/* Generated by Cython 0.24 */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
    #error Cython requires Python 2.6+ or Python 3.2+.
#else
#define CYTHON_ABI "0_24"
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
#endif
#if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000
  #define CYTHON_USE_PYLONG_INTERNALS 1
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
  #undef SHIFT
  #undef BASE
  #undef MASK
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#else
  #define CYTHON_PEP393_ENABLED 0
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #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(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#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
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !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
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if PY_VERSION_HEX >= 0x030500B1
#define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
#define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
#elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
typedef struct {
    unaryfunc am_await;
    unaryfunc am_aiter;
    unaryfunc am_anext;
} __Pyx_PyAsyncMethodsStruct;
#define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
#else
#define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)

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

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


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

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

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

#define __PYX_HAVE__libzfs
#define __PYX_HAVE_API__libzfs
#include "nvpair.h"
#include "sys/types.h"
#include "sys/param.h"
#include "sys/mount.h"
#include "sys/fs/zfs.h"
#include "sys/zfs_ioctl.h"
#include "zfeature_common.h"
#include "sys/vdev_impl.h"
#include "libzfs_core.h"
#include "libzfs.h"
#include "errno.h"
#include "stdint.h"
#include "string.h"
#include "stdlib.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#endif

#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
typedef struct {PyObject **p; 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 1
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
#define __PYX_DEFAULT_STRING_ENCODING "ascii"
#define __Pyx_PyObject_FromString __Pyx_PyUnicode_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER) && defined (_M_X64)
    #define __Pyx_sst_abs(value) _abs64(value)
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#if PY_MAJOR_VERSION < 3
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
{
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#else
#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
#endif
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
#if CYTHON_COMPILING_IN_CPYTHON
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#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));
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


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

static PyObject *__pyx_m;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static 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[] = {
  "converter.pxi",
  "libzfs.pyx",
  "nvpair.pxi",
};

/*--- Type declarations ---*/
struct __pyx_obj_6libzfs_NVList;
struct __pyx_obj_6libzfs_ZFS;
struct __pyx_obj_6libzfs_ZPoolProperty;
struct __pyx_obj_6libzfs_ZPoolFeature;
struct __pyx_obj_6libzfs_ZFSProperty;
struct __pyx_obj_6libzfs_ZFSUserProperty;
struct __pyx_obj_6libzfs_ZFSVdevStats;
struct __pyx_obj_6libzfs_ZFSVdev;
struct __pyx_obj_6libzfs_ZPoolScrub;
struct __pyx_obj_6libzfs_ZFSPool;
struct __pyx_obj_6libzfs_ZFSImportablePool;
struct __pyx_obj_6libzfs_ZFSPropertyDict;
struct __pyx_obj_6libzfs_ZFSObject;
struct __pyx_obj_6libzfs_ZFSDataset;
struct __pyx_obj_6libzfs_ZFSSnapshot;
struct __pyx_obj_6libzfs_ZFSBookmark;
struct __pyx_obj_6libzfs___pyx_scope_struct____iter__;
struct __pyx_obj_6libzfs___pyx_scope_struct_1_items;
struct __pyx_obj_6libzfs___pyx_scope_struct_2___get__;
struct __pyx_obj_6libzfs___pyx_scope_struct_3___get__;
struct __pyx_obj_6libzfs___pyx_scope_struct_4___get__;
struct __pyx_obj_6libzfs___pyx_scope_struct_5_find_import;
struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history;
struct __pyx_obj_6libzfs___pyx_scope_struct_7___get__;
struct __pyx_obj_6libzfs___pyx_scope_struct_8___get__;
struct __pyx_obj_6libzfs___pyx_scope_struct_9___get__;
struct __pyx_obj_6libzfs___pyx_scope_struct_10___get__;
struct __pyx_obj_6libzfs___pyx_scope_struct_11___get__;
struct __pyx_obj_6libzfs___pyx_scope_struct_12___get__;
struct __pyx_obj_6libzfs___pyx_scope_struct_13_vdev_by_guid;
struct __pyx_obj_6libzfs___pyx_scope_struct_14___iter__;
struct __pyx_obj_6libzfs___pyx_scope_struct_15___get__;
struct __pyx_obj_6libzfs___pyx_scope_struct_16___get__;
struct __pyx_obj_6libzfs___pyx_scope_struct_17___get__;
struct __pyx_obj_6libzfs___pyx_scope_struct_18___get__;
struct __pyx_obj_6libzfs___pyx_scope_struct_19___get__;
struct __pyx_obj_6libzfs___pyx_scope_struct_20___get__;
struct __pyx_obj_6libzfs___pyx_scope_struct_21_diff;
struct __pyx_opt_args_6libzfs_6NVList___get_value;

/* "libzfs.pyx":268
 * 
 * IF FREEBSD_VERSION >= 1003509:
 *     cdef enum:             # <<<<<<<<<<<<<<
 *         MAX_DATASET_NAME_LEN = zfs.ZFS_MAX_DATASET_NAME_LEN
 * ELSE:
 */
enum  {

  /* "libzfs.pyx":269
 * IF FREEBSD_VERSION >= 1003509:
 *     cdef enum:
 *         MAX_DATASET_NAME_LEN = zfs.ZFS_MAX_DATASET_NAME_LEN             # <<<<<<<<<<<<<<
 * ELSE:
 *     cdef enum:
 */
  __pyx_e_6libzfs_MAX_DATASET_NAME_LEN = ZFS_MAX_DATASET_NAME_LEN
};

/* "nvpair.pxi":71
 *         return pair
 * 
 *     cdef object __get_value(self, nvpair.nvpair_t* pair, wrap_dict=True):             # <<<<<<<<<<<<<<
 *         cdef nvpair.nvlist_t *nested
 *         cdef char *cstr
 */
struct __pyx_opt_args_6libzfs_6NVList___get_value {
  int __pyx_n;
  PyObject *wrap_dict;
};

/* "nvpair.pxi":38
 * 
 * @cython.internal
 * cdef class NVList(object):             # <<<<<<<<<<<<<<
 *     cdef nvpair.nvlist_t* handle
 *     cdef int foreign
 */
struct __pyx_obj_6libzfs_NVList {
  PyObject_HEAD
  struct __pyx_vtabstruct_6libzfs_NVList *__pyx_vtab;
  nvlist_t *handle;
  int foreign;
};


/* "libzfs.pyx":316
 * 
 * 
 * cdef class ZFS(object):             # <<<<<<<<<<<<<<
 *     cdef libzfs.libzfs_handle_t* handle
 *     cdef int history
 */
struct __pyx_obj_6libzfs_ZFS {
  PyObject_HEAD
  struct __pyx_vtabstruct_6libzfs_ZFS *__pyx_vtab;
  libzfs_handle_t *handle;
  int history;
  char *history_prefix;
};


/* "libzfs.pyx":799
 * 
 * 
 * cdef class ZPoolProperty(object):             # <<<<<<<<<<<<<<
 *     cdef int propid
 *     cdef readonly ZFSPool pool
 */
struct __pyx_obj_6libzfs_ZPoolProperty {
  PyObject_HEAD
  int propid;
  struct __pyx_obj_6libzfs_ZFSPool *pool;
};


/* "libzfs.pyx":890
 * 
 * 
 * cdef class ZPoolFeature(object):             # <<<<<<<<<<<<<<
 *     cdef readonly ZFSPool pool
 *     cdef NVList nvlist
 */
struct __pyx_obj_6libzfs_ZPoolFeature {
  PyObject_HEAD
  struct __pyx_obj_6libzfs_ZFSPool *pool;
  struct __pyx_obj_6libzfs_NVList *nvlist;
  zfeature_info_t *feature;
};


/* "libzfs.pyx":942
 * 
 * 
 * cdef class ZFSProperty(object):             # <<<<<<<<<<<<<<
 *     cdef readonly ZFSObject dataset
 *     cdef int propid
 */
struct __pyx_obj_6libzfs_ZFSProperty {
  PyObject_HEAD
  struct __pyx_obj_6libzfs_ZFSObject *dataset;
  int propid;
  char const *cname;
  char cvalue[(ZFS_MAXPROPLEN + 1)];
  char crawvalue[(ZFS_MAXPROPLEN + 1)];
  char csrcstr[(__pyx_e_6libzfs_MAX_DATASET_NAME_LEN + 1)];
  zprop_source_t csource;
};


/* "libzfs.pyx":1044
 * 
 * 
 * cdef class ZFSUserProperty(ZFSProperty):             # <<<<<<<<<<<<<<
 *     cdef dict values
 *     cdef readonly name
 */
struct __pyx_obj_6libzfs_ZFSUserProperty {
  struct __pyx_obj_6libzfs_ZFSProperty __pyx_base;
  PyObject *values;
  PyObject *name;
};


/* "libzfs.pyx":1096
 * 
 * 
 * cdef class ZFSVdevStats(object):             # <<<<<<<<<<<<<<
 *     cdef readonly ZFSVdev vdev
 *     cdef NVList nvlist
 */
struct __pyx_obj_6libzfs_ZFSVdevStats {
  PyObject_HEAD
  struct __pyx_obj_6libzfs_ZFSVdev *vdev;
  struct __pyx_obj_6libzfs_NVList *nvlist;
};


/* "libzfs.pyx":1165
 * 
 * 
 * cdef class ZFSVdev(object):             # <<<<<<<<<<<<<<
 *     cdef readonly ZFSPool zpool
 *     cdef readonly ZFS root
 */
struct __pyx_obj_6libzfs_ZFSVdev {
  PyObject_HEAD
  struct __pyx_obj_6libzfs_ZFSPool *zpool;
  struct __pyx_obj_6libzfs_ZFS *root;
  struct __pyx_obj_6libzfs_ZFSVdev *parent;
  PyObject *group;
  struct __pyx_obj_6libzfs_NVList *nvlist;
};


/* "libzfs.pyx":1395
 * 
 * 
 * cdef class ZPoolScrub(object):             # <<<<<<<<<<<<<<
 *     cdef readonly ZFS root
 *     cdef readonly ZFSPool pool
 */
struct __pyx_obj_6libzfs_ZPoolScrub {
  PyObject_HEAD
  struct __pyx_obj_6libzfs_ZFS *root;
  struct __pyx_obj_6libzfs_ZFSPool *pool;
  PyObject *stat;
};


/* "libzfs.pyx":1479
 * 
 * 
 * cdef class ZFSPool(object):             # <<<<<<<<<<<<<<
 *     cdef libzfs.zpool_handle_t* handle
 *     cdef bint free
 */
struct __pyx_obj_6libzfs_ZFSPool {
  PyObject_HEAD
  struct __pyx_vtabstruct_6libzfs_ZFSPool *__pyx_vtab;
  zpool_handle_t *handle;
  int free;
  struct __pyx_obj_6libzfs_ZFS *root;
};


/* "libzfs.pyx":1845
 * 
 * 
 * cdef class ZFSImportablePool(ZFSPool):             # <<<<<<<<<<<<<<
 *     cdef NVList nvlist
 *     cdef public object name
 */
struct __pyx_obj_6libzfs_ZFSImportablePool {
  struct __pyx_obj_6libzfs_ZFSPool __pyx_base;
  struct __pyx_obj_6libzfs_NVList *nvlist;
  PyObject *name;
};


/* "libzfs.pyx":1888
 * 
 * 
 * cdef class ZFSPropertyDict(dict):             # <<<<<<<<<<<<<<
 *     cdef ZFSObject parent
 *     cdef object props
 */
struct __pyx_obj_6libzfs_ZFSPropertyDict {
  PyDictObject __pyx_base;
  struct __pyx_vtabstruct_6libzfs_ZFSPropertyDict *__pyx_vtab;
  struct __pyx_obj_6libzfs_ZFSObject *parent;
  PyObject *props;
};


/* "libzfs.pyx":2006
 * 
 * 
 * cdef class ZFSObject(object):             # <<<<<<<<<<<<<<
 *     cdef libzfs.zfs_handle_t* handle
 *     cdef readonly ZFS root
 */
struct __pyx_obj_6libzfs_ZFSObject {
  PyObject_HEAD
  zfs_handle_t *handle;
  struct __pyx_obj_6libzfs_ZFS *root;
  struct __pyx_obj_6libzfs_ZFSPool *pool;
};


/* "libzfs.pyx":2099
 * 
 * 
 * cdef class ZFSDataset(ZFSObject):             # <<<<<<<<<<<<<<
 *     def __getstate__(self, recursive=True):
 *         ret = super(ZFSDataset, self).__getstate__()
 */
struct __pyx_obj_6libzfs_ZFSDataset {
  struct __pyx_obj_6libzfs_ZFSObject __pyx_base;
  struct __pyx_vtabstruct_6libzfs_ZFSDataset *__pyx_vtab;
};


/* "libzfs.pyx":2414
 * 
 * 
 * cdef class ZFSSnapshot(ZFSObject):             # <<<<<<<<<<<<<<
 *     def __getstate__(self):
 *         ret = super(ZFSSnapshot, self).__getstate__()
 */
struct __pyx_obj_6libzfs_ZFSSnapshot {
  struct __pyx_obj_6libzfs_ZFSObject __pyx_base;
};


/* "libzfs.pyx":2549
 * 
 * 
 * cdef class ZFSBookmark(ZFSObject):             # <<<<<<<<<<<<<<
 *     def __getstate__(self):
 *         ret = super(ZFSBookmark, self).__getstate__()
 */
struct __pyx_obj_6libzfs_ZFSBookmark {
  struct __pyx_obj_6libzfs_ZFSObject __pyx_base;
};


/* "nvpair.pxi":181
 *         nvpair.nvlist_remove(self.handle, key, self.type(key))
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef nvpair.nvpair_t *pair = NULL
 *         while True:
 */
struct __pyx_obj_6libzfs___pyx_scope_struct____iter__ {
  PyObject_HEAD
  nvpair_t *__pyx_v_pair;
  struct __pyx_obj_6libzfs_NVList *__pyx_v_self;
};


/* "nvpair.pxi":418
 *         return [v for k, v in self.items()]
 * 
 *     def items(self, raw=False):             # <<<<<<<<<<<<<<
 *         cdef nvpair.nvpair_t *pair = NULL
 *         while True:
 */
struct __pyx_obj_6libzfs___pyx_scope_struct_1_items {
  PyObject_HEAD
  nvpair_t *__pyx_v_pair;
  PyObject *__pyx_v_raw;
  struct __pyx_obj_6libzfs_NVList *__pyx_v_self;
};


/* "libzfs.pyx":379
 * 
 *     property pools:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSPool pool
 *             pools = []
 */
struct __pyx_obj_6libzfs___pyx_scope_struct_2___get__ {
  PyObject_HEAD
  PyObject *__pyx_v_h;
  struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_pool;
  PyObject *__pyx_v_pools;
  struct __pyx_obj_6libzfs_ZFS *__pyx_v_self;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
};


/* "libzfs.pyx":396
 * 
 *     property datasets:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             for p in self.pools:
 *                 try:
 */
struct __pyx_obj_6libzfs___pyx_scope_struct_3___get__ {
  PyObject_HEAD
  PyObject *__pyx_v_c;
  PyObject *__pyx_v_p;
  struct __pyx_obj_6libzfs_ZFS *__pyx_v_self;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
  PyObject *__pyx_t_3;
  PyObject *__pyx_t_4;
  PyObject *__pyx_t_5;
  PyObject *__pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
};


/* "libzfs.pyx":406
 * 
 *     property snapshots:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             for p in self.pools:
 *                 try:
 */
struct __pyx_obj_6libzfs___pyx_scope_struct_4___get__ {
  PyObject_HEAD
  PyObject *__pyx_v_c;
  PyObject *__pyx_v_p;
  struct __pyx_obj_6libzfs_ZFS *__pyx_v_self;
  PyObject *__pyx_t_0;
  PyObject *__pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4;
  PyObject *__pyx_t_5;
  PyObject *__pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
};


/* "libzfs.pyx":430
 *         return pool
 * 
 *     def find_import(self, cachefile=None, name=None, destroyed=False, search_paths=None):             # <<<<<<<<<<<<<<
 *         cdef ZFSImportablePool pool
 *         cdef libzfs.importargs_t iargs
 */
struct __pyx_obj_6libzfs___pyx_scope_struct_5_find_import {
  PyObject_HEAD
  char *__pyx_v_c_name;
  PyObject *__pyx_v_cachefile;
  PyObject *__pyx_v_config;
  PyObject *__pyx_v_destroyed;
  PyObject *__pyx_v_encoded;
  PyObject *__pyx_v_i;
  importargs_t __pyx_v_iargs;
  PyObject *__pyx_v_name;
  struct __pyx_obj_6libzfs_NVList *__pyx_v_nv;
  PyObject *__pyx_v_p;
  char *__pyx_v_paths;
  struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_pool;
  nvlist_t *__pyx_v_result;
  PyObject *__pyx_v_search_paths;
  struct __pyx_obj_6libzfs_ZFS *__pyx_v_self;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "libzfs.pyx":683
 *             raise self.get_error()
 * 
 *     def write_history(self, *args):             # <<<<<<<<<<<<<<
 *         cdef const char *c_message
 * 
 */
struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history {
  PyObject_HEAD
  PyObject *__pyx_v_arg;
  PyObject *__pyx_v_eval_arg;
  PyObject *__pyx_v_eval_dict;
  PyObject *__pyx_v_eval_list;
  PyObject *__pyx_v_eval_str;
  PyObject *__pyx_v_eval_tuple;
  PyObject *__pyx_v_eval_zfsvdev;
};


/* "libzfs.pyx":1363
 * 
 *     property children:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSVdev vdev
 * 
 */
struct __pyx_obj_6libzfs___pyx_scope_struct_7___get__ {
  PyObject_HEAD
  PyObject *__pyx_v_i;
  struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self;
  struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_vdev;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "libzfs.pyx":1569
 * 
 *     property data_vdevs:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSVdev vdev
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')
 */
struct __pyx_obj_6libzfs___pyx_scope_struct_8___get__ {
  PyObject_HEAD
  PyObject *__pyx_v_child;
  struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self;
  struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_vdev;
  struct __pyx_obj_6libzfs_NVList *__pyx_v_vdev_tree;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "libzfs.pyx":1586
 * 
 *     property log_vdevs:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSVdev vdev
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')
 */
struct __pyx_obj_6libzfs___pyx_scope_struct_9___get__ {
  PyObject_HEAD
  PyObject *__pyx_v_child;
  struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self;
  struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_vdev;
  struct __pyx_obj_6libzfs_NVList *__pyx_v_vdev_tree;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "libzfs.pyx":1603
 * 
 *     property cache_vdevs:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSVdev vdev
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')
 */
struct __pyx_obj_6libzfs___pyx_scope_struct_10___get__ {
  PyObject_HEAD
  PyObject *__pyx_v_child;
  struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self;
  struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_vdev;
  struct __pyx_obj_6libzfs_NVList *__pyx_v_vdev_tree;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "libzfs.pyx":1619
 * 
 *     property spare_vdevs:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSVdev vdev
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')
 */
struct __pyx_obj_6libzfs___pyx_scope_struct_11___get__ {
  PyObject_HEAD
  PyObject *__pyx_v_child;
  struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self;
  struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_vdev;
  struct __pyx_obj_6libzfs_NVList *__pyx_v_vdev_tree;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "libzfs.pyx":1690
 * 
 *     property features:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZPoolFeature f
 *             cdef NVList features_nv
 */
struct __pyx_obj_6libzfs___pyx_scope_struct_12___get__ {
  PyObject_HEAD
  struct __pyx_obj_6libzfs_ZPoolFeature *__pyx_v_f;
  zfeature_info_t *__pyx_v_feat;
  struct __pyx_obj_6libzfs_NVList *__pyx_v_features_nv;
  long __pyx_v_i;
  uintptr_t __pyx_v_nvl;
  struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self;
  spa_feature_t __pyx_t_0;
  long __pyx_t_1;
};


/* "libzfs.pyx":1766
 *         self.root.write_history(command, self.name, self.root.history_vdevs_list(vdevs_tree))
 * 
 *     def vdev_by_guid(self, guid):             # <<<<<<<<<<<<<<
 *         def search_vdev(vdev, g):
 *             if vdev.guid == g:
 */
struct __pyx_obj_6libzfs___pyx_scope_struct_13_vdev_by_guid {
  PyObject_HEAD
  PyObject *__pyx_v_search_vdev;
};


/* "libzfs.pyx":1971
 *         self.parent.root.write_history('zfs set', (str(key), str(userprop.value)), self.parent.name)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         for i in self.props:
 *             yield  i
 */
struct __pyx_obj_6libzfs___pyx_scope_struct_14___iter__ {
  PyObject_HEAD
  PyObject *__pyx_v_i;
  struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "libzfs.pyx":2134
 * 
 *     property children:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSDataset dataset
 * 
 */
struct __pyx_obj_6libzfs___pyx_scope_struct_15___get__ {
  PyObject_HEAD
  struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_dataset;
  PyObject *__pyx_v_datasets;
  PyObject *__pyx_v_h;
  struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
};


/* "libzfs.pyx":2149
 * 
 *     property children_recursive:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             for c in self.children:
 *                 yield c
 */
struct __pyx_obj_6libzfs___pyx_scope_struct_16___get__ {
  PyObject_HEAD
  PyObject *__pyx_v_c;
  PyObject *__pyx_v_i;
  struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
  PyObject *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
};


/* "libzfs.pyx":2156
 * 
 *     property snapshots:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSSnapshot snapshot
 * 
 */
struct __pyx_obj_6libzfs___pyx_scope_struct_17___get__ {
  PyObject_HEAD
  PyObject *__pyx_v_h;
  struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self;
  struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_snapshot;
  PyObject *__pyx_v_snapshots;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
};


/* "libzfs.pyx":2174
 * 
 *     property bookmarks:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSBookmark bookmark
 * 
 */
struct __pyx_obj_6libzfs___pyx_scope_struct_18___get__ {
  PyObject_HEAD
  PyObject *__pyx_v_b;
  struct __pyx_obj_6libzfs_ZFSBookmark *__pyx_v_bookmark;
  PyObject *__pyx_v_bookmarks;
  struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
};


/* "libzfs.pyx":2190
 * 
 *     property snapshots_recursive:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             for s in self.snapshots:
 *                 yield s
 */
struct __pyx_obj_6libzfs___pyx_scope_struct_19___get__ {
  PyObject_HEAD
  PyObject *__pyx_v_c;
  PyObject *__pyx_v_i;
  PyObject *__pyx_v_s;
  struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
  PyObject *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
};


/* "libzfs.pyx":2202
 * 
 *     property dependents:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSDataset dataset
 *             cdef ZFSSnapshot snapshot
 */
struct __pyx_obj_6libzfs___pyx_scope_struct_20___get__ {
  PyObject_HEAD
  struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_dataset;
  PyObject *__pyx_v_dependents;
  PyObject *__pyx_v_h;
  struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self;
  struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_snapshot;
  zfs_type_t __pyx_v_type;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
};


/* "libzfs.pyx":2384
 *         )
 * 
 *     def diff(self, fromsnap, tosnap):             # <<<<<<<<<<<<<<
 *         cdef char *c_fromsnap = fromsnap
 *         cdef char *c_tosnap = tosnap
 */
struct __pyx_obj_6libzfs___pyx_scope_struct_21_diff {
  PyObject_HEAD
  int __pyx_v_c_flags;
  char *__pyx_v_c_fromsnap;
  char *__pyx_v_c_tosnap;
  PyObject *__pyx_v_f;
  PyObject *__pyx_v_fromsnap;
  PyObject *__pyx_v_line;
  PyObject *__pyx_v_ret;
  PyObject *__pyx_v_rfd;
  struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self;
  PyObject *__pyx_v_thr;
  PyObject *__pyx_v_tosnap;
  PyObject *__pyx_v_wfd;
  PyObject *__pyx_v_worker;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2;
  PyObject *__pyx_t_3;
  PyObject *__pyx_t_4;
  PyObject *__pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
};



/* "nvpair.pxi":38
 * 
 * @cython.internal
 * cdef class NVList(object):             # <<<<<<<<<<<<<<
 *     cdef nvpair.nvlist_t* handle
 *     cdef int foreign
 */

struct __pyx_vtabstruct_6libzfs_NVList {
  PyObject *(*get_raw)(struct __pyx_obj_6libzfs_NVList *, PyObject *);
  nvpair_t *(*__pyx___get_pair)(struct __pyx_obj_6libzfs_NVList *, PyObject *);
  PyObject *(*__pyx___get_value)(struct __pyx_obj_6libzfs_NVList *, nvpair_t *, struct __pyx_opt_args_6libzfs_6NVList___get_value *__pyx_optional_args);
};
static struct __pyx_vtabstruct_6libzfs_NVList *__pyx_vtabptr_6libzfs_NVList;


/* "libzfs.pyx":316
 * 
 * 
 * cdef class ZFS(object):             # <<<<<<<<<<<<<<
 *     cdef libzfs.libzfs_handle_t* handle
 *     cdef int history
 */

struct __pyx_vtabstruct_6libzfs_ZFS {
  int (*__pyx___iterate_pools)(zpool_handle_t *, void *);
  PyObject *(*get_error)(struct __pyx_obj_6libzfs_ZFS *);
  struct __pyx_obj_6libzfs_ZFSVdev *(*make_vdev_tree)(struct __pyx_obj_6libzfs_ZFS *, PyObject *);
};
static struct __pyx_vtabstruct_6libzfs_ZFS *__pyx_vtabptr_6libzfs_ZFS;


/* "libzfs.pyx":1479
 * 
 * 
 * cdef class ZFSPool(object):             # <<<<<<<<<<<<<<
 *     cdef libzfs.zpool_handle_t* handle
 *     cdef bint free
 */

struct __pyx_vtabstruct_6libzfs_ZFSPool {
  int (*__pyx___iterate_props)(int, void *);
  struct __pyx_obj_6libzfs_NVList *(*get_raw_config)(struct __pyx_obj_6libzfs_ZFSPool *);
};
static struct __pyx_vtabstruct_6libzfs_ZFSPool *__pyx_vtabptr_6libzfs_ZFSPool;


/* "libzfs.pyx":1845
 * 
 * 
 * cdef class ZFSImportablePool(ZFSPool):             # <<<<<<<<<<<<<<
 *     cdef NVList nvlist
 *     cdef public object name
 */

struct __pyx_vtabstruct_6libzfs_ZFSImportablePool {
  struct __pyx_vtabstruct_6libzfs_ZFSPool __pyx_base;
};
static struct __pyx_vtabstruct_6libzfs_ZFSImportablePool *__pyx_vtabptr_6libzfs_ZFSImportablePool;


/* "libzfs.pyx":1888
 * 
 * 
 * cdef class ZFSPropertyDict(dict):             # <<<<<<<<<<<<<<
 *     cdef ZFSObject parent
 *     cdef object props
 */

struct __pyx_vtabstruct_6libzfs_ZFSPropertyDict {
  int (*__pyx___iterate_props)(int, void *);
};
static struct __pyx_vtabstruct_6libzfs_ZFSPropertyDict *__pyx_vtabptr_6libzfs_ZFSPropertyDict;


/* "libzfs.pyx":2099
 * 
 * 
 * cdef class ZFSDataset(ZFSObject):             # <<<<<<<<<<<<<<
 *     def __getstate__(self, recursive=True):
 *         ret = super(ZFSDataset, self).__getstate__()
 */

struct __pyx_vtabstruct_6libzfs_ZFSDataset {
  int (*__pyx___iterate_children)(zfs_handle_t *, void *);
  int (*__pyx___iterate_snapshots)(zfs_handle_t *, void *);
  int (*__pyx___iterate_bookmarks)(zfs_handle_t *, void *);
  int (*__pyx___iterate_dependents)(zfs_handle_t *, void *);
};
static struct __pyx_vtabstruct_6libzfs_ZFSDataset *__pyx_vtabptr_6libzfs_ZFSDataset;

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

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

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

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

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

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

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

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

/* PyThreadStateGet.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = PyThreadState_GET();
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#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);
#else
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(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

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

/* unicode_iter.proto */
static CYTHON_INLINE int __Pyx_init_unicode_iteration(
    PyObject* ustring, Py_ssize_t *length, void** data, int *kind);

/* ListCompAppend.proto */
#if CYTHON_COMPILING_IN_CPYTHON
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);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#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));
}

/* GetModuleGlobalName.proto */
static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);

/* PyIntBinop.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#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 CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

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

/* SaveResetException.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#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

/* PyErrExceptionMatches.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#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

/* GetException.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#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

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

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

/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

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

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

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

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

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

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

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

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

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

/* CythonFunction.proto */
#define __Pyx_CyFunction_USED 1
#include <structmember.h>
#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;
    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_NewEx(ml, flags, qualname, self, module, globals, code)\
    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
static PyObject *__Pyx_CyFunction_New(PyTypeObject *, 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);

/* PyIntBinop.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\
    PyObject_RichCompare(op1, op2, Py_EQ)
    #endif

/* ListExtend.proto */
static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject* none = _PyList_Extend((PyListObject*)L, v);
    if (unlikely(!none))
        return -1;
    Py_DECREF(none);
    return 0;
#else
    return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
#endif
}

/* dict_getitem_default.proto */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_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);

/* IterNext.proto */
#define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL)
static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *);

/* StringJoin.proto */
#if PY_MAJOR_VERSION < 3
#define __Pyx_PyString_Join __Pyx_PyBytes_Join
#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
#else
#define __Pyx_PyString_Join PyUnicode_Join
#define __Pyx_PyBaseString_Join PyUnicode_Join
#endif
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION < 3
    #define __Pyx_PyBytes_Join _PyString_Join
    #else
    #define __Pyx_PyBytes_Join _PyBytes_Join
    #endif
#else
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
#endif

/* PyObjectLookupSpecial.proto */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) {
    PyObject *res;
    PyTypeObject *tp = Py_TYPE(obj);
#if PY_MAJOR_VERSION < 3
    if (unlikely(PyInstance_Check(obj)))
        return __Pyx_PyObject_GetAttrStr(obj, attr_name);
#endif
    res = _PyType_Lookup(tp, attr_name);
    if (likely(res)) {
        descrgetfunc f = Py_TYPE(res)->tp_descr_get;
        if (!f) {
            Py_INCREF(res);
        } else {
            res = f(res, obj, (PyObject *)tp);
        }
    } else {
        PyErr_SetObject(PyExc_AttributeError, attr_name);
    }
    return res;
}
#else
#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
#endif

/* None.proto */
static CYTHON_INLINE long __Pyx_div_long(long, long);

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

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

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

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

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

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_zfs_type_t(zfs_type_t value);

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_zprop_source_t(zprop_source_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_vdev_state_t(vdev_state_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_vdev_aux_t(vdev_aux_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_pool_state_t(pool_state_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_pool_scan_func_t(pool_scan_func_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_zpool_status_t(zpool_status_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dsl_scan_state_t(dsl_scan_state_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_zio_type_t(zio_type_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__lzc_send_flags(enum lzc_send_flags value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value);

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int16_t(int16_t value);

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value);

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_data_type_t(data_type_t value);

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_spa_feature_t(spa_feature_t value);

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

/* CIntFromPy.proto */
static CYTHON_INLINE data_type_t __Pyx_PyInt_As_data_type_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE boolean_t __Pyx_PyInt_As_boolean_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE uint8_t __Pyx_PyInt_As_uint8_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE int8_t __Pyx_PyInt_As_int8_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE uint16_t __Pyx_PyInt_As_uint16_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE int16_t __Pyx_PyInt_As_int16_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(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 vdev_aux_t __Pyx_PyInt_As_vdev_aux_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE vdev_state_t __Pyx_PyInt_As_vdev_state_t(PyObject *);

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

/* CIntFromPy.proto */
static CYTHON_INLINE zfs_type_t __Pyx_PyInt_As_zfs_type_t(PyObject *);

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

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

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

/* 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, closure, name, qualname)\
    __Pyx__Coroutine_New(__pyx_GeneratorType, body, closure, name, qualname)
static PyObject *__Pyx_Generator_Next(PyObject *self);
static int __pyx_Generator_init(void);

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

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

static PyObject *__pyx_f_6libzfs_6NVList_get_raw(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, PyObject *__pyx_v_key); /* proto*/
static nvpair_t *__pyx_f_6libzfs_6NVList___get_pair(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, PyObject *__pyx_v_key); /* proto*/
static PyObject *__pyx_f_6libzfs_6NVList___get_value(CYTHON_UNUSED struct __pyx_obj_6libzfs_NVList *__pyx_v_self, nvpair_t *__pyx_v_pair, struct __pyx_opt_args_6libzfs_6NVList___get_value *__pyx_optional_args); /* proto*/
static int __pyx_f_6libzfs_3ZFS___iterate_pools(zpool_handle_t *__pyx_v_handle, void *__pyx_v_arg); /* proto*/
static PyObject *__pyx_f_6libzfs_3ZFS_get_error(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self); /* proto*/
static struct __pyx_obj_6libzfs_ZFSVdev *__pyx_f_6libzfs_3ZFS_make_vdev_tree(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_topology); /* proto*/
static int __pyx_f_6libzfs_7ZFSPool___iterate_props(int __pyx_v_proptype, void *__pyx_v_arg); /* proto*/
static struct __pyx_obj_6libzfs_NVList *__pyx_f_6libzfs_7ZFSPool_get_raw_config(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto*/
static struct __pyx_obj_6libzfs_NVList *__pyx_f_6libzfs_17ZFSImportablePool_get_raw_config(struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_self); /* proto*/
static int __pyx_f_6libzfs_15ZFSPropertyDict___iterate_props(int __pyx_v_proptype, void *__pyx_v_arg); /* proto*/
static int __pyx_f_6libzfs_10ZFSDataset___iterate_children(zfs_handle_t *__pyx_v_handle, void *__pyx_v_arg); /* proto*/
static int __pyx_f_6libzfs_10ZFSDataset___iterate_snapshots(zfs_handle_t *__pyx_v_handle, void *__pyx_v_arg); /* proto*/
static int __pyx_f_6libzfs_10ZFSDataset___iterate_bookmarks(zfs_handle_t *__pyx_v_handle, void *__pyx_v_arg); /* proto*/
static int __pyx_f_6libzfs_10ZFSDataset___iterate_dependents(zfs_handle_t *__pyx_v_handle, void *__pyx_v_arg); /* proto*/

/* Module declarations from 'nvpair' */

/* Module declarations from 'types' */

/* Module declarations from 'zfs' */

/* Module declarations from 'cython' */

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

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

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

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

/* Module declarations from 'libzfs' */
static PyTypeObject *__pyx_ptype_6libzfs_NVList = 0;
static PyTypeObject *__pyx_ptype_6libzfs_ZFS = 0;
static PyTypeObject *__pyx_ptype_6libzfs_ZPoolProperty = 0;
static PyTypeObject *__pyx_ptype_6libzfs_ZPoolFeature = 0;
static PyTypeObject *__pyx_ptype_6libzfs_ZFSProperty = 0;
static PyTypeObject *__pyx_ptype_6libzfs_ZFSUserProperty = 0;
static PyTypeObject *__pyx_ptype_6libzfs_ZFSVdevStats = 0;
static PyTypeObject *__pyx_ptype_6libzfs_ZFSVdev = 0;
static PyTypeObject *__pyx_ptype_6libzfs_ZPoolScrub = 0;
static PyTypeObject *__pyx_ptype_6libzfs_ZFSPool = 0;
static PyTypeObject *__pyx_ptype_6libzfs_ZFSImportablePool = 0;
static PyTypeObject *__pyx_ptype_6libzfs_ZFSPropertyDict = 0;
static PyTypeObject *__pyx_ptype_6libzfs_ZFSObject = 0;
static PyTypeObject *__pyx_ptype_6libzfs_ZFSDataset = 0;
static PyTypeObject *__pyx_ptype_6libzfs_ZFSSnapshot = 0;
static PyTypeObject *__pyx_ptype_6libzfs_ZFSBookmark = 0;
static PyTypeObject *__pyx_ptype_6libzfs___pyx_scope_struct____iter__ = 0;
static PyTypeObject *__pyx_ptype_6libzfs___pyx_scope_struct_1_items = 0;
static PyTypeObject *__pyx_ptype_6libzfs___pyx_scope_struct_2___get__ = 0;
static PyTypeObject *__pyx_ptype_6libzfs___pyx_scope_struct_3___get__ = 0;
static PyTypeObject *__pyx_ptype_6libzfs___pyx_scope_struct_4___get__ = 0;
static PyTypeObject *__pyx_ptype_6libzfs___pyx_scope_struct_5_find_import = 0;
static PyTypeObject *__pyx_ptype_6libzfs___pyx_scope_struct_6_write_history = 0;
static PyTypeObject *__pyx_ptype_6libzfs___pyx_scope_struct_7___get__ = 0;
static PyTypeObject *__pyx_ptype_6libzfs___pyx_scope_struct_8___get__ = 0;
static PyTypeObject *__pyx_ptype_6libzfs___pyx_scope_struct_9___get__ = 0;
static PyTypeObject *__pyx_ptype_6libzfs___pyx_scope_struct_10___get__ = 0;
static PyTypeObject *__pyx_ptype_6libzfs___pyx_scope_struct_11___get__ = 0;
static PyTypeObject *__pyx_ptype_6libzfs___pyx_scope_struct_12___get__ = 0;
static PyTypeObject *__pyx_ptype_6libzfs___pyx_scope_struct_13_vdev_by_guid = 0;
static PyTypeObject *__pyx_ptype_6libzfs___pyx_scope_struct_14___iter__ = 0;
static PyTypeObject *__pyx_ptype_6libzfs___pyx_scope_struct_15___get__ = 0;
static PyTypeObject *__pyx_ptype_6libzfs___pyx_scope_struct_16___get__ = 0;
static PyTypeObject *__pyx_ptype_6libzfs___pyx_scope_struct_17___get__ = 0;
static PyTypeObject *__pyx_ptype_6libzfs___pyx_scope_struct_18___get__ = 0;
static PyTypeObject *__pyx_ptype_6libzfs___pyx_scope_struct_19___get__ = 0;
static PyTypeObject *__pyx_ptype_6libzfs___pyx_scope_struct_20___get__ = 0;
static PyTypeObject *__pyx_ptype_6libzfs___pyx_scope_struct_21_diff = 0;
static PyObject *__pyx_f_6libzfs_convert_sendflags(PyObject *, sendflags_t *); /*proto*/
#define __Pyx_MODULE_NAME "libzfs"
int __pyx_module_is_main_libzfs = 0;

/* Implementation of 'libzfs' */
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_NotImplementedError;
static PyObject *__pyx_builtin_OSError;
static const char __pyx_k_0[] = "0";
static const char __pyx_k_B[] = "B";
static const char __pyx_k_C[] = "C";
static const char __pyx_k_E[] = "E";
static const char __pyx_k_F[] = "F";
static const char __pyx_k_M[] = "M";
static const char __pyx_k_O[] = "-O";
static const char __pyx_k_R[] = "R";
static const char __pyx_k_d[] = "d";
static const char __pyx_k_e[] = "-e";
static const char __pyx_k_f[] = "-f";
static const char __pyx_k_g[] = "g";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_k[] = "k";
static const char __pyx_k_l[] = "l";
static const char __pyx_k_o[] = "-o";
static const char __pyx_k_r[] = "-r";
static const char __pyx_k_t[] = "-t";
static const char __pyx_k_u[] = "-u";
static const char __pyx_k_IO[] = "IO";
static const char __pyx_k_OK[] = "OK";
static const char __pyx_k__3[] = "-";
static const char __pyx_k__9[] = "->";
static const char __pyx_k_fd[] = "fd";
static const char __pyx_k_id[] = "id";
static const char __pyx_k_no[] = "no";
static const char __pyx_k_on[] = "on";
static const char __pyx_k_os[] = "os";
static const char __pyx_k_st[] = "st";
static const char __pyx_k_0_1[] = "'{0}': {1}";
static const char __pyx_k_ADD[] = "ADD";
static const char __pyx_k__11[] = "";
static const char __pyx_k__13[] = " ";
static const char __pyx_k__14[] = "=";
static const char __pyx_k__49[] = "{";
  static const char __pyx_k__50[] = ", ";
static const char __pyx_k__51[] = "}";
static const char __pyx_k__59[] = "@";
static const char __pyx_k__62[] = "#";
static const char __pyx_k__80[] = "+";
static const char __pyx_k__81[] = "/";
static const char __pyx_k_buf[] = "buf";
static const char __pyx_k_cmd[] = "cmd";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_err[] = "err";
static const char __pyx_k_get[] = "get";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_log[] = "log";
static const char __pyx_k_off[] = "off";
static const char __pyx_k_ops[] = "ops";
static const char __pyx_k_out[] = "out";
static const char __pyx_k_pop[] = "pop";
static const char __pyx_k_r_2[] = "r";
static const char __pyx_k_raw[] = "raw";
static const char __pyx_k_ret[] = "ret";
static const char __pyx_k_set[] = "set";
static const char __pyx_k_str[] = "__str__";
static const char __pyx_k_tag[] = "tag";
static const char __pyx_k_tup[] = "tup";
static const char __pyx_k_typ[] = "typ";
static const char __pyx_k_yes[] = "yes";
static const char __pyx_k_zfs[] = "zfs";
static const char __pyx_k_BUSY[] = "BUSY";
static const char __pyx_k_CHAR[] = "CHAR";
static const char __pyx_k_DIFF[] = "DIFF";
static const char __pyx_k_Enum[] = "Enum";
static const char __pyx_k_FILE[] = "FILE";
static const char __pyx_k_FREE[] = "FREE";
static const char __pyx_k_HOLD[] = "HOLD";
static const char __pyx_k_INTR[] = "INTR";
static const char __pyx_k_LOGS[] = "LOGS";
static const char __pyx_k_NONE[] = "NONE";
static const char __pyx_k_PERM[] = "PERM";
static const char __pyx_k_READ[] = "READ";
static const char __pyx_k_RELE[] = "RELE";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_c_fd[] = "c_fd";
static const char __pyx_k_code[] = "code";
static const char __pyx_k_data[] = "data";
static const char __pyx_k_diff[] = "diff";
static const char __pyx_k_disk[] = "disk";
static const char __pyx_k_enum[] = "enum";
static const char __pyx_k_exec[] = "exec";
static const char __pyx_k_exit[] = "__exit__";
static const char __pyx_k_file[] = "file";
static const char __pyx_k_free[] = "free";
static const char __pyx_k_guid[] = "guid";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_iter[] = "__iter__";
static const char __pyx_k_join[] = "join";
static const char __pyx_k_keys[] = "keys";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_none[] = "none";
static const char __pyx_k_null[] = "null";
static const char __pyx_k_open[] = "open";
static const char __pyx_k_opts[] = "opts";
static const char __pyx_k_path[] = "path";
static const char __pyx_k_pipe[] = "pipe";
static const char __pyx_k_pool[] = "pool";
static const char __pyx_k_prop[] = "prop";
static const char __pyx_k_read[] = "read";
static const char __pyx_k_repr[] = "__repr__";
static const char __pyx_k_rest[] = "rest";
static const char __pyx_k_root[] = "root";
static const char __pyx_k_scan[] = "scan";
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_stat[] = "stat";
static const char __pyx_k_sync[] = "sync";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_type[] = "type";
static const char __pyx_k_used[] = "used";
static const char __pyx_k_vdev[] = "vdev";
static const char __pyx_k_0_1_2[] = "{0}#{1}";
static const char __pyx_k_BLOCK[] = "BLOCK";
static const char __pyx_k_CLAIM[] = "CLAIM";
static const char __pyx_k_DEDUP[] = "DEDUP";
static const char __pyx_k_DOALL[] = "DOALL";
static const char __pyx_k_Error[] = "Error";
static const char __pyx_k_FAULT[] = "FAULT";
static const char __pyx_k_IOCTL[] = "IOCTL";
static const char __pyx_k_LOCAL[] = "LOCAL";
static const char __pyx_k_NOCAP[] = "NOCAP";
static const char __pyx_k_NOENT[] = "NOENT";
static const char __pyx_k_NOMEM[] = "NOMEM";
static const char __pyx_k_NOSPC[] = "NOSPC";
static const char __pyx_k_PROPS[] = "PROPS";
static const char __pyx_k_SCRUB[] = "SCRUB";
static const char __pyx_k_SPARE[] = "SPARE";
static const char __pyx_k_WRITE[] = "WRITE";
static const char __pyx_k_ZONED[] = "ZONED";
static const char __pyx_k_asize[] = "asize";
static const char __pyx_k_atime[] = "atime";
static const char __pyx_k_bytes[] = "bytes";
static const char __pyx_k_c_ret[] = "c_ret";
static const char __pyx_k_cache[] = "cache";
static const char __pyx_k_class[] = "__class__";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_dedup[] = "dedup";
static const char __pyx_k_disks[] = "disks";
static const char __pyx_k_enter[] = "__enter__";
static const char __pyx_k_errno[] = "errno";
static const char __pyx_k_flags[] = "flags";
static const char __pyx_k_force[] = "force";
static const char __pyx_k_fstat[] = "fstat";
static const char __pyx_k_get_2[] = "__get__";
static const char __pyx_k_holds[] = "holds";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_mount[] = "mount";
static const char __pyx_k_paths[] = "paths";
static const char __pyx_k_pools[] = "pools";
static const char __pyx_k_props[] = "props";
static const char __pyx_k_psize[] = "psize";
static const char __pyx_k_quota[] = "quota";
static const char __pyx_k_raidz[] = "raidz";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_recvd[] = "$recvd";
static const char __pyx_k_scrub[] = "scrub";
static const char __pyx_k_spare[] = "spare";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_start[] = "start";
static const char __pyx_k_state[] = "state";
static const char __pyx_k_stats[] = "stats";
static const char __pyx_k_strip[] = "strip";
static const char __pyx_k_super[] = "super";
static const char __pyx_k_throw[] = "throw";
static const char __pyx_k_token[] = "token";
static const char __pyx_k_utf_8[] = "utf-8";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_vscan[] = "vscan";
static const char __pyx_k_xattr[] = "xattr";
static const char __pyx_k_ACTIVE[] = "ACTIVE";
static const char __pyx_k_BADDEV[] = "BADDEV";
static const char __pyx_k_BADWHO[] = "BADWHO";
static const char __pyx_k_CLOSED[] = "CLOSED";
static const char __pyx_k_DRYRUN[] = "DRYRUN";
static const char __pyx_k_EINVAL[] = "EINVAL";
static const char __pyx_k_EXISTS[] = "EXISTS";
static const char __pyx_k_MODIFY[] = "MODIFY";
static const char __pyx_k_NOTSUP[] = "NOTSUP";
static const char __pyx_k_Number[] = "Number";
static const char __pyx_k_ONLINE[] = "ONLINE";
static const char __pyx_k_ORIGIN[] = "$ORIGIN";
static const char __pyx_k_REMOVE[] = "REMOVE";
static const char __pyx_k_RENAME[] = "RENAME";
static const char __pyx_k_SOCKET[] = "SOCKET";
static const char __pyx_k_SPARED[] = "SPARED";
static const char __pyx_k_Thread[] = "Thread";
static const char __pyx_k_VOLUME[] = "VOLUME";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_ashift[] = "ashift";
static const char __pyx_k_bootfs[] = "bootfs";
static const char __pyx_k_config[] = "config";
static const char __pyx_k_copies[] = "copies";
static const char __pyx_k_daemon[] = "daemon";
static const char __pyx_k_delete[] = "delete";
static const char __pyx_k_device[] = "device";
static const char __pyx_k_enable[] = "enable";
static const char __pyx_k_encode[] = "encode";
static const char __pyx_k_errors[] = "errors";
static const char __pyx_k_errstr[] = "errstr";
static const char __pyx_k_expand[] = "expand";
static const char __pyx_k_fdopen[] = "fdopen";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_fsopts[] = "fsopts";
static const char __pyx_k_fstype[] = "fstype";
static const char __pyx_k_groups[] = "groups";
static const char __pyx_k_handle[] = "handle";
static const char __pyx_k_health[] = "health";
static const char __pyx_k_hidden[] = "hidden";
static const char __pyx_k_import[] = "$import";
static const char __pyx_k_is_log[] = "is_log";
static const char __pyx_k_jailed[] = "jailed";
static const char __pyx_k_kwargs[] = "kwargs";
static const char __pyx_k_leaked[] = "leaked";
static const char __pyx_k_libzfs[] = "libzfs";
static const char __pyx_k_mirror[] = "mirror";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_name_2[] = "name";
static const char __pyx_k_nbmand[] = "nbmand";
static const char __pyx_k_nvlist[] = "nvlist";
static const char __pyx_k_object[] = "object";
static const char __pyx_k_offset[] = "offset";
static const char __pyx_k_parent[] = "parent";
static const char __pyx_k_parsed[] = "parsed";
static const char __pyx_k_prefix[] = "prefix";
static const char __pyx_k_raidz1[] = "raidz1";
static const char __pyx_k_raidz2[] = "raidz2";
static const char __pyx_k_raidz3[] = "raidz3";
static const char __pyx_k_result[] = "result";
static const char __pyx_k_setuid[] = "setuid";
static const char __pyx_k_source[] = "source";
static const char __pyx_k_spares[] = "spares";
static const char __pyx_k_status[] = "status";
static const char __pyx_k_target[] = "target";
static const char __pyx_k_toname[] = "toname";
static const char __pyx_k_tosnap[] = "tosnap";
static const char __pyx_k_typeid[] = "typeid";
static const char __pyx_k_umount[] = "umount";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_values[] = "values";
static const char __pyx_k_worker[] = "worker";
static const char __pyx_k_BADPATH[] = "BADPATH";
static const char __pyx_k_BADPERM[] = "BADPERM";
static const char __pyx_k_BADPROP[] = "BADPROP";
static const char __pyx_k_BADTYPE[] = "BADTYPE";
static const char __pyx_k_BAD_LOG[] = "BAD_LOG";
static const char __pyx_k_DEFAULT[] = "DEFAULT";
static const char __pyx_k_ENABLED[] = "ENABLED";
static const char __pyx_k_FAULTED[] = "FAULTED";
static const char __pyx_k_HEALTHY[] = "HEALTHY";
static const char __pyx_k_ISSPARE[] = "ISSPARE";
static const char __pyx_k_IntEnum[] = "IntEnum";
static const char __pyx_k_L2CACHE[] = "L2CACHE";
static const char __pyx_k_OFFLINE[] = "OFFLINE";
static const char __pyx_k_OSError[] = "OSError";
static const char __pyx_k_REMOVED[] = "REMOVED";
static const char __pyx_k_SUCCESS[] = "SUCCESS";
static const char __pyx_k_SYMLINK[] = "SYMLINK";
static const char __pyx_k_S_ISCHR[] = "S_ISCHR";
static const char __pyx_k_UNAVAIL[] = "UNAVAIL";
static const char __pyx_k_UNKNOWN[] = "UNKNOWN";
static const char __pyx_k_VERBOSE[] = "VERBOSE";
static const char __pyx_k_ZIOType[] = "ZIOType";
static const char __pyx_k_aclmode[] = "aclmode";
static const char __pyx_k_altroot[] = "altroot";
static const char __pyx_k_comment[] = "comment";
static const char __pyx_k_dataset[] = "dataset";
static const char __pyx_k_default[] = "default";
static const char __pyx_k_devices[] = "devices";
static const char __pyx_k_enabled[] = "enabled";
static const char __pyx_k_freeing[] = "freeing";
static const char __pyx_k_history[] = "history";
static const char __pyx_k_inherit[] = "inherit";
static const char __pyx_k_l2cache[] = "l2cache";
static const char __pyx_k_limitds[] = "limitds";
static const char __pyx_k_logbias[] = "logbias";
static const char __pyx_k_message[] = "message";
static const char __pyx_k_mounted[] = "mounted";
static const char __pyx_k_newname[] = "newname";
static const char __pyx_k_nomount[] = "nomount";
static const char __pyx_k_nparity[] = "nparity";
static const char __pyx_k_numbers[] = "numbers";
static const char __pyx_k_oldpath[] = "oldpath";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_receive[] = "receive";
static const char __pyx_k_refresh[] = "refresh";
static const char __pyx_k_snapdir[] = "snapdir";
static const char __pyx_k_st_mode[] = "st_mode";
static const char __pyx_k_version[] = "version";
static const char __pyx_k_visible[] = "visible";
static const char __pyx_k_volmode[] = "volmode";
static const char __pyx_k_volsize[] = "volsize";
static const char __pyx_k_written[] = "written";
static const char __pyx_k_zfs_cmd[] = "zfs_cmd";
static const char __pyx_k_zfs_set[] = "zfs set";
static const char __pyx_k_BADCACHE[] = "BADCACHE";
static const char __pyx_k_BOOKMARK[] = "BOOKMARK";
static const char __pyx_k_CANCELED[] = "CANCELED";
static const char __pyx_k_DEGRADED[] = "DEGRADED";
static const char __pyx_k_DIFFDATA[] = "DIFFDATA";
static const char __pyx_k_DISABLED[] = "DISABLED";
static const char __pyx_k_EXPORTED[] = "EXPORTED";
static const char __pyx_k_EXTERNAL[] = "EXTERNAL";
static const char __pyx_k_FINISHED[] = "FINISHED";
static const char __pyx_k_INVALARG[] = "INVALARG";
static const char __pyx_k_KeyError[] = "KeyError";
static const char __pyx_k_NODEVICE[] = "NODEVICE";
static const char __pyx_k_O_RDONLY[] = "O_RDONLY";
static const char __pyx_k_O_WRONLY[] = "O_WRONLY";
static const char __pyx_k_PARSABLE[] = "PARSABLE";
static const char __pyx_k_PROGRESS[] = "PROGRESS";
static const char __pyx_k_PROPTYPE[] = "PROPTYPE";
static const char __pyx_k_RECEIVED[] = "RECEIVED";
static const char __pyx_k_RESILVER[] = "RESILVER";
static const char __pyx_k_SCANNING[] = "SCANNING";
static const char __pyx_k_SNAPSHOT[] = "SNAPSHOT";
static const char __pyx_k_SendFlag[] = "SendFlag";
static const char __pyx_k_Sequence[] = "Sequence";
static const char __pyx_k_argument[] = "argument";
static const char __pyx_k_canmount[] = "canmount";
static const char __pyx_k_capacity[] = "capacity";
static const char __pyx_k_checksum[] = "checksum";
static const char __pyx_k_children[] = "children";
static const char __pyx_k_creation[] = "creation";
static const char __pyx_k_datetime[] = "datetime";
static const char __pyx_k_end_time[] = "end_time";
static const char __pyx_k_eval_arg[] = "eval_arg";
static const char __pyx_k_eval_str[] = "eval_str";
static const char __pyx_k_failmode[] = "failmode";
static const char __pyx_k_features[] = "features";
static const char __pyx_k_fromname[] = "fromname";
static const char __pyx_k_fromsnap[] = "fromsnap";
static const char __pyx_k_function[] = "function";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_hostname[] = "hostname";
static const char __pyx_k_import_2[] = "__import__";
static const char __pyx_k_iterkeys[] = "iterkeys";
static const char __pyx_k_maxsplit[] = "maxsplit";
static const char __pyx_k_mislabel[] = "mislabel";
static const char __pyx_k_new_name[] = "new_name";
static const char __pyx_k_nullable[] = "nullable";
static const char __pyx_k_opt_dict[] = "opt_dict";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_rawvalue[] = "rawvalue";
static const char __pyx_k_readonly[] = "readonly";
static const char __pyx_k_received[] = "received";
static const char __pyx_k_refquota[] = "refquota";
static const char __pyx_k_sharenfs[] = "sharenfs";
static const char __pyx_k_sharesmb[] = "sharesmb";
static const char __pyx_k_strerror[] = "strerror";
static const char __pyx_k_topology[] = "topology";
static const char __pyx_k_utf8only[] = "utf8only";
static const char __pyx_k_zfs_hold[] = "zfs hold";
static const char __pyx_k_BADBACKUP[] = "BADBACKUP";
static const char __pyx_k_BADSTREAM[] = "BADSTREAM";
static const char __pyx_k_BADTARGET[] = "BADTARGET";
static const char __pyx_k_BAD_LABEL[] = "BAD_LABEL";
static const char __pyx_k_CANT_OPEN[] = "CANT_OPEN";
static const char __pyx_k_DESTROYED[] = "DESTROYED";
static const char __pyx_k_DIRECTORY[] = "DIRECTORY";
static const char __pyx_k_INHERITED[] = "INHERITED";
static const char __pyx_k_ISL2CACHE[] = "ISL2CACHE";
static const char __pyx_k_NOHISTORY[] = "NOHISTORY";
static const char __pyx_k_POOLPROPS[] = "POOLPROPS";
static const char __pyx_k_PROPSPACE[] = "PROPSPACE";
static const char __pyx_k_PoolState[] = "PoolState";
static const char __pyx_k_RECURSIVE[] = "RECURSIVE";
static const char __pyx_k_REPLICATE[] = "REPLICATE";
static const char __pyx_k_SCRUBBING[] = "SCRUBBING";
static const char __pyx_k_ScanState[] = "ScanState";
static const char __pyx_k_SendFlags[] = "SendFlags";
static const char __pyx_k_TEMPORARY[] = "TEMPORARY";
static const char __pyx_k_TOO_SMALL[] = "TOO_SMALL";
static const char __pyx_k_VDevState[] = "VDevState";
static const char __pyx_k_VOLTOOBIG[] = "VOLTOOBIG";
static const char __pyx_k_ZFS___get[] = "ZFS.__get__";
static const char __pyx_k_allocated[] = "allocated";
static const char __pyx_k_available[] = "available";
static const char __pyx_k_cachefile[] = "cachefile";
static const char __pyx_k_cachemode[] = "cachemode";
static const char __pyx_k_destroyed[] = "destroyed";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_eval_dict[] = "eval_dict";
static const char __pyx_k_eval_list[] = "eval_list";
static const char __pyx_k_feature_0[] = "feature@{0}";
static const char __pyx_k_log_vdevs[] = "log_vdevs";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_nounmount[] = "nounmount";
static const char __pyx_k_otherdict[] = "otherdict";
static const char __pyx_k_partition[] = "partition";
static const char __pyx_k_pool_guid[] = "pool_guid";
static const char __pyx_k_read_null[] = "read_null";
static const char __pyx_k_recursive[] = "recursive";
static const char __pyx_k_resumable[] = "resumable";
static const char __pyx_k_root_vdev[] = "root_vdev";
static const char __pyx_k_snapshots[] = "snapshots";
static const char __pyx_k_temporary[] = "temporary";
static const char __pyx_k_threading[] = "threading";
static const char __pyx_k_timestamp[] = "timestamp";
static const char __pyx_k_to_native[] = "to_native";
static const char __pyx_k_vdev_tree[] = "vdev_tree";
static const char __pyx_k_zfs_clone[] = "zfs clone";
static const char __pyx_k_zfs_mount[] = "zfs mount";
static const char __pyx_k_zpool_set[] = "zpool set";
static const char __pyx_k_BADPERMSET[] = "BADPERMSET";
static const char __pyx_k_BADRESTORE[] = "BADRESTORE";
static const char __pyx_k_BADVERSION[] = "BADVERSION";
static const char __pyx_k_DSREADONLY[] = "DSREADONLY";
static const char __pyx_k_DiffRecord[] = "DiffRecord";
static const char __pyx_k_EMBED_DATA[] = "EMBED_DATA";
static const char __pyx_k_FILESYSTEM[] = "FILESYSTEM";
static const char __pyx_k_FROMORIGIN[] = "FROMORIGIN";
static const char __pyx_k_IO_FAILURE[] = "IO_FAILURE";
static const char __pyx_k_LARGEBLOCK[] = "LARGEBLOCK";
static const char __pyx_k_NOREPLICAS[] = "NOREPLICAS";
static const char __pyx_k_OPENFAILED[] = "OPENFAILED";
static const char __pyx_k_PIPEFAILED[] = "PIPEFAILED";
static const char __pyx_k_PoolStatus[] = "PoolStatus";
static const char __pyx_k_SPLIT_POOL[] = "SPLIT_POOL";
static const char __pyx_k_TAGTOOLONG[] = "TAGTOOLONG";
static const char __pyx_k_UNSUP_FEAT[] = "UNSUP_FEAT";
static const char __pyx_k_VDEVNOTSUP[] = "VDEVNOTSUP";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_aclinherit[] = "aclinherit";
static const char __pyx_k_autoexpand[] = "autoexpand";
static const char __pyx_k_data_vdevs[] = "data_vdevs";
static const char __pyx_k_dedupditto[] = "dedupditto";
static const char __pyx_k_dedupratio[] = "dedupratio";
static const char __pyx_k_delegation[] = "delegation";
static const char __pyx_k_eval_tuple[] = "eval_tuple";
static const char __pyx_k_expandsize[] = "expandsize";
static const char __pyx_k_itervalues[] = "itervalues";
static const char __pyx_k_mountpoint[] = "mountpoint";
static const char __pyx_k_percentage[] = "percentage";
static const char __pyx_k_properties[] = "properties";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_read_label[] = "read_label";
static const char __pyx_k_recordsize[] = "recordsize";
static const char __pyx_k_referenced[] = "referenced";
static const char __pyx_k_scan_stats[] = "scan_stats";
static const char __pyx_k_sparse_vol[] = "sparse_vol";
static const char __pyx_k_start_time[] = "start_time";
static const char __pyx_k_startswith[] = "startswith";
static const char __pyx_k_vdev_stats[] = "vdev_stats";
static const char __pyx_k_zfs_rename[] = "zfs rename";
static const char __pyx_k_zfs_umount[] = "zfs umount";
static const char __pyx_k_CROSSTARGET[] = "CROSSTARGET";
static const char __pyx_k_DEVOVERFLOW[] = "DEVOVERFLOW";
static const char __pyx_k_DatasetType[] = "DatasetType";
static const char __pyx_k_FAILING_DEV[] = "FAILING_DEV";
static const char __pyx_k_INVALCONFIG[] = "INVALCONFIG";
static const char __pyx_k_INVALIDNAME[] = "INVALIDNAME";
static const char __pyx_k_LABELFAILED[] = "LABELFAILED";
static const char __pyx_k_MOUNTFAILED[] = "MOUNTFAILED";
static const char __pyx_k_NAMETOOLONG[] = "NAMETOOLONG";
static const char __pyx_k_NO_REPLICAS[] = "NO_REPLICAS";
static const char __pyx_k_OFFLINE_DEV[] = "OFFLINE_DEV";
static const char __pyx_k_OPEN_FAILED[] = "OPEN_FAILED";
static const char __pyx_k_POOLUNAVAIL[] = "POOLUNAVAIL";
static const char __pyx_k_POOL_NOTSUP[] = "POOL_NOTSUP";
static const char __pyx_k_REMOVED_DEV[] = "REMOVED_DEV";
static const char __pyx_k_RESILVERING[] = "RESILVERING";
static const char __pyx_k_autoreplace[] = "autoreplace";
static const char __pyx_k_cache_vdevs[] = "cache_vdevs";
static const char __pyx_k_clear_label[] = "clear_label";
static const char __pyx_k_collections[] = "collections";
static const char __pyx_k_compression[] = "compression";
static const char __pyx_k_description[] = "description";
static const char __pyx_k_error_count[] = "error_count";
static const char __pyx_k_find_import[] = "find_import";
static const char __pyx_k_get_dataset[] = "get_dataset";
static const char __pyx_k_logicalused[] = "logicalused";
static const char __pyx_k_read_errors[] = "read_errors";
static const char __pyx_k_reservation[] = "reservation";
static const char __pyx_k_search_vdev[] = "search_vdev";
static const char __pyx_k_spare_vdevs[] = "spare_vdevs";
static const char __pyx_k_to_property[] = "to_property";
static const char __pyx_k_zfs_destroy[] = "zfs destroy";
static const char __pyx_k_zfs_inherit[] = "zfs inherit";
static const char __pyx_k_zfs_promote[] = "zfs promote";
static const char __pyx_k_zfs_release[] = "zfs release";
static const char __pyx_k_zpool_clear[] = "zpool clear";
static const char __pyx_k_zpool_scrub[] = "zpool scrub";
static const char __pyx_k_BAD_GUID_SUM[] = "BAD_GUID_SUM";
static const char __pyx_k_CORRUPT_DATA[] = "CORRUPT_DATA";
static const char __pyx_k_CORRUPT_POOL[] = "CORRUPT_POOL";
static const char __pyx_k_DiffFileType[] = "DiffFileType";
static const char __pyx_k_ERR_EXCEEDED[] = "ERR_EXCEEDED";
static const char __pyx_k_FeatureState[] = "FeatureState";
static const char __pyx_k_NODELEGATION[] = "NODELEGATION";
static const char __pyx_k_NVList_items[] = "NVList.items";
static const char __pyx_k_POOLREADONLY[] = "POOLREADONLY";
static const char __pyx_k_PROPREADONLY[] = "PROPREADONLY";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_ScanFunction[] = "ScanFunction";
static const char __pyx_k_UMOUNTFAILED[] = "UMOUNTFAILED";
static const char __pyx_k_VDevAuxState[] = "VDevAuxState";
static const char __pyx_k_ZFSException[] = "ZFSException";
static const char __pyx_k_ZfsConverter[] = "ZfsConverter";
static const char __pyx_k_eval_zfsvdev[] = "eval_zfsvdev";
static const char __pyx_k_forceunmount[] = "forceunmount";
static const char __pyx_k_get_snapshot[] = "get_snapshot";
static const char __pyx_k_nicestrtonum[] = "nicestrtonum";
static const char __pyx_k_primarycache[] = "primarycache";
static const char __pyx_k_root_dataset[] = "root_dataset";
static const char __pyx_k_search_paths[] = "search_paths";
static const char __pyx_k_volblocksize[] = "volblocksize";
static const char __pyx_k_write_errors[] = "write_errors";
static const char __pyx_k_zfs_rollback[] = "zfs rollback";
static const char __pyx_k_zfs_snapshot[] = "zfs snapshot";
static const char __pyx_k_zpool_create[] = "zpool create";
static const char __pyx_k_zpool_export[] = "zpool export";
static const char __pyx_k_zpool_import[] = "zpool import";
static const char __pyx_k_CORRUPT_CACHE[] = "CORRUPT_CACHE";
static const char __pyx_k_FAULTED_DEV_R[] = "FAULTED_DEV_R";
static const char __pyx_k_FEAT_DISABLED[] = "FEAT_DISABLED";
static const char __pyx_k_MISSING_DEV_R[] = "MISSING_DEV_R";
static const char __pyx_k_NVList___iter[] = "NVList.__iter__";
static const char __pyx_k_UNINITIALIZED[] = "UNINITIALIZED";
static const char __pyx_k_VERSION_NEWER[] = "VERSION_NEWER";
static const char __pyx_k_VERSION_OLDER[] = "VERSION_OLDER";
static const char __pyx_k_ZFSPool___get[] = "ZFSPool.__get__";
static const char __pyx_k_ZFSVdev___get[] = "ZFSVdev.__get__";
static const char __pyx_k_bookmark_name[] = "bookmark_name";
static const char __pyx_k_bytes_scanned[] = "bytes_scanned";
static const char __pyx_k_bytes_to_scan[] = "bytes_to_scan";
static const char __pyx_k_fragmentation[] = "fragmentation";
static const char __pyx_k_fromtimestamp[] = "fromtimestamp";
static const char __pyx_k_listsnapshots[] = "listsnapshots";
static const char __pyx_k_normalization[] = "normalization";
static const char __pyx_k_snapshot_name[] = "snapshot_name";
static const char __pyx_k_usedbydataset[] = "usedbydataset";
static const char __pyx_k_write_history[] = "write_history";
static const char __pyx_k_zpool_scrub_s[] = "zpool scrub -s";
static const char __pyx_k_zpool_upgrade[] = "zpool upgrade";
static const char __pyx_k_ASHIFT_TOO_BIG[] = "ASHIFT_TOO_BIG";
static const char __pyx_k_AttributeError[] = "AttributeError";
static const char __pyx_k_DiffRecordType[] = "DiffRecordType";
static const char __pyx_k_FAULTED_DEV_NR[] = "FAULTED_DEV_NR";
static const char __pyx_k_MISSING_DEV_NR[] = "MISSING_DEV_NR";
static const char __pyx_k_PROPNONINHERIT[] = "PROPNONINHERIT";
static const char __pyx_k_PropertySource[] = "PropertySource";
static const char __pyx_k_SHARENFSFAILED[] = "SHARENFSFAILED";
static const char __pyx_k_SHARESMBFAILED[] = "SHARESMBFAILED";
static const char __pyx_k_add_child_vdev[] = "add_child_vdev";
static const char __pyx_k_history_prefix[] = "history_prefix";
static const char __pyx_k_logical_ashift[] = "logical_ashift";
static const char __pyx_k_parse_zfs_prop[] = "parse_zfs_prop";
static const char __pyx_k_refreservation[] = "refreservation";
static const char __pyx_k_rewind_request[] = "rewind-request";
static const char __pyx_k_secondarycache[] = "secondarycache";
static const char __pyx_k_snapshot_count[] = "snapshot_count";
static const char __pyx_k_snapshot_limit[] = "snapshot_limit";
static const char __pyx_k_usedbychildren[] = "usedbychildren";
static const char __pyx_k_CORRUPT_LABEL_R[] = "CORRUPT_LABEL_R";
static const char __pyx_k_HOSTID_MISMATCH[] = "HOSTID_MISMATCH";
static const char __pyx_k_IO_FAILURE_WAIT[] = "IO_FAILURE_WAIT";
static const char __pyx_k_Key_0_not_found[] = "Key {0} not found";
static const char __pyx_k_UNSUP_FEAT_READ[] = "UNSUP_FEAT_READ";
static const char __pyx_k_ZFSDataset_diff[] = "ZFSDataset.diff";
static const char __pyx_k_ZFS_find_import[] = "ZFS.find_import";
static const char __pyx_k_bytes_processed[] = "bytes_processed";
static const char __pyx_k_casesensitivity[] = "casesensitivity";
static const char __pyx_k_checksum_errors[] = "checksum_errors";
static const char __pyx_k_mount_recursive[] = "mount_recursive";
static const char __pyx_k_physical_ashift[] = "physical_ashift";
static const char __pyx_k_usedbysnapshots[] = "usedbysnapshots";
static const char __pyx_k_CORRUPT_LABEL_NR[] = "CORRUPT_LABEL_NR";
static const char __pyx_k_DiffRecord___str[] = "DiffRecord.__str__";
static const char __pyx_k_Pool_0_not_found[] = "Pool {0} not found";
static const char __pyx_k_UNSHARENFSFAILED[] = "UNSHARENFSFAILED";
static const char __pyx_k_UNSHARESMBFAILED[] = "UNSHARESMBFAILED";
static const char __pyx_k_UNSUP_FEAT_WRITE[] = "UNSUP_FEAT_WRITE";
static const char __pyx_k_ZFSDataset___get[] = "ZFSDataset.__get__";
static const char __pyx_k_ZFS_TYPE_DATASET[] = "ZFS_TYPE_DATASET";
static const char __pyx_k_bytes_to_process[] = "bytes_to_process";
static const char __pyx_k_destroy_snapshot[] = "destroy_snapshot";
static const char __pyx_k_filesystem_count[] = "filesystem_count";
static const char __pyx_k_filesystem_limit[] = "filesystem_limit";
static const char __pyx_k_parse_zpool_prop[] = "parse_zpool_prop";
static const char __pyx_k_refcompressratio[] = "refcompressratio";
static const char __pyx_k_umount_recursive[] = "umount_recursive";
static const char __pyx_k_utcfromtimestamp[] = "utcfromtimestamp";
static const char __pyx_k_Cannot_read_label[] = "Cannot read label";
static const char __pyx_k_DiffRecord___init[] = "DiffRecord.__init__";
static const char __pyx_k_DiffRecord___repr[] = "DiffRecord.__repr__";
static const char __pyx_k_Invalid_vdev_type[] = "Invalid vdev type";
static const char __pyx_k_NON_NATIVE_ASHIFT[] = "NON_NATIVE_ASHIFT";
static const char __pyx_k_ZFS_ONLINE_EXPAND[] = "ZFS_ONLINE_EXPAND";
static const char __pyx_k_configured_ashift[] = "configured_ashift";
static const char __pyx_k_logicalreferenced[] = "logicalreferenced";
static const char __pyx_k_vdev_label_offset[] = "vdev_label_offset";
static const char __pyx_k_POTENTIALLY_ACTIVE[] = "POTENTIALLY_ACTIVE";
static const char __pyx_k_THREADCREATEFAILED[] = "THREADCREATEFAILED";
static const char __pyx_k_children_recursive[] = "children_recursive";
static const char __pyx_k_datasets_recursive[] = "datasets_recursive";
static const char __pyx_k_diff_locals_worker[] = "diff.<locals>.worker";
static const char __pyx_k_history_vdevs_list[] = "history_vdevs_list";
static const char __pyx_k_redundant_metadata[] = "redundant_metadata";
static const char __pyx_k_serialize_zfs_prop[] = "serialize_zfs_prop";
static const char __pyx_k_Dataset_0_not_found[] = "Dataset {0} not found";
static const char __pyx_k_IO_FAILURE_CONTINUE[] = "IO_FAILURE_CONTINUE";
static const char __pyx_k_NotImplementedError[] = "NotImplementedError";
static const char __pyx_k_ZFSException___init[] = "ZFSException.__init__";
static const char __pyx_k_ZfsConverter___init[] = "ZfsConverter.__init__";
static const char __pyx_k_snapshots_recursive[] = "snapshots_recursive";
static const char __pyx_k_Snapshot_0_not_found[] = "Snapshot {0} not found";
static const char __pyx_k_serialize_zpool_prop[] = "serialize_zpool_prop";
static const char __pyx_k_usedbyrefreservation[] = "usedbyrefreservation";
static const char __pyx_k_DiffRecord___getstate[] = "DiffRecord.__getstate__";
static const char __pyx_k_Property_is_read_only[] = "Property is read-only";
static const char __pyx_k_generate_history_opts[] = "generate_history_opts";
static const char __pyx_k_libzfs_ZFSVdev_type_0[] = "<libzfs.ZFSVdev type '{0}'>";
static const char __pyx_k_Can_replace_disks_only[] = "Can replace disks only";
static const char __pyx_k_Not_a_character_device[] = "Not a character device";
static const char __pyx_k_ZFSPropertyDict___iter[] = "ZFSPropertyDict.__iter__";
static const char __pyx_k_ZfsConverter_to_native[] = "ZfsConverter.to_native";
static const char __pyx_k_libzfs_0_name_1_type_2[] = "<libzfs.{0} name '{1}' type '{2}'>";
static const char __pyx_k_ZFS_PROPERTY_CONVERTERS[] = "ZFS_PROPERTY_CONVERTERS";
static const char __pyx_k_Property_is_not_nullable[] = "Property is not nullable";
static const char __pyx_k_ZfsConverter_to_property[] = "ZfsConverter.to_property";
static const char __pyx_k_ZPOOL_PROPERTY_CONVERTERS[] = "ZPOOL_PROPERTY_CONVERTERS";
static const char __pyx_k_Can_make_disks_online_only[] = "Can make disks online only";
static const char __pyx_k_Can_make_disks_offline_only[] = "Can make disks offline only";
static const char __pyx_k_Cannot_convert_0_to_integer[] = "Cannot convert {0} to integer";
static const char __pyx_k_Cannot_detach_virtual_vdevs[] = "Cannot detach virtual vdevs";
static const char __pyx_k_Cannot_obtain_send_progress[] = "Cannot obtain send progress";
static const char __pyx_k_toname_argument_is_required[] = "toname argument is required";
static const char __pyx_k_Cannot_obtain_space_estimate[] = "Cannot obtain space estimate: ";
static const char __pyx_k_libzfs_ZFSPool_name_0_guid_1[] = "<libzfs.ZFSPool name '{0}' guid '{1}'>";
static const char __pyx_k_libzfs_ZFSVdev_type_0_path_1[] = "<libzfs.ZFSVdev type '{0}', path '{1}'>";
static const char __pyx_k_Dataset_with_path_0_not_found[] = "Dataset with path {0} not found";
static const char __pyx_k_flags_must_be_passed_as_a_set[] = "flags must be passed as a set";
static const char __pyx_k_write_history_locals_eval_arg[] = "write_history.<locals>.eval_arg";
static const char __pyx_k_write_history_locals_eval_str[] = "write_history.<locals>.eval_str";
static const char __pyx_k_history_is_a_boolean_parameter[] = "history is a boolean parameter";
static const char __pyx_k_write_history_locals_eval_dict[] = "write_history.<locals>.eval_dict";
static const char __pyx_k_write_history_locals_eval_list[] = "write_history.<locals>.eval_list";
static const char __pyx_k_Can_attach_disks_to_mirrors_and[] = "Can attach disks to mirrors and stripes only";
static const char __pyx_k_Can_replace_disks_in_mirror_and[] = "Can replace disks in mirror and raidz* vdevs only";
static const char __pyx_k_Cannot_replace_a_top_level_vdev[] = "Cannot replace a top-level vdev";
static const char __pyx_k_libzfs_ZFSImportablePool_name_0[] = "<libzfs.ZFSImportablePool name '{0}' guid '{1}'>";
static const char __pyx_k_libzfs_ZFSProperty_name_0_value[] = "<libzfs.ZFSProperty name '{0}' value '{1}'>";
static const char __pyx_k_libzfs_ZFSUserProperty_name_0_v[] = "<libzfs.ZFSUserProperty name '{0}' value '{1}'>";
static const char __pyx_k_libzfs_ZPoolProperty_name_0_val[] = "<libzfs.ZPoolProperty name '{0}' value '{1}'>";
static const char __pyx_k_usr_nas_source_py_libzfs_conver[] = "/usr/nas_source/py-libzfs/converter.pxi";
static const char __pyx_k_usr_nas_source_py_libzfs_libzfs[] = "/usr/nas_source/py-libzfs/libzfs.pyx";
static const char __pyx_k_vdev_by_guid_locals_search_vdev[] = "vdev_by_guid.<locals>.search_vdev";
static const char __pyx_k_write_history_locals_eval_tuple[] = "write_history.<locals>.eval_tuple";
static const char __pyx_k_Can_detach_disks_from_mirrors_an[] = "Can detach disks from mirrors and spares only";
static const char __pyx_k_Cannot_overwrite_existing_proper[] = "Cannot overwrite existing property";
static const char __pyx_k_Value_not_compatible_with_type_s[] = "Value not compatible with type specified: {0}";
static const char __pyx_k_Value_should_be_of_type_ZFSUserP[] = "Value should be of type ZFSUserProperty";
static const char __pyx_k_ZFSObject_cannot_be_instantiated[] = "ZFSObject cannot be instantiated by the user";
static const char __pyx_k_ZFSPool_cannot_be_instantiated_b[] = "ZFSPool cannot be instantiated by the user";
static const char __pyx_k_ZFSProperty_cannot_be_instantiat[] = "ZFSProperty cannot be instantiated by the user";
static const char __pyx_k_ZPoolProperty_cannot_be_instanti[] = "ZPoolProperty cannot be instantiated by the user";
static const char __pyx_k_history_prefix_is_a_string_param[] = "history_prefix is a string parameter";
static const char __pyx_k_write_history_locals_eval_zfsvde[] = "write_history.<locals>.eval_zfsvdev";
static PyObject *__pyx_kp_s_0;
static PyObject *__pyx_kp_s_0_1;
static PyObject *__pyx_kp_s_0_1_2;
static PyObject *__pyx_n_s_ACTIVE;
static PyObject *__pyx_n_s_ADD;
static PyObject *__pyx_n_s_ASHIFT_TOO_BIG;
static PyObject *__pyx_n_s_AttributeError;
static PyObject *__pyx_n_s_B;
static PyObject *__pyx_n_s_BADBACKUP;
static PyObject *__pyx_n_s_BADCACHE;
static PyObject *__pyx_n_s_BADDEV;
static PyObject *__pyx_n_s_BADPATH;
static PyObject *__pyx_n_s_BADPERM;
static PyObject *__pyx_n_s_BADPERMSET;
static PyObject *__pyx_n_s_BADPROP;
static PyObject *__pyx_n_s_BADRESTORE;
static PyObject *__pyx_n_s_BADSTREAM;
static PyObject *__pyx_n_s_BADTARGET;
static PyObject *__pyx_n_s_BADTYPE;
static PyObject *__pyx_n_s_BADVERSION;
static PyObject *__pyx_n_s_BADWHO;
static PyObject *__pyx_n_s_BAD_GUID_SUM;
static PyObject *__pyx_n_s_BAD_LABEL;
static PyObject *__pyx_n_s_BAD_LOG;
static PyObject *__pyx_n_s_BLOCK;
static PyObject *__pyx_n_s_BOOKMARK;
static PyObject *__pyx_n_s_BUSY;
static PyObject *__pyx_n_s_C;
static PyObject *__pyx_n_s_CANCELED;
static PyObject *__pyx_n_s_CANT_OPEN;
static PyObject *__pyx_n_s_CHAR;
static PyObject *__pyx_n_s_CLAIM;
static PyObject *__pyx_n_s_CLOSED;
static PyObject *__pyx_n_s_CORRUPT_CACHE;
static PyObject *__pyx_n_s_CORRUPT_DATA;
static PyObject *__pyx_n_s_CORRUPT_LABEL_NR;
static PyObject *__pyx_n_s_CORRUPT_LABEL_R;
static PyObject *__pyx_n_s_CORRUPT_POOL;
static PyObject *__pyx_n_s_CROSSTARGET;
static PyObject *__pyx_kp_s_Can_attach_disks_to_mirrors_and;
static PyObject *__pyx_kp_s_Can_detach_disks_from_mirrors_an;
static PyObject *__pyx_kp_s_Can_make_disks_offline_only;
static PyObject *__pyx_kp_s_Can_make_disks_online_only;
static PyObject *__pyx_kp_s_Can_replace_disks_in_mirror_and;
static PyObject *__pyx_kp_s_Can_replace_disks_only;
static PyObject *__pyx_kp_s_Cannot_convert_0_to_integer;
static PyObject *__pyx_kp_s_Cannot_detach_virtual_vdevs;
static PyObject *__pyx_kp_s_Cannot_obtain_send_progress;
static PyObject *__pyx_kp_s_Cannot_obtain_space_estimate;
static PyObject *__pyx_kp_s_Cannot_overwrite_existing_proper;
static PyObject *__pyx_kp_s_Cannot_read_label;
static PyObject *__pyx_kp_s_Cannot_replace_a_top_level_vdev;
static PyObject *__pyx_n_s_DEDUP;
static PyObject *__pyx_n_s_DEFAULT;
static PyObject *__pyx_n_s_DEGRADED;
static PyObject *__pyx_n_s_DESTROYED;
static PyObject *__pyx_n_s_DEVOVERFLOW;
static PyObject *__pyx_n_s_DIFF;
static PyObject *__pyx_n_s_DIFFDATA;
static PyObject *__pyx_n_s_DIRECTORY;
static PyObject *__pyx_n_s_DISABLED;
static PyObject *__pyx_n_s_DOALL;
static PyObject *__pyx_n_s_DRYRUN;
static PyObject *__pyx_n_s_DSREADONLY;
static PyObject *__pyx_n_s_DatasetType;
static PyObject *__pyx_kp_s_Dataset_0_not_found;
static PyObject *__pyx_kp_s_Dataset_with_path_0_not_found;
static PyObject *__pyx_n_s_DiffFileType;
static PyObject *__pyx_n_s_DiffRecord;
static PyObject *__pyx_n_s_DiffRecordType;
static PyObject *__pyx_n_s_DiffRecord___getstate;
static PyObject *__pyx_n_s_DiffRecord___init;
static PyObject *__pyx_n_s_DiffRecord___repr;
static PyObject *__pyx_n_s_DiffRecord___str;
static PyObject *__pyx_n_s_E;
static PyObject *__pyx_n_s_EINVAL;
static PyObject *__pyx_n_s_EMBED_DATA;
static PyObject *__pyx_n_s_ENABLED;
static PyObject *__pyx_n_s_ERR_EXCEEDED;
static PyObject *__pyx_n_s_EXISTS;
static PyObject *__pyx_n_s_EXPORTED;
static PyObject *__pyx_n_s_EXTERNAL;
static PyObject *__pyx_n_s_Enum;
static PyObject *__pyx_n_s_Error;
static PyObject *__pyx_n_s_F;
static PyObject *__pyx_n_s_FAILING_DEV;
static PyObject *__pyx_n_s_FAULT;
static PyObject *__pyx_n_s_FAULTED;
static PyObject *__pyx_n_s_FAULTED_DEV_NR;
static PyObject *__pyx_n_s_FAULTED_DEV_R;
static PyObject *__pyx_n_s_FEAT_DISABLED;
static PyObject *__pyx_n_s_FILE;
static PyObject *__pyx_n_s_FILESYSTEM;
static PyObject *__pyx_n_s_FINISHED;
static PyObject *__pyx_n_s_FREE;
static PyObject *__pyx_n_s_FROMORIGIN;
static PyObject *__pyx_n_s_FeatureState;
static PyObject *__pyx_n_s_HEALTHY;
static PyObject *__pyx_n_s_HOLD;
static PyObject *__pyx_n_s_HOSTID_MISMATCH;
static PyObject *__pyx_n_s_INHERITED;
static PyObject *__pyx_n_s_INTR;
static PyObject *__pyx_n_s_INVALARG;
static PyObject *__pyx_n_s_INVALCONFIG;
static PyObject *__pyx_n_s_INVALIDNAME;
static PyObject *__pyx_n_s_IO;
static PyObject *__pyx_n_s_IOCTL;
static PyObject *__pyx_n_s_IO_FAILURE;
static PyObject *__pyx_n_s_IO_FAILURE_CONTINUE;
static PyObject *__pyx_n_s_IO_FAILURE_WAIT;
static PyObject *__pyx_n_s_ISL2CACHE;
static PyObject *__pyx_n_s_ISSPARE;
static PyObject *__pyx_n_s_IntEnum;
static PyObject *__pyx_kp_s_Invalid_vdev_type;
static PyObject *__pyx_n_s_KeyError;
static PyObject *__pyx_kp_s_Key_0_not_found;
static PyObject *__pyx_n_s_L2CACHE;
static PyObject *__pyx_n_s_LABELFAILED;
static PyObject *__pyx_n_s_LARGEBLOCK;
static PyObject *__pyx_n_s_LOCAL;
static PyObject *__pyx_n_s_LOGS;
static PyObject *__pyx_n_s_M;
static PyObject *__pyx_n_s_MISSING_DEV_NR;
static PyObject *__pyx_n_s_MISSING_DEV_R;
static PyObject *__pyx_n_s_MODIFY;
static PyObject *__pyx_n_s_MOUNTFAILED;
static PyObject *__pyx_n_s_NAMETOOLONG;
static PyObject *__pyx_n_s_NOCAP;
static PyObject *__pyx_n_s_NODELEGATION;
static PyObject *__pyx_n_s_NODEVICE;
static PyObject *__pyx_n_s_NOENT;
static PyObject *__pyx_n_s_NOHISTORY;
static PyObject *__pyx_n_s_NOMEM;
static PyObject *__pyx_n_s_NONE;
static PyObject *__pyx_n_s_NON_NATIVE_ASHIFT;
static PyObject *__pyx_n_s_NOREPLICAS;
static PyObject *__pyx_n_s_NOSPC;
static PyObject *__pyx_n_s_NOTSUP;
static PyObject *__pyx_n_s_NO_REPLICAS;
static PyObject *__pyx_n_s_NVList___iter;
static PyObject *__pyx_n_s_NVList_items;
static PyObject *__pyx_n_s_NotImplementedError;
static PyObject *__pyx_kp_s_Not_a_character_device;
static PyObject *__pyx_n_s_Number;
static PyObject *__pyx_kp_s_O;
static PyObject *__pyx_n_s_OFFLINE;
static PyObject *__pyx_n_s_OFFLINE_DEV;
static PyObject *__pyx_n_s_OK;
static PyObject *__pyx_n_s_ONLINE;
static PyObject *__pyx_n_s_OPENFAILED;
static PyObject *__pyx_n_s_OPEN_FAILED;
static PyObject *__pyx_kp_s_ORIGIN;
static PyObject *__pyx_n_s_OSError;
static PyObject *__pyx_n_s_O_RDONLY;
static PyObject *__pyx_n_s_O_WRONLY;
static PyObject *__pyx_n_s_PARSABLE;
static PyObject *__pyx_n_s_PERM;
static PyObject *__pyx_n_s_PIPEFAILED;
static PyObject *__pyx_n_s_POOLPROPS;
static PyObject *__pyx_n_s_POOLREADONLY;
static PyObject *__pyx_n_s_POOLUNAVAIL;
static PyObject *__pyx_n_s_POOL_NOTSUP;
static PyObject *__pyx_n_s_POTENTIALLY_ACTIVE;
static PyObject *__pyx_n_s_PROGRESS;
static PyObject *__pyx_n_s_PROPNONINHERIT;
static PyObject *__pyx_n_s_PROPREADONLY;
static PyObject *__pyx_n_s_PROPS;
static PyObject *__pyx_n_s_PROPSPACE;
static PyObject *__pyx_n_s_PROPTYPE;
static PyObject *__pyx_n_s_PoolState;
static PyObject *__pyx_n_s_PoolStatus;
static PyObject *__pyx_kp_s_Pool_0_not_found;
static PyObject *__pyx_n_s_PropertySource;
static PyObject *__pyx_kp_s_Property_is_not_nullable;
static PyObject *__pyx_kp_s_Property_is_read_only;
static PyObject *__pyx_n_s_R;
static PyObject *__pyx_n_s_READ;
static PyObject *__pyx_n_s_RECEIVED;
static PyObject *__pyx_n_s_RECURSIVE;
static PyObject *__pyx_n_s_RELE;
static PyObject *__pyx_n_s_REMOVE;
static PyObject *__pyx_n_s_REMOVED;
static PyObject *__pyx_n_s_REMOVED_DEV;
static PyObject *__pyx_n_s_RENAME;
static PyObject *__pyx_n_s_REPLICATE;
static PyObject *__pyx_n_s_RESILVER;
static PyObject *__pyx_n_s_RESILVERING;
static PyObject *__pyx_n_s_RuntimeError;
static PyObject *__pyx_n_s_SCANNING;
static PyObject *__pyx_n_s_SCRUB;
static PyObject *__pyx_n_s_SCRUBBING;
static PyObject *__pyx_n_s_SHARENFSFAILED;
static PyObject *__pyx_n_s_SHARESMBFAILED;
static PyObject *__pyx_n_s_SNAPSHOT;
static PyObject *__pyx_n_s_SOCKET;
static PyObject *__pyx_n_s_SPARE;
static PyObject *__pyx_n_s_SPARED;
static PyObject *__pyx_n_s_SPLIT_POOL;
static PyObject *__pyx_n_s_SUCCESS;
static PyObject *__pyx_n_s_SYMLINK;
static PyObject *__pyx_n_s_S_ISCHR;
static PyObject *__pyx_n_s_ScanFunction;
static PyObject *__pyx_n_s_ScanState;
static PyObject *__pyx_n_s_SendFlag;
static PyObject *__pyx_n_s_SendFlags;
static PyObject *__pyx_n_s_Sequence;
static PyObject *__pyx_kp_s_Snapshot_0_not_found;
static PyObject *__pyx_n_s_TAGTOOLONG;
static PyObject *__pyx_n_s_TEMPORARY;
static PyObject *__pyx_n_s_THREADCREATEFAILED;
static PyObject *__pyx_n_s_TOO_SMALL;
static PyObject *__pyx_n_s_Thread;
static PyObject *__pyx_n_s_UMOUNTFAILED;
static PyObject *__pyx_n_s_UNAVAIL;
static PyObject *__pyx_n_s_UNINITIALIZED;
static PyObject *__pyx_n_s_UNKNOWN;
static PyObject *__pyx_n_s_UNSHARENFSFAILED;
static PyObject *__pyx_n_s_UNSHARESMBFAILED;
static PyObject *__pyx_n_s_UNSUP_FEAT;
static PyObject *__pyx_n_s_UNSUP_FEAT_READ;
static PyObject *__pyx_n_s_UNSUP_FEAT_WRITE;
static PyObject *__pyx_n_s_VDEVNOTSUP;
static PyObject *__pyx_n_s_VDevAuxState;
static PyObject *__pyx_n_s_VDevState;
static PyObject *__pyx_n_s_VERBOSE;
static PyObject *__pyx_n_s_VERSION_NEWER;
static PyObject *__pyx_n_s_VERSION_OLDER;
static PyObject *__pyx_n_s_VOLTOOBIG;
static PyObject *__pyx_n_s_VOLUME;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_kp_s_Value_not_compatible_with_type_s;
static PyObject *__pyx_kp_s_Value_should_be_of_type_ZFSUserP;
static PyObject *__pyx_n_s_WRITE;
static PyObject *__pyx_n_s_ZFSDataset___get;
static PyObject *__pyx_n_s_ZFSDataset_diff;
static PyObject *__pyx_n_s_ZFSException;
static PyObject *__pyx_n_s_ZFSException___init;
static PyObject *__pyx_kp_s_ZFSObject_cannot_be_instantiated;
static PyObject *__pyx_n_s_ZFSPool___get;
static PyObject *__pyx_kp_s_ZFSPool_cannot_be_instantiated_b;
static PyObject *__pyx_n_s_ZFSPropertyDict___iter;
static PyObject *__pyx_kp_s_ZFSProperty_cannot_be_instantiat;
static PyObject *__pyx_n_s_ZFSVdev___get;
static PyObject *__pyx_n_s_ZFS_ONLINE_EXPAND;
static PyObject *__pyx_n_s_ZFS_PROPERTY_CONVERTERS;
static PyObject *__pyx_n_s_ZFS_TYPE_DATASET;
static PyObject *__pyx_n_s_ZFS___get;
static PyObject *__pyx_n_s_ZFS_find_import;
static PyObject *__pyx_n_s_ZIOType;
static PyObject *__pyx_n_s_ZONED;
static PyObject *__pyx_n_s_ZPOOL_PROPERTY_CONVERTERS;
static PyObject *__pyx_kp_s_ZPoolProperty_cannot_be_instanti;
static PyObject *__pyx_n_s_ZfsConverter;
static PyObject *__pyx_n_s_ZfsConverter___init;
static PyObject *__pyx_n_s_ZfsConverter_to_native;
static PyObject *__pyx_n_s_ZfsConverter_to_property;
static PyObject *__pyx_kp_s__11;
static PyObject *__pyx_kp_s__13;
static PyObject *__pyx_kp_s__14;
static PyObject *__pyx_kp_s__3;
static PyObject *__pyx_kp_s__49;
static PyObject *__pyx_kp_s__50;
static PyObject *__pyx_kp_s__51;
static PyObject *__pyx_kp_s__59;
static PyObject *__pyx_kp_s__62;
static PyObject *__pyx_kp_s__80;
static PyObject *__pyx_kp_s__81;
static PyObject *__pyx_kp_s__9;
static PyObject *__pyx_n_s_aclinherit;
static PyObject *__pyx_n_s_aclmode;
static PyObject *__pyx_n_s_add_child_vdev;
static PyObject *__pyx_n_s_allocated;
static PyObject *__pyx_n_s_altroot;
static PyObject *__pyx_n_s_append;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_argument;
static PyObject *__pyx_n_s_ashift;
static PyObject *__pyx_n_s_asize;
static PyObject *__pyx_n_s_atime;
static PyObject *__pyx_n_s_autoexpand;
static PyObject *__pyx_n_s_autoreplace;
static PyObject *__pyx_n_s_available;
static PyObject *__pyx_n_s_bookmark_name;
static PyObject *__pyx_n_s_bootfs;
static PyObject *__pyx_n_s_buf;
static PyObject *__pyx_n_s_bytes;
static PyObject *__pyx_n_s_bytes_processed;
static PyObject *__pyx_n_s_bytes_scanned;
static PyObject *__pyx_n_s_bytes_to_process;
static PyObject *__pyx_n_s_bytes_to_scan;
static PyObject *__pyx_n_s_c_fd;
static PyObject *__pyx_n_s_c_ret;
static PyObject *__pyx_n_s_cache;
static PyObject *__pyx_n_s_cache_vdevs;
static PyObject *__pyx_n_s_cachefile;
static PyObject *__pyx_n_s_cachemode;
static PyObject *__pyx_n_s_canmount;
static PyObject *__pyx_n_s_capacity;
static PyObject *__pyx_n_s_casesensitivity;
static PyObject *__pyx_n_s_checksum;
static PyObject *__pyx_n_s_checksum_errors;
static PyObject *__pyx_n_s_children;
static PyObject *__pyx_n_s_children_recursive;
static PyObject *__pyx_n_s_class;
static PyObject *__pyx_n_s_clear_label;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_cmd;
static PyObject *__pyx_n_s_code;
static PyObject *__pyx_n_s_collections;
static PyObject *__pyx_n_s_comment;
static PyObject *__pyx_n_s_compression;
static PyObject *__pyx_n_s_config;
static PyObject *__pyx_n_s_configured_ashift;
static PyObject *__pyx_n_s_copies;
static PyObject *__pyx_n_s_creation;
static PyObject *__pyx_n_s_d;
static PyObject *__pyx_n_s_daemon;
static PyObject *__pyx_n_s_data;
static PyObject *__pyx_n_s_data_vdevs;
static PyObject *__pyx_n_s_dataset;
static PyObject *__pyx_n_s_datasets_recursive;
static PyObject *__pyx_n_s_datetime;
static PyObject *__pyx_n_s_dedup;
static PyObject *__pyx_n_s_dedupditto;
static PyObject *__pyx_n_s_dedupratio;
static PyObject *__pyx_n_s_default;
static PyObject *__pyx_n_s_delegation;
static PyObject *__pyx_n_s_delete;
static PyObject *__pyx_n_s_description;
static PyObject *__pyx_n_s_destroy_snapshot;
static PyObject *__pyx_n_s_destroyed;
static PyObject *__pyx_n_s_device;
static PyObject *__pyx_n_s_devices;
static PyObject *__pyx_n_s_diff;
static PyObject *__pyx_n_s_diff_locals_worker;
static PyObject *__pyx_n_s_disk;
static PyObject *__pyx_n_s_disks;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_kp_s_e;
static PyObject *__pyx_n_s_enable;
static PyObject *__pyx_n_s_enabled;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_end_time;
static PyObject *__pyx_n_s_enter;
static PyObject *__pyx_n_s_enum;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_err;
static PyObject *__pyx_n_s_errno;
static PyObject *__pyx_n_s_error_count;
static PyObject *__pyx_n_s_errors;
static PyObject *__pyx_n_s_errstr;
static PyObject *__pyx_n_s_eval_arg;
static PyObject *__pyx_n_s_eval_dict;
static PyObject *__pyx_n_s_eval_list;
static PyObject *__pyx_n_s_eval_str;
static PyObject *__pyx_n_s_eval_tuple;
static PyObject *__pyx_n_s_eval_zfsvdev;
static PyObject *__pyx_n_s_exec;
static PyObject *__pyx_n_s_exit;
static PyObject *__pyx_n_s_expand;
static PyObject *__pyx_n_s_expandsize;
static PyObject *__pyx_kp_s_f;
static PyObject *__pyx_n_s_failmode;
static PyObject *__pyx_n_s_fd;
static PyObject *__pyx_n_s_fdopen;
static PyObject *__pyx_kp_s_feature_0;
static PyObject *__pyx_n_s_features;
static PyObject *__pyx_n_s_file;
static PyObject *__pyx_n_s_filesystem_count;
static PyObject *__pyx_n_s_filesystem_limit;
static PyObject *__pyx_n_s_find_import;
static PyObject *__pyx_n_s_flags;
static PyObject *__pyx_kp_s_flags_must_be_passed_as_a_set;
static PyObject *__pyx_n_s_force;
static PyObject *__pyx_n_s_forceunmount;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_s_fragmentation;
static PyObject *__pyx_n_s_free;
static PyObject *__pyx_n_s_freeing;
static PyObject *__pyx_n_s_fromname;
static PyObject *__pyx_n_s_fromsnap;
static PyObject *__pyx_n_s_fromtimestamp;
static PyObject *__pyx_n_s_fsopts;
static PyObject *__pyx_n_s_fstat;
static PyObject *__pyx_n_s_fstype;
static PyObject *__pyx_n_s_function;
static PyObject *__pyx_n_s_g;
static PyObject *__pyx_n_s_generate_history_opts;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_get_2;
static PyObject *__pyx_n_s_get_dataset;
static PyObject *__pyx_n_s_get_snapshot;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_groups;
static PyObject *__pyx_n_s_guid;
static PyObject *__pyx_n_s_handle;
static PyObject *__pyx_n_s_health;
static PyObject *__pyx_n_s_hidden;
static PyObject *__pyx_n_s_history;
static PyObject *__pyx_kp_s_history_is_a_boolean_parameter;
static PyObject *__pyx_n_s_history_prefix;
static PyObject *__pyx_kp_s_history_prefix_is_a_string_param;
static PyObject *__pyx_n_s_history_vdevs_list;
static PyObject *__pyx_n_s_holds;
static PyObject *__pyx_n_s_hostname;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_id;
static PyObject *__pyx_kp_s_import;
static PyObject *__pyx_n_s_import_2;
static PyObject *__pyx_n_s_inherit;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_is_log;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_iter;
static PyObject *__pyx_n_s_iterkeys;
static PyObject *__pyx_n_s_itervalues;
static PyObject *__pyx_n_s_jailed;
static PyObject *__pyx_n_s_join;
static PyObject *__pyx_n_s_k;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_s_keys;
static PyObject *__pyx_n_s_kwargs;
static PyObject *__pyx_n_s_l;
static PyObject *__pyx_n_s_l2cache;
static PyObject *__pyx_n_s_leaked;
static PyObject *__pyx_n_s_libzfs;
static PyObject *__pyx_kp_s_libzfs_0_name_1_type_2;
static PyObject *__pyx_kp_s_libzfs_ZFSImportablePool_name_0;
static PyObject *__pyx_kp_s_libzfs_ZFSPool_name_0_guid_1;
static PyObject *__pyx_kp_s_libzfs_ZFSProperty_name_0_value;
static PyObject *__pyx_kp_s_libzfs_ZFSUserProperty_name_0_v;
static PyObject *__pyx_kp_s_libzfs_ZFSVdev_type_0;
static PyObject *__pyx_kp_s_libzfs_ZFSVdev_type_0_path_1;
static PyObject *__pyx_kp_s_libzfs_ZPoolProperty_name_0_val;
static PyObject *__pyx_n_s_limitds;
static PyObject *__pyx_n_s_listsnapshots;
static PyObject *__pyx_n_s_log;
static PyObject *__pyx_n_s_log_vdevs;
static PyObject *__pyx_n_s_logbias;
static PyObject *__pyx_n_s_logical_ashift;
static PyObject *__pyx_n_s_logicalreferenced;
static PyObject *__pyx_n_s_logicalused;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_maxsplit;
static PyObject *__pyx_n_s_message;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_mirror;
static PyObject *__pyx_n_s_mislabel;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_mount;
static PyObject *__pyx_n_s_mount_recursive;
static PyObject *__pyx_n_s_mounted;
static PyObject *__pyx_n_s_mountpoint;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_n_s_nbmand;
static PyObject *__pyx_n_s_new_name;
static PyObject *__pyx_n_s_newname;
static PyObject *__pyx_n_s_nicestrtonum;
static PyObject *__pyx_n_s_no;
static PyObject *__pyx_n_s_nomount;
static PyObject *__pyx_n_s_none;
static PyObject *__pyx_n_s_normalization;
static PyObject *__pyx_n_s_nounmount;
static PyObject *__pyx_n_s_nparity;
static PyObject *__pyx_n_s_null;
static PyObject *__pyx_n_s_nullable;
static PyObject *__pyx_n_s_numbers;
static PyObject *__pyx_n_s_nvlist;
static PyObject *__pyx_kp_s_o;
static PyObject *__pyx_n_s_object;
static PyObject *__pyx_n_s_off;
static PyObject *__pyx_n_s_offset;
static PyObject *__pyx_n_s_oldpath;
static PyObject *__pyx_n_s_on;
static PyObject *__pyx_n_s_open;
static PyObject *__pyx_n_s_ops;
static PyObject *__pyx_n_s_opt_dict;
static PyObject *__pyx_n_s_opts;
static PyObject *__pyx_n_s_os;
static PyObject *__pyx_n_s_otherdict;
static PyObject *__pyx_n_s_out;
static PyObject *__pyx_n_s_parent;
static PyObject *__pyx_n_s_parse_zfs_prop;
static PyObject *__pyx_n_s_parse_zpool_prop;
static PyObject *__pyx_n_s_parsed;
static PyObject *__pyx_n_s_partition;
static PyObject *__pyx_n_s_path;
static PyObject *__pyx_n_s_paths;
static PyObject *__pyx_n_s_percentage;
static PyObject *__pyx_n_s_physical_ashift;
static PyObject *__pyx_n_s_pipe;
static PyObject *__pyx_n_s_pool;
static PyObject *__pyx_n_s_pool_guid;
static PyObject *__pyx_n_s_pools;
static PyObject *__pyx_n_s_pop;
static PyObject *__pyx_n_s_prefix;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_primarycache;
static PyObject *__pyx_n_s_prop;
static PyObject *__pyx_n_s_properties;
static PyObject *__pyx_n_s_props;
static PyObject *__pyx_n_s_psize;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_quota;
static PyObject *__pyx_kp_s_r;
static PyObject *__pyx_n_s_r_2;
static PyObject *__pyx_n_s_raidz;
static PyObject *__pyx_n_s_raidz1;
static PyObject *__pyx_n_s_raidz2;
static PyObject *__pyx_n_s_raidz3;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_raw;
static PyObject *__pyx_n_s_rawvalue;
static PyObject *__pyx_n_s_read;
static PyObject *__pyx_n_s_read_errors;
static PyObject *__pyx_n_s_read_label;
static PyObject *__pyx_n_s_read_null;
static PyObject *__pyx_n_s_readonly;
static PyObject *__pyx_n_s_receive;
static PyObject *__pyx_n_s_received;
static PyObject *__pyx_n_s_recordsize;
static PyObject *__pyx_n_s_recursive;
static PyObject *__pyx_kp_s_recvd;
static PyObject *__pyx_n_s_redundant_metadata;
static PyObject *__pyx_n_s_refcompressratio;
static PyObject *__pyx_n_s_referenced;
static PyObject *__pyx_n_s_refquota;
static PyObject *__pyx_n_s_refreservation;
static PyObject *__pyx_n_s_refresh;
static PyObject *__pyx_n_s_repr;
static PyObject *__pyx_n_s_reservation;
static PyObject *__pyx_n_s_rest;
static PyObject *__pyx_n_s_result;
static PyObject *__pyx_n_s_resumable;
static PyObject *__pyx_n_s_ret;
static PyObject *__pyx_kp_s_rewind_request;
static PyObject *__pyx_n_s_root;
static PyObject *__pyx_n_s_root_dataset;
static PyObject *__pyx_n_s_root_vdev;
static PyObject *__pyx_n_s_scan;
static PyObject *__pyx_n_s_scan_stats;
static PyObject *__pyx_n_s_scrub;
static PyObject *__pyx_n_s_search_paths;
static PyObject *__pyx_n_s_search_vdev;
static PyObject *__pyx_n_s_secondarycache;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_send;
static PyObject *__pyx_n_s_serialize_zfs_prop;
static PyObject *__pyx_n_s_serialize_zpool_prop;
static PyObject *__pyx_n_s_set;
static PyObject *__pyx_n_s_setuid;
static PyObject *__pyx_n_s_sharenfs;
static PyObject *__pyx_n_s_sharesmb;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_n_s_snapdir;
static PyObject *__pyx_n_s_snapshot_count;
static PyObject *__pyx_n_s_snapshot_limit;
static PyObject *__pyx_n_s_snapshot_name;
static PyObject *__pyx_n_s_snapshots;
static PyObject *__pyx_n_s_snapshots_recursive;
static PyObject *__pyx_n_s_source;
static PyObject *__pyx_n_s_spare;
static PyObject *__pyx_n_s_spare_vdevs;
static PyObject *__pyx_n_s_spares;
static PyObject *__pyx_n_s_sparse_vol;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_n_s_st;
static PyObject *__pyx_n_s_st_mode;
static PyObject *__pyx_n_s_start;
static PyObject *__pyx_n_s_start_time;
static PyObject *__pyx_n_s_startswith;
static PyObject *__pyx_n_s_stat;
static PyObject *__pyx_n_s_state;
static PyObject *__pyx_n_s_stats;
static PyObject *__pyx_n_s_status;
static PyObject *__pyx_n_s_str;
static PyObject *__pyx_n_s_strerror;
static PyObject *__pyx_n_s_strip;
static PyObject *__pyx_n_s_super;
static PyObject *__pyx_n_s_sync;
static PyObject *__pyx_kp_s_t;
static PyObject *__pyx_n_s_tag;
static PyObject *__pyx_n_s_target;
static PyObject *__pyx_n_s_temporary;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_threading;
static PyObject *__pyx_n_s_throw;
static PyObject *__pyx_n_s_timestamp;
static PyObject *__pyx_n_s_to_native;
static PyObject *__pyx_n_s_to_property;
static PyObject *__pyx_n_s_token;
static PyObject *__pyx_n_s_toname;
static PyObject *__pyx_kp_s_toname_argument_is_required;
static PyObject *__pyx_n_s_topology;
static PyObject *__pyx_n_s_tosnap;
static PyObject *__pyx_n_s_tup;
static PyObject *__pyx_n_s_typ;
static PyObject *__pyx_n_s_type;
static PyObject *__pyx_n_s_typeid;
static PyObject *__pyx_kp_s_u;
static PyObject *__pyx_n_s_umount;
static PyObject *__pyx_n_s_umount_recursive;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_used;
static PyObject *__pyx_n_s_usedbychildren;
static PyObject *__pyx_n_s_usedbydataset;
static PyObject *__pyx_n_s_usedbyrefreservation;
static PyObject *__pyx_n_s_usedbysnapshots;
static PyObject *__pyx_kp_s_usr_nas_source_py_libzfs_conver;
static PyObject *__pyx_kp_s_usr_nas_source_py_libzfs_libzfs;
static PyObject *__pyx_n_s_utcfromtimestamp;
static PyObject *__pyx_n_s_utf8only;
static PyObject *__pyx_kp_s_utf_8;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_values;
static PyObject *__pyx_n_s_vdev;
static PyObject *__pyx_n_s_vdev_by_guid_locals_search_vdev;
static PyObject *__pyx_n_s_vdev_label_offset;
static PyObject *__pyx_n_s_vdev_stats;
static PyObject *__pyx_n_s_vdev_tree;
static PyObject *__pyx_n_s_version;
static PyObject *__pyx_n_s_visible;
static PyObject *__pyx_n_s_volblocksize;
static PyObject *__pyx_n_s_volmode;
static PyObject *__pyx_n_s_volsize;
static PyObject *__pyx_n_s_vscan;
static PyObject *__pyx_n_s_worker;
static PyObject *__pyx_n_s_write_errors;
static PyObject *__pyx_n_s_write_history;
static PyObject *__pyx_n_s_write_history_locals_eval_arg;
static PyObject *__pyx_n_s_write_history_locals_eval_dict;
static PyObject *__pyx_n_s_write_history_locals_eval_list;
static PyObject *__pyx_n_s_write_history_locals_eval_str;
static PyObject *__pyx_n_s_write_history_locals_eval_tuple;
static PyObject *__pyx_n_s_write_history_locals_eval_zfsvde;
static PyObject *__pyx_n_s_written;
static PyObject *__pyx_n_s_xattr;
static PyObject *__pyx_n_s_yes;
static PyObject *__pyx_n_s_zfs;
static PyObject *__pyx_kp_s_zfs_clone;
static PyObject *__pyx_n_s_zfs_cmd;
static PyObject *__pyx_kp_s_zfs_destroy;
static PyObject *__pyx_kp_s_zfs_hold;
static PyObject *__pyx_kp_s_zfs_inherit;
static PyObject *__pyx_kp_s_zfs_mount;
static PyObject *__pyx_kp_s_zfs_promote;
static PyObject *__pyx_kp_s_zfs_release;
static PyObject *__pyx_kp_s_zfs_rename;
static PyObject *__pyx_kp_s_zfs_rollback;
static PyObject *__pyx_kp_s_zfs_set;
static PyObject *__pyx_kp_s_zfs_snapshot;
static PyObject *__pyx_kp_s_zfs_umount;
static PyObject *__pyx_kp_s_zpool_clear;
static PyObject *__pyx_kp_s_zpool_create;
static PyObject *__pyx_kp_s_zpool_export;
static PyObject *__pyx_kp_s_zpool_import;
static PyObject *__pyx_kp_s_zpool_scrub;
static PyObject *__pyx_kp_s_zpool_scrub_s;
static PyObject *__pyx_kp_s_zpool_set;
static PyObject *__pyx_kp_s_zpool_upgrade;
static int __pyx_pf_6libzfs_6NVList___init__(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, uintptr_t __pyx_v_nvlist, PyObject *__pyx_v_otherdict); /* proto */
static void __pyx_pf_6libzfs_6NVList_2__dealloc__(struct __pyx_obj_6libzfs_NVList *__pyx_v_self); /* proto */
static int __pyx_pf_6libzfs_6NVList_4__contains__(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static int __pyx_pf_6libzfs_6NVList_6__delitem__(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_6libzfs_6NVList_8__iter__(struct __pyx_obj_6libzfs_NVList *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_6NVList_11get(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default); /* proto */
static PyObject *__pyx_pf_6libzfs_6NVList_13type(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_6libzfs_6NVList_15set(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, PyObject *__pyx_v_typeid); /* proto */
static PyObject *__pyx_pf_6libzfs_6NVList_17__getitem__(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static int __pyx_pf_6libzfs_6NVList_19__setitem__(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6libzfs_6NVList_21get_type(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_6libzfs_6NVList_23keys(struct __pyx_obj_6libzfs_NVList *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_6NVList_25values(struct __pyx_obj_6libzfs_NVList *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_6NVList_27items(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, PyObject *__pyx_v_raw); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZfsConverter___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_typ, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZfsConverter_2to_native(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZfsConverter_4to_property(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6libzfs_parse_zfs_prop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6libzfs_2serialize_zfs_prop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6libzfs_4parse_zpool_prop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6libzfs_6serialize_zpool_prop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6libzfs_10DiffRecord___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_raw); /* proto */
static PyObject *__pyx_pf_6libzfs_10DiffRecord_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10DiffRecord_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10DiffRecord_6__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZFSException___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_code, PyObject *__pyx_v_message); /* proto */
static int __pyx_pf_6libzfs_3ZFS___cinit__(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_history, PyObject *__pyx_v_history_prefix); /* proto */
static void __pyx_pf_6libzfs_3ZFS_2__dealloc__(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_4__getstate__(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_5errno___get__(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_6errstr___get__(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_5pools___get__(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_8datasets___get__(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_9snapshots___get__(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_6get(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_8find_import(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_cachefile, PyObject *__pyx_v_name, PyObject *__pyx_v_destroyed, PyObject *__pyx_v_search_paths); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_11import_pool(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_pool, PyObject *__pyx_v_newname, PyObject *__pyx_v_opts); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_13export_pool(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_pool); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_15get_dataset(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_17get_snapshot(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_19get_object(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_21get_dataset_by_path(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_path); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_23create(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_topology, PyObject *__pyx_v_opts, PyObject *__pyx_v_fsopts); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_25destroy(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_27receive(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_fd, PyObject *__pyx_v_force, PyObject *__pyx_v_nomount, PyObject *__pyx_v_resumable, PyObject *__pyx_v_props, PyObject *__pyx_v_limitds); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_13write_history_eval_arg(PyObject *__pyx_self, PyObject *__pyx_v_argument); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_13write_history_2eval_str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_argument); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_13write_history_4eval_dict(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_argument); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_13write_history_6eval_tuple(PyObject *__pyx_self, PyObject *__pyx_v_argument); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_13write_history_8eval_list(PyObject *__pyx_self, PyObject *__pyx_v_argument); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_13write_history_10eval_zfsvdev(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_argument); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_29write_history(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_31generate_history_opts(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_opt_dict, PyObject *__pyx_v_prefix); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_33history_vdevs_list(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_topology); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_35send_resume(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_fd, PyObject *__pyx_v_token, PyObject *__pyx_v_flags); /* proto */
static PyObject *__pyx_pf_6libzfs_3ZFS_37describe_resume_token(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_token); /* proto */
static int __pyx_pf_6libzfs_13ZPoolProperty___init__(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_13ZPoolProperty_2__getstate__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_13ZPoolProperty_4__str__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_13ZPoolProperty_6__repr__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_13ZPoolProperty_4name___get__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_13ZPoolProperty_5value___get__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self); /* proto */
static int __pyx_pf_6libzfs_13ZPoolProperty_5value_2__set__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6libzfs_13ZPoolProperty_8rawvalue___get__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_13ZPoolProperty_6source___get__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_13ZPoolProperty_6parsed___get__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self); /* proto */
static int __pyx_pf_6libzfs_13ZPoolProperty_6parsed_2__set__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6libzfs_13ZPoolProperty_14allowed_values___get__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_13ZPoolProperty_8reset(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_13ZPoolProperty_4pool___get__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZPoolFeature___getstate__(struct __pyx_obj_6libzfs_ZPoolFeature *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZPoolFeature_4name___get__(struct __pyx_obj_6libzfs_ZPoolFeature *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZPoolFeature_4guid___get__(struct __pyx_obj_6libzfs_ZPoolFeature *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZPoolFeature_11description___get__(struct __pyx_obj_6libzfs_ZPoolFeature *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZPoolFeature_5state___get__(struct __pyx_obj_6libzfs_ZPoolFeature *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZPoolFeature_2enable(struct __pyx_obj_6libzfs_ZPoolFeature *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZPoolFeature_4pool___get__(struct __pyx_obj_6libzfs_ZPoolFeature *__pyx_v_self); /* proto */
static int __pyx_pf_6libzfs_11ZFSProperty___init__(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSProperty_2__getstate__(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSProperty_4__str__(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSProperty_6__repr__(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSProperty_8refresh(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSProperty_4name___get__(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSProperty_5value___get__(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self); /* proto */
static int __pyx_pf_6libzfs_11ZFSProperty_5value_2__set__(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSProperty_8rawvalue___get__(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSProperty_6source___get__(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSProperty_6parsed___get__(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self); /* proto */
static int __pyx_pf_6libzfs_11ZFSProperty_6parsed_2__set__(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSProperty_14allowed_values___get__(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSProperty_10inherit(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self, PyObject *__pyx_v_recursive, int __pyx_v_received); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSProperty_7dataset___get__(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self); /* proto */
static int __pyx_pf_6libzfs_15ZFSUserProperty___init__(struct __pyx_obj_6libzfs_ZFSUserProperty *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6libzfs_15ZFSUserProperty_2__str__(struct __pyx_obj_6libzfs_ZFSUserProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_15ZFSUserProperty_4__repr__(struct __pyx_obj_6libzfs_ZFSUserProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_15ZFSUserProperty_5value___get__(struct __pyx_obj_6libzfs_ZFSUserProperty *__pyx_v_self); /* proto */
static int __pyx_pf_6libzfs_15ZFSUserProperty_5value_2__set__(struct __pyx_obj_6libzfs_ZFSUserProperty *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6libzfs_15ZFSUserProperty_8rawvalue___get__(struct __pyx_obj_6libzfs_ZFSUserProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_15ZFSUserProperty_6source___get__(struct __pyx_obj_6libzfs_ZFSUserProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_15ZFSUserProperty_4name___get__(struct __pyx_obj_6libzfs_ZFSUserProperty *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats___getstate__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_9timestamp___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_4size___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_9allocated___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_11read_errors___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_12write_errors___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_15checksum_errors___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_3ops___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_5bytes___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_17configured_ashift___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_14logical_ashift___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_15physical_ashift___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_13fragmentation___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_4vdev___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self); /* proto */
static int __pyx_pf_6libzfs_7ZFSVdev___init__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, struct __pyx_obj_6libzfs_ZFS *__pyx_v_root, PyObject *__pyx_v_typ, struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_pool); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_2__str__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_4__repr__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_6__getstate__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, PyObject *__pyx_v_recursive); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_8add_child_vdev(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_vdev); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_10attach(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_vdev); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_12replace(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_vdev); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_14detach(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_16remove(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_18offline(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, PyObject *__pyx_v_temporary); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_20online(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, PyObject *__pyx_v_expand); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_22degrade(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, PyObject *__pyx_v_aux); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_24fault(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, PyObject *__pyx_v_aux); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_4type___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self); /* proto */
static int __pyx_pf_6libzfs_7ZFSVdev_4type_2__set__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_4guid___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_4path___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self); /* proto */
static int __pyx_pf_6libzfs_7ZFSVdev_4path_2__set__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_6status___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_4size___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_5stats___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_8children___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self); /* proto */
static int __pyx_pf_6libzfs_7ZFSVdev_8children_3__set__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_5disks___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_5zpool___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_4root___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_6parent___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSVdev_5group___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self); /* proto */
static int __pyx_pf_6libzfs_10ZPoolScrub___init__(struct __pyx_obj_6libzfs_ZPoolScrub *__pyx_v_self, struct __pyx_obj_6libzfs_ZFS *__pyx_v_root, struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_pool); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_5state___get__(struct __pyx_obj_6libzfs_ZPoolScrub *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_8function___get__(struct __pyx_obj_6libzfs_ZPoolScrub *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_10start_time___get__(struct __pyx_obj_6libzfs_ZPoolScrub *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_8end_time___get__(struct __pyx_obj_6libzfs_ZPoolScrub *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_13bytes_to_scan___get__(struct __pyx_obj_6libzfs_ZPoolScrub *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_13bytes_scanned___get__(struct __pyx_obj_6libzfs_ZPoolScrub *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_6errors___get__(struct __pyx_obj_6libzfs_ZPoolScrub *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_10percentage___get__(struct __pyx_obj_6libzfs_ZPoolScrub *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_2__getstate__(struct __pyx_obj_6libzfs_ZPoolScrub *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_4root___get__(struct __pyx_obj_6libzfs_ZPoolScrub *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_4pool___get__(struct __pyx_obj_6libzfs_ZPoolScrub *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_4stat___get__(struct __pyx_obj_6libzfs_ZPoolScrub *__pyx_v_self); /* proto */
static int __pyx_pf_6libzfs_7ZFSPool___cinit__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static int __pyx_pf_6libzfs_7ZFSPool_2__init__(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static void __pyx_pf_6libzfs_7ZFSPool_4__dealloc__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_6__str__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_8__repr__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_10__getstate__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self, PyObject *__pyx_v_datasets_recursive); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_12root_dataset___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_9root_vdev___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_10data_vdevs___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_9log_vdevs___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_11cache_vdevs___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_11spare_vdevs___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_6groups___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_4name___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_4guid___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_8hostname___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_5state___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_6status___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_11error_count___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_6config___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_10properties___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_8features___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_5disks___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_5scrub___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_12create(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_fsopts, PyObject *__pyx_v_fstype, PyObject *__pyx_v_sparse_vol); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_14attach_vdevs(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self, PyObject *__pyx_v_vdevs_tree); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_12vdev_by_guid_search_vdev(PyObject *__pyx_self, PyObject *__pyx_v_vdev, PyObject *__pyx_v_g); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_16vdev_by_guid(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self, PyObject *__pyx_v_guid); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_18delete(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_20start_scrub(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_22stop_scrub(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_24clear(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_26upgrade(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_7ZFSPool_4root___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_17ZFSImportablePool___str__(struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_17ZFSImportablePool_2__repr__(struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_17ZFSImportablePool_6config___get__(struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_17ZFSImportablePool_10properties___get__(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_17ZFSImportablePool_12root_dataset___get__(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_17ZFSImportablePool_11error_count___get__(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_17ZFSImportablePool_8features___get__(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_17ZFSImportablePool_4create(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_6libzfs_17ZFSImportablePool_6destroy(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_6libzfs_17ZFSImportablePool_8attach_vdev(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_vdev); /* proto */
static PyObject *__pyx_pf_6libzfs_17ZFSImportablePool_4name___get__(struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_self); /* proto */
static int __pyx_pf_6libzfs_17ZFSImportablePool_4name_2__set__(struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6libzfs_17ZFSImportablePool_4name_4__del__(struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict___repr__(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_2refresh(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self); /* proto */
static int __pyx_pf_6libzfs_15ZFSPropertyDict_4__delitem__(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_6__getitem__(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
static int __pyx_pf_6libzfs_15ZFSPropertyDict_8__setitem__(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_10__iter__(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_13get(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self, PyObject *__pyx_v_k, PyObject *__pyx_v_d); /* proto */
static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_15setdefault(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_k, CYTHON_UNUSED PyObject *__pyx_v_d); /* proto */
static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_17keys(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_19values(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_21iterkeys(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_23itervalues(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_25has_key(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_27items(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_29update(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_E, CYTHON_UNUSED PyObject *__pyx_v_F); /* proto */
static int __pyx_pf_6libzfs_15ZFSPropertyDict_31__contains__(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static int __pyx_pf_6libzfs_9ZFSObject___init__(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self); /* proto */
static void __pyx_pf_6libzfs_9ZFSObject_2__dealloc__(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_9ZFSObject_4__str__(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_9ZFSObject_6__repr__(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_9ZFSObject_8__getstate__(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_9ZFSObject_4name___get__(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_9ZFSObject_4type___get__(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_9ZFSObject_10properties___get__(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_9ZFSObject_10rename(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self, PyObject *__pyx_v_new_name, PyObject *__pyx_v_nounmount, PyObject *__pyx_v_forceunmount); /* proto */
static PyObject *__pyx_pf_6libzfs_9ZFSObject_12delete(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_9ZFSObject_14get_send_space(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self, PyObject *__pyx_v_fromname); /* proto */
static PyObject *__pyx_pf_6libzfs_9ZFSObject_4root___get__(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_9ZFSObject_4pool___get__(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZFSDataset___getstate__(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self, PyObject *__pyx_v_recursive); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZFSDataset_8children___get__(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZFSDataset_18children_recursive___get__(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZFSDataset_9snapshots___get__(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZFSDataset_9bookmarks___get__(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZFSDataset_19snapshots_recursive___get__(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZFSDataset_10dependents___get__(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZFSDataset_10mountpoint___get__(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZFSDataset_2destroy_snapshot(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZFSDataset_4mount(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZFSDataset_6mount_recursive(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZFSDataset_8umount(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self, PyObject *__pyx_v_force); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZFSDataset_10umount_recursive(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self, PyObject *__pyx_v_force); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZFSDataset_12send(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self, PyObject *__pyx_v_fd, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZFSDataset_14get_send_progress(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self, PyObject *__pyx_v_fd); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZFSDataset_16promote(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZFSDataset_18snapshot(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_fsopts, PyObject *__pyx_v_recursive); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZFSDataset_20receive(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self, PyObject *__pyx_v_fd, PyObject *__pyx_v_force, PyObject *__pyx_v_nomount, PyObject *__pyx_v_resumable, PyObject *__pyx_v_props, PyObject *__pyx_v_limitds); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZFSDataset_22diff(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self, PyObject *__pyx_v_fromsnap, PyObject *__pyx_v_tosnap); /* proto */
static PyObject *__pyx_pf_6libzfs_10ZFSDataset_4diff_worker(PyObject *__pyx_self, PyObject *__pyx_v_fd); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSSnapshot___getstate__(struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSSnapshot_2rollback(struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_self, PyObject *__pyx_v_force); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSSnapshot_4bookmark(struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSSnapshot_6clone(struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_opts); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSSnapshot_8hold(struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_recursive); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSSnapshot_10release(struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_recursive); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSSnapshot_12delete(struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_self, PyObject *__pyx_v_recursive); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSSnapshot_14send(struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_self, PyObject *__pyx_v_fd, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSSnapshot_13snapshot_name___get__(struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSSnapshot_6parent___get__(struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSSnapshot_5holds___get__(struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSBookmark___getstate__(struct __pyx_obj_6libzfs_ZFSBookmark *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSBookmark_6parent___get__(struct __pyx_obj_6libzfs_ZFSBookmark *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_11ZFSBookmark_13bookmark_name___get__(struct __pyx_obj_6libzfs_ZFSBookmark *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6libzfs_8nicestrtonum(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_6libzfs_ZFS *__pyx_v_zfs, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6libzfs_10vdev_label_offset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_psize, PyObject *__pyx_v_l, PyObject *__pyx_v_offset); /* proto */
static PyObject *__pyx_pf_6libzfs_12read_label(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_device); /* proto */
static PyObject *__pyx_pf_6libzfs_14clear_label(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_device); /* proto */
static PyObject *__pyx_tp_new_6libzfs_NVList(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs_ZFS(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs_ZPoolProperty(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs_ZPoolFeature(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs_ZFSProperty(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs_ZFSUserProperty(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs_ZFSVdevStats(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs_ZFSVdev(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs_ZPoolScrub(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs_ZFSPool(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs_ZFSImportablePool(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs_ZFSPropertyDict(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs_ZFSObject(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs_ZFSDataset(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs_ZFSSnapshot(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs_ZFSBookmark(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_1_items(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_2___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_3___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_4___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_5_find_import(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_6_write_history(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_7___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_8___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_9___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_10___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_11___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_12___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_13_vdev_by_guid(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_14___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_15___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_16___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_17___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_18___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_19___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_20___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_21_diff(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
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_6;
static PyObject *__pyx_int_7;
static PyObject *__pyx_int_8;
static PyObject *__pyx_int_9;
static PyObject *__pyx_int_13;
static PyObject *__pyx_int_14;
static PyObject *__pyx_int_19;
static PyObject *__pyx_int_1L;
static PyObject *__pyx_k__46;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_slice__34;
static PyObject *__pyx_slice__35;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__23;
static PyObject *__pyx_tuple__25;
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__36;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__39;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__47;
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__58;
static PyObject *__pyx_tuple__60;
static PyObject *__pyx_tuple__61;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_tuple__64;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__66;
static PyObject *__pyx_tuple__68;
static PyObject *__pyx_tuple__70;
static PyObject *__pyx_tuple__72;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_tuple__78;
static PyObject *__pyx_tuple__82;
static PyObject *__pyx_tuple__84;
static PyObject *__pyx_tuple__86;
static PyObject *__pyx_tuple__88;
static PyObject *__pyx_tuple__90;
static PyObject *__pyx_tuple__92;
static PyObject *__pyx_tuple__94;
static PyObject *__pyx_tuple__96;
static PyObject *__pyx_tuple__98;
static PyObject *__pyx_codeobj__16;
static PyObject *__pyx_codeobj__18;
static PyObject *__pyx_codeobj__20;
static PyObject *__pyx_codeobj__22;
static PyObject *__pyx_codeobj__24;
static PyObject *__pyx_codeobj__26;
static PyObject *__pyx_codeobj__48;
static PyObject *__pyx_codeobj__57;
static PyObject *__pyx_codeobj__67;
static PyObject *__pyx_codeobj__69;
static PyObject *__pyx_codeobj__71;
static PyObject *__pyx_codeobj__73;
static PyObject *__pyx_codeobj__75;
static PyObject *__pyx_codeobj__77;
static PyObject *__pyx_codeobj__79;
static PyObject *__pyx_codeobj__83;
static PyObject *__pyx_codeobj__85;
static PyObject *__pyx_codeobj__87;
static PyObject *__pyx_codeobj__89;
static PyObject *__pyx_codeobj__91;
static PyObject *__pyx_codeobj__93;
static PyObject *__pyx_codeobj__95;
static PyObject *__pyx_codeobj__97;
static PyObject *__pyx_codeobj__99;

/* "nvpair.pxi":42
 *     cdef int foreign
 * 
 *     def __init__(self, uintptr_t nvlist=0, otherdict=None):             # <<<<<<<<<<<<<<
 *         if nvlist:
 *             self.foreign = True
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_6NVList_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6libzfs_6NVList_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  uintptr_t __pyx_v_nvlist;
  PyObject *__pyx_v_otherdict = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nvlist,&__pyx_n_s_otherdict,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nvlist);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_otherdict);
          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(2, 42, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_nvlist = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_nvlist == (uintptr_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 42, __pyx_L3_error)
    } else {
      __pyx_v_nvlist = ((uintptr_t)0);
    }
    __pyx_v_otherdict = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 42, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.NVList.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_6NVList___init__(((struct __pyx_obj_6libzfs_NVList *)__pyx_v_self), __pyx_v_nvlist, __pyx_v_otherdict);

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

static int __pyx_pf_6libzfs_6NVList___init__(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, uintptr_t __pyx_v_nvlist, PyObject *__pyx_v_otherdict) {
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_v = NULL;
  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;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "nvpair.pxi":43
 * 
 *     def __init__(self, uintptr_t nvlist=0, otherdict=None):
 *         if nvlist:             # <<<<<<<<<<<<<<
 *             self.foreign = True
 *             self.handle = <nvpair.nvlist_t*>nvlist
 */
  __pyx_t_1 = (__pyx_v_nvlist != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":44
 *     def __init__(self, uintptr_t nvlist=0, otherdict=None):
 *         if nvlist:
 *             self.foreign = True             # <<<<<<<<<<<<<<
 *             self.handle = <nvpair.nvlist_t*>nvlist
 *         else:
 */
    __pyx_v_self->foreign = 1;

    /* "nvpair.pxi":45
 *         if nvlist:
 *             self.foreign = True
 *             self.handle = <nvpair.nvlist_t*>nvlist             # <<<<<<<<<<<<<<
 *         else:
 *             self.foreign = False
 */
    __pyx_v_self->handle = ((nvlist_t *)__pyx_v_nvlist);

    /* "nvpair.pxi":43
 * 
 *     def __init__(self, uintptr_t nvlist=0, otherdict=None):
 *         if nvlist:             # <<<<<<<<<<<<<<
 *             self.foreign = True
 *             self.handle = <nvpair.nvlist_t*>nvlist
 */
    goto __pyx_L3;
  }

  /* "nvpair.pxi":47
 *             self.handle = <nvpair.nvlist_t*>nvlist
 *         else:
 *             self.foreign = False             # <<<<<<<<<<<<<<
 *             nvpair.nvlist_alloc(&self.handle, nvpair.NV_UNIQUE_NAME, 0)
 * 
 */
  /*else*/ {
    __pyx_v_self->foreign = 0;

    /* "nvpair.pxi":48
 *         else:
 *             self.foreign = False
 *             nvpair.nvlist_alloc(&self.handle, nvpair.NV_UNIQUE_NAME, 0)             # <<<<<<<<<<<<<<
 * 
 *         if otherdict:
 */
    nvlist_alloc((&__pyx_v_self->handle), NV_UNIQUE_NAME, 0);
  }
  __pyx_L3:;

  /* "nvpair.pxi":50
 *             nvpair.nvlist_alloc(&self.handle, nvpair.NV_UNIQUE_NAME, 0)
 * 
 *         if otherdict:             # <<<<<<<<<<<<<<
 *             for k, v in otherdict.items():
 *                 self[k] = v
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_otherdict); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 50, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "nvpair.pxi":51
 * 
 *         if otherdict:
 *             for k, v in otherdict.items():             # <<<<<<<<<<<<<<
 *                 self[k] = v
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_otherdict, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 51, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && 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);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 51, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 51, __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_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 51, __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(2, 51, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_COMPILING_IN_CPYTHON
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(2, 51, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 51, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(2, 51, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 51, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_6(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(2, 51, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        #if CYTHON_COMPILING_IN_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(2, 51, __pyx_L1_error)
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        #else
        __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 51, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 51, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 51, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
        index = 0; __pyx_t_4 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L7_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_4);
        index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L7_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(2, 51, __pyx_L1_error)
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L8_unpacking_done;
        __pyx_L7_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(2, 51, __pyx_L1_error)
        __pyx_L8_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "nvpair.pxi":52
 *         if otherdict:
 *             for k, v in otherdict.items():
 *                 self[k] = v             # <<<<<<<<<<<<<<
 * 
 * 
 */
      if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_k, __pyx_v_v) < 0)) __PYX_ERR(2, 52, __pyx_L1_error)

      /* "nvpair.pxi":51
 * 
 *         if otherdict:
 *             for k, v in otherdict.items():             # <<<<<<<<<<<<<<
 *                 self[k] = v
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "nvpair.pxi":50
 *             nvpair.nvlist_alloc(&self.handle, nvpair.NV_UNIQUE_NAME, 0)
 * 
 *         if otherdict:             # <<<<<<<<<<<<<<
 *             for k, v in otherdict.items():
 *                 self[k] = v
 */
  }

  /* "nvpair.pxi":42
 *     cdef int foreign
 * 
 *     def __init__(self, uintptr_t nvlist=0, otherdict=None):             # <<<<<<<<<<<<<<
 *         if nvlist:
 *             self.foreign = True
 */

  /* 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_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("libzfs.NVList.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "nvpair.pxi":55
 * 
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if not self.foreign:
 *             nvpair.nvlist_free(self.handle)
 */

/* Python wrapper */
static void __pyx_pw_6libzfs_6NVList_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_6libzfs_6NVList_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_6libzfs_6NVList_2__dealloc__(((struct __pyx_obj_6libzfs_NVList *)__pyx_v_self));

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

static void __pyx_pf_6libzfs_6NVList_2__dealloc__(struct __pyx_obj_6libzfs_NVList *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "nvpair.pxi":56
 * 
 *     def __dealloc__(self):
 *         if not self.foreign:             # <<<<<<<<<<<<<<
 *             nvpair.nvlist_free(self.handle)
 *             self.handle = NULL
 */
  __pyx_t_1 = ((!(__pyx_v_self->foreign != 0)) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":57
 *     def __dealloc__(self):
 *         if not self.foreign:
 *             nvpair.nvlist_free(self.handle)             # <<<<<<<<<<<<<<
 *             self.handle = NULL
 * 
 */
    nvlist_free(__pyx_v_self->handle);

    /* "nvpair.pxi":58
 *         if not self.foreign:
 *             nvpair.nvlist_free(self.handle)
 *             self.handle = NULL             # <<<<<<<<<<<<<<
 * 
 *     cdef object get_raw(self, key):
 */
    __pyx_v_self->handle = NULL;

    /* "nvpair.pxi":56
 * 
 *     def __dealloc__(self):
 *         if not self.foreign:             # <<<<<<<<<<<<<<
 *             nvpair.nvlist_free(self.handle)
 *             self.handle = NULL
 */
  }

  /* "nvpair.pxi":55
 * 
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if not self.foreign:
 *             nvpair.nvlist_free(self.handle)
 */

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

/* "nvpair.pxi":60
 *             self.handle = NULL
 * 
 *     cdef object get_raw(self, key):             # <<<<<<<<<<<<<<
 *         cdef nvpair.nvpair_t* pair = self.__get_pair(key)
 *         return self.__get_value(pair, False)
 */

static PyObject *__pyx_f_6libzfs_6NVList_get_raw(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, PyObject *__pyx_v_key) {
  nvpair_t *__pyx_v_pair;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  nvpair_t *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_6libzfs_6NVList___get_value __pyx_t_3;
  __Pyx_RefNannySetupContext("get_raw", 0);

  /* "nvpair.pxi":61
 * 
 *     cdef object get_raw(self, key):
 *         cdef nvpair.nvpair_t* pair = self.__get_pair(key)             # <<<<<<<<<<<<<<
 *         return self.__get_value(pair, False)
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6libzfs_NVList *)__pyx_v_self->__pyx_vtab)->__pyx___get_pair(__pyx_v_self, __pyx_v_key); if (unlikely(__pyx_t_1 == NULL)) __PYX_ERR(2, 61, __pyx_L1_error)
  __pyx_v_pair = __pyx_t_1;

  /* "nvpair.pxi":62
 *     cdef object get_raw(self, key):
 *         cdef nvpair.nvpair_t* pair = self.__get_pair(key)
 *         return self.__get_value(pair, False)             # <<<<<<<<<<<<<<
 * 
 *     cdef nvpair.nvpair_t* __get_pair(self, key) except NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.wrap_dict = Py_False;
  __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_NVList *)__pyx_v_self->__pyx_vtab)->__pyx___get_value(__pyx_v_self, __pyx_v_pair, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "nvpair.pxi":60
 *             self.handle = NULL
 * 
 *     cdef object get_raw(self, key):             # <<<<<<<<<<<<<<
 *         cdef nvpair.nvpair_t* pair = self.__get_pair(key)
 *         return self.__get_value(pair, False)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("libzfs.NVList.get_raw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "nvpair.pxi":64
 *         return self.__get_value(pair, False)
 * 
 *     cdef nvpair.nvpair_t* __get_pair(self, key) except NULL:             # <<<<<<<<<<<<<<
 *         cdef nvpair.nvpair_t* pair
 *         if nvpair.nvlist_lookup_nvpair(self.handle, key, &pair) != 0:
 */

static nvpair_t *__pyx_f_6libzfs_6NVList___get_pair(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, PyObject *__pyx_v_key) {
  nvpair_t *__pyx_v_pair;
  nvpair_t *__pyx_r;
  __Pyx_RefNannyDeclarations
  char const *__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;
  __Pyx_RefNannySetupContext("__get_pair", 0);

  /* "nvpair.pxi":66
 *     cdef nvpair.nvpair_t* __get_pair(self, key) except NULL:
 *         cdef nvpair.nvpair_t* pair
 *         if nvpair.nvlist_lookup_nvpair(self.handle, key, &pair) != 0:             # <<<<<<<<<<<<<<
 *             raise ValueError('Key {0} not found'.format(key))
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(2, 66, __pyx_L1_error)
  __pyx_t_2 = ((nvlist_lookup_nvpair(__pyx_v_self->handle, __pyx_t_1, (&__pyx_v_pair)) != 0) != 0);
  if (__pyx_t_2) {

    /* "nvpair.pxi":67
 *         cdef nvpair.nvpair_t* pair
 *         if nvpair.nvlist_lookup_nvpair(self.handle, key, &pair) != 0:
 *             raise ValueError('Key {0} not found'.format(key))             # <<<<<<<<<<<<<<
 * 
 *         return pair
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Key_0_not_found, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 67, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 67, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 67, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_key);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 67, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 67, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 67, __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(2, 67, __pyx_L1_error)

    /* "nvpair.pxi":66
 *     cdef nvpair.nvpair_t* __get_pair(self, key) except NULL:
 *         cdef nvpair.nvpair_t* pair
 *         if nvpair.nvlist_lookup_nvpair(self.handle, key, &pair) != 0:             # <<<<<<<<<<<<<<
 *             raise ValueError('Key {0} not found'.format(key))
 * 
 */
  }

  /* "nvpair.pxi":69
 *             raise ValueError('Key {0} not found'.format(key))
 * 
 *         return pair             # <<<<<<<<<<<<<<
 * 
 *     cdef object __get_value(self, nvpair.nvpair_t* pair, wrap_dict=True):
 */
  __pyx_r = __pyx_v_pair;
  goto __pyx_L0;

  /* "nvpair.pxi":64
 *         return self.__get_value(pair, False)
 * 
 *     cdef nvpair.nvpair_t* __get_pair(self, key) except NULL:             # <<<<<<<<<<<<<<
 *         cdef nvpair.nvpair_t* pair
 *         if nvpair.nvlist_lookup_nvpair(self.handle, key, &pair) != 0:
 */

  /* function exit code */
  __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("libzfs.NVList.__get_pair", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "nvpair.pxi":71
 *         return pair
 * 
 *     cdef object __get_value(self, nvpair.nvpair_t* pair, wrap_dict=True):             # <<<<<<<<<<<<<<
 *         cdef nvpair.nvlist_t *nested
 *         cdef char *cstr
 */

static PyObject *__pyx_f_6libzfs_6NVList___get_value(CYTHON_UNUSED struct __pyx_obj_6libzfs_NVList *__pyx_v_self, nvpair_t *__pyx_v_pair, struct __pyx_opt_args_6libzfs_6NVList___get_value *__pyx_optional_args) {
  PyObject *__pyx_v_wrap_dict = ((PyObject *)Py_True);
  nvlist_t *__pyx_v_nested;
  char *__pyx_v_cstr;
  void *__pyx_v_carray;
  uint_t __pyx_v_carraylen;
  int __pyx_v_boolean;
  int32_t __pyx_v_cint;
  uint64_t __pyx_v_clong;
  int __pyx_v_datatype;
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  void *__pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int16_t *__pyx_t_11;
  int16_t *__pyx_t_12;
  int16_t *__pyx_t_13;
  uint16_t *__pyx_t_14;
  uint16_t *__pyx_t_15;
  uint16_t *__pyx_t_16;
  int32_t *__pyx_t_17;
  int32_t *__pyx_t_18;
  int32_t *__pyx_t_19;
  uint32_t *__pyx_t_20;
  uint32_t *__pyx_t_21;
  uint32_t *__pyx_t_22;
  int64_t *__pyx_t_23;
  int64_t *__pyx_t_24;
  int64_t *__pyx_t_25;
  uint64_t *__pyx_t_26;
  uint64_t *__pyx_t_27;
  uint64_t *__pyx_t_28;
  char **__pyx_t_29;
  char **__pyx_t_30;
  char **__pyx_t_31;
  uintptr_t *__pyx_t_32;
  uintptr_t *__pyx_t_33;
  uintptr_t *__pyx_t_34;
  PyObject *__pyx_t_35 = NULL;
  __Pyx_RefNannySetupContext("__get_value", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_wrap_dict = __pyx_optional_args->wrap_dict;
    }
  }

  /* "nvpair.pxi":81
 *         cdef int datatype
 * 
 *         datatype = nvpair.nvpair_type(pair)             # <<<<<<<<<<<<<<
 * 
 *         if datatype == nvpair.DATA_TYPE_STRING:
 */
  __pyx_v_datatype = nvpair_type(__pyx_v_pair);

  /* "nvpair.pxi":83
 *         datatype = nvpair.nvpair_type(pair)
 * 
 *         if datatype == nvpair.DATA_TYPE_STRING:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_string(pair, &cstr)
 *             return cstr
 */
  __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_STRING) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":84
 * 
 *         if datatype == nvpair.DATA_TYPE_STRING:
 *             nvpair.nvpair_value_string(pair, &cstr)             # <<<<<<<<<<<<<<
 *             return cstr
 * 
 */
    nvpair_value_string(__pyx_v_pair, (&__pyx_v_cstr));

    /* "nvpair.pxi":85
 *         if datatype == nvpair.DATA_TYPE_STRING:
 *             nvpair.nvpair_value_string(pair, &cstr)
 *             return cstr             # <<<<<<<<<<<<<<
 * 
 *         if datatype == nvpair.DATA_TYPE_BOOLEAN:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyUnicode_FromString(__pyx_v_cstr); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 85, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "nvpair.pxi":83
 *         datatype = nvpair.nvpair_type(pair)
 * 
 *         if datatype == nvpair.DATA_TYPE_STRING:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_string(pair, &cstr)
 *             return cstr
 */
  }

  /* "nvpair.pxi":87
 *             return cstr
 * 
 *         if datatype == nvpair.DATA_TYPE_BOOLEAN:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_boolean_value(pair, <boolean_t*>&boolean)
 *             return boolean
 */
  __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_BOOLEAN) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":88
 * 
 *         if datatype == nvpair.DATA_TYPE_BOOLEAN:
 *             nvpair.nvpair_value_boolean_value(pair, <boolean_t*>&boolean)             # <<<<<<<<<<<<<<
 *             return boolean
 * 
 */
    nvpair_value_boolean_value(__pyx_v_pair, ((boolean_t *)(&__pyx_v_boolean)));

    /* "nvpair.pxi":89
 *         if datatype == nvpair.DATA_TYPE_BOOLEAN:
 *             nvpair.nvpair_value_boolean_value(pair, <boolean_t*>&boolean)
 *             return boolean             # <<<<<<<<<<<<<<
 * 
 *         if datatype == nvpair.DATA_TYPE_BYTE:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_boolean); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 89, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "nvpair.pxi":87
 *             return cstr
 * 
 *         if datatype == nvpair.DATA_TYPE_BOOLEAN:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_boolean_value(pair, <boolean_t*>&boolean)
 *             return boolean
 */
  }

  /* "nvpair.pxi":91
 *             return boolean
 * 
 *         if datatype == nvpair.DATA_TYPE_BYTE:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_byte(pair, <uchar_t*>&cint)
 *             return cint
 */
  __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_BYTE) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":92
 * 
 *         if datatype == nvpair.DATA_TYPE_BYTE:
 *             nvpair.nvpair_value_byte(pair, <uchar_t*>&cint)             # <<<<<<<<<<<<<<
 *             return cint
 * 
 */
    nvpair_value_byte(__pyx_v_pair, ((uchar_t *)(&__pyx_v_cint)));

    /* "nvpair.pxi":93
 *         if datatype == nvpair.DATA_TYPE_BYTE:
 *             nvpair.nvpair_value_byte(pair, <uchar_t*>&cint)
 *             return cint             # <<<<<<<<<<<<<<
 * 
 *         if datatype == nvpair.DATA_TYPE_INT8:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_int32_t(__pyx_v_cint); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 93, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "nvpair.pxi":91
 *             return boolean
 * 
 *         if datatype == nvpair.DATA_TYPE_BYTE:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_byte(pair, <uchar_t*>&cint)
 *             return cint
 */
  }

  /* "nvpair.pxi":95
 *             return cint
 * 
 *         if datatype == nvpair.DATA_TYPE_INT8:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_int8(pair, <int8_t*>&cint)
 *             return cint
 */
  __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_INT8) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":96
 * 
 *         if datatype == nvpair.DATA_TYPE_INT8:
 *             nvpair.nvpair_value_int8(pair, <int8_t*>&cint)             # <<<<<<<<<<<<<<
 *             return cint
 * 
 */
    nvpair_value_int8(__pyx_v_pair, ((int8_t *)(&__pyx_v_cint)));

    /* "nvpair.pxi":97
 *         if datatype == nvpair.DATA_TYPE_INT8:
 *             nvpair.nvpair_value_int8(pair, <int8_t*>&cint)
 *             return cint             # <<<<<<<<<<<<<<
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT8:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_int32_t(__pyx_v_cint); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 97, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "nvpair.pxi":95
 *             return cint
 * 
 *         if datatype == nvpair.DATA_TYPE_INT8:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_int8(pair, <int8_t*>&cint)
 *             return cint
 */
  }

  /* "nvpair.pxi":99
 *             return cint
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT8:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_uint8(pair, <uint8_t*>&cint)
 *             return cint
 */
  __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_UINT8) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":100
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT8:
 *             nvpair.nvpair_value_uint8(pair, <uint8_t*>&cint)             # <<<<<<<<<<<<<<
 *             return cint
 * 
 */
    nvpair_value_uint8(__pyx_v_pair, ((uint8_t *)(&__pyx_v_cint)));

    /* "nvpair.pxi":101
 *         if datatype == nvpair.DATA_TYPE_UINT8:
 *             nvpair.nvpair_value_uint8(pair, <uint8_t*>&cint)
 *             return cint             # <<<<<<<<<<<<<<
 * 
 *         if datatype == nvpair.DATA_TYPE_INT16:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_int32_t(__pyx_v_cint); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "nvpair.pxi":99
 *             return cint
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT8:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_uint8(pair, <uint8_t*>&cint)
 *             return cint
 */
  }

  /* "nvpair.pxi":103
 *             return cint
 * 
 *         if datatype == nvpair.DATA_TYPE_INT16:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_int16(pair, <int16_t*>&cint)
 *             return cint
 */
  __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_INT16) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":104
 * 
 *         if datatype == nvpair.DATA_TYPE_INT16:
 *             nvpair.nvpair_value_int16(pair, <int16_t*>&cint)             # <<<<<<<<<<<<<<
 *             return cint
 * 
 */
    nvpair_value_int16(__pyx_v_pair, ((int16_t *)(&__pyx_v_cint)));

    /* "nvpair.pxi":105
 *         if datatype == nvpair.DATA_TYPE_INT16:
 *             nvpair.nvpair_value_int16(pair, <int16_t*>&cint)
 *             return cint             # <<<<<<<<<<<<<<
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT16:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_int32_t(__pyx_v_cint); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "nvpair.pxi":103
 *             return cint
 * 
 *         if datatype == nvpair.DATA_TYPE_INT16:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_int16(pair, <int16_t*>&cint)
 *             return cint
 */
  }

  /* "nvpair.pxi":107
 *             return cint
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT16:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_uint16(pair, <uint16_t*>&cint)
 *             return cint
 */
  __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_UINT16) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":108
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT16:
 *             nvpair.nvpair_value_uint16(pair, <uint16_t*>&cint)             # <<<<<<<<<<<<<<
 *             return cint
 * 
 */
    nvpair_value_uint16(__pyx_v_pair, ((uint16_t *)(&__pyx_v_cint)));

    /* "nvpair.pxi":109
 *         if datatype == nvpair.DATA_TYPE_UINT16:
 *             nvpair.nvpair_value_uint16(pair, <uint16_t*>&cint)
 *             return cint             # <<<<<<<<<<<<<<
 * 
 *         if datatype == nvpair.DATA_TYPE_INT32:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_int32_t(__pyx_v_cint); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "nvpair.pxi":107
 *             return cint
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT16:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_uint16(pair, <uint16_t*>&cint)
 *             return cint
 */
  }

  /* "nvpair.pxi":111
 *             return cint
 * 
 *         if datatype == nvpair.DATA_TYPE_INT32:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_int32(pair, <int32_t*>&cint)
 *             return cint
 */
  __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_INT32) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":112
 * 
 *         if datatype == nvpair.DATA_TYPE_INT32:
 *             nvpair.nvpair_value_int32(pair, <int32_t*>&cint)             # <<<<<<<<<<<<<<
 *             return cint
 * 
 */
    nvpair_value_int32(__pyx_v_pair, ((int32_t *)(&__pyx_v_cint)));

    /* "nvpair.pxi":113
 *         if datatype == nvpair.DATA_TYPE_INT32:
 *             nvpair.nvpair_value_int32(pair, <int32_t*>&cint)
 *             return cint             # <<<<<<<<<<<<<<
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT32:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_int32_t(__pyx_v_cint); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "nvpair.pxi":111
 *             return cint
 * 
 *         if datatype == nvpair.DATA_TYPE_INT32:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_int32(pair, <int32_t*>&cint)
 *             return cint
 */
  }

  /* "nvpair.pxi":115
 *             return cint
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT32:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_uint32(pair, <uint32_t*>&clong)
 *             return clong
 */
  __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_UINT32) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":116
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT32:
 *             nvpair.nvpair_value_uint32(pair, <uint32_t*>&clong)             # <<<<<<<<<<<<<<
 *             return clong
 * 
 */
    nvpair_value_uint32(__pyx_v_pair, ((uint32_t *)(&__pyx_v_clong)));

    /* "nvpair.pxi":117
 *         if datatype == nvpair.DATA_TYPE_UINT32:
 *             nvpair.nvpair_value_uint32(pair, <uint32_t*>&clong)
 *             return clong             # <<<<<<<<<<<<<<
 * 
 *         if datatype == nvpair.DATA_TYPE_INT64:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_clong); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "nvpair.pxi":115
 *             return cint
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT32:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_uint32(pair, <uint32_t*>&clong)
 *             return clong
 */
  }

  /* "nvpair.pxi":119
 *             return clong
 * 
 *         if datatype == nvpair.DATA_TYPE_INT64:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_int64(pair, <int64_t*>&clong)
 *             return clong
 */
  __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_INT64) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":120
 * 
 *         if datatype == nvpair.DATA_TYPE_INT64:
 *             nvpair.nvpair_value_int64(pair, <int64_t*>&clong)             # <<<<<<<<<<<<<<
 *             return clong
 * 
 */
    nvpair_value_int64(__pyx_v_pair, ((int64_t *)(&__pyx_v_clong)));

    /* "nvpair.pxi":121
 *         if datatype == nvpair.DATA_TYPE_INT64:
 *             nvpair.nvpair_value_int64(pair, <int64_t*>&clong)
 *             return clong             # <<<<<<<<<<<<<<
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT64:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_clong); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "nvpair.pxi":119
 *             return clong
 * 
 *         if datatype == nvpair.DATA_TYPE_INT64:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_int64(pair, <int64_t*>&clong)
 *             return clong
 */
  }

  /* "nvpair.pxi":123
 *             return clong
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT64:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_uint64(pair, <uint64_t*>&clong)
 *             return clong
 */
  __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_UINT64) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":124
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT64:
 *             nvpair.nvpair_value_uint64(pair, <uint64_t*>&clong)             # <<<<<<<<<<<<<<
 *             return clong
 * 
 */
    nvpair_value_uint64(__pyx_v_pair, ((uint64_t *)(&__pyx_v_clong)));

    /* "nvpair.pxi":125
 *         if datatype == nvpair.DATA_TYPE_UINT64:
 *             nvpair.nvpair_value_uint64(pair, <uint64_t*>&clong)
 *             return clong             # <<<<<<<<<<<<<<
 * 
 *         if datatype == nvpair.DATA_TYPE_BYTE_ARRAY:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_clong); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "nvpair.pxi":123
 *             return clong
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT64:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_uint64(pair, <uint64_t*>&clong)
 *             return clong
 */
  }

  /* "nvpair.pxi":127
 *             return clong
 * 
 *         if datatype == nvpair.DATA_TYPE_BYTE_ARRAY:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_byte_array(pair, <uchar_t**>&carray, &carraylen)
 *             return [x for x in (<uchar_t *>carray)[:carraylen]]
 */
  __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_BYTE_ARRAY) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":128
 * 
 *         if datatype == nvpair.DATA_TYPE_BYTE_ARRAY:
 *             nvpair.nvpair_value_byte_array(pair, <uchar_t**>&carray, &carraylen)             # <<<<<<<<<<<<<<
 *             return [x for x in (<uchar_t *>carray)[:carraylen]]
 * 
 */
    nvpair_value_byte_array(__pyx_v_pair, ((uchar_t **)(&__pyx_v_carray)), (&__pyx_v_carraylen));

    /* "nvpair.pxi":129
 *         if datatype == nvpair.DATA_TYPE_BYTE_ARRAY:
 *             nvpair.nvpair_value_byte_array(pair, <uchar_t**>&carray, &carraylen)
 *             return [x for x in (<uchar_t *>carray)[:carraylen]]             # <<<<<<<<<<<<<<
 * 
 *         if datatype == nvpair.DATA_TYPE_INT8_ARRAY:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyUnicode_FromStringAndSize(((const char*)((uchar_t *)__pyx_v_carray)) + 0, __pyx_v_carraylen - 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_init_unicode_iteration(__pyx_t_3, (&__pyx_t_5), (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(2, 129, __pyx_L1_error)
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_5; __pyx_t_9++) {
      __pyx_t_4 = __pyx_t_9;
      __pyx_t_10 = PyUnicode_FromOrdinal(__Pyx_PyUnicode_READ(__pyx_t_7, __pyx_t_6, __pyx_t_4)); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 129, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_10);
      __pyx_t_10 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_v_x))) __PYX_ERR(2, 129, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "nvpair.pxi":127
 *             return clong
 * 
 *         if datatype == nvpair.DATA_TYPE_BYTE_ARRAY:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_byte_array(pair, <uchar_t**>&carray, &carraylen)
 *             return [x for x in (<uchar_t *>carray)[:carraylen]]
 */
  }

  /* "nvpair.pxi":131
 *             return [x for x in (<uchar_t *>carray)[:carraylen]]
 * 
 *         if datatype == nvpair.DATA_TYPE_INT8_ARRAY:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_int8_array(pair, <int8_t**>&carray, &carraylen)
 *             return [x for x in (<uint8_t *>carray)[:carraylen]]
 */
  __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_INT8_ARRAY) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":132
 * 
 *         if datatype == nvpair.DATA_TYPE_INT8_ARRAY:
 *             nvpair.nvpair_value_int8_array(pair, <int8_t**>&carray, &carraylen)             # <<<<<<<<<<<<<<
 *             return [x for x in (<uint8_t *>carray)[:carraylen]]
 * 
 */
    nvpair_value_int8_array(__pyx_v_pair, ((int8_t **)(&__pyx_v_carray)), (&__pyx_v_carraylen));

    /* "nvpair.pxi":133
 *         if datatype == nvpair.DATA_TYPE_INT8_ARRAY:
 *             nvpair.nvpair_value_int8_array(pair, <int8_t**>&carray, &carraylen)
 *             return [x for x in (<uint8_t *>carray)[:carraylen]]             # <<<<<<<<<<<<<<
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT8_ARRAY:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyUnicode_FromStringAndSize(((const char*)((uint8_t *)__pyx_v_carray)) + 0, __pyx_v_carraylen - 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_init_unicode_iteration(__pyx_t_3, (&__pyx_t_4), (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(2, 133, __pyx_L1_error)
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_4; __pyx_t_9++) {
      __pyx_t_5 = __pyx_t_9;
      __pyx_t_10 = PyUnicode_FromOrdinal(__Pyx_PyUnicode_READ(__pyx_t_7, __pyx_t_6, __pyx_t_5)); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 133, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_10);
      __pyx_t_10 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_v_x))) __PYX_ERR(2, 133, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "nvpair.pxi":131
 *             return [x for x in (<uchar_t *>carray)[:carraylen]]
 * 
 *         if datatype == nvpair.DATA_TYPE_INT8_ARRAY:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_int8_array(pair, <int8_t**>&carray, &carraylen)
 *             return [x for x in (<uint8_t *>carray)[:carraylen]]
 */
  }

  /* "nvpair.pxi":135
 *             return [x for x in (<uint8_t *>carray)[:carraylen]]
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT8_ARRAY:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_uint8_array(pair, <uint8_t**>&carray, &carraylen)
 *             return [x for x in (<uint8_t *>carray)[:carraylen]]
 */
  __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_UINT8_ARRAY) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":136
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT8_ARRAY:
 *             nvpair.nvpair_value_uint8_array(pair, <uint8_t**>&carray, &carraylen)             # <<<<<<<<<<<<<<
 *             return [x for x in (<uint8_t *>carray)[:carraylen]]
 * 
 */
    nvpair_value_uint8_array(__pyx_v_pair, ((uint8_t **)(&__pyx_v_carray)), (&__pyx_v_carraylen));

    /* "nvpair.pxi":137
 *         if datatype == nvpair.DATA_TYPE_UINT8_ARRAY:
 *             nvpair.nvpair_value_uint8_array(pair, <uint8_t**>&carray, &carraylen)
 *             return [x for x in (<uint8_t *>carray)[:carraylen]]             # <<<<<<<<<<<<<<
 * 
 *         if datatype == nvpair.DATA_TYPE_INT16_ARRAY:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyUnicode_FromStringAndSize(((const char*)((uint8_t *)__pyx_v_carray)) + 0, __pyx_v_carraylen - 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_init_unicode_iteration(__pyx_t_3, (&__pyx_t_5), (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(2, 137, __pyx_L1_error)
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_5; __pyx_t_9++) {
      __pyx_t_4 = __pyx_t_9;
      __pyx_t_10 = PyUnicode_FromOrdinal(__Pyx_PyUnicode_READ(__pyx_t_7, __pyx_t_6, __pyx_t_4)); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 137, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_10);
      __pyx_t_10 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_v_x))) __PYX_ERR(2, 137, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "nvpair.pxi":135
 *             return [x for x in (<uint8_t *>carray)[:carraylen]]
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT8_ARRAY:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_uint8_array(pair, <uint8_t**>&carray, &carraylen)
 *             return [x for x in (<uint8_t *>carray)[:carraylen]]
 */
  }

  /* "nvpair.pxi":139
 *             return [x for x in (<uint8_t *>carray)[:carraylen]]
 * 
 *         if datatype == nvpair.DATA_TYPE_INT16_ARRAY:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_int16_array(pair, <int16_t**>&carray, &carraylen)
 *             return [x for x in (<int16_t *>carray)[:carraylen]]
 */
  __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_INT16_ARRAY) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":140
 * 
 *         if datatype == nvpair.DATA_TYPE_INT16_ARRAY:
 *             nvpair.nvpair_value_int16_array(pair, <int16_t**>&carray, &carraylen)             # <<<<<<<<<<<<<<
 *             return [x for x in (<int16_t *>carray)[:carraylen]]
 * 
 */
    nvpair_value_int16_array(__pyx_v_pair, ((int16_t **)(&__pyx_v_carray)), (&__pyx_v_carraylen));

    /* "nvpair.pxi":141
 *         if datatype == nvpair.DATA_TYPE_INT16_ARRAY:
 *             nvpair.nvpair_value_int16_array(pair, <int16_t**>&carray, &carraylen)
 *             return [x for x in (<int16_t *>carray)[:carraylen]]             # <<<<<<<<<<<<<<
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT16_ARRAY:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_12 = (((int16_t *)__pyx_v_carray) + __pyx_v_carraylen);
    for (__pyx_t_13 = ((int16_t *)__pyx_v_carray); __pyx_t_13 < __pyx_t_12; __pyx_t_13++) {
      __pyx_t_11 = __pyx_t_13;
      __pyx_t_3 = __Pyx_PyInt_From_int16_t((__pyx_t_11[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 141, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3);
      __pyx_t_3 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_v_x))) __PYX_ERR(2, 141, __pyx_L1_error)
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "nvpair.pxi":139
 *             return [x for x in (<uint8_t *>carray)[:carraylen]]
 * 
 *         if datatype == nvpair.DATA_TYPE_INT16_ARRAY:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_int16_array(pair, <int16_t**>&carray, &carraylen)
 *             return [x for x in (<int16_t *>carray)[:carraylen]]
 */
  }

  /* "nvpair.pxi":143
 *             return [x for x in (<int16_t *>carray)[:carraylen]]
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT16_ARRAY:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_uint16_array(pair, <uint16_t**>&carray, &carraylen)
 *             return [x for x in (<uint16_t *>carray)[:carraylen]]
 */
  __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_UINT16_ARRAY) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":144
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT16_ARRAY:
 *             nvpair.nvpair_value_uint16_array(pair, <uint16_t**>&carray, &carraylen)             # <<<<<<<<<<<<<<
 *             return [x for x in (<uint16_t *>carray)[:carraylen]]
 * 
 */
    nvpair_value_uint16_array(__pyx_v_pair, ((uint16_t **)(&__pyx_v_carray)), (&__pyx_v_carraylen));

    /* "nvpair.pxi":145
 *         if datatype == nvpair.DATA_TYPE_UINT16_ARRAY:
 *             nvpair.nvpair_value_uint16_array(pair, <uint16_t**>&carray, &carraylen)
 *             return [x for x in (<uint16_t *>carray)[:carraylen]]             # <<<<<<<<<<<<<<
 * 
 *         if datatype == nvpair.DATA_TYPE_INT32_ARRAY:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_15 = (((uint16_t *)__pyx_v_carray) + __pyx_v_carraylen);
    for (__pyx_t_16 = ((uint16_t *)__pyx_v_carray); __pyx_t_16 < __pyx_t_15; __pyx_t_16++) {
      __pyx_t_14 = __pyx_t_16;
      __pyx_t_3 = __Pyx_PyInt_From_uint16_t((__pyx_t_14[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3);
      __pyx_t_3 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_v_x))) __PYX_ERR(2, 145, __pyx_L1_error)
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "nvpair.pxi":143
 *             return [x for x in (<int16_t *>carray)[:carraylen]]
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT16_ARRAY:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_uint16_array(pair, <uint16_t**>&carray, &carraylen)
 *             return [x for x in (<uint16_t *>carray)[:carraylen]]
 */
  }

  /* "nvpair.pxi":147
 *             return [x for x in (<uint16_t *>carray)[:carraylen]]
 * 
 *         if datatype == nvpair.DATA_TYPE_INT32_ARRAY:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_int32_array(pair, <int32_t**>&carray, &carraylen)
 *             return [x for x in (<int32_t *>carray)[:carraylen]]
 */
  __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_INT32_ARRAY) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":148
 * 
 *         if datatype == nvpair.DATA_TYPE_INT32_ARRAY:
 *             nvpair.nvpair_value_int32_array(pair, <int32_t**>&carray, &carraylen)             # <<<<<<<<<<<<<<
 *             return [x for x in (<int32_t *>carray)[:carraylen]]
 * 
 */
    nvpair_value_int32_array(__pyx_v_pair, ((int32_t **)(&__pyx_v_carray)), (&__pyx_v_carraylen));

    /* "nvpair.pxi":149
 *         if datatype == nvpair.DATA_TYPE_INT32_ARRAY:
 *             nvpair.nvpair_value_int32_array(pair, <int32_t**>&carray, &carraylen)
 *             return [x for x in (<int32_t *>carray)[:carraylen]]             # <<<<<<<<<<<<<<
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT32_ARRAY:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_18 = (((int32_t *)__pyx_v_carray) + __pyx_v_carraylen);
    for (__pyx_t_19 = ((int32_t *)__pyx_v_carray); __pyx_t_19 < __pyx_t_18; __pyx_t_19++) {
      __pyx_t_17 = __pyx_t_19;
      __pyx_t_3 = __Pyx_PyInt_From_int32_t((__pyx_t_17[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3);
      __pyx_t_3 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_v_x))) __PYX_ERR(2, 149, __pyx_L1_error)
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "nvpair.pxi":147
 *             return [x for x in (<uint16_t *>carray)[:carraylen]]
 * 
 *         if datatype == nvpair.DATA_TYPE_INT32_ARRAY:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_int32_array(pair, <int32_t**>&carray, &carraylen)
 *             return [x for x in (<int32_t *>carray)[:carraylen]]
 */
  }

  /* "nvpair.pxi":151
 *             return [x for x in (<int32_t *>carray)[:carraylen]]
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT32_ARRAY:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_uint32_array(pair, <uint32_t**>&carray, &carraylen)
 *             return [x for x in (<uint32_t *>carray)[:carraylen]]
 */
  __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_UINT32_ARRAY) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":152
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT32_ARRAY:
 *             nvpair.nvpair_value_uint32_array(pair, <uint32_t**>&carray, &carraylen)             # <<<<<<<<<<<<<<
 *             return [x for x in (<uint32_t *>carray)[:carraylen]]
 * 
 */
    nvpair_value_uint32_array(__pyx_v_pair, ((uint32_t **)(&__pyx_v_carray)), (&__pyx_v_carraylen));

    /* "nvpair.pxi":153
 *         if datatype == nvpair.DATA_TYPE_UINT32_ARRAY:
 *             nvpair.nvpair_value_uint32_array(pair, <uint32_t**>&carray, &carraylen)
 *             return [x for x in (<uint32_t *>carray)[:carraylen]]             # <<<<<<<<<<<<<<
 * 
 *         if datatype == nvpair.DATA_TYPE_INT64_ARRAY:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_21 = (((uint32_t *)__pyx_v_carray) + __pyx_v_carraylen);
    for (__pyx_t_22 = ((uint32_t *)__pyx_v_carray); __pyx_t_22 < __pyx_t_21; __pyx_t_22++) {
      __pyx_t_20 = __pyx_t_22;
      __pyx_t_3 = __Pyx_PyInt_From_uint32_t((__pyx_t_20[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3);
      __pyx_t_3 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_v_x))) __PYX_ERR(2, 153, __pyx_L1_error)
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "nvpair.pxi":151
 *             return [x for x in (<int32_t *>carray)[:carraylen]]
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT32_ARRAY:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_uint32_array(pair, <uint32_t**>&carray, &carraylen)
 *             return [x for x in (<uint32_t *>carray)[:carraylen]]
 */
  }

  /* "nvpair.pxi":155
 *             return [x for x in (<uint32_t *>carray)[:carraylen]]
 * 
 *         if datatype == nvpair.DATA_TYPE_INT64_ARRAY:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_int64_array(pair, <int64_t**>&carray, &carraylen)
 *             return [x for x in (<int64_t *>carray)[:carraylen]]
 */
  __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_INT64_ARRAY) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":156
 * 
 *         if datatype == nvpair.DATA_TYPE_INT64_ARRAY:
 *             nvpair.nvpair_value_int64_array(pair, <int64_t**>&carray, &carraylen)             # <<<<<<<<<<<<<<
 *             return [x for x in (<int64_t *>carray)[:carraylen]]
 * 
 */
    nvpair_value_int64_array(__pyx_v_pair, ((int64_t **)(&__pyx_v_carray)), (&__pyx_v_carraylen));

    /* "nvpair.pxi":157
 *         if datatype == nvpair.DATA_TYPE_INT64_ARRAY:
 *             nvpair.nvpair_value_int64_array(pair, <int64_t**>&carray, &carraylen)
 *             return [x for x in (<int64_t *>carray)[:carraylen]]             # <<<<<<<<<<<<<<
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT64_ARRAY:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_24 = (((int64_t *)__pyx_v_carray) + __pyx_v_carraylen);
    for (__pyx_t_25 = ((int64_t *)__pyx_v_carray); __pyx_t_25 < __pyx_t_24; __pyx_t_25++) {
      __pyx_t_23 = __pyx_t_25;
      __pyx_t_3 = __Pyx_PyInt_From_int64_t((__pyx_t_23[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 157, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3);
      __pyx_t_3 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_v_x))) __PYX_ERR(2, 157, __pyx_L1_error)
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "nvpair.pxi":155
 *             return [x for x in (<uint32_t *>carray)[:carraylen]]
 * 
 *         if datatype == nvpair.DATA_TYPE_INT64_ARRAY:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_int64_array(pair, <int64_t**>&carray, &carraylen)
 *             return [x for x in (<int64_t *>carray)[:carraylen]]
 */
  }

  /* "nvpair.pxi":159
 *             return [x for x in (<int64_t *>carray)[:carraylen]]
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT64_ARRAY:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_uint64_array(pair, <uint64_t**>&carray, &carraylen)
 *             return [x for x in (<uint64_t *>carray)[:carraylen]]
 */
  __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_UINT64_ARRAY) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":160
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT64_ARRAY:
 *             nvpair.nvpair_value_uint64_array(pair, <uint64_t**>&carray, &carraylen)             # <<<<<<<<<<<<<<
 *             return [x for x in (<uint64_t *>carray)[:carraylen]]
 * 
 */
    nvpair_value_uint64_array(__pyx_v_pair, ((uint64_t **)(&__pyx_v_carray)), (&__pyx_v_carraylen));

    /* "nvpair.pxi":161
 *         if datatype == nvpair.DATA_TYPE_UINT64_ARRAY:
 *             nvpair.nvpair_value_uint64_array(pair, <uint64_t**>&carray, &carraylen)
 *             return [x for x in (<uint64_t *>carray)[:carraylen]]             # <<<<<<<<<<<<<<
 * 
 *         if datatype == nvpair.DATA_TYPE_STRING_ARRAY:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_27 = (((uint64_t *)__pyx_v_carray) + __pyx_v_carraylen);
    for (__pyx_t_28 = ((uint64_t *)__pyx_v_carray); __pyx_t_28 < __pyx_t_27; __pyx_t_28++) {
      __pyx_t_26 = __pyx_t_28;
      __pyx_t_3 = __Pyx_PyInt_From_uint64_t((__pyx_t_26[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3);
      __pyx_t_3 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_v_x))) __PYX_ERR(2, 161, __pyx_L1_error)
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "nvpair.pxi":159
 *             return [x for x in (<int64_t *>carray)[:carraylen]]
 * 
 *         if datatype == nvpair.DATA_TYPE_UINT64_ARRAY:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_uint64_array(pair, <uint64_t**>&carray, &carraylen)
 *             return [x for x in (<uint64_t *>carray)[:carraylen]]
 */
  }

  /* "nvpair.pxi":163
 *             return [x for x in (<uint64_t *>carray)[:carraylen]]
 * 
 *         if datatype == nvpair.DATA_TYPE_STRING_ARRAY:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_string_array(pair, <char***>&carray, &carraylen)
 *             return [x for x in (<char**>carray)[:carraylen]]
 */
  __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_STRING_ARRAY) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":164
 * 
 *         if datatype == nvpair.DATA_TYPE_STRING_ARRAY:
 *             nvpair.nvpair_value_string_array(pair, <char***>&carray, &carraylen)             # <<<<<<<<<<<<<<
 *             return [x for x in (<char**>carray)[:carraylen]]
 * 
 */
    nvpair_value_string_array(__pyx_v_pair, ((char ***)(&__pyx_v_carray)), (&__pyx_v_carraylen));

    /* "nvpair.pxi":165
 *         if datatype == nvpair.DATA_TYPE_STRING_ARRAY:
 *             nvpair.nvpair_value_string_array(pair, <char***>&carray, &carraylen)
 *             return [x for x in (<char**>carray)[:carraylen]]             # <<<<<<<<<<<<<<
 * 
 *         if datatype == nvpair.DATA_TYPE_NVLIST:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_30 = (((char **)__pyx_v_carray) + __pyx_v_carraylen);
    for (__pyx_t_31 = ((char **)__pyx_v_carray); __pyx_t_31 < __pyx_t_30; __pyx_t_31++) {
      __pyx_t_29 = __pyx_t_31;
      __pyx_t_3 = __Pyx_PyUnicode_FromString((__pyx_t_29[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 165, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3);
      __pyx_t_3 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_v_x))) __PYX_ERR(2, 165, __pyx_L1_error)
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "nvpair.pxi":163
 *             return [x for x in (<uint64_t *>carray)[:carraylen]]
 * 
 *         if datatype == nvpair.DATA_TYPE_STRING_ARRAY:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_string_array(pair, <char***>&carray, &carraylen)
 *             return [x for x in (<char**>carray)[:carraylen]]
 */
  }

  /* "nvpair.pxi":167
 *             return [x for x in (<char**>carray)[:carraylen]]
 * 
 *         if datatype == nvpair.DATA_TYPE_NVLIST:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_nvlist(pair, &nested)
 *             return dict(NVList(<uintptr_t>nested)) if wrap_dict else NVList(<uintptr_t>nested)
 */
  __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_NVLIST) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":168
 * 
 *         if datatype == nvpair.DATA_TYPE_NVLIST:
 *             nvpair.nvpair_value_nvlist(pair, &nested)             # <<<<<<<<<<<<<<
 *             return dict(NVList(<uintptr_t>nested)) if wrap_dict else NVList(<uintptr_t>nested)
 * 
 */
    nvpair_value_nvlist(__pyx_v_pair, (&__pyx_v_nested));

    /* "nvpair.pxi":169
 *         if datatype == nvpair.DATA_TYPE_NVLIST:
 *             nvpair.nvpair_value_nvlist(pair, &nested)
 *             return dict(NVList(<uintptr_t>nested)) if wrap_dict else NVList(<uintptr_t>nested)             # <<<<<<<<<<<<<<
 * 
 *         if datatype == nvpair.DATA_TYPE_NVLIST_ARRAY:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_wrap_dict); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 169, __pyx_L1_error)
    if (__pyx_t_1) {
      __pyx_t_3 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_nested)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_NVList), __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyDict_Type)), __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_2 = __pyx_t_3;
      __pyx_t_3 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_nested)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_NVList), __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_2 = __pyx_t_3;
      __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "nvpair.pxi":167
 *             return [x for x in (<char**>carray)[:carraylen]]
 * 
 *         if datatype == nvpair.DATA_TYPE_NVLIST:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_nvlist(pair, &nested)
 *             return dict(NVList(<uintptr_t>nested)) if wrap_dict else NVList(<uintptr_t>nested)
 */
  }

  /* "nvpair.pxi":171
 *             return dict(NVList(<uintptr_t>nested)) if wrap_dict else NVList(<uintptr_t>nested)
 * 
 *         if datatype == nvpair.DATA_TYPE_NVLIST_ARRAY:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_nvlist_array(pair, <nvpair.nvlist_t***>&carray, &carraylen)
 *             return [dict(NVList(x)) if wrap_dict else NVList(x) for x in (<uintptr_t *>carray)[:carraylen]]
 */
  __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_NVLIST_ARRAY) != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":172
 * 
 *         if datatype == nvpair.DATA_TYPE_NVLIST_ARRAY:
 *             nvpair.nvpair_value_nvlist_array(pair, <nvpair.nvlist_t***>&carray, &carraylen)             # <<<<<<<<<<<<<<
 *             return [dict(NVList(x)) if wrap_dict else NVList(x) for x in (<uintptr_t *>carray)[:carraylen]]
 * 
 */
    nvpair_value_nvlist_array(__pyx_v_pair, ((nvlist_t ***)(&__pyx_v_carray)), (&__pyx_v_carraylen));

    /* "nvpair.pxi":173
 *         if datatype == nvpair.DATA_TYPE_NVLIST_ARRAY:
 *             nvpair.nvpair_value_nvlist_array(pair, <nvpair.nvlist_t***>&carray, &carraylen)
 *             return [dict(NVList(x)) if wrap_dict else NVList(x) for x in (<uintptr_t *>carray)[:carraylen]]             # <<<<<<<<<<<<<<
 * 
 *     def __contains__(self, key):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_33 = (((uintptr_t *)__pyx_v_carray) + __pyx_v_carraylen);
    for (__pyx_t_34 = ((uintptr_t *)__pyx_v_carray); __pyx_t_34 < __pyx_t_33; __pyx_t_34++) {
      __pyx_t_32 = __pyx_t_34;
      __pyx_t_3 = __Pyx_PyInt_FromSize_t((__pyx_t_32[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 173, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_wrap_dict); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 173, __pyx_L1_error)
      if (__pyx_t_1) {
        __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 173, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_INCREF(__pyx_v_x);
        __Pyx_GIVEREF(__pyx_v_x);
        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_x);
        __pyx_t_35 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_NVList), __pyx_t_10, NULL); if (unlikely(!__pyx_t_35)) __PYX_ERR(2, 173, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_35);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 173, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_35);
        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_35);
        __pyx_t_35 = 0;
        __pyx_t_35 = __Pyx_PyObject_Call(((PyObject *)(&PyDict_Type)), __pyx_t_10, NULL); if (unlikely(!__pyx_t_35)) __PYX_ERR(2, 173, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_35);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_3 = __pyx_t_35;
        __pyx_t_35 = 0;
      } else {
        __pyx_t_35 = PyTuple_New(1); if (unlikely(!__pyx_t_35)) __PYX_ERR(2, 173, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_35);
        __Pyx_INCREF(__pyx_v_x);
        __Pyx_GIVEREF(__pyx_v_x);
        PyTuple_SET_ITEM(__pyx_t_35, 0, __pyx_v_x);
        __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_NVList), __pyx_t_35, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 173, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_35); __pyx_t_35 = 0;
        __pyx_t_3 = __pyx_t_10;
        __pyx_t_10 = 0;
      }
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(2, 173, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "nvpair.pxi":171
 *             return dict(NVList(<uintptr_t>nested)) if wrap_dict else NVList(<uintptr_t>nested)
 * 
 *         if datatype == nvpair.DATA_TYPE_NVLIST_ARRAY:             # <<<<<<<<<<<<<<
 *             nvpair.nvpair_value_nvlist_array(pair, <nvpair.nvlist_t***>&carray, &carraylen)
 *             return [dict(NVList(x)) if wrap_dict else NVList(x) for x in (<uintptr_t *>carray)[:carraylen]]
 */
  }

  /* "nvpair.pxi":71
 *         return pair
 * 
 *     cdef object __get_value(self, nvpair.nvpair_t* pair, wrap_dict=True):             # <<<<<<<<<<<<<<
 *         cdef nvpair.nvlist_t *nested
 *         cdef char *cstr
 */

  /* 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_10);
  __Pyx_XDECREF(__pyx_t_35);
  __Pyx_AddTraceback("libzfs.NVList.__get_value", __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;
}

/* "nvpair.pxi":175
 *             return [dict(NVList(x)) if wrap_dict else NVList(x) for x in (<uintptr_t *>carray)[:carraylen]]
 * 
 *     def __contains__(self, key):             # <<<<<<<<<<<<<<
 *         return nvpair.nvlist_exists(self.handle, key)
 * 
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_6NVList_5__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static int __pyx_pw_6libzfs_6NVList_5__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_6NVList_4__contains__(((struct __pyx_obj_6libzfs_NVList *)__pyx_v_self), ((PyObject *)__pyx_v_key));

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

static int __pyx_pf_6libzfs_6NVList_4__contains__(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  char const *__pyx_t_1;
  __Pyx_RefNannySetupContext("__contains__", 0);

  /* "nvpair.pxi":176
 * 
 *     def __contains__(self, key):
 *         return nvpair.nvlist_exists(self.handle, key)             # <<<<<<<<<<<<<<
 * 
 *     def __delitem__(self, key):
 */
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(2, 176, __pyx_L1_error)
  __pyx_r = nvlist_exists(__pyx_v_self->handle, __pyx_t_1);
  goto __pyx_L0;

  /* "nvpair.pxi":175
 *             return [dict(NVList(x)) if wrap_dict else NVList(x) for x in (<uintptr_t *>carray)[:carraylen]]
 * 
 *     def __contains__(self, key):             # <<<<<<<<<<<<<<
 *         return nvpair.nvlist_exists(self.handle, key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("libzfs.NVList.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "nvpair.pxi":178
 *         return nvpair.nvlist_exists(self.handle, key)
 * 
 *     def __delitem__(self, key):             # <<<<<<<<<<<<<<
 *         nvpair.nvlist_remove(self.handle, key, self.type(key))
 * 
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_6NVList_7__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static int __pyx_pw_6libzfs_6NVList_7__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_6NVList_6__delitem__(((struct __pyx_obj_6libzfs_NVList *)__pyx_v_self), ((PyObject *)__pyx_v_key));

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

static int __pyx_pf_6libzfs_6NVList_6__delitem__(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  char const *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  data_type_t __pyx_t_6;
  __Pyx_RefNannySetupContext("__delitem__", 0);

  /* "nvpair.pxi":179
 * 
 *     def __delitem__(self, key):
 *         nvpair.nvlist_remove(self.handle, key, self.type(key))             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(2, 179, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_key);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = ((data_type_t)__Pyx_PyInt_As_data_type_t(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 179, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  nvlist_remove(__pyx_v_self->handle, __pyx_t_1, __pyx_t_6);

  /* "nvpair.pxi":178
 *         return nvpair.nvlist_exists(self.handle, key)
 * 
 *     def __delitem__(self, key):             # <<<<<<<<<<<<<<
 *         nvpair.nvlist_remove(self.handle, key, self.type(key))
 * 
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("libzfs.NVList.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6libzfs_6NVList_10generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "nvpair.pxi":181
 *         nvpair.nvlist_remove(self.handle, key, self.type(key))
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef nvpair.nvpair_t *pair = NULL
 *         while True:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_6NVList_9__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_6NVList_9__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_6NVList_8__iter__(((struct __pyx_obj_6libzfs_NVList *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_6NVList_8__iter__(struct __pyx_obj_6libzfs_NVList *__pyx_v_self) {
  struct __pyx_obj_6libzfs___pyx_scope_struct____iter__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);
  __pyx_cur_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct____iter__ *)__pyx_tp_new_6libzfs___pyx_scope_struct____iter__(__pyx_ptype_6libzfs___pyx_scope_struct____iter__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6libzfs_6NVList_10generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_NVList___iter); if (unlikely(!gen)) __PYX_ERR(2, 181, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

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

static PyObject *__pyx_gb_6libzfs_6NVList_10generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6libzfs___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_6libzfs___pyx_scope_struct____iter__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L7_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(2, 181, __pyx_L1_error)

  /* "nvpair.pxi":182
 * 
 *     def __iter__(self):
 *         cdef nvpair.nvpair_t *pair = NULL             # <<<<<<<<<<<<<<
 *         while True:
 *             pair = nvpair.nvlist_next_nvpair(self.handle, pair)
 */
  __pyx_cur_scope->__pyx_v_pair = NULL;

  /* "nvpair.pxi":183
 *     def __iter__(self):
 *         cdef nvpair.nvpair_t *pair = NULL
 *         while True:             # <<<<<<<<<<<<<<
 *             pair = nvpair.nvlist_next_nvpair(self.handle, pair)
 *             if pair is NULL:
 */
  while (1) {

    /* "nvpair.pxi":184
 *         cdef nvpair.nvpair_t *pair = NULL
 *         while True:
 *             pair = nvpair.nvlist_next_nvpair(self.handle, pair)             # <<<<<<<<<<<<<<
 *             if pair is NULL:
 *                 return
 */
    __pyx_cur_scope->__pyx_v_pair = nvlist_next_nvpair(__pyx_cur_scope->__pyx_v_self->handle, __pyx_cur_scope->__pyx_v_pair);

    /* "nvpair.pxi":185
 *         while True:
 *             pair = nvpair.nvlist_next_nvpair(self.handle, pair)
 *             if pair is NULL:             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
    __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_pair == NULL) != 0);
    if (__pyx_t_1) {

      /* "nvpair.pxi":186
 *             pair = nvpair.nvlist_next_nvpair(self.handle, pair)
 *             if pair is NULL:
 *                 return             # <<<<<<<<<<<<<<
 * 
 *             yield nvpair.nvpair_name(pair)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = NULL;
      goto __pyx_L0;

      /* "nvpair.pxi":185
 *         while True:
 *             pair = nvpair.nvlist_next_nvpair(self.handle, pair)
 *             if pair is NULL:             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
    }

    /* "nvpair.pxi":188
 *                 return
 * 
 *             yield nvpair.nvpair_name(pair)             # <<<<<<<<<<<<<<
 * 
 *     def get(self, key, object default=None):
 */
    __pyx_t_2 = __Pyx_PyUnicode_FromString(nvpair_name(__pyx_cur_scope->__pyx_v_pair)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L7_resume_from_yield:;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 188, __pyx_L1_error)
  }

  /* "nvpair.pxi":181
 *         nvpair.nvlist_remove(self.handle, key, self.type(key))
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef nvpair.nvpair_t *pair = NULL
 *         while True:
 */

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

/* "nvpair.pxi":190
 *             yield nvpair.nvpair_name(pair)
 * 
 *     def get(self, key, object default=None):             # <<<<<<<<<<<<<<
 *         if not key in self:
 *             return default
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_6NVList_12get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_6NVList_12get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_default = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_default,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_default);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) __PYX_ERR(2, 190, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_key = values[0];
    __pyx_v_default = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 190, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.NVList.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_6NVList_11get(((struct __pyx_obj_6libzfs_NVList *)__pyx_v_self), __pyx_v_key, __pyx_v_default);

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

static PyObject *__pyx_pf_6libzfs_6NVList_11get(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("get", 0);

  /* "nvpair.pxi":191
 * 
 *     def get(self, key, object default=None):
 *         if not key in self:             # <<<<<<<<<<<<<<
 *             return default
 * 
 */
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, ((PyObject *)__pyx_v_self), Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 191, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "nvpair.pxi":192
 *     def get(self, key, object default=None):
 *         if not key in self:
 *             return default             # <<<<<<<<<<<<<<
 * 
 *         return self[key]
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_default);
    __pyx_r = __pyx_v_default;
    goto __pyx_L0;

    /* "nvpair.pxi":191
 * 
 *     def get(self, key, object default=None):
 *         if not key in self:             # <<<<<<<<<<<<<<
 *             return default
 * 
 */
  }

  /* "nvpair.pxi":194
 *             return default
 * 
 *         return self[key]             # <<<<<<<<<<<<<<
 * 
 *     def type(self, key):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "nvpair.pxi":190
 *             yield nvpair.nvpair_name(pair)
 * 
 *     def get(self, key, object default=None):             # <<<<<<<<<<<<<<
 *         if not key in self:
 *             return default
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("libzfs.NVList.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "nvpair.pxi":196
 *         return self[key]
 * 
 *     def type(self, key):             # <<<<<<<<<<<<<<
 *         cdef nvpair.nvpair_t *pair = self.__get_pair(key)
 *         return nvpair.nvpair_type(pair)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_6NVList_14type(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_6libzfs_6NVList_14type(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("type (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_6NVList_13type(((struct __pyx_obj_6libzfs_NVList *)__pyx_v_self), ((PyObject *)__pyx_v_key));

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

static PyObject *__pyx_pf_6libzfs_6NVList_13type(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, PyObject *__pyx_v_key) {
  nvpair_t *__pyx_v_pair;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  nvpair_t *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("type", 0);

  /* "nvpair.pxi":197
 * 
 *     def type(self, key):
 *         cdef nvpair.nvpair_t *pair = self.__get_pair(key)             # <<<<<<<<<<<<<<
 *         return nvpair.nvpair_type(pair)
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6libzfs_NVList *)__pyx_v_self->__pyx_vtab)->__pyx___get_pair(__pyx_v_self, __pyx_v_key); if (unlikely(__pyx_t_1 == NULL)) __PYX_ERR(2, 197, __pyx_L1_error)
  __pyx_v_pair = __pyx_t_1;

  /* "nvpair.pxi":198
 *     def type(self, key):
 *         cdef nvpair.nvpair_t *pair = self.__get_pair(key)
 *         return nvpair.nvpair_type(pair)             # <<<<<<<<<<<<<<
 * 
 *     def set(self, key, value, typeid):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_data_type_t(nvpair_type(__pyx_v_pair)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "nvpair.pxi":196
 *         return self[key]
 * 
 *     def type(self, key):             # <<<<<<<<<<<<<<
 *         cdef nvpair.nvpair_t *pair = self.__get_pair(key)
 *         return nvpair.nvpair_type(pair)
 */

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

/* "nvpair.pxi":200
 *         return nvpair.nvpair_type(pair)
 * 
 *     def set(self, key, value, typeid):             # <<<<<<<<<<<<<<
 *         cdef NVList cnvlist
 *         cdef void* carray = NULL
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_6NVList_16set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_6NVList_16set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_typeid = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_value,&__pyx_n_s_typeid,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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set", 1, 3, 3, 1); __PYX_ERR(2, 200, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_typeid)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set", 1, 3, 3, 2); __PYX_ERR(2, 200, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(2, 200, __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_key = values[0];
    __pyx_v_value = values[1];
    __pyx_v_typeid = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 200, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.NVList.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_6NVList_15set(((struct __pyx_obj_6libzfs_NVList *)__pyx_v_self), __pyx_v_key, __pyx_v_value, __pyx_v_typeid);

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

static PyObject *__pyx_pf_6libzfs_6NVList_15set(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, PyObject *__pyx_v_typeid) {
  struct __pyx_obj_6libzfs_NVList *__pyx_v_cnvlist = 0;
  void *__pyx_v_carray;
  PyObject *__pyx_v_idx = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  char const *__pyx_t_7;
  char const *__pyx_t_8;
  char const *__pyx_t_9;
  boolean_t __pyx_t_10;
  char const *__pyx_t_11;
  char __pyx_t_12;
  char const *__pyx_t_13;
  uint8_t __pyx_t_14;
  char const *__pyx_t_15;
  int8_t __pyx_t_16;
  char const *__pyx_t_17;
  uint16_t __pyx_t_18;
  char const *__pyx_t_19;
  int16_t __pyx_t_20;
  char const *__pyx_t_21;
  uint32_t __pyx_t_22;
  char const *__pyx_t_23;
  int32_t __pyx_t_24;
  char const *__pyx_t_25;
  uint64_t __pyx_t_26;
  char const *__pyx_t_27;
  int64_t __pyx_t_28;
  char const *__pyx_t_29;
  Py_ssize_t __pyx_t_30;
  PyObject *(*__pyx_t_31)(PyObject *);
  PyObject *__pyx_t_32 = NULL;
  char *__pyx_t_33;
  Py_ssize_t __pyx_t_34;
  char const *__pyx_t_35;
  char const *__pyx_t_36;
  char const *__pyx_t_37;
  char const *__pyx_t_38;
  char const *__pyx_t_39;
  char const *__pyx_t_40;
  char const *__pyx_t_41;
  char const *__pyx_t_42;
  char const *__pyx_t_43;
  char const *__pyx_t_44;
  char const *__pyx_t_45;
  char const *__pyx_t_46;
  PyObject *__pyx_t_47 = NULL;
  PyObject *__pyx_t_48 = NULL;
  __Pyx_RefNannySetupContext("set", 0);

  /* "nvpair.pxi":202
 *     def set(self, key, value, typeid):
 *         cdef NVList cnvlist
 *         cdef void* carray = NULL             # <<<<<<<<<<<<<<
 *         cdef uintptr_t cptr
 * 
 */
  __pyx_v_carray = NULL;

  /* "nvpair.pxi":207
 *         # Oh god, this is tedious...
 * 
 *         if isinstance(value, (str, unicode)):             # <<<<<<<<<<<<<<
 *             if typeid == nvpair.DATA_TYPE_STRING:
 *                 nvpair.nvlist_add_string(self.handle, key, value)
 */
  __pyx_t_2 = PyString_Check(__pyx_v_value); 
  __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 = PyUnicode_Check(__pyx_v_value); 
  __pyx_t_2 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "nvpair.pxi":208
 * 
 *         if isinstance(value, (str, unicode)):
 *             if typeid == nvpair.DATA_TYPE_STRING:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_string(self.handle, key, value)
 *                 return
 */
    __pyx_t_4 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_STRING); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 208, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 208, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "nvpair.pxi":209
 *         if isinstance(value, (str, unicode)):
 *             if typeid == nvpair.DATA_TYPE_STRING:
 *                 nvpair.nvlist_add_string(self.handle, key, value)             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
      __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(2, 209, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(2, 209, __pyx_L1_error)
      nvlist_add_string(__pyx_v_self->handle, __pyx_t_6, __pyx_t_7);

      /* "nvpair.pxi":210
 *             if typeid == nvpair.DATA_TYPE_STRING:
 *                 nvpair.nvlist_add_string(self.handle, key, value)
 *                 return             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(value, type(None)):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "nvpair.pxi":208
 * 
 *         if isinstance(value, (str, unicode)):
 *             if typeid == nvpair.DATA_TYPE_STRING:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_string(self.handle, key, value)
 *                 return
 */
    }

    /* "nvpair.pxi":207
 *         # Oh god, this is tedious...
 * 
 *         if isinstance(value, (str, unicode)):             # <<<<<<<<<<<<<<
 *             if typeid == nvpair.DATA_TYPE_STRING:
 *                 nvpair.nvlist_add_string(self.handle, key, value)
 */
  }

  /* "nvpair.pxi":212
 *                 return
 * 
 *         if isinstance(value, type(None)):             # <<<<<<<<<<<<<<
 *             if typeid == nvpair.DATA_TYPE_BOOLEAN:
 *                 nvpair.nvlist_add_boolean(self.handle, key)
 */
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_value, ((PyObject *)Py_TYPE(Py_None))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(2, 212, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":213
 * 
 *         if isinstance(value, type(None)):
 *             if typeid == nvpair.DATA_TYPE_BOOLEAN:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_boolean(self.handle, key)
 *                 return
 */
    __pyx_t_5 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_BOOLEAN); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 213, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 213, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "nvpair.pxi":214
 *         if isinstance(value, type(None)):
 *             if typeid == nvpair.DATA_TYPE_BOOLEAN:
 *                 nvpair.nvlist_add_boolean(self.handle, key)             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
      __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(2, 214, __pyx_L1_error)
      nvlist_add_boolean(__pyx_v_self->handle, __pyx_t_8);

      /* "nvpair.pxi":215
 *             if typeid == nvpair.DATA_TYPE_BOOLEAN:
 *                 nvpair.nvlist_add_boolean(self.handle, key)
 *                 return             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(value, bool):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "nvpair.pxi":213
 * 
 *         if isinstance(value, type(None)):
 *             if typeid == nvpair.DATA_TYPE_BOOLEAN:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_boolean(self.handle, key)
 *                 return
 */
    }

    /* "nvpair.pxi":212
 *                 return
 * 
 *         if isinstance(value, type(None)):             # <<<<<<<<<<<<<<
 *             if typeid == nvpair.DATA_TYPE_BOOLEAN:
 *                 nvpair.nvlist_add_boolean(self.handle, key)
 */
  }

  /* "nvpair.pxi":217
 *                 return
 * 
 *         if isinstance(value, bool):             # <<<<<<<<<<<<<<
 *             if typeid == nvpair.DATA_TYPE_BOOLEAN:
 *                 nvpair.nvlist_add_boolean_value(self.handle, key, <boolean_t>value)
 */
  __pyx_t_4 = ((PyObject*)&PyBool_Type);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_1 = PyObject_IsInstance(__pyx_v_value, __pyx_t_4); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(2, 217, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "nvpair.pxi":218
 * 
 *         if isinstance(value, bool):
 *             if typeid == nvpair.DATA_TYPE_BOOLEAN:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_boolean_value(self.handle, key, <boolean_t>value)
 *                 return
 */
    __pyx_t_4 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_BOOLEAN); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 218, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 218, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "nvpair.pxi":219
 *         if isinstance(value, bool):
 *             if typeid == nvpair.DATA_TYPE_BOOLEAN:
 *                 nvpair.nvlist_add_boolean_value(self.handle, key, <boolean_t>value)             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
      __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(2, 219, __pyx_L1_error)
      __pyx_t_10 = __Pyx_PyInt_As_boolean_t(__pyx_v_value); if (unlikely((__pyx_t_10 == (boolean_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 219, __pyx_L1_error)
      nvlist_add_boolean_value(__pyx_v_self->handle, __pyx_t_9, ((boolean_t)__pyx_t_10));

      /* "nvpair.pxi":220
 *             if typeid == nvpair.DATA_TYPE_BOOLEAN:
 *                 nvpair.nvlist_add_boolean_value(self.handle, key, <boolean_t>value)
 *                 return             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(value, numbers.Number):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "nvpair.pxi":218
 * 
 *         if isinstance(value, bool):
 *             if typeid == nvpair.DATA_TYPE_BOOLEAN:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_boolean_value(self.handle, key, <boolean_t>value)
 *                 return
 */
    }

    /* "nvpair.pxi":217
 *                 return
 * 
 *         if isinstance(value, bool):             # <<<<<<<<<<<<<<
 *             if typeid == nvpair.DATA_TYPE_BOOLEAN:
 *                 nvpair.nvlist_add_boolean_value(self.handle, key, <boolean_t>value)
 */
  }

  /* "nvpair.pxi":222
 *                 return
 * 
 *         if isinstance(value, numbers.Number):             # <<<<<<<<<<<<<<
 *             if typeid == nvpair.DATA_TYPE_BYTE:
 *                 nvpair.nvlist_add_byte(self.handle, key, <char>value)
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Number); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_value, __pyx_t_4); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(2, 222, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":223
 * 
 *         if isinstance(value, numbers.Number):
 *             if typeid == nvpair.DATA_TYPE_BYTE:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_byte(self.handle, key, <char>value)
 *                 return
 */
    __pyx_t_4 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 223, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 223, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_1) {

      /* "nvpair.pxi":224
 *         if isinstance(value, numbers.Number):
 *             if typeid == nvpair.DATA_TYPE_BYTE:
 *                 nvpair.nvlist_add_byte(self.handle, key, <char>value)             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
      __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(2, 224, __pyx_L1_error)
      __pyx_t_12 = __Pyx_PyInt_As_char(__pyx_v_value); if (unlikely((__pyx_t_12 == (char)-1) && PyErr_Occurred())) __PYX_ERR(2, 224, __pyx_L1_error)
      nvlist_add_byte(__pyx_v_self->handle, __pyx_t_11, ((char)__pyx_t_12));

      /* "nvpair.pxi":225
 *             if typeid == nvpair.DATA_TYPE_BYTE:
 *                 nvpair.nvlist_add_byte(self.handle, key, <char>value)
 *                 return             # <<<<<<<<<<<<<<
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT8:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "nvpair.pxi":223
 * 
 *         if isinstance(value, numbers.Number):
 *             if typeid == nvpair.DATA_TYPE_BYTE:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_byte(self.handle, key, <char>value)
 *                 return
 */
    }

    /* "nvpair.pxi":227
 *                 return
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT8:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_uint8(self.handle, key, <uint8_t>value)
 *                 return
 */
    __pyx_t_5 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_UINT8); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 227, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 227, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "nvpair.pxi":228
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT8:
 *                 nvpair.nvlist_add_uint8(self.handle, key, <uint8_t>value)             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
      __pyx_t_13 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(2, 228, __pyx_L1_error)
      __pyx_t_14 = __Pyx_PyInt_As_uint8_t(__pyx_v_value); if (unlikely((__pyx_t_14 == (uint8_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 228, __pyx_L1_error)
      nvlist_add_uint8(__pyx_v_self->handle, __pyx_t_13, ((uint8_t)__pyx_t_14));

      /* "nvpair.pxi":229
 *             if typeid == nvpair.DATA_TYPE_UINT8:
 *                 nvpair.nvlist_add_uint8(self.handle, key, <uint8_t>value)
 *                 return             # <<<<<<<<<<<<<<
 * 
 *             if typeid == nvpair.DATA_TYPE_INT8:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "nvpair.pxi":227
 *                 return
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT8:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_uint8(self.handle, key, <uint8_t>value)
 *                 return
 */
    }

    /* "nvpair.pxi":231
 *                 return
 * 
 *             if typeid == nvpair.DATA_TYPE_INT8:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_int8(self.handle, key, <int8_t>value)
 *                 return
 */
    __pyx_t_4 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_INT8); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 231, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 231, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_1) {

      /* "nvpair.pxi":232
 * 
 *             if typeid == nvpair.DATA_TYPE_INT8:
 *                 nvpair.nvlist_add_int8(self.handle, key, <int8_t>value)             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
      __pyx_t_15 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_15) && PyErr_Occurred())) __PYX_ERR(2, 232, __pyx_L1_error)
      __pyx_t_16 = __Pyx_PyInt_As_int8_t(__pyx_v_value); if (unlikely((__pyx_t_16 == (int8_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 232, __pyx_L1_error)
      nvlist_add_int8(__pyx_v_self->handle, __pyx_t_15, ((int8_t)__pyx_t_16));

      /* "nvpair.pxi":233
 *             if typeid == nvpair.DATA_TYPE_INT8:
 *                 nvpair.nvlist_add_int8(self.handle, key, <int8_t>value)
 *                 return             # <<<<<<<<<<<<<<
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT16:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "nvpair.pxi":231
 *                 return
 * 
 *             if typeid == nvpair.DATA_TYPE_INT8:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_int8(self.handle, key, <int8_t>value)
 *                 return
 */
    }

    /* "nvpair.pxi":235
 *                 return
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT16:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_uint16(self.handle, key, <uint16_t>value)
 *                 return
 */
    __pyx_t_5 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_UINT16); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 235, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 235, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "nvpair.pxi":236
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT16:
 *                 nvpair.nvlist_add_uint16(self.handle, key, <uint16_t>value)             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
      __pyx_t_17 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(2, 236, __pyx_L1_error)
      __pyx_t_18 = __Pyx_PyInt_As_uint16_t(__pyx_v_value); if (unlikely((__pyx_t_18 == (uint16_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 236, __pyx_L1_error)
      nvlist_add_uint16(__pyx_v_self->handle, __pyx_t_17, ((uint16_t)__pyx_t_18));

      /* "nvpair.pxi":237
 *             if typeid == nvpair.DATA_TYPE_UINT16:
 *                 nvpair.nvlist_add_uint16(self.handle, key, <uint16_t>value)
 *                 return             # <<<<<<<<<<<<<<
 * 
 *             if typeid == nvpair.DATA_TYPE_INT16:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "nvpair.pxi":235
 *                 return
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT16:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_uint16(self.handle, key, <uint16_t>value)
 *                 return
 */
    }

    /* "nvpair.pxi":239
 *                 return
 * 
 *             if typeid == nvpair.DATA_TYPE_INT16:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_int16(self.handle, key, <int16_t>value)
 *                 return
 */
    __pyx_t_4 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_INT16); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 239, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 239, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_1) {

      /* "nvpair.pxi":240
 * 
 *             if typeid == nvpair.DATA_TYPE_INT16:
 *                 nvpair.nvlist_add_int16(self.handle, key, <int16_t>value)             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
      __pyx_t_19 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_19) && PyErr_Occurred())) __PYX_ERR(2, 240, __pyx_L1_error)
      __pyx_t_20 = __Pyx_PyInt_As_int16_t(__pyx_v_value); if (unlikely((__pyx_t_20 == (int16_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 240, __pyx_L1_error)
      nvlist_add_int16(__pyx_v_self->handle, __pyx_t_19, ((int16_t)__pyx_t_20));

      /* "nvpair.pxi":241
 *             if typeid == nvpair.DATA_TYPE_INT16:
 *                 nvpair.nvlist_add_int16(self.handle, key, <int16_t>value)
 *                 return             # <<<<<<<<<<<<<<
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT32:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "nvpair.pxi":239
 *                 return
 * 
 *             if typeid == nvpair.DATA_TYPE_INT16:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_int16(self.handle, key, <int16_t>value)
 *                 return
 */
    }

    /* "nvpair.pxi":243
 *                 return
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT32:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_uint32(self.handle, key, <uint32_t>value)
 *                 return
 */
    __pyx_t_5 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_UINT32); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 243, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 243, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "nvpair.pxi":244
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT32:
 *                 nvpair.nvlist_add_uint32(self.handle, key, <uint32_t>value)             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
      __pyx_t_21 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_21) && PyErr_Occurred())) __PYX_ERR(2, 244, __pyx_L1_error)
      __pyx_t_22 = __Pyx_PyInt_As_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_22 == (uint32_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 244, __pyx_L1_error)
      nvlist_add_uint32(__pyx_v_self->handle, __pyx_t_21, ((uint32_t)__pyx_t_22));

      /* "nvpair.pxi":245
 *             if typeid == nvpair.DATA_TYPE_UINT32:
 *                 nvpair.nvlist_add_uint32(self.handle, key, <uint32_t>value)
 *                 return             # <<<<<<<<<<<<<<
 * 
 *             if typeid == nvpair.DATA_TYPE_INT32:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "nvpair.pxi":243
 *                 return
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT32:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_uint32(self.handle, key, <uint32_t>value)
 *                 return
 */
    }

    /* "nvpair.pxi":247
 *                 return
 * 
 *             if typeid == nvpair.DATA_TYPE_INT32:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_int32(self.handle, key, <int32_t>value)
 *                 return
 */
    __pyx_t_4 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_INT32); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 247, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 247, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_1) {

      /* "nvpair.pxi":248
 * 
 *             if typeid == nvpair.DATA_TYPE_INT32:
 *                 nvpair.nvlist_add_int32(self.handle, key, <int32_t>value)             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
      __pyx_t_23 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_23) && PyErr_Occurred())) __PYX_ERR(2, 248, __pyx_L1_error)
      __pyx_t_24 = __Pyx_PyInt_As_int32_t(__pyx_v_value); if (unlikely((__pyx_t_24 == (int32_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 248, __pyx_L1_error)
      nvlist_add_int32(__pyx_v_self->handle, __pyx_t_23, ((int32_t)__pyx_t_24));

      /* "nvpair.pxi":249
 *             if typeid == nvpair.DATA_TYPE_INT32:
 *                 nvpair.nvlist_add_int32(self.handle, key, <int32_t>value)
 *                 return             # <<<<<<<<<<<<<<
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT64:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "nvpair.pxi":247
 *                 return
 * 
 *             if typeid == nvpair.DATA_TYPE_INT32:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_int32(self.handle, key, <int32_t>value)
 *                 return
 */
    }

    /* "nvpair.pxi":251
 *                 return
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT64:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_uint64(self.handle, key, <uint64_t>value)
 *                 return
 */
    __pyx_t_5 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_UINT64); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 251, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 251, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "nvpair.pxi":252
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT64:
 *                 nvpair.nvlist_add_uint64(self.handle, key, <uint64_t>value)             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
      __pyx_t_25 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_25) && PyErr_Occurred())) __PYX_ERR(2, 252, __pyx_L1_error)
      __pyx_t_26 = __Pyx_PyInt_As_uint64_t(__pyx_v_value); if (unlikely((__pyx_t_26 == (uint64_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 252, __pyx_L1_error)
      nvlist_add_uint64(__pyx_v_self->handle, __pyx_t_25, ((uint64_t)__pyx_t_26));

      /* "nvpair.pxi":253
 *             if typeid == nvpair.DATA_TYPE_UINT64:
 *                 nvpair.nvlist_add_uint64(self.handle, key, <uint64_t>value)
 *                 return             # <<<<<<<<<<<<<<
 * 
 *             if typeid == nvpair.DATA_TYPE_INT64:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "nvpair.pxi":251
 *                 return
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT64:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_uint64(self.handle, key, <uint64_t>value)
 *                 return
 */
    }

    /* "nvpair.pxi":255
 *                 return
 * 
 *             if typeid == nvpair.DATA_TYPE_INT64:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_int64(self.handle, key, <int64_t>value)
 *                 return
 */
    __pyx_t_4 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_INT64); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 255, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 255, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 255, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_1) {

      /* "nvpair.pxi":256
 * 
 *             if typeid == nvpair.DATA_TYPE_INT64:
 *                 nvpair.nvlist_add_int64(self.handle, key, <int64_t>value)             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
      __pyx_t_27 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_27) && PyErr_Occurred())) __PYX_ERR(2, 256, __pyx_L1_error)
      __pyx_t_28 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_28 == (int64_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 256, __pyx_L1_error)
      nvlist_add_int64(__pyx_v_self->handle, __pyx_t_27, ((int64_t)__pyx_t_28));

      /* "nvpair.pxi":257
 *             if typeid == nvpair.DATA_TYPE_INT64:
 *                 nvpair.nvlist_add_int64(self.handle, key, <int64_t>value)
 *                 return             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(value, NVList):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "nvpair.pxi":255
 *                 return
 * 
 *             if typeid == nvpair.DATA_TYPE_INT64:             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_int64(self.handle, key, <int64_t>value)
 *                 return
 */
    }

    /* "nvpair.pxi":222
 *                 return
 * 
 *         if isinstance(value, numbers.Number):             # <<<<<<<<<<<<<<
 *             if typeid == nvpair.DATA_TYPE_BYTE:
 *                 nvpair.nvlist_add_byte(self.handle, key, <char>value)
 */
  }

  /* "nvpair.pxi":259
 *                 return
 * 
 *         if isinstance(value, NVList):             # <<<<<<<<<<<<<<
 *             if typeid == nvpair.DATA_TYPE_NVLIST:
 *                 cnvlist = <NVList>value
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_6libzfs_NVList); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "nvpair.pxi":260
 * 
 *         if isinstance(value, NVList):
 *             if typeid == nvpair.DATA_TYPE_NVLIST:             # <<<<<<<<<<<<<<
 *                 cnvlist = <NVList>value
 *                 nvpair.nvlist_add_nvlist(self.handle, key, cnvlist.handle)
 */
    __pyx_t_5 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_NVLIST); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 260, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 260, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "nvpair.pxi":261
 *         if isinstance(value, NVList):
 *             if typeid == nvpair.DATA_TYPE_NVLIST:
 *                 cnvlist = <NVList>value             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_nvlist(self.handle, key, cnvlist.handle)
 *                 return
 */
      __pyx_t_4 = __pyx_v_value;
      __Pyx_INCREF(__pyx_t_4);
      __pyx_v_cnvlist = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "nvpair.pxi":262
 *             if typeid == nvpair.DATA_TYPE_NVLIST:
 *                 cnvlist = <NVList>value
 *                 nvpair.nvlist_add_nvlist(self.handle, key, cnvlist.handle)             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
      __pyx_t_29 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_29) && PyErr_Occurred())) __PYX_ERR(2, 262, __pyx_L1_error)
      nvlist_add_nvlist(__pyx_v_self->handle, __pyx_t_29, __pyx_v_cnvlist->handle);

      /* "nvpair.pxi":263
 *                 cnvlist = <NVList>value
 *                 nvpair.nvlist_add_nvlist(self.handle, key, cnvlist.handle)
 *                 return             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(value, dict):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "nvpair.pxi":260
 * 
 *         if isinstance(value, NVList):
 *             if typeid == nvpair.DATA_TYPE_NVLIST:             # <<<<<<<<<<<<<<
 *                 cnvlist = <NVList>value
 *                 nvpair.nvlist_add_nvlist(self.handle, key, cnvlist.handle)
 */
    }

    /* "nvpair.pxi":259
 *                 return
 * 
 *         if isinstance(value, NVList):             # <<<<<<<<<<<<<<
 *             if typeid == nvpair.DATA_TYPE_NVLIST:
 *                 cnvlist = <NVList>value
 */
  }

  /* "nvpair.pxi":265
 *                 return
 * 
 *         if isinstance(value, dict):             # <<<<<<<<<<<<<<
 *             if typeid == nvpair.DATA_TYPE_NVLIST:
 *                 cnvlist = NVList(otherdict=value)
 */
  __pyx_t_2 = PyDict_Check(__pyx_v_value); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":266
 * 
 *         if isinstance(value, dict):
 *             if typeid == nvpair.DATA_TYPE_NVLIST:             # <<<<<<<<<<<<<<
 *                 cnvlist = NVList(otherdict=value)
 *                 nvpair.nvlist_add_nvlist(self.handle, key, cnvlist.handle)
 */
    __pyx_t_4 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_NVLIST); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 266, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 266, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_1) {

      /* "nvpair.pxi":267
 *         if isinstance(value, dict):
 *             if typeid == nvpair.DATA_TYPE_NVLIST:
 *                 cnvlist = NVList(otherdict=value)             # <<<<<<<<<<<<<<
 *                 nvpair.nvlist_add_nvlist(self.handle, key, cnvlist.handle)
 *                 return
 */
      __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 267, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_otherdict, __pyx_v_value) < 0) __PYX_ERR(2, 267, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_NVList), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 267, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_cnvlist = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "nvpair.pxi":268
 *             if typeid == nvpair.DATA_TYPE_NVLIST:
 *                 cnvlist = NVList(otherdict=value)
 *                 nvpair.nvlist_add_nvlist(self.handle, key, cnvlist.handle)             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
      __pyx_t_29 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_29) && PyErr_Occurred())) __PYX_ERR(2, 268, __pyx_L1_error)
      nvlist_add_nvlist(__pyx_v_self->handle, __pyx_t_29, __pyx_v_cnvlist->handle);

      /* "nvpair.pxi":269
 *                 cnvlist = NVList(otherdict=value)
 *                 nvpair.nvlist_add_nvlist(self.handle, key, cnvlist.handle)
 *                 return             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(value, collections.Sequence):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "nvpair.pxi":266
 * 
 *         if isinstance(value, dict):
 *             if typeid == nvpair.DATA_TYPE_NVLIST:             # <<<<<<<<<<<<<<
 *                 cnvlist = NVList(otherdict=value)
 *                 nvpair.nvlist_add_nvlist(self.handle, key, cnvlist.handle)
 */
    }

    /* "nvpair.pxi":265
 *                 return
 * 
 *         if isinstance(value, dict):             # <<<<<<<<<<<<<<
 *             if typeid == nvpair.DATA_TYPE_NVLIST:
 *                 cnvlist = NVList(otherdict=value)
 */
  }

  /* "nvpair.pxi":271
 *                 return
 * 
 *         if isinstance(value, collections.Sequence):             # <<<<<<<<<<<<<<
 *             if typeid == nvpair.DATA_TYPE_STRING_ARRAY:
 *                 carray = malloc(len(value) * sizeof(char*))
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_collections); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = PyObject_IsInstance(__pyx_v_value, __pyx_t_5); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(2, 271, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "nvpair.pxi":272
 * 
 *         if isinstance(value, collections.Sequence):
 *             if typeid == nvpair.DATA_TYPE_STRING_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(char*))
 *                 for idx, i in enumerate(value):
 */
    __pyx_t_5 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_STRING_ARRAY); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 272, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 272, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "nvpair.pxi":273
 *         if isinstance(value, collections.Sequence):
 *             if typeid == nvpair.DATA_TYPE_STRING_ARRAY:
 *                 carray = malloc(len(value) * sizeof(char*))             # <<<<<<<<<<<<<<
 *                 for idx, i in enumerate(value):
 *                     (<char**>carray)[idx] = i
 */
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 273, __pyx_L1_error)
      __pyx_v_carray = malloc((__pyx_t_30 * (sizeof(char *))));

      /* "nvpair.pxi":274
 *             if typeid == nvpair.DATA_TYPE_STRING_ARRAY:
 *                 carray = malloc(len(value) * sizeof(char*))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     (<char**>carray)[idx] = i
 * 
 */
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_4 = __pyx_int_0;
      if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
        __pyx_t_5 = __pyx_v_value; __Pyx_INCREF(__pyx_t_5); __pyx_t_30 = 0;
        __pyx_t_31 = NULL;
      } else {
        __pyx_t_30 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 274, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_31 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_31)) __PYX_ERR(2, 274, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_31)) {
          if (likely(PyList_CheckExact(__pyx_t_5))) {
            if (__pyx_t_30 >= PyList_GET_SIZE(__pyx_t_5)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 274, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_5, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 274, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          } else {
            if (__pyx_t_30 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 274, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_5, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 274, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          }
        } else {
          __pyx_t_32 = __pyx_t_31(__pyx_t_5);
          if (unlikely(!__pyx_t_32)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(2, 274, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_32);
        }
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_32);
        __pyx_t_32 = 0;
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
        __pyx_t_32 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 274, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_32);
        __Pyx_DECREF(__pyx_t_4);
        __pyx_t_4 = __pyx_t_32;
        __pyx_t_32 = 0;

        /* "nvpair.pxi":275
 *                 carray = malloc(len(value) * sizeof(char*))
 *                 for idx, i in enumerate(value):
 *                     (<char**>carray)[idx] = i             # <<<<<<<<<<<<<<
 * 
 *                 nvpair.nvlist_add_string_array(self.handle, key, <char**>carray, len(value))
 */
        __pyx_t_33 = __Pyx_PyObject_AsString(__pyx_v_i); if (unlikely((!__pyx_t_33) && PyErr_Occurred())) __PYX_ERR(2, 275, __pyx_L1_error)
        __pyx_t_34 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_34 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 275, __pyx_L1_error)
        (((char **)__pyx_v_carray)[__pyx_t_34]) = __pyx_t_33;

        /* "nvpair.pxi":274
 *             if typeid == nvpair.DATA_TYPE_STRING_ARRAY:
 *                 carray = malloc(len(value) * sizeof(char*))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     (<char**>carray)[idx] = i
 * 
 */
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "nvpair.pxi":277
 *                     (<char**>carray)[idx] = i
 * 
 *                 nvpair.nvlist_add_string_array(self.handle, key, <char**>carray, len(value))             # <<<<<<<<<<<<<<
 * 
 *             if typeid == nvpair.DATA_TYPE_BOOLEAN_ARRAY:
 */
      __pyx_t_35 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_35) && PyErr_Occurred())) __PYX_ERR(2, 277, __pyx_L1_error)
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 277, __pyx_L1_error)
      nvlist_add_string_array(__pyx_v_self->handle, __pyx_t_35, ((char **)__pyx_v_carray), __pyx_t_30);

      /* "nvpair.pxi":272
 * 
 *         if isinstance(value, collections.Sequence):
 *             if typeid == nvpair.DATA_TYPE_STRING_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(char*))
 *                 for idx, i in enumerate(value):
 */
    }

    /* "nvpair.pxi":279
 *                 nvpair.nvlist_add_string_array(self.handle, key, <char**>carray, len(value))
 * 
 *             if typeid == nvpair.DATA_TYPE_BOOLEAN_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(char*))
 *                 for idx, i in enumerate(value):
 */
    __pyx_t_4 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_BOOLEAN_ARRAY); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 279, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 279, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "nvpair.pxi":280
 * 
 *             if typeid == nvpair.DATA_TYPE_BOOLEAN_ARRAY:
 *                 carray = malloc(len(value) * sizeof(char*))             # <<<<<<<<<<<<<<
 *                 for idx, i in enumerate(value):
 *                     (<boolean_t*>carray)[idx] = i
 */
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 280, __pyx_L1_error)
      __pyx_v_carray = malloc((__pyx_t_30 * (sizeof(char *))));

      /* "nvpair.pxi":281
 *             if typeid == nvpair.DATA_TYPE_BOOLEAN_ARRAY:
 *                 carray = malloc(len(value) * sizeof(char*))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     (<boolean_t*>carray)[idx] = i
 * 
 */
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_5 = __pyx_int_0;
      if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
        __pyx_t_4 = __pyx_v_value; __Pyx_INCREF(__pyx_t_4); __pyx_t_30 = 0;
        __pyx_t_31 = NULL;
      } else {
        __pyx_t_30 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 281, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_31 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_31)) __PYX_ERR(2, 281, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_31)) {
          if (likely(PyList_CheckExact(__pyx_t_4))) {
            if (__pyx_t_30 >= PyList_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 281, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_4, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 281, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          } else {
            if (__pyx_t_30 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 281, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_4, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 281, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          }
        } else {
          __pyx_t_32 = __pyx_t_31(__pyx_t_4);
          if (unlikely(!__pyx_t_32)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(2, 281, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_32);
        }
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_32);
        __pyx_t_32 = 0;
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
        __pyx_t_32 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 281, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_32);
        __Pyx_DECREF(__pyx_t_5);
        __pyx_t_5 = __pyx_t_32;
        __pyx_t_32 = 0;

        /* "nvpair.pxi":282
 *                 carray = malloc(len(value) * sizeof(char*))
 *                 for idx, i in enumerate(value):
 *                     (<boolean_t*>carray)[idx] = i             # <<<<<<<<<<<<<<
 * 
 *                 nvpair.nvlist_add_boolean_array(self.handle, key, <boolean_t*>carray, len(value))
 */
        __pyx_t_10 = __Pyx_PyInt_As_boolean_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (boolean_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 282, __pyx_L1_error)
        __pyx_t_34 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_34 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 282, __pyx_L1_error)
        (((boolean_t *)__pyx_v_carray)[__pyx_t_34]) = __pyx_t_10;

        /* "nvpair.pxi":281
 *             if typeid == nvpair.DATA_TYPE_BOOLEAN_ARRAY:
 *                 carray = malloc(len(value) * sizeof(char*))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     (<boolean_t*>carray)[idx] = i
 * 
 */
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "nvpair.pxi":284
 *                     (<boolean_t*>carray)[idx] = i
 * 
 *                 nvpair.nvlist_add_boolean_array(self.handle, key, <boolean_t*>carray, len(value))             # <<<<<<<<<<<<<<
 * 
 *             if typeid == nvpair.DATA_TYPE_BYTE_ARRAY:
 */
      __pyx_t_36 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_36) && PyErr_Occurred())) __PYX_ERR(2, 284, __pyx_L1_error)
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 284, __pyx_L1_error)
      nvlist_add_boolean_array(__pyx_v_self->handle, __pyx_t_36, ((boolean_t *)__pyx_v_carray), __pyx_t_30);

      /* "nvpair.pxi":279
 *                 nvpair.nvlist_add_string_array(self.handle, key, <char**>carray, len(value))
 * 
 *             if typeid == nvpair.DATA_TYPE_BOOLEAN_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(char*))
 *                 for idx, i in enumerate(value):
 */
    }

    /* "nvpair.pxi":286
 *                 nvpair.nvlist_add_boolean_array(self.handle, key, <boolean_t*>carray, len(value))
 * 
 *             if typeid == nvpair.DATA_TYPE_BYTE_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(char))
 *                 for idx, i in enumerate(value):
 */
    __pyx_t_5 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_BYTE_ARRAY); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 286, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 286, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "nvpair.pxi":287
 * 
 *             if typeid == nvpair.DATA_TYPE_BYTE_ARRAY:
 *                 carray = malloc(len(value) * sizeof(char))             # <<<<<<<<<<<<<<
 *                 for idx, i in enumerate(value):
 *                     (<char*>carray)[idx] = i
 */
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 287, __pyx_L1_error)
      __pyx_v_carray = malloc((__pyx_t_30 * (sizeof(char))));

      /* "nvpair.pxi":288
 *             if typeid == nvpair.DATA_TYPE_BYTE_ARRAY:
 *                 carray = malloc(len(value) * sizeof(char))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     (<char*>carray)[idx] = i
 * 
 */
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_4 = __pyx_int_0;
      if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
        __pyx_t_5 = __pyx_v_value; __Pyx_INCREF(__pyx_t_5); __pyx_t_30 = 0;
        __pyx_t_31 = NULL;
      } else {
        __pyx_t_30 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 288, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_31 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_31)) __PYX_ERR(2, 288, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_31)) {
          if (likely(PyList_CheckExact(__pyx_t_5))) {
            if (__pyx_t_30 >= PyList_GET_SIZE(__pyx_t_5)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 288, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_5, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 288, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          } else {
            if (__pyx_t_30 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 288, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_5, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 288, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          }
        } else {
          __pyx_t_32 = __pyx_t_31(__pyx_t_5);
          if (unlikely(!__pyx_t_32)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(2, 288, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_32);
        }
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_32);
        __pyx_t_32 = 0;
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
        __pyx_t_32 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 288, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_32);
        __Pyx_DECREF(__pyx_t_4);
        __pyx_t_4 = __pyx_t_32;
        __pyx_t_32 = 0;

        /* "nvpair.pxi":289
 *                 carray = malloc(len(value) * sizeof(char))
 *                 for idx, i in enumerate(value):
 *                     (<char*>carray)[idx] = i             # <<<<<<<<<<<<<<
 * 
 *                 nvpair.nvlist_add_byte_array(self.handle, key, <uchar_t*>carray, len(value))
 */
        __pyx_t_12 = __Pyx_PyInt_As_char(__pyx_v_i); if (unlikely((__pyx_t_12 == (char)-1) && PyErr_Occurred())) __PYX_ERR(2, 289, __pyx_L1_error)
        __pyx_t_34 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_34 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 289, __pyx_L1_error)
        (((char *)__pyx_v_carray)[__pyx_t_34]) = __pyx_t_12;

        /* "nvpair.pxi":288
 *             if typeid == nvpair.DATA_TYPE_BYTE_ARRAY:
 *                 carray = malloc(len(value) * sizeof(char))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     (<char*>carray)[idx] = i
 * 
 */
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "nvpair.pxi":291
 *                     (<char*>carray)[idx] = i
 * 
 *                 nvpair.nvlist_add_byte_array(self.handle, key, <uchar_t*>carray, len(value))             # <<<<<<<<<<<<<<
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT8_ARRAY:
 */
      __pyx_t_37 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_37) && PyErr_Occurred())) __PYX_ERR(2, 291, __pyx_L1_error)
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 291, __pyx_L1_error)
      nvlist_add_byte_array(__pyx_v_self->handle, __pyx_t_37, ((uchar_t *)__pyx_v_carray), __pyx_t_30);

      /* "nvpair.pxi":286
 *                 nvpair.nvlist_add_boolean_array(self.handle, key, <boolean_t*>carray, len(value))
 * 
 *             if typeid == nvpair.DATA_TYPE_BYTE_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(char))
 *                 for idx, i in enumerate(value):
 */
    }

    /* "nvpair.pxi":293
 *                 nvpair.nvlist_add_byte_array(self.handle, key, <uchar_t*>carray, len(value))
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT8_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(uint8_t))
 *                 for idx, i in enumerate(value):
 */
    __pyx_t_4 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_UINT8_ARRAY); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 293, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 293, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "nvpair.pxi":294
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT8_ARRAY:
 *                 carray = malloc(len(value) * sizeof(uint8_t))             # <<<<<<<<<<<<<<
 *                 for idx, i in enumerate(value):
 *                     (<uint8_t*>carray)[idx] = i
 */
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 294, __pyx_L1_error)
      __pyx_v_carray = malloc((__pyx_t_30 * (sizeof(uint8_t))));

      /* "nvpair.pxi":295
 *             if typeid == nvpair.DATA_TYPE_UINT8_ARRAY:
 *                 carray = malloc(len(value) * sizeof(uint8_t))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     (<uint8_t*>carray)[idx] = i
 * 
 */
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_5 = __pyx_int_0;
      if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
        __pyx_t_4 = __pyx_v_value; __Pyx_INCREF(__pyx_t_4); __pyx_t_30 = 0;
        __pyx_t_31 = NULL;
      } else {
        __pyx_t_30 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 295, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_31 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_31)) __PYX_ERR(2, 295, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_31)) {
          if (likely(PyList_CheckExact(__pyx_t_4))) {
            if (__pyx_t_30 >= PyList_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 295, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_4, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 295, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          } else {
            if (__pyx_t_30 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 295, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_4, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 295, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          }
        } else {
          __pyx_t_32 = __pyx_t_31(__pyx_t_4);
          if (unlikely(!__pyx_t_32)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(2, 295, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_32);
        }
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_32);
        __pyx_t_32 = 0;
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
        __pyx_t_32 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 295, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_32);
        __Pyx_DECREF(__pyx_t_5);
        __pyx_t_5 = __pyx_t_32;
        __pyx_t_32 = 0;

        /* "nvpair.pxi":296
 *                 carray = malloc(len(value) * sizeof(uint8_t))
 *                 for idx, i in enumerate(value):
 *                     (<uint8_t*>carray)[idx] = i             # <<<<<<<<<<<<<<
 * 
 *                 nvpair.nvlist_add_uint8_array(self.handle, key, <uint8_t*>carray, len(value))
 */
        __pyx_t_14 = __Pyx_PyInt_As_uint8_t(__pyx_v_i); if (unlikely((__pyx_t_14 == (uint8_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 296, __pyx_L1_error)
        __pyx_t_34 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_34 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 296, __pyx_L1_error)
        (((uint8_t *)__pyx_v_carray)[__pyx_t_34]) = __pyx_t_14;

        /* "nvpair.pxi":295
 *             if typeid == nvpair.DATA_TYPE_UINT8_ARRAY:
 *                 carray = malloc(len(value) * sizeof(uint8_t))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     (<uint8_t*>carray)[idx] = i
 * 
 */
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "nvpair.pxi":298
 *                     (<uint8_t*>carray)[idx] = i
 * 
 *                 nvpair.nvlist_add_uint8_array(self.handle, key, <uint8_t*>carray, len(value))             # <<<<<<<<<<<<<<
 * 
 *             if typeid == nvpair.DATA_TYPE_INT8_ARRAY:
 */
      __pyx_t_38 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_38) && PyErr_Occurred())) __PYX_ERR(2, 298, __pyx_L1_error)
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 298, __pyx_L1_error)
      nvlist_add_uint8_array(__pyx_v_self->handle, __pyx_t_38, ((uint8_t *)__pyx_v_carray), __pyx_t_30);

      /* "nvpair.pxi":293
 *                 nvpair.nvlist_add_byte_array(self.handle, key, <uchar_t*>carray, len(value))
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT8_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(uint8_t))
 *                 for idx, i in enumerate(value):
 */
    }

    /* "nvpair.pxi":300
 *                 nvpair.nvlist_add_uint8_array(self.handle, key, <uint8_t*>carray, len(value))
 * 
 *             if typeid == nvpair.DATA_TYPE_INT8_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(int8_t))
 *                 for idx, i in enumerate(value):
 */
    __pyx_t_5 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_INT8_ARRAY); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 300, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 300, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 300, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "nvpair.pxi":301
 * 
 *             if typeid == nvpair.DATA_TYPE_INT8_ARRAY:
 *                 carray = malloc(len(value) * sizeof(int8_t))             # <<<<<<<<<<<<<<
 *                 for idx, i in enumerate(value):
 *                     (<int8_t*>carray)[idx] = i
 */
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 301, __pyx_L1_error)
      __pyx_v_carray = malloc((__pyx_t_30 * (sizeof(int8_t))));

      /* "nvpair.pxi":302
 *             if typeid == nvpair.DATA_TYPE_INT8_ARRAY:
 *                 carray = malloc(len(value) * sizeof(int8_t))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     (<int8_t*>carray)[idx] = i
 * 
 */
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_4 = __pyx_int_0;
      if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
        __pyx_t_5 = __pyx_v_value; __Pyx_INCREF(__pyx_t_5); __pyx_t_30 = 0;
        __pyx_t_31 = NULL;
      } else {
        __pyx_t_30 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 302, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_31 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_31)) __PYX_ERR(2, 302, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_31)) {
          if (likely(PyList_CheckExact(__pyx_t_5))) {
            if (__pyx_t_30 >= PyList_GET_SIZE(__pyx_t_5)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 302, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_5, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 302, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          } else {
            if (__pyx_t_30 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 302, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_5, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 302, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          }
        } else {
          __pyx_t_32 = __pyx_t_31(__pyx_t_5);
          if (unlikely(!__pyx_t_32)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(2, 302, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_32);
        }
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_32);
        __pyx_t_32 = 0;
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
        __pyx_t_32 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 302, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_32);
        __Pyx_DECREF(__pyx_t_4);
        __pyx_t_4 = __pyx_t_32;
        __pyx_t_32 = 0;

        /* "nvpair.pxi":303
 *                 carray = malloc(len(value) * sizeof(int8_t))
 *                 for idx, i in enumerate(value):
 *                     (<int8_t*>carray)[idx] = i             # <<<<<<<<<<<<<<
 * 
 *                 nvpair.nvlist_add_int8_array(self.handle, key, <int8_t*>carray, len(value))
 */
        __pyx_t_16 = __Pyx_PyInt_As_int8_t(__pyx_v_i); if (unlikely((__pyx_t_16 == (int8_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 303, __pyx_L1_error)
        __pyx_t_34 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_34 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 303, __pyx_L1_error)
        (((int8_t *)__pyx_v_carray)[__pyx_t_34]) = __pyx_t_16;

        /* "nvpair.pxi":302
 *             if typeid == nvpair.DATA_TYPE_INT8_ARRAY:
 *                 carray = malloc(len(value) * sizeof(int8_t))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     (<int8_t*>carray)[idx] = i
 * 
 */
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "nvpair.pxi":305
 *                     (<int8_t*>carray)[idx] = i
 * 
 *                 nvpair.nvlist_add_int8_array(self.handle, key, <int8_t*>carray, len(value))             # <<<<<<<<<<<<<<
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT16_ARRAY:
 */
      __pyx_t_39 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_39) && PyErr_Occurred())) __PYX_ERR(2, 305, __pyx_L1_error)
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 305, __pyx_L1_error)
      nvlist_add_int8_array(__pyx_v_self->handle, __pyx_t_39, ((int8_t *)__pyx_v_carray), __pyx_t_30);

      /* "nvpair.pxi":300
 *                 nvpair.nvlist_add_uint8_array(self.handle, key, <uint8_t*>carray, len(value))
 * 
 *             if typeid == nvpair.DATA_TYPE_INT8_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(int8_t))
 *                 for idx, i in enumerate(value):
 */
    }

    /* "nvpair.pxi":307
 *                 nvpair.nvlist_add_int8_array(self.handle, key, <int8_t*>carray, len(value))
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT16_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(uint16_t))
 *                 for idx, i in enumerate(value):
 */
    __pyx_t_4 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_UINT16_ARRAY); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 307, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 307, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "nvpair.pxi":308
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT16_ARRAY:
 *                 carray = malloc(len(value) * sizeof(uint16_t))             # <<<<<<<<<<<<<<
 *                 for idx, i in enumerate(value):
 *                     (<uint16_t*>carray)[idx] = i
 */
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 308, __pyx_L1_error)
      __pyx_v_carray = malloc((__pyx_t_30 * (sizeof(uint16_t))));

      /* "nvpair.pxi":309
 *             if typeid == nvpair.DATA_TYPE_UINT16_ARRAY:
 *                 carray = malloc(len(value) * sizeof(uint16_t))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     (<uint16_t*>carray)[idx] = i
 * 
 */
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_5 = __pyx_int_0;
      if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
        __pyx_t_4 = __pyx_v_value; __Pyx_INCREF(__pyx_t_4); __pyx_t_30 = 0;
        __pyx_t_31 = NULL;
      } else {
        __pyx_t_30 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 309, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_31 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_31)) __PYX_ERR(2, 309, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_31)) {
          if (likely(PyList_CheckExact(__pyx_t_4))) {
            if (__pyx_t_30 >= PyList_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 309, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_4, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 309, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          } else {
            if (__pyx_t_30 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 309, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_4, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 309, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          }
        } else {
          __pyx_t_32 = __pyx_t_31(__pyx_t_4);
          if (unlikely(!__pyx_t_32)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(2, 309, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_32);
        }
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_32);
        __pyx_t_32 = 0;
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
        __pyx_t_32 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 309, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_32);
        __Pyx_DECREF(__pyx_t_5);
        __pyx_t_5 = __pyx_t_32;
        __pyx_t_32 = 0;

        /* "nvpair.pxi":310
 *                 carray = malloc(len(value) * sizeof(uint16_t))
 *                 for idx, i in enumerate(value):
 *                     (<uint16_t*>carray)[idx] = i             # <<<<<<<<<<<<<<
 * 
 *                 nvpair.nvlist_add_uint16_array(self.handle, key, <uint16_t*>carray, len(value))
 */
        __pyx_t_18 = __Pyx_PyInt_As_uint16_t(__pyx_v_i); if (unlikely((__pyx_t_18 == (uint16_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 310, __pyx_L1_error)
        __pyx_t_34 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_34 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 310, __pyx_L1_error)
        (((uint16_t *)__pyx_v_carray)[__pyx_t_34]) = __pyx_t_18;

        /* "nvpair.pxi":309
 *             if typeid == nvpair.DATA_TYPE_UINT16_ARRAY:
 *                 carray = malloc(len(value) * sizeof(uint16_t))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     (<uint16_t*>carray)[idx] = i
 * 
 */
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "nvpair.pxi":312
 *                     (<uint16_t*>carray)[idx] = i
 * 
 *                 nvpair.nvlist_add_uint16_array(self.handle, key, <uint16_t*>carray, len(value))             # <<<<<<<<<<<<<<
 * 
 *             if typeid == nvpair.DATA_TYPE_INT16_ARRAY:
 */
      __pyx_t_40 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_40) && PyErr_Occurred())) __PYX_ERR(2, 312, __pyx_L1_error)
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 312, __pyx_L1_error)
      nvlist_add_uint16_array(__pyx_v_self->handle, __pyx_t_40, ((uint16_t *)__pyx_v_carray), __pyx_t_30);

      /* "nvpair.pxi":307
 *                 nvpair.nvlist_add_int8_array(self.handle, key, <int8_t*>carray, len(value))
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT16_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(uint16_t))
 *                 for idx, i in enumerate(value):
 */
    }

    /* "nvpair.pxi":314
 *                 nvpair.nvlist_add_uint16_array(self.handle, key, <uint16_t*>carray, len(value))
 * 
 *             if typeid == nvpair.DATA_TYPE_INT16_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(int16_t))
 *                 for idx, i in enumerate(value):
 */
    __pyx_t_5 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_INT16_ARRAY); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 314, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 314, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 314, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "nvpair.pxi":315
 * 
 *             if typeid == nvpair.DATA_TYPE_INT16_ARRAY:
 *                 carray = malloc(len(value) * sizeof(int16_t))             # <<<<<<<<<<<<<<
 *                 for idx, i in enumerate(value):
 *                     (<uint16_t*>carray)[idx] = i
 */
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 315, __pyx_L1_error)
      __pyx_v_carray = malloc((__pyx_t_30 * (sizeof(int16_t))));

      /* "nvpair.pxi":316
 *             if typeid == nvpair.DATA_TYPE_INT16_ARRAY:
 *                 carray = malloc(len(value) * sizeof(int16_t))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     (<uint16_t*>carray)[idx] = i
 * 
 */
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_4 = __pyx_int_0;
      if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
        __pyx_t_5 = __pyx_v_value; __Pyx_INCREF(__pyx_t_5); __pyx_t_30 = 0;
        __pyx_t_31 = NULL;
      } else {
        __pyx_t_30 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 316, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_31 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_31)) __PYX_ERR(2, 316, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_31)) {
          if (likely(PyList_CheckExact(__pyx_t_5))) {
            if (__pyx_t_30 >= PyList_GET_SIZE(__pyx_t_5)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 316, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_5, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 316, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          } else {
            if (__pyx_t_30 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 316, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_5, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 316, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          }
        } else {
          __pyx_t_32 = __pyx_t_31(__pyx_t_5);
          if (unlikely(!__pyx_t_32)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(2, 316, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_32);
        }
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_32);
        __pyx_t_32 = 0;
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
        __pyx_t_32 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 316, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_32);
        __Pyx_DECREF(__pyx_t_4);
        __pyx_t_4 = __pyx_t_32;
        __pyx_t_32 = 0;

        /* "nvpair.pxi":317
 *                 carray = malloc(len(value) * sizeof(int16_t))
 *                 for idx, i in enumerate(value):
 *                     (<uint16_t*>carray)[idx] = i             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __pyx_t_18 = __Pyx_PyInt_As_uint16_t(__pyx_v_i); if (unlikely((__pyx_t_18 == (uint16_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 317, __pyx_L1_error)
        __pyx_t_34 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_34 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 317, __pyx_L1_error)
        (((uint16_t *)__pyx_v_carray)[__pyx_t_34]) = __pyx_t_18;

        /* "nvpair.pxi":316
 *             if typeid == nvpair.DATA_TYPE_INT16_ARRAY:
 *                 carray = malloc(len(value) * sizeof(int16_t))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     (<uint16_t*>carray)[idx] = i
 * 
 */
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "nvpair.pxi":320
 * 
 * 
 *                 nvpair.nvlist_add_int16_array(self.handle, key, <int16_t*>carray, len(value))             # <<<<<<<<<<<<<<
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT32_ARRAY:
 */
      __pyx_t_41 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_41) && PyErr_Occurred())) __PYX_ERR(2, 320, __pyx_L1_error)
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 320, __pyx_L1_error)
      nvlist_add_int16_array(__pyx_v_self->handle, __pyx_t_41, ((int16_t *)__pyx_v_carray), __pyx_t_30);

      /* "nvpair.pxi":314
 *                 nvpair.nvlist_add_uint16_array(self.handle, key, <uint16_t*>carray, len(value))
 * 
 *             if typeid == nvpair.DATA_TYPE_INT16_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(int16_t))
 *                 for idx, i in enumerate(value):
 */
    }

    /* "nvpair.pxi":322
 *                 nvpair.nvlist_add_int16_array(self.handle, key, <int16_t*>carray, len(value))
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT32_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(uint32_t))
 *                 for idx, i in enumerate(value):
 */
    __pyx_t_4 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_UINT32_ARRAY); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 322, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 322, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 322, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "nvpair.pxi":323
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT32_ARRAY:
 *                 carray = malloc(len(value) * sizeof(uint32_t))             # <<<<<<<<<<<<<<
 *                 for idx, i in enumerate(value):
 *                     (<uint32_t*>carray)[idx] = i
 */
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 323, __pyx_L1_error)
      __pyx_v_carray = malloc((__pyx_t_30 * (sizeof(uint32_t))));

      /* "nvpair.pxi":324
 *             if typeid == nvpair.DATA_TYPE_UINT32_ARRAY:
 *                 carray = malloc(len(value) * sizeof(uint32_t))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     (<uint32_t*>carray)[idx] = i
 * 
 */
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_5 = __pyx_int_0;
      if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
        __pyx_t_4 = __pyx_v_value; __Pyx_INCREF(__pyx_t_4); __pyx_t_30 = 0;
        __pyx_t_31 = NULL;
      } else {
        __pyx_t_30 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 324, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_31 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_31)) __PYX_ERR(2, 324, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_31)) {
          if (likely(PyList_CheckExact(__pyx_t_4))) {
            if (__pyx_t_30 >= PyList_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 324, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_4, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 324, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          } else {
            if (__pyx_t_30 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 324, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_4, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 324, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          }
        } else {
          __pyx_t_32 = __pyx_t_31(__pyx_t_4);
          if (unlikely(!__pyx_t_32)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(2, 324, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_32);
        }
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_32);
        __pyx_t_32 = 0;
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
        __pyx_t_32 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 324, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_32);
        __Pyx_DECREF(__pyx_t_5);
        __pyx_t_5 = __pyx_t_32;
        __pyx_t_32 = 0;

        /* "nvpair.pxi":325
 *                 carray = malloc(len(value) * sizeof(uint32_t))
 *                 for idx, i in enumerate(value):
 *                     (<uint32_t*>carray)[idx] = i             # <<<<<<<<<<<<<<
 * 
 *                 nvpair.nvlist_add_uint32_array(self.handle, key, <uint32_t*>carray, len(value))
 */
        __pyx_t_22 = __Pyx_PyInt_As_uint32_t(__pyx_v_i); if (unlikely((__pyx_t_22 == (uint32_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 325, __pyx_L1_error)
        __pyx_t_34 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_34 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 325, __pyx_L1_error)
        (((uint32_t *)__pyx_v_carray)[__pyx_t_34]) = __pyx_t_22;

        /* "nvpair.pxi":324
 *             if typeid == nvpair.DATA_TYPE_UINT32_ARRAY:
 *                 carray = malloc(len(value) * sizeof(uint32_t))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     (<uint32_t*>carray)[idx] = i
 * 
 */
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "nvpair.pxi":327
 *                     (<uint32_t*>carray)[idx] = i
 * 
 *                 nvpair.nvlist_add_uint32_array(self.handle, key, <uint32_t*>carray, len(value))             # <<<<<<<<<<<<<<
 * 
 *             if typeid == nvpair.DATA_TYPE_INT32_ARRAY:
 */
      __pyx_t_42 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_42) && PyErr_Occurred())) __PYX_ERR(2, 327, __pyx_L1_error)
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 327, __pyx_L1_error)
      nvlist_add_uint32_array(__pyx_v_self->handle, __pyx_t_42, ((uint32_t *)__pyx_v_carray), __pyx_t_30);

      /* "nvpair.pxi":322
 *                 nvpair.nvlist_add_int16_array(self.handle, key, <int16_t*>carray, len(value))
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT32_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(uint32_t))
 *                 for idx, i in enumerate(value):
 */
    }

    /* "nvpair.pxi":329
 *                 nvpair.nvlist_add_uint32_array(self.handle, key, <uint32_t*>carray, len(value))
 * 
 *             if typeid == nvpair.DATA_TYPE_INT32_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(int32_t))
 *                 for idx, i in enumerate(value):
 */
    __pyx_t_5 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_INT32_ARRAY); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 329, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 329, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "nvpair.pxi":330
 * 
 *             if typeid == nvpair.DATA_TYPE_INT32_ARRAY:
 *                 carray = malloc(len(value) * sizeof(int32_t))             # <<<<<<<<<<<<<<
 *                 for idx, i in enumerate(value):
 *                     (<int32_t*>carray)[idx] = i
 */
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 330, __pyx_L1_error)
      __pyx_v_carray = malloc((__pyx_t_30 * (sizeof(int32_t))));

      /* "nvpair.pxi":331
 *             if typeid == nvpair.DATA_TYPE_INT32_ARRAY:
 *                 carray = malloc(len(value) * sizeof(int32_t))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     (<int32_t*>carray)[idx] = i
 * 
 */
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_4 = __pyx_int_0;
      if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
        __pyx_t_5 = __pyx_v_value; __Pyx_INCREF(__pyx_t_5); __pyx_t_30 = 0;
        __pyx_t_31 = NULL;
      } else {
        __pyx_t_30 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 331, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_31 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_31)) __PYX_ERR(2, 331, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_31)) {
          if (likely(PyList_CheckExact(__pyx_t_5))) {
            if (__pyx_t_30 >= PyList_GET_SIZE(__pyx_t_5)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 331, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_5, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 331, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          } else {
            if (__pyx_t_30 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 331, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_5, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 331, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          }
        } else {
          __pyx_t_32 = __pyx_t_31(__pyx_t_5);
          if (unlikely(!__pyx_t_32)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(2, 331, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_32);
        }
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_32);
        __pyx_t_32 = 0;
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
        __pyx_t_32 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 331, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_32);
        __Pyx_DECREF(__pyx_t_4);
        __pyx_t_4 = __pyx_t_32;
        __pyx_t_32 = 0;

        /* "nvpair.pxi":332
 *                 carray = malloc(len(value) * sizeof(int32_t))
 *                 for idx, i in enumerate(value):
 *                     (<int32_t*>carray)[idx] = i             # <<<<<<<<<<<<<<
 * 
 *                 nvpair.nvlist_add_int32_array(self.handle, key, <int32_t*>carray, len(value))
 */
        __pyx_t_24 = __Pyx_PyInt_As_int32_t(__pyx_v_i); if (unlikely((__pyx_t_24 == (int32_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 332, __pyx_L1_error)
        __pyx_t_34 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_34 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 332, __pyx_L1_error)
        (((int32_t *)__pyx_v_carray)[__pyx_t_34]) = __pyx_t_24;

        /* "nvpair.pxi":331
 *             if typeid == nvpair.DATA_TYPE_INT32_ARRAY:
 *                 carray = malloc(len(value) * sizeof(int32_t))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     (<int32_t*>carray)[idx] = i
 * 
 */
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "nvpair.pxi":334
 *                     (<int32_t*>carray)[idx] = i
 * 
 *                 nvpair.nvlist_add_int32_array(self.handle, key, <int32_t*>carray, len(value))             # <<<<<<<<<<<<<<
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT64_ARRAY:
 */
      __pyx_t_43 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_43) && PyErr_Occurred())) __PYX_ERR(2, 334, __pyx_L1_error)
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 334, __pyx_L1_error)
      nvlist_add_int32_array(__pyx_v_self->handle, __pyx_t_43, ((int32_t *)__pyx_v_carray), __pyx_t_30);

      /* "nvpair.pxi":329
 *                 nvpair.nvlist_add_uint32_array(self.handle, key, <uint32_t*>carray, len(value))
 * 
 *             if typeid == nvpair.DATA_TYPE_INT32_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(int32_t))
 *                 for idx, i in enumerate(value):
 */
    }

    /* "nvpair.pxi":336
 *                 nvpair.nvlist_add_int32_array(self.handle, key, <int32_t*>carray, len(value))
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT64_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(uint64_t))
 *                 for idx, i in enumerate(value):
 */
    __pyx_t_4 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_UINT64_ARRAY); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 336, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 336, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 336, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "nvpair.pxi":337
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT64_ARRAY:
 *                 carray = malloc(len(value) * sizeof(uint64_t))             # <<<<<<<<<<<<<<
 *                 for idx, i in enumerate(value):
 *                     (<uint64_t*>carray)[idx] = i
 */
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 337, __pyx_L1_error)
      __pyx_v_carray = malloc((__pyx_t_30 * (sizeof(uint64_t))));

      /* "nvpair.pxi":338
 *             if typeid == nvpair.DATA_TYPE_UINT64_ARRAY:
 *                 carray = malloc(len(value) * sizeof(uint64_t))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     (<uint64_t*>carray)[idx] = i
 * 
 */
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_5 = __pyx_int_0;
      if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
        __pyx_t_4 = __pyx_v_value; __Pyx_INCREF(__pyx_t_4); __pyx_t_30 = 0;
        __pyx_t_31 = NULL;
      } else {
        __pyx_t_30 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 338, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_31 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_31)) __PYX_ERR(2, 338, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_31)) {
          if (likely(PyList_CheckExact(__pyx_t_4))) {
            if (__pyx_t_30 >= PyList_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 338, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_4, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 338, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          } else {
            if (__pyx_t_30 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 338, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_4, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 338, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          }
        } else {
          __pyx_t_32 = __pyx_t_31(__pyx_t_4);
          if (unlikely(!__pyx_t_32)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(2, 338, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_32);
        }
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_32);
        __pyx_t_32 = 0;
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
        __pyx_t_32 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 338, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_32);
        __Pyx_DECREF(__pyx_t_5);
        __pyx_t_5 = __pyx_t_32;
        __pyx_t_32 = 0;

        /* "nvpair.pxi":339
 *                 carray = malloc(len(value) * sizeof(uint64_t))
 *                 for idx, i in enumerate(value):
 *                     (<uint64_t*>carray)[idx] = i             # <<<<<<<<<<<<<<
 * 
 *                 nvpair.nvlist_add_uint64_array(self.handle, key, <uint64_t*>carray, len(value))
 */
        __pyx_t_26 = __Pyx_PyInt_As_uint64_t(__pyx_v_i); if (unlikely((__pyx_t_26 == (uint64_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 339, __pyx_L1_error)
        __pyx_t_34 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_34 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 339, __pyx_L1_error)
        (((uint64_t *)__pyx_v_carray)[__pyx_t_34]) = __pyx_t_26;

        /* "nvpair.pxi":338
 *             if typeid == nvpair.DATA_TYPE_UINT64_ARRAY:
 *                 carray = malloc(len(value) * sizeof(uint64_t))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     (<uint64_t*>carray)[idx] = i
 * 
 */
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "nvpair.pxi":341
 *                     (<uint64_t*>carray)[idx] = i
 * 
 *                 nvpair.nvlist_add_uint64_array(self.handle, key, <uint64_t*>carray, len(value))             # <<<<<<<<<<<<<<
 * 
 *             if typeid == nvpair.DATA_TYPE_INT64_ARRAY:
 */
      __pyx_t_44 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_44) && PyErr_Occurred())) __PYX_ERR(2, 341, __pyx_L1_error)
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 341, __pyx_L1_error)
      nvlist_add_uint64_array(__pyx_v_self->handle, __pyx_t_44, ((uint64_t *)__pyx_v_carray), __pyx_t_30);

      /* "nvpair.pxi":336
 *                 nvpair.nvlist_add_int32_array(self.handle, key, <int32_t*>carray, len(value))
 * 
 *             if typeid == nvpair.DATA_TYPE_UINT64_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(uint64_t))
 *                 for idx, i in enumerate(value):
 */
    }

    /* "nvpair.pxi":343
 *                 nvpair.nvlist_add_uint64_array(self.handle, key, <uint64_t*>carray, len(value))
 * 
 *             if typeid == nvpair.DATA_TYPE_INT64_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(int64_t))
 *                 for idx, i in enumerate(value):
 */
    __pyx_t_5 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_INT64_ARRAY); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 343, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 343, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "nvpair.pxi":344
 * 
 *             if typeid == nvpair.DATA_TYPE_INT64_ARRAY:
 *                 carray = malloc(len(value) * sizeof(int64_t))             # <<<<<<<<<<<<<<
 *                 for idx, i in enumerate(value):
 *                     (<int64_t*>carray)[idx] = i
 */
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 344, __pyx_L1_error)
      __pyx_v_carray = malloc((__pyx_t_30 * (sizeof(int64_t))));

      /* "nvpair.pxi":345
 *             if typeid == nvpair.DATA_TYPE_INT64_ARRAY:
 *                 carray = malloc(len(value) * sizeof(int64_t))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     (<int64_t*>carray)[idx] = i
 * 
 */
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_4 = __pyx_int_0;
      if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
        __pyx_t_5 = __pyx_v_value; __Pyx_INCREF(__pyx_t_5); __pyx_t_30 = 0;
        __pyx_t_31 = NULL;
      } else {
        __pyx_t_30 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 345, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_31 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_31)) __PYX_ERR(2, 345, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_31)) {
          if (likely(PyList_CheckExact(__pyx_t_5))) {
            if (__pyx_t_30 >= PyList_GET_SIZE(__pyx_t_5)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 345, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_5, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 345, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          } else {
            if (__pyx_t_30 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 345, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_5, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 345, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          }
        } else {
          __pyx_t_32 = __pyx_t_31(__pyx_t_5);
          if (unlikely(!__pyx_t_32)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(2, 345, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_32);
        }
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_32);
        __pyx_t_32 = 0;
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
        __pyx_t_32 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 345, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_32);
        __Pyx_DECREF(__pyx_t_4);
        __pyx_t_4 = __pyx_t_32;
        __pyx_t_32 = 0;

        /* "nvpair.pxi":346
 *                 carray = malloc(len(value) * sizeof(int64_t))
 *                 for idx, i in enumerate(value):
 *                     (<int64_t*>carray)[idx] = i             # <<<<<<<<<<<<<<
 * 
 *                 nvpair.nvlist_add_int64_array(self.handle, key, <int64_t*>carray, len(value))
 */
        __pyx_t_28 = __Pyx_PyInt_As_int64_t(__pyx_v_i); if (unlikely((__pyx_t_28 == (int64_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 346, __pyx_L1_error)
        __pyx_t_34 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_34 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 346, __pyx_L1_error)
        (((int64_t *)__pyx_v_carray)[__pyx_t_34]) = __pyx_t_28;

        /* "nvpair.pxi":345
 *             if typeid == nvpair.DATA_TYPE_INT64_ARRAY:
 *                 carray = malloc(len(value) * sizeof(int64_t))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     (<int64_t*>carray)[idx] = i
 * 
 */
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "nvpair.pxi":348
 *                     (<int64_t*>carray)[idx] = i
 * 
 *                 nvpair.nvlist_add_int64_array(self.handle, key, <int64_t*>carray, len(value))             # <<<<<<<<<<<<<<
 * 
 *             if typeid == nvpair.DATA_TYPE_NVLIST_ARRAY:
 */
      __pyx_t_45 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_45) && PyErr_Occurred())) __PYX_ERR(2, 348, __pyx_L1_error)
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 348, __pyx_L1_error)
      nvlist_add_int64_array(__pyx_v_self->handle, __pyx_t_45, ((int64_t *)__pyx_v_carray), __pyx_t_30);

      /* "nvpair.pxi":343
 *                 nvpair.nvlist_add_uint64_array(self.handle, key, <uint64_t*>carray, len(value))
 * 
 *             if typeid == nvpair.DATA_TYPE_INT64_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(int64_t))
 *                 for idx, i in enumerate(value):
 */
    }

    /* "nvpair.pxi":350
 *                 nvpair.nvlist_add_int64_array(self.handle, key, <int64_t*>carray, len(value))
 * 
 *             if typeid == nvpair.DATA_TYPE_NVLIST_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(nvpair.nvlist_t*))
 *                 for idx, i in enumerate(value):
 */
    __pyx_t_4 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_NVLIST_ARRAY); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_typeid, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 350, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 350, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "nvpair.pxi":351
 * 
 *             if typeid == nvpair.DATA_TYPE_NVLIST_ARRAY:
 *                 carray = malloc(len(value) * sizeof(nvpair.nvlist_t*))             # <<<<<<<<<<<<<<
 *                 for idx, i in enumerate(value):
 *                     cnvlist = <NVList>i
 */
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 351, __pyx_L1_error)
      __pyx_v_carray = malloc((__pyx_t_30 * (sizeof(nvlist_t *))));

      /* "nvpair.pxi":352
 *             if typeid == nvpair.DATA_TYPE_NVLIST_ARRAY:
 *                 carray = malloc(len(value) * sizeof(nvpair.nvlist_t*))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     cnvlist = <NVList>i
 *                     (<uintptr_t*>carray)[idx] = <uintptr_t>cnvlist.handle
 */
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_5 = __pyx_int_0;
      if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
        __pyx_t_4 = __pyx_v_value; __Pyx_INCREF(__pyx_t_4); __pyx_t_30 = 0;
        __pyx_t_31 = NULL;
      } else {
        __pyx_t_30 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 352, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_31 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_31)) __PYX_ERR(2, 352, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_31)) {
          if (likely(PyList_CheckExact(__pyx_t_4))) {
            if (__pyx_t_30 >= PyList_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 352, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_4, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 352, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          } else {
            if (__pyx_t_30 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_32 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_30); __Pyx_INCREF(__pyx_t_32); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(2, 352, __pyx_L1_error)
            #else
            __pyx_t_32 = PySequence_ITEM(__pyx_t_4, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 352, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_32);
            #endif
          }
        } else {
          __pyx_t_32 = __pyx_t_31(__pyx_t_4);
          if (unlikely(!__pyx_t_32)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(2, 352, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_32);
        }
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_32);
        __pyx_t_32 = 0;
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
        __pyx_t_32 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 352, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_32);
        __Pyx_DECREF(__pyx_t_5);
        __pyx_t_5 = __pyx_t_32;
        __pyx_t_32 = 0;

        /* "nvpair.pxi":353
 *                 carray = malloc(len(value) * sizeof(nvpair.nvlist_t*))
 *                 for idx, i in enumerate(value):
 *                     cnvlist = <NVList>i             # <<<<<<<<<<<<<<
 *                     (<uintptr_t*>carray)[idx] = <uintptr_t>cnvlist.handle
 * 
 */
        __pyx_t_32 = __pyx_v_i;
        __Pyx_INCREF(__pyx_t_32);
        __Pyx_XDECREF_SET(__pyx_v_cnvlist, ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_32));
        __pyx_t_32 = 0;

        /* "nvpair.pxi":354
 *                 for idx, i in enumerate(value):
 *                     cnvlist = <NVList>i
 *                     (<uintptr_t*>carray)[idx] = <uintptr_t>cnvlist.handle             # <<<<<<<<<<<<<<
 * 
 *                 nvpair.nvlist_add_nvlist_array(self.handle, key, <nvpair.nvlist_t**>carray, len(value))
 */
        __pyx_t_34 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_34 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 354, __pyx_L1_error)
        (((uintptr_t *)__pyx_v_carray)[__pyx_t_34]) = ((uintptr_t)__pyx_v_cnvlist->handle);

        /* "nvpair.pxi":352
 *             if typeid == nvpair.DATA_TYPE_NVLIST_ARRAY:
 *                 carray = malloc(len(value) * sizeof(nvpair.nvlist_t*))
 *                 for idx, i in enumerate(value):             # <<<<<<<<<<<<<<
 *                     cnvlist = <NVList>i
 *                     (<uintptr_t*>carray)[idx] = <uintptr_t>cnvlist.handle
 */
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "nvpair.pxi":356
 *                     (<uintptr_t*>carray)[idx] = <uintptr_t>cnvlist.handle
 * 
 *                 nvpair.nvlist_add_nvlist_array(self.handle, key, <nvpair.nvlist_t**>carray, len(value))             # <<<<<<<<<<<<<<
 * 
 *             if carray != NULL:
 */
      __pyx_t_46 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_46) && PyErr_Occurred())) __PYX_ERR(2, 356, __pyx_L1_error)
      __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == -1)) __PYX_ERR(2, 356, __pyx_L1_error)
      nvlist_add_nvlist_array(__pyx_v_self->handle, __pyx_t_46, ((nvlist_t **)__pyx_v_carray), __pyx_t_30);

      /* "nvpair.pxi":350
 *                 nvpair.nvlist_add_int64_array(self.handle, key, <int64_t*>carray, len(value))
 * 
 *             if typeid == nvpair.DATA_TYPE_NVLIST_ARRAY:             # <<<<<<<<<<<<<<
 *                 carray = malloc(len(value) * sizeof(nvpair.nvlist_t*))
 *                 for idx, i in enumerate(value):
 */
    }

    /* "nvpair.pxi":358
 *                 nvpair.nvlist_add_nvlist_array(self.handle, key, <nvpair.nvlist_t**>carray, len(value))
 * 
 *             if carray != NULL:             # <<<<<<<<<<<<<<
 *                 free(carray)
 * 
 */
    __pyx_t_2 = ((__pyx_v_carray != NULL) != 0);
    if (__pyx_t_2) {

      /* "nvpair.pxi":359
 * 
 *             if carray != NULL:
 *                 free(carray)             # <<<<<<<<<<<<<<
 * 
 *             return
 */
      free(__pyx_v_carray);

      /* "nvpair.pxi":358
 *                 nvpair.nvlist_add_nvlist_array(self.handle, key, <nvpair.nvlist_t**>carray, len(value))
 * 
 *             if carray != NULL:             # <<<<<<<<<<<<<<
 *                 free(carray)
 * 
 */
    }

    /* "nvpair.pxi":361
 *                 free(carray)
 * 
 *             return             # <<<<<<<<<<<<<<
 * 
 *         raise ValueError('Value not compatible with type specified: {0}'.format(type(value).__name__))
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "nvpair.pxi":271
 *                 return
 * 
 *         if isinstance(value, collections.Sequence):             # <<<<<<<<<<<<<<
 *             if typeid == nvpair.DATA_TYPE_STRING_ARRAY:
 *                 carray = malloc(len(value) * sizeof(char*))
 */
  }

  /* "nvpair.pxi":363
 *             return
 * 
 *         raise ValueError('Value not compatible with type specified: {0}'.format(type(value).__name__))             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, key):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Value_not_compatible_with_type_s, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_32 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_value)), __pyx_n_s_name); if (unlikely(!__pyx_t_32)) __PYX_ERR(2, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_32);
  __pyx_t_47 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_47 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_47)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_47);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_47) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_32); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 363, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
    __Pyx_GOTREF(__pyx_t_5);
  } else {
    __pyx_t_48 = PyTuple_New(1+1); if (unlikely(!__pyx_t_48)) __PYX_ERR(2, 363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_48);
    __Pyx_GIVEREF(__pyx_t_47); PyTuple_SET_ITEM(__pyx_t_48, 0, __pyx_t_47); __pyx_t_47 = NULL;
    __Pyx_GIVEREF(__pyx_t_32);
    PyTuple_SET_ITEM(__pyx_t_48, 0+1, __pyx_t_32);
    __pyx_t_32 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_48, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_48); __pyx_t_48 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __PYX_ERR(2, 363, __pyx_L1_error)

  /* "nvpair.pxi":200
 *         return nvpair.nvpair_type(pair)
 * 
 *     def set(self, key, value, typeid):             # <<<<<<<<<<<<<<
 *         cdef NVList cnvlist
 *         cdef void* carray = NULL
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_32);
  __Pyx_XDECREF(__pyx_t_47);
  __Pyx_XDECREF(__pyx_t_48);
  __Pyx_AddTraceback("libzfs.NVList.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_cnvlist);
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "nvpair.pxi":365
 *         raise ValueError('Value not compatible with type specified: {0}'.format(type(value).__name__))
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         cdef nvpair.nvpair_t *pair
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_6NVList_18__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_6libzfs_6NVList_18__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_6NVList_17__getitem__(((struct __pyx_obj_6libzfs_NVList *)__pyx_v_self), ((PyObject *)__pyx_v_key));

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

static PyObject *__pyx_pf_6libzfs_6NVList_17__getitem__(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, PyObject *__pyx_v_key) {
  nvpair_t *__pyx_v_pair;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  nvpair_t *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "nvpair.pxi":368
 *         cdef nvpair.nvpair_t *pair
 * 
 *         pair = self.__get_pair(key)             # <<<<<<<<<<<<<<
 *         return self.__get_value(pair)
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6libzfs_NVList *)__pyx_v_self->__pyx_vtab)->__pyx___get_pair(__pyx_v_self, __pyx_v_key); if (unlikely(__pyx_t_1 == NULL)) __PYX_ERR(2, 368, __pyx_L1_error)
  __pyx_v_pair = __pyx_t_1;

  /* "nvpair.pxi":369
 * 
 *         pair = self.__get_pair(key)
 *         return self.__get_value(pair)             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, key, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_NVList *)__pyx_v_self->__pyx_vtab)->__pyx___get_value(__pyx_v_self, __pyx_v_pair, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "nvpair.pxi":365
 *         raise ValueError('Value not compatible with type specified: {0}'.format(type(value).__name__))
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         cdef nvpair.nvpair_t *pair
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("libzfs.NVList.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "nvpair.pxi":371
 *         return self.__get_value(pair)
 * 
 *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
 *         if type(key) is unicode:
 *             key = str(key)
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_6NVList_20__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6libzfs_6NVList_20__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_6NVList_19__setitem__(((struct __pyx_obj_6libzfs_NVList *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6libzfs_6NVList_19__setitem__(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("__setitem__", 0);
  __Pyx_INCREF(__pyx_v_key);

  /* "nvpair.pxi":372
 * 
 *     def __setitem__(self, key, value):
 *         if type(key) is unicode:             # <<<<<<<<<<<<<<
 *             key = str(key)
 * 
 */
  __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_key)) == ((PyObject *)(&PyUnicode_Type)));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "nvpair.pxi":373
 *     def __setitem__(self, key, value):
 *         if type(key) is unicode:
 *             key = str(key)             # <<<<<<<<<<<<<<
 * 
 *         if type(value) is bool or value is None:
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key);
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "nvpair.pxi":372
 * 
 *     def __setitem__(self, key, value):
 *         if type(key) is unicode:             # <<<<<<<<<<<<<<
 *             key = str(key)
 * 
 */
  }

  /* "nvpair.pxi":375
 *             key = str(key)
 * 
 *         if type(value) is bool or value is None:             # <<<<<<<<<<<<<<
 *             self.set(key, value, nvpair.DATA_TYPE_BOOLEAN)
 * 
 */
  __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_value)) == ((PyObject*)&PyBool_Type));
  __pyx_t_5 = (__pyx_t_1 != 0);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_2 = __pyx_t_5;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_value == Py_None);
  __pyx_t_1 = (__pyx_t_5 != 0);
  __pyx_t_2 = __pyx_t_1;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_2) {

    /* "nvpair.pxi":376
 * 
 *         if type(value) is bool or value is None:
 *             self.set(key, value, nvpair.DATA_TYPE_BOOLEAN)             # <<<<<<<<<<<<<<
 * 
 *         if type(value) is int:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 376, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_BOOLEAN); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 376, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_8 = 1;
      }
    }
    __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 376, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(__pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_key);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_value);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 376, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "nvpair.pxi":375
 *             key = str(key)
 * 
 *         if type(value) is bool or value is None:             # <<<<<<<<<<<<<<
 *             self.set(key, value, nvpair.DATA_TYPE_BOOLEAN)
 * 
 */
  }

  /* "nvpair.pxi":378
 *             self.set(key, value, nvpair.DATA_TYPE_BOOLEAN)
 * 
 *         if type(value) is int:             # <<<<<<<<<<<<<<
 *             self.set(key, value, nvpair.DATA_TYPE_UINT64)
 * 
 */
  __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_value)) == ((PyObject *)(&PyInt_Type)));
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":379
 * 
 *         if type(value) is int:
 *             self.set(key, value, nvpair.DATA_TYPE_UINT64)             # <<<<<<<<<<<<<<
 * 
 *         if type(value) is str or type(value) is unicode:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_UINT64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_6 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_8 = 1;
      }
    }
    __pyx_t_7 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 379, __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_INCREF(__pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_key);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_value);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_8, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "nvpair.pxi":378
 *             self.set(key, value, nvpair.DATA_TYPE_BOOLEAN)
 * 
 *         if type(value) is int:             # <<<<<<<<<<<<<<
 *             self.set(key, value, nvpair.DATA_TYPE_UINT64)
 * 
 */
  }

  /* "nvpair.pxi":381
 *             self.set(key, value, nvpair.DATA_TYPE_UINT64)
 * 
 *         if type(value) is str or type(value) is unicode:             # <<<<<<<<<<<<<<
 *             self.set(key, str(value), nvpair.DATA_TYPE_STRING)
 * 
 */
  __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_value)) == ((PyObject *)(&PyString_Type)));
  __pyx_t_5 = (__pyx_t_2 != 0);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_5 = (((PyObject *)Py_TYPE(__pyx_v_value)) == ((PyObject *)(&PyUnicode_Type)));
  __pyx_t_2 = (__pyx_t_5 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L9_bool_binop_done:;
  if (__pyx_t_1) {

    /* "nvpair.pxi":382
 * 
 *         if type(value) is str or type(value) is unicode:
 *             self.set(key, str(value), nvpair.DATA_TYPE_STRING)             # <<<<<<<<<<<<<<
 * 
 *         if type(value) is NVList:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_value);
    __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_STRING); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_8 = 1;
      }
    }
    __pyx_t_10 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_8, __pyx_v_key);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_8, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_8, __pyx_t_7);
    __pyx_t_9 = 0;
    __pyx_t_7 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "nvpair.pxi":381
 *             self.set(key, value, nvpair.DATA_TYPE_UINT64)
 * 
 *         if type(value) is str or type(value) is unicode:             # <<<<<<<<<<<<<<
 *             self.set(key, str(value), nvpair.DATA_TYPE_STRING)
 * 
 */
  }

  /* "nvpair.pxi":384
 *             self.set(key, str(value), nvpair.DATA_TYPE_STRING)
 * 
 *         if type(value) is NVList:             # <<<<<<<<<<<<<<
 *             self.set(key, value, nvpair.DATA_TYPE_NVLIST)
 * 
 */
  __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_value)) == ((PyObject *)__pyx_ptype_6libzfs_NVList));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "nvpair.pxi":385
 * 
 *         if type(value) is NVList:
 *             self.set(key, value, nvpair.DATA_TYPE_NVLIST)             # <<<<<<<<<<<<<<
 * 
 *         if type(value) is list:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_NVLIST); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_8 = 1;
      }
    }
    __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(__pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_key);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_value);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_10);
    __pyx_t_10 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "nvpair.pxi":384
 *             self.set(key, str(value), nvpair.DATA_TYPE_STRING)
 * 
 *         if type(value) is NVList:             # <<<<<<<<<<<<<<
 *             self.set(key, value, nvpair.DATA_TYPE_NVLIST)
 * 
 */
  }

  /* "nvpair.pxi":387
 *             self.set(key, value, nvpair.DATA_TYPE_NVLIST)
 * 
 *         if type(value) is list:             # <<<<<<<<<<<<<<
 *             # We need some heuristics here...
 *             if len(value) == 0:
 */
  __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_value)) == ((PyObject *)(&PyList_Type)));
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":389
 *         if type(value) is list:
 *             # We need some heuristics here...
 *             if len(value) == 0:             # <<<<<<<<<<<<<<
 *                 # don't know what to do!
 *                 return
 */
    __pyx_t_8 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(2, 389, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_8 == 0) != 0);
    if (__pyx_t_1) {

      /* "nvpair.pxi":391
 *             if len(value) == 0:
 *                 # don't know what to do!
 *                 return             # <<<<<<<<<<<<<<
 * 
 *             if type(value[0]) is NVList:
 */
      __pyx_r = 0;
      goto __pyx_L0;

      /* "nvpair.pxi":389
 *         if type(value) is list:
 *             # We need some heuristics here...
 *             if len(value) == 0:             # <<<<<<<<<<<<<<
 *                 # don't know what to do!
 *                 return
 */
    }

    /* "nvpair.pxi":393
 *                 return
 * 
 *             if type(value[0]) is NVList:             # <<<<<<<<<<<<<<
 *                 self.set(key, value, nvpair.DATA_TYPE_NVLIST_ARRAY)
 * 
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_t_4)) == ((PyObject *)__pyx_ptype_6libzfs_NVList));
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "nvpair.pxi":394
 * 
 *             if type(value[0]) is NVList:
 *                 self.set(key, value, nvpair.DATA_TYPE_NVLIST_ARRAY)             # <<<<<<<<<<<<<<
 * 
 *             if type(value[0]) is int:
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 394, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_NVLIST_ARRAY); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 394, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && 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_8 = 1;
        }
      }
      __pyx_t_7 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 394, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_10) {
        __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_10); __pyx_t_10 = NULL;
      }
      __Pyx_INCREF(__pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_key);
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_value);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_8, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 394, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "nvpair.pxi":393
 *                 return
 * 
 *             if type(value[0]) is NVList:             # <<<<<<<<<<<<<<
 *                 self.set(key, value, nvpair.DATA_TYPE_NVLIST_ARRAY)
 * 
 */
    }

    /* "nvpair.pxi":396
 *                 self.set(key, value, nvpair.DATA_TYPE_NVLIST_ARRAY)
 * 
 *             if type(value[0]) is int:             # <<<<<<<<<<<<<<
 *                 self.set(key, value, nvpair.DATA_TYPE_INT32_ARRAY)
 * 
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_t_4)) == ((PyObject *)(&PyInt_Type)));
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "nvpair.pxi":397
 * 
 *             if type(value[0]) is int:
 *                 self.set(key, value, nvpair.DATA_TYPE_INT32_ARRAY)             # <<<<<<<<<<<<<<
 * 
 *             if type(value[0]) is long:
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 397, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_INT32_ARRAY); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 397, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && 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 = 1;
        }
      }
      __pyx_t_10 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 397, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__pyx_t_9) {
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
      }
      __Pyx_INCREF(__pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_8, __pyx_v_key);
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_8, __pyx_v_value);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_8, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 397, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "nvpair.pxi":396
 *                 self.set(key, value, nvpair.DATA_TYPE_NVLIST_ARRAY)
 * 
 *             if type(value[0]) is int:             # <<<<<<<<<<<<<<
 *                 self.set(key, value, nvpair.DATA_TYPE_INT32_ARRAY)
 * 
 */
    }

    /* "nvpair.pxi":399
 *                 self.set(key, value, nvpair.DATA_TYPE_INT32_ARRAY)
 * 
 *             if type(value[0]) is long:             # <<<<<<<<<<<<<<
 *                 self.set(key, value, nvpair.DATA_TYPE_INT64_ARRAY)
 * 
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_t_4)) == ((PyObject *)(&PyLong_Type)));
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "nvpair.pxi":400
 * 
 *             if type(value[0]) is long:
 *                 self.set(key, value, nvpair.DATA_TYPE_INT64_ARRAY)             # <<<<<<<<<<<<<<
 * 
 *             if type(value[0]) is str or type(value) is unicode:
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 400, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_INT64_ARRAY); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 400, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_7 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_8 = 1;
        }
      }
      __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 400, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_key);
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_value);
      __Pyx_GIVEREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_10);
      __pyx_t_10 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 400, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "nvpair.pxi":399
 *                 self.set(key, value, nvpair.DATA_TYPE_INT32_ARRAY)
 * 
 *             if type(value[0]) is long:             # <<<<<<<<<<<<<<
 *                 self.set(key, value, nvpair.DATA_TYPE_INT64_ARRAY)
 * 
 */
    }

    /* "nvpair.pxi":402
 *                 self.set(key, value, nvpair.DATA_TYPE_INT64_ARRAY)
 * 
 *             if type(value[0]) is str or type(value) is unicode:             # <<<<<<<<<<<<<<
 *                 self.set(key, value, nvpair.DATA_TYPE_STRING_ARRAY)
 * 
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_t_4)) == ((PyObject *)(&PyString_Type)));
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = (__pyx_t_1 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_2 = __pyx_t_5;
      goto __pyx_L18_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)Py_TYPE(__pyx_v_value)) == ((PyObject *)(&PyUnicode_Type)));
    __pyx_t_1 = (__pyx_t_5 != 0);
    __pyx_t_2 = __pyx_t_1;
    __pyx_L18_bool_binop_done:;
    if (__pyx_t_2) {

      /* "nvpair.pxi":403
 * 
 *             if type(value[0]) is str or type(value) is unicode:
 *                 self.set(key, value, nvpair.DATA_TYPE_STRING_ARRAY)             # <<<<<<<<<<<<<<
 * 
 *         if type(value) is dict:
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 403, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_STRING_ARRAY); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 403, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && 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_8 = 1;
        }
      }
      __pyx_t_7 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 403, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_10) {
        __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_10); __pyx_t_10 = NULL;
      }
      __Pyx_INCREF(__pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_key);
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_value);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_8, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 403, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "nvpair.pxi":402
 *                 self.set(key, value, nvpair.DATA_TYPE_INT64_ARRAY)
 * 
 *             if type(value[0]) is str or type(value) is unicode:             # <<<<<<<<<<<<<<
 *                 self.set(key, value, nvpair.DATA_TYPE_STRING_ARRAY)
 * 
 */
    }

    /* "nvpair.pxi":387
 *             self.set(key, value, nvpair.DATA_TYPE_NVLIST)
 * 
 *         if type(value) is list:             # <<<<<<<<<<<<<<
 *             # We need some heuristics here...
 *             if len(value) == 0:
 */
  }

  /* "nvpair.pxi":405
 *                 self.set(key, value, nvpair.DATA_TYPE_STRING_ARRAY)
 * 
 *         if type(value) is dict:             # <<<<<<<<<<<<<<
 *             self.set(key, value, nvpair.DATA_TYPE_NVLIST)
 * 
 */
  __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_value)) == ((PyObject *)(&PyDict_Type)));
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "nvpair.pxi":406
 * 
 *         if type(value) is dict:
 *             self.set(key, value, nvpair.DATA_TYPE_NVLIST)             # <<<<<<<<<<<<<<
 * 
 *     def get_type(self, key):
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_NVLIST); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && 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 = 1;
      }
    }
    __pyx_t_10 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_9) {
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
    }
    __Pyx_INCREF(__pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_8, __pyx_v_key);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_8, __pyx_v_value);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_8, __pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "nvpair.pxi":405
 *                 self.set(key, value, nvpair.DATA_TYPE_STRING_ARRAY)
 * 
 *         if type(value) is dict:             # <<<<<<<<<<<<<<
 *             self.set(key, value, nvpair.DATA_TYPE_NVLIST)
 * 
 */
  }

  /* "nvpair.pxi":371
 *         return self.__get_value(pair)
 * 
 *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
 *         if type(key) is unicode:
 *             key = str(key)
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("libzfs.NVList.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "nvpair.pxi":408
 *             self.set(key, value, nvpair.DATA_TYPE_NVLIST)
 * 
 *     def get_type(self, key):             # <<<<<<<<<<<<<<
 *         pair = self.__get_pair(key)
 *         return nvpair.nvpair_type(pair)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_6NVList_22get_type(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_6libzfs_6NVList_22get_type(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_type (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_6NVList_21get_type(((struct __pyx_obj_6libzfs_NVList *)__pyx_v_self), ((PyObject *)__pyx_v_key));

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

static PyObject *__pyx_pf_6libzfs_6NVList_21get_type(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, PyObject *__pyx_v_key) {
  nvpair_t *__pyx_v_pair;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  nvpair_t *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("get_type", 0);

  /* "nvpair.pxi":409
 * 
 *     def get_type(self, key):
 *         pair = self.__get_pair(key)             # <<<<<<<<<<<<<<
 *         return nvpair.nvpair_type(pair)
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6libzfs_NVList *)__pyx_v_self->__pyx_vtab)->__pyx___get_pair(__pyx_v_self, __pyx_v_key); if (unlikely(__pyx_t_1 == NULL)) __PYX_ERR(2, 409, __pyx_L1_error)
  __pyx_v_pair = __pyx_t_1;

  /* "nvpair.pxi":410
 *     def get_type(self, key):
 *         pair = self.__get_pair(key)
 *         return nvpair.nvpair_type(pair)             # <<<<<<<<<<<<<<
 * 
 *     def keys(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_data_type_t(nvpair_type(__pyx_v_pair)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "nvpair.pxi":408
 *             self.set(key, value, nvpair.DATA_TYPE_NVLIST)
 * 
 *     def get_type(self, key):             # <<<<<<<<<<<<<<
 *         pair = self.__get_pair(key)
 *         return nvpair.nvpair_type(pair)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("libzfs.NVList.get_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "nvpair.pxi":412
 *         return nvpair.nvpair_type(pair)
 * 
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         return list(self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_6NVList_24keys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_6NVList_24keys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("keys (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_6NVList_23keys(((struct __pyx_obj_6libzfs_NVList *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_6NVList_23keys(struct __pyx_obj_6libzfs_NVList *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("keys", 0);

  /* "nvpair.pxi":413
 * 
 *     def keys(self):
 *         return list(self)             # <<<<<<<<<<<<<<
 * 
 *     def values(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "nvpair.pxi":412
 *         return nvpair.nvpair_type(pair)
 * 
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         return list(self)
 * 
 */

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

/* "nvpair.pxi":415
 *         return list(self)
 * 
 *     def values(self):             # <<<<<<<<<<<<<<
 *         return [v for k, v in self.items()]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_6NVList_26values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_6NVList_26values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("values (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_6NVList_25values(((struct __pyx_obj_6libzfs_NVList *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_6NVList_25values(struct __pyx_obj_6libzfs_NVList *__pyx_v_self) {
  CYTHON_UNUSED PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_RefNannySetupContext("values", 0);

  /* "nvpair.pxi":416
 * 
 *     def values(self):
 *         return [v for k, v in self.items()]             # <<<<<<<<<<<<<<
 * 
 *     def items(self, raw=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (__pyx_t_4) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 416, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 416, __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_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 416, __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(2, 416, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(2, 416, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 416, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(2, 416, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 416, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(2, 416, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(2, 416, __pyx_L1_error)
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 416, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 416, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 416, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
      index = 0; __pyx_t_4 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(2, 416, __pyx_L1_error)
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(2, 416, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7);
    __pyx_t_7 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_v))) __PYX_ERR(2, 416, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "nvpair.pxi":415
 *         return list(self)
 * 
 *     def values(self):             # <<<<<<<<<<<<<<
 *         return [v for k, v in self.items()]
 * 
 */

  /* 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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("libzfs.NVList.values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6libzfs_6NVList_29generator1(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "nvpair.pxi":418
 *         return [v for k, v in self.items()]
 * 
 *     def items(self, raw=False):             # <<<<<<<<<<<<<<
 *         cdef nvpair.nvpair_t *pair = NULL
 *         while True:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_6NVList_28items(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_6NVList_28items(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_raw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("items (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_raw,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);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_raw);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "items") < 0)) __PYX_ERR(2, 418, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_raw = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("items", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 418, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.NVList.items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_6NVList_27items(((struct __pyx_obj_6libzfs_NVList *)__pyx_v_self), __pyx_v_raw);

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

static PyObject *__pyx_pf_6libzfs_6NVList_27items(struct __pyx_obj_6libzfs_NVList *__pyx_v_self, PyObject *__pyx_v_raw) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_1_items *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("items", 0);
  __pyx_cur_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_1_items *)__pyx_tp_new_6libzfs___pyx_scope_struct_1_items(__pyx_ptype_6libzfs___pyx_scope_struct_1_items, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __pyx_cur_scope->__pyx_v_raw = __pyx_v_raw;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_raw);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_raw);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6libzfs_6NVList_29generator1, (PyObject *) __pyx_cur_scope, __pyx_n_s_items, __pyx_n_s_NVList_items); if (unlikely(!gen)) __PYX_ERR(2, 418, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("libzfs.NVList.items", __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_6libzfs_6NVList_29generator1(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6libzfs___pyx_scope_struct_1_items *__pyx_cur_scope = ((struct __pyx_obj_6libzfs___pyx_scope_struct_1_items *)__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;
  struct __pyx_opt_args_6libzfs_6NVList___get_value __pyx_t_5;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L7_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(2, 418, __pyx_L1_error)

  /* "nvpair.pxi":419
 * 
 *     def items(self, raw=False):
 *         cdef nvpair.nvpair_t *pair = NULL             # <<<<<<<<<<<<<<
 *         while True:
 *             pair = nvpair.nvlist_next_nvpair(self.handle, pair)
 */
  __pyx_cur_scope->__pyx_v_pair = NULL;

  /* "nvpair.pxi":420
 *     def items(self, raw=False):
 *         cdef nvpair.nvpair_t *pair = NULL
 *         while True:             # <<<<<<<<<<<<<<
 *             pair = nvpair.nvlist_next_nvpair(self.handle, pair)
 *             if pair is NULL:
 */
  while (1) {

    /* "nvpair.pxi":421
 *         cdef nvpair.nvpair_t *pair = NULL
 *         while True:
 *             pair = nvpair.nvlist_next_nvpair(self.handle, pair)             # <<<<<<<<<<<<<<
 *             if pair is NULL:
 *                 return
 */
    __pyx_cur_scope->__pyx_v_pair = nvlist_next_nvpair(__pyx_cur_scope->__pyx_v_self->handle, __pyx_cur_scope->__pyx_v_pair);

    /* "nvpair.pxi":422
 *         while True:
 *             pair = nvpair.nvlist_next_nvpair(self.handle, pair)
 *             if pair is NULL:             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
    __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_pair == NULL) != 0);
    if (__pyx_t_1) {

      /* "nvpair.pxi":423
 *             pair = nvpair.nvlist_next_nvpair(self.handle, pair)
 *             if pair is NULL:
 *                 return             # <<<<<<<<<<<<<<
 * 
 *             yield (nvpair.nvpair_name(pair), self.__get_value(pair, not raw))
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = NULL;
      goto __pyx_L0;

      /* "nvpair.pxi":422
 *         while True:
 *             pair = nvpair.nvlist_next_nvpair(self.handle, pair)
 *             if pair is NULL:             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
    }

    /* "nvpair.pxi":425
 *                 return
 * 
 *             yield (nvpair.nvpair_name(pair), self.__get_value(pair, not raw))             # <<<<<<<<<<<<<<
 */
    __pyx_t_2 = __Pyx_PyUnicode_FromString(nvpair_name(__pyx_cur_scope->__pyx_v_pair)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_raw); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 425, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.wrap_dict = __pyx_t_3;
    __pyx_t_4 = ((struct __pyx_vtabstruct_6libzfs_NVList *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->__pyx___get_value(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_pair, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 425, __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;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L7_resume_from_yield:;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 425, __pyx_L1_error)
  }

  /* "nvpair.pxi":418
 *         return [v for k, v in self.items()]
 * 
 *     def items(self, raw=False):             # <<<<<<<<<<<<<<
 *         cdef nvpair.nvpair_t *pair = NULL
 *         while True:
 */

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

/* "converter.pxi":30
 * 
 * class ZfsConverter(object):
 *     def __init__(self, typ, **kwargs):             # <<<<<<<<<<<<<<
 *         self.typ = typ
 *         self.readonly = kwargs.pop('readonly', False)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZfsConverter_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_12ZfsConverter_1__init__ = {"__init__", (PyCFunction)__pyx_pw_6libzfs_12ZfsConverter_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6libzfs_12ZfsConverter_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_typ = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (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_typ,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_typ)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 30, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 30, __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_typ = 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, 30, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("libzfs.ZfsConverter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_12ZfsConverter___init__(__pyx_self, __pyx_v_self, __pyx_v_typ, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_6libzfs_12ZfsConverter___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_typ, 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;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "converter.pxi":31
 * class ZfsConverter(object):
 *     def __init__(self, typ, **kwargs):
 *         self.typ = typ             # <<<<<<<<<<<<<<
 *         self.readonly = kwargs.pop('readonly', False)
 *         self.nullable = kwargs.pop('nullable', False)
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_typ, __pyx_v_typ) < 0) __PYX_ERR(0, 31, __pyx_L1_error)

  /* "converter.pxi":32
 *     def __init__(self, typ, **kwargs):
 *         self.typ = typ
 *         self.readonly = kwargs.pop('readonly', False)             # <<<<<<<<<<<<<<
 *         self.nullable = kwargs.pop('nullable', False)
 *         self.null = kwargs.pop('null', '-')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_readonly, __pyx_t_2) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "converter.pxi":33
 *         self.typ = typ
 *         self.readonly = kwargs.pop('readonly', False)
 *         self.nullable = kwargs.pop('nullable', False)             # <<<<<<<<<<<<<<
 *         self.null = kwargs.pop('null', '-')
 *         self.read_null = kwargs.pop('read_null', self.null)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nullable, __pyx_t_1) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":34
 *         self.readonly = kwargs.pop('readonly', False)
 *         self.nullable = kwargs.pop('nullable', False)
 *         self.null = kwargs.pop('null', '-')             # <<<<<<<<<<<<<<
 *         self.read_null = kwargs.pop('read_null', self.null)
 *         self.no = kwargs.pop('no', 'off')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__4, NULL); 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;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_null, __pyx_t_2) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "converter.pxi":35
 *         self.nullable = kwargs.pop('nullable', False)
 *         self.null = kwargs.pop('null', '-')
 *         self.read_null = kwargs.pop('read_null', self.null)             # <<<<<<<<<<<<<<
 *         self.no = kwargs.pop('no', 'off')
 *         self.yes = kwargs.pop('yes', 'on')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_null); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 35, __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_n_s_read_null);
  __Pyx_GIVEREF(__pyx_n_s_read_null);
  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_n_s_read_null);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_read_null, __pyx_t_2) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "converter.pxi":36
 *         self.null = kwargs.pop('null', '-')
 *         self.read_null = kwargs.pop('read_null', self.null)
 *         self.no = kwargs.pop('no', 'off')             # <<<<<<<<<<<<<<
 *         self.yes = kwargs.pop('yes', 'on')
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_no, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":37
 *         self.read_null = kwargs.pop('read_null', self.null)
 *         self.no = kwargs.pop('no', 'off')
 *         self.yes = kwargs.pop('yes', 'on')             # <<<<<<<<<<<<<<
 * 
 *     def to_native(self, value):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_yes, __pyx_t_2) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "converter.pxi":30
 * 
 * class ZfsConverter(object):
 *     def __init__(self, typ, **kwargs):             # <<<<<<<<<<<<<<
 *         self.typ = typ
 *         self.readonly = kwargs.pop('readonly', False)
 */

  /* 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("libzfs.ZfsConverter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "converter.pxi":39
 *         self.yes = kwargs.pop('yes', 'on')
 * 
 *     def to_native(self, value):             # <<<<<<<<<<<<<<
 *         if value is None:
 *             return None
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZfsConverter_3to_native(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_12ZfsConverter_3to_native = {"to_native", (PyCFunction)__pyx_pw_6libzfs_12ZfsConverter_3to_native, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6libzfs_12ZfsConverter_3to_native(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_native (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("to_native", 1, 2, 2, 1); __PYX_ERR(0, 39, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_native") < 0)) __PYX_ERR(0, 39, __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_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_native", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 39, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZfsConverter.to_native", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_12ZfsConverter_2to_native(__pyx_self, __pyx_v_self, __pyx_v_value);

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

static PyObject *__pyx_pf_6libzfs_12ZfsConverter_2to_native(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  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;
  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;
  __Pyx_RefNannySetupContext("to_native", 0);

  /* "converter.pxi":40
 * 
 *     def to_native(self, value):
 *         if value is None:             # <<<<<<<<<<<<<<
 *             return None
 * 
 */
  __pyx_t_1 = (__pyx_v_value == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "converter.pxi":41
 *     def to_native(self, value):
 *         if value is None:
 *             return None             # <<<<<<<<<<<<<<
 * 
 *         if self.nullable and value == self.read_null:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;

    /* "converter.pxi":40
 * 
 *     def to_native(self, value):
 *         if value is None:             # <<<<<<<<<<<<<<
 *             return None
 * 
 */
  }

  /* "converter.pxi":43
 *             return None
 * 
 *         if self.nullable and value == self.read_null:             # <<<<<<<<<<<<<<
 *             return None
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nullable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_read_null); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_value, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = __pyx_t_1;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_2) {

    /* "converter.pxi":44
 * 
 *         if self.nullable and value == self.read_null:
 *             return None             # <<<<<<<<<<<<<<
 * 
 *         if self.typ is int:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;

    /* "converter.pxi":43
 *             return None
 * 
 *         if self.nullable and value == self.read_null:             # <<<<<<<<<<<<<<
 *             return None
 * 
 */
  }

  /* "converter.pxi":46
 *             return None
 * 
 *         if self.typ is int:             # <<<<<<<<<<<<<<
 *             try:
 *                 return int(value)
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_typ); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = (__pyx_t_4 == ((PyObject *)(&PyInt_Type)));
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "converter.pxi":47
 * 
 *         if self.typ is int:
 *             try:             # <<<<<<<<<<<<<<
 *                 return int(value)
 *             except ValueError:
 */
    {
      __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:*/ {

        /* "converter.pxi":48
 *         if self.typ is int:
 *             try:
 *                 return int(value)             # <<<<<<<<<<<<<<
 *             except ValueError:
 *                 return None
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 48, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L12_try_return;

        /* "converter.pxi":47
 * 
 *         if self.typ is int:
 *             try:             # <<<<<<<<<<<<<<
 *                 return int(value)
 *             except ValueError:
 */
      }
      __pyx_L8_error:;
      __Pyx_PyThreadState_assign
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "converter.pxi":49
 *             try:
 *                 return int(value)
 *             except ValueError:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
      __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
      if (__pyx_t_8) {
        __Pyx_AddTraceback("libzfs.ZfsConverter.to_native", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_9) < 0) __PYX_ERR(0, 49, __pyx_L10_except_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_t_9);

        /* "converter.pxi":50
 *                 return int(value)
 *             except ValueError:
 *                 return None             # <<<<<<<<<<<<<<
 * 
 *         if self.typ is str:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_None);
        __pyx_r = Py_None;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L11_except_return;
      }
      goto __pyx_L10_except_error;
      __pyx_L10_except_error:;

      /* "converter.pxi":47
 * 
 *         if self.typ is int:
 *             try:             # <<<<<<<<<<<<<<
 *                 return int(value)
 *             except ValueError:
 */
      __Pyx_PyThreadState_assign
      __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_L12_try_return:;
      __Pyx_PyThreadState_assign
      __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;
      __pyx_L11_except_return:;
      __Pyx_PyThreadState_assign
      __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;
    }

    /* "converter.pxi":46
 *             return None
 * 
 *         if self.typ is int:             # <<<<<<<<<<<<<<
 *             try:
 *                 return int(value)
 */
  }

  /* "converter.pxi":52
 *                 return None
 * 
 *         if self.typ is str:             # <<<<<<<<<<<<<<
 *             return value
 * 
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_typ); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_1 = (__pyx_t_9 == ((PyObject *)(&PyString_Type)));
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "converter.pxi":53
 * 
 *         if self.typ is str:
 *             return value             # <<<<<<<<<<<<<<
 * 
 *         if self.typ is bool:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_value);
    __pyx_r = __pyx_v_value;
    goto __pyx_L0;

    /* "converter.pxi":52
 *                 return None
 * 
 *         if self.typ is str:             # <<<<<<<<<<<<<<
 *             return value
 * 
 */
  }

  /* "converter.pxi":55
 *             return value
 * 
 *         if self.typ is bool:             # <<<<<<<<<<<<<<
 *             if value == self.yes:
 *                 return True
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_typ); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_2 = (__pyx_t_9 == ((PyObject*)&PyBool_Type));
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "converter.pxi":56
 * 
 *         if self.typ is bool:
 *             if value == self.yes:             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_yes); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 56, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_value, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 56, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "converter.pxi":57
 *         if self.typ is bool:
 *             if value == self.yes:
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *             if value == self.no:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "converter.pxi":56
 * 
 *         if self.typ is bool:
 *             if value == self.yes:             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
    }

    /* "converter.pxi":59
 *                 return True
 * 
 *             if value == self.no:             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_no); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = PyObject_RichCompare(__pyx_v_value, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 59, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 59, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_1) {

      /* "converter.pxi":60
 * 
 *             if value == self.no:
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *             return None
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      goto __pyx_L0;

      /* "converter.pxi":59
 *                 return True
 * 
 *             if value == self.no:             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
    }

    /* "converter.pxi":62
 *                 return False
 * 
 *             return None             # <<<<<<<<<<<<<<
 * 
 *         if self.typ == datetime:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;

    /* "converter.pxi":55
 *             return value
 * 
 *         if self.typ is bool:             # <<<<<<<<<<<<<<
 *             if value == self.yes:
 *                 return True
 */
  }

  /* "converter.pxi":64
 *             return None
 * 
 *         if self.typ == datetime:             # <<<<<<<<<<<<<<
 *             return datetime.fromtimestamp(int(value))
 * 
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_typ); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_9, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {

    /* "converter.pxi":65
 * 
 *         if self.typ == datetime:
 *             return datetime.fromtimestamp(int(value))             # <<<<<<<<<<<<<<
 * 
 *     def to_property(self, value):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_fromtimestamp); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 65, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && 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);
      }
    }
    if (!__pyx_t_10) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 65, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "converter.pxi":64
 *             return None
 * 
 *         if self.typ == datetime:             # <<<<<<<<<<<<<<
 *             return datetime.fromtimestamp(int(value))
 * 
 */
  }

  /* "converter.pxi":39
 *         self.yes = kwargs.pop('yes', 'on')
 * 
 *     def to_native(self, value):             # <<<<<<<<<<<<<<
 *         if value is None:
 *             return None
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("libzfs.ZfsConverter.to_native", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "converter.pxi":67
 *             return datetime.fromtimestamp(int(value))
 * 
 *     def to_property(self, value):             # <<<<<<<<<<<<<<
 *         if self.readonly:
 *             raise ValueError('Property is read-only')
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZfsConverter_5to_property(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_12ZfsConverter_5to_property = {"to_property", (PyCFunction)__pyx_pw_6libzfs_12ZfsConverter_5to_property, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6libzfs_12ZfsConverter_5to_property(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_property (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("to_property", 1, 2, 2, 1); __PYX_ERR(0, 67, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_property") < 0)) __PYX_ERR(0, 67, __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_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_property", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 67, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZfsConverter.to_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_12ZfsConverter_4to_property(__pyx_self, __pyx_v_self, __pyx_v_value);

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

static PyObject *__pyx_pf_6libzfs_12ZfsConverter_4to_property(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  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;
  __Pyx_RefNannySetupContext("to_property", 0);

  /* "converter.pxi":68
 * 
 *     def to_property(self, value):
 *         if self.readonly:             # <<<<<<<<<<<<<<
 *             raise ValueError('Property is read-only')
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_readonly); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __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, 68, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "converter.pxi":69
 *     def to_property(self, value):
 *         if self.readonly:
 *             raise ValueError('Property is read-only')             # <<<<<<<<<<<<<<
 * 
 *         if value is None:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __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, 69, __pyx_L1_error)

    /* "converter.pxi":68
 * 
 *     def to_property(self, value):
 *         if self.readonly:             # <<<<<<<<<<<<<<
 *             raise ValueError('Property is read-only')
 * 
 */
  }

  /* "converter.pxi":71
 *             raise ValueError('Property is read-only')
 * 
 *         if value is None:             # <<<<<<<<<<<<<<
 *             if not self.nullable:
 *                 raise ValueError('Property is not nullable')
 */
  __pyx_t_2 = (__pyx_v_value == Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "converter.pxi":72
 * 
 *         if value is None:
 *             if not self.nullable:             # <<<<<<<<<<<<<<
 *                 raise ValueError('Property is not nullable')
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nullable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 72, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = ((!__pyx_t_3) != 0);
    if (__pyx_t_2) {

      /* "converter.pxi":73
 *         if value is None:
 *             if not self.nullable:
 *                 raise ValueError('Property is not nullable')             # <<<<<<<<<<<<<<
 * 
 *             return self.null
 */
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __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, 73, __pyx_L1_error)

      /* "converter.pxi":72
 * 
 *         if value is None:
 *             if not self.nullable:             # <<<<<<<<<<<<<<
 *                 raise ValueError('Property is not nullable')
 * 
 */
    }

    /* "converter.pxi":75
 *                 raise ValueError('Property is not nullable')
 * 
 *             return self.null             # <<<<<<<<<<<<<<
 * 
 *         if self.typ is int:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_null); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "converter.pxi":71
 *             raise ValueError('Property is read-only')
 * 
 *         if value is None:             # <<<<<<<<<<<<<<
 *             if not self.nullable:
 *                 raise ValueError('Property is not nullable')
 */
  }

  /* "converter.pxi":77
 *             return self.null
 * 
 *         if self.typ is int:             # <<<<<<<<<<<<<<
 *             return str(value)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_typ); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == ((PyObject *)(&PyInt_Type)));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "converter.pxi":78
 * 
 *         if self.typ is int:
 *             return str(value)             # <<<<<<<<<<<<<<
 * 
 *         if self.typ is str:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 78, __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;

    /* "converter.pxi":77
 *             return self.null
 * 
 *         if self.typ is int:             # <<<<<<<<<<<<<<
 *             return str(value)
 * 
 */
  }

  /* "converter.pxi":80
 *             return str(value)
 * 
 *         if self.typ is str:             # <<<<<<<<<<<<<<
 *             return value
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_typ); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__pyx_t_4 == ((PyObject *)(&PyString_Type)));
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "converter.pxi":81
 * 
 *         if self.typ is str:
 *             return value             # <<<<<<<<<<<<<<
 * 
 *         if self.typ is bool:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_value);
    __pyx_r = __pyx_v_value;
    goto __pyx_L0;

    /* "converter.pxi":80
 *             return str(value)
 * 
 *         if self.typ is str:             # <<<<<<<<<<<<<<
 *             return value
 * 
 */
  }

  /* "converter.pxi":83
 *             return value
 * 
 *         if self.typ is bool:             # <<<<<<<<<<<<<<
 *             return self.yes if value else self.no
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_typ); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = (__pyx_t_4 == ((PyObject*)&PyBool_Type));
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "converter.pxi":84
 * 
 *         if self.typ is bool:
 *             return self.yes if value else self.no             # <<<<<<<<<<<<<<
 * 
 *         if self.typ is datetime:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 84, __pyx_L1_error)
    if (__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_yes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1;
      __pyx_t_1 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_no); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1;
      __pyx_t_1 = 0;
    }
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "converter.pxi":83
 *             return value
 * 
 *         if self.typ is bool:             # <<<<<<<<<<<<<<
 *             return self.yes if value else self.no
 * 
 */
  }

  /* "converter.pxi":86
 *             return self.yes if value else self.no
 * 
 *         if self.typ is datetime:             # <<<<<<<<<<<<<<
 *             return str(value.timestamp())
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_typ); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__pyx_t_4 == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "converter.pxi":87
 * 
 *         if self.typ is datetime:
 *             return str(value.timestamp())             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_timestamp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 87, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 87, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "converter.pxi":86
 *             return self.yes if value else self.no
 * 
 *         if self.typ is datetime:             # <<<<<<<<<<<<<<
 *             return str(value.timestamp())
 * 
 */
  }

  /* "converter.pxi":67
 *             return datetime.fromtimestamp(int(value))
 * 
 *     def to_property(self, value):             # <<<<<<<<<<<<<<
 *         if self.readonly:
 *             raise ValueError('Property is read-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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("libzfs.ZfsConverter.to_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "converter.pxi":178
 * 
 * 
 * def parse_zfs_prop(prop, value):             # <<<<<<<<<<<<<<
 *     try:
 *         return ZFS_PROPERTY_CONVERTERS[prop].to_native(value)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_1parse_zfs_prop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_1parse_zfs_prop = {"parse_zfs_prop", (PyCFunction)__pyx_pw_6libzfs_1parse_zfs_prop, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6libzfs_1parse_zfs_prop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_prop = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse_zfs_prop (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("parse_zfs_prop", 1, 2, 2, 1); __PYX_ERR(0, 178, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_zfs_prop") < 0)) __PYX_ERR(0, 178, __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_prop = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parse_zfs_prop", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 178, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.parse_zfs_prop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_parse_zfs_prop(__pyx_self, __pyx_v_prop, __pyx_v_value);

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

static PyObject *__pyx_pf_6libzfs_parse_zfs_prop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value) {
  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;
  __Pyx_RefNannySetupContext("parse_zfs_prop", 0);

  /* "converter.pxi":179
 * 
 * def parse_zfs_prop(prop, value):
 *     try:             # <<<<<<<<<<<<<<
 *         return ZFS_PROPERTY_CONVERTERS[prop].to_native(value)
 *     except KeyError:
 */
  {
    __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:*/ {

      /* "converter.pxi":180
 * def parse_zfs_prop(prop, value):
 *     try:
 *         return ZFS_PROPERTY_CONVERTERS[prop].to_native(value)             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         return value
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFS_PROPERTY_CONVERTERS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 180, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyObject_GetItem(__pyx_t_5, __pyx_v_prop); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __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_to_native); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 180, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      if (!__pyx_t_6) {
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 180, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
      } else {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 180, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_value);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 180, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "converter.pxi":179
 * 
 * def parse_zfs_prop(prop, value):
 *     try:             # <<<<<<<<<<<<<<
 *         return ZFS_PROPERTY_CONVERTERS[prop].to_native(value)
 *     except KeyError:
 */
    }
    __pyx_L3_error:;
    __Pyx_PyThreadState_assign
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "converter.pxi":181
 *     try:
 *         return ZFS_PROPERTY_CONVERTERS[prop].to_native(value)
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         return value
 * 
 */
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_8) {
      __Pyx_AddTraceback("libzfs.parse_zfs_prop", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_7) < 0) __PYX_ERR(0, 181, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_7);

      /* "converter.pxi":182
 *         return ZFS_PROPERTY_CONVERTERS[prop].to_native(value)
 *     except KeyError:
 *         return value             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_value);
      __pyx_r = __pyx_v_value;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "converter.pxi":179
 * 
 * def parse_zfs_prop(prop, value):
 *     try:             # <<<<<<<<<<<<<<
 *         return ZFS_PROPERTY_CONVERTERS[prop].to_native(value)
 *     except KeyError:
 */
    __Pyx_PyThreadState_assign
    __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_PyThreadState_assign
    __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_PyThreadState_assign
    __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;
  }

  /* "converter.pxi":178
 * 
 * 
 * def parse_zfs_prop(prop, value):             # <<<<<<<<<<<<<<
 *     try:
 *         return ZFS_PROPERTY_CONVERTERS[prop].to_native(value)
 */

  /* 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("libzfs.parse_zfs_prop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "converter.pxi":185
 * 
 * 
 * def serialize_zfs_prop(prop, value):             # <<<<<<<<<<<<<<
 *     try:
 *         return ZFS_PROPERTY_CONVERTERS[prop].to_property(value)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3serialize_zfs_prop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_3serialize_zfs_prop = {"serialize_zfs_prop", (PyCFunction)__pyx_pw_6libzfs_3serialize_zfs_prop, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6libzfs_3serialize_zfs_prop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_prop = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize_zfs_prop (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("serialize_zfs_prop", 1, 2, 2, 1); __PYX_ERR(0, 185, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize_zfs_prop") < 0)) __PYX_ERR(0, 185, __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_prop = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize_zfs_prop", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 185, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.serialize_zfs_prop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_2serialize_zfs_prop(__pyx_self, __pyx_v_prop, __pyx_v_value);

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

static PyObject *__pyx_pf_6libzfs_2serialize_zfs_prop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value) {
  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;
  __Pyx_RefNannySetupContext("serialize_zfs_prop", 0);

  /* "converter.pxi":186
 * 
 * def serialize_zfs_prop(prop, value):
 *     try:             # <<<<<<<<<<<<<<
 *         return ZFS_PROPERTY_CONVERTERS[prop].to_property(value)
 *     except KeyError:
 */
  {
    __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:*/ {

      /* "converter.pxi":187
 * def serialize_zfs_prop(prop, value):
 *     try:
 *         return ZFS_PROPERTY_CONVERTERS[prop].to_property(value)             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         return value
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFS_PROPERTY_CONVERTERS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 187, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyObject_GetItem(__pyx_t_5, __pyx_v_prop); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 187, __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_to_property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 187, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      if (!__pyx_t_6) {
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 187, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
      } else {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 187, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_value);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 187, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "converter.pxi":186
 * 
 * def serialize_zfs_prop(prop, value):
 *     try:             # <<<<<<<<<<<<<<
 *         return ZFS_PROPERTY_CONVERTERS[prop].to_property(value)
 *     except KeyError:
 */
    }
    __pyx_L3_error:;
    __Pyx_PyThreadState_assign
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "converter.pxi":188
 *     try:
 *         return ZFS_PROPERTY_CONVERTERS[prop].to_property(value)
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         return value
 * 
 */
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_8) {
      __Pyx_AddTraceback("libzfs.serialize_zfs_prop", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_7) < 0) __PYX_ERR(0, 188, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_7);

      /* "converter.pxi":189
 *         return ZFS_PROPERTY_CONVERTERS[prop].to_property(value)
 *     except KeyError:
 *         return value             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_value);
      __pyx_r = __pyx_v_value;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "converter.pxi":186
 * 
 * def serialize_zfs_prop(prop, value):
 *     try:             # <<<<<<<<<<<<<<
 *         return ZFS_PROPERTY_CONVERTERS[prop].to_property(value)
 *     except KeyError:
 */
    __Pyx_PyThreadState_assign
    __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_PyThreadState_assign
    __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_PyThreadState_assign
    __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;
  }

  /* "converter.pxi":185
 * 
 * 
 * def serialize_zfs_prop(prop, value):             # <<<<<<<<<<<<<<
 *     try:
 *         return ZFS_PROPERTY_CONVERTERS[prop].to_property(value)
 */

  /* 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("libzfs.serialize_zfs_prop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "converter.pxi":192
 * 
 * 
 * def parse_zpool_prop(prop, value):             # <<<<<<<<<<<<<<
 *     try:
 *         return ZPOOL_PROPERTY_CONVERTERS[prop].to_native(value)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_5parse_zpool_prop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_5parse_zpool_prop = {"parse_zpool_prop", (PyCFunction)__pyx_pw_6libzfs_5parse_zpool_prop, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6libzfs_5parse_zpool_prop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_prop = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse_zpool_prop (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("parse_zpool_prop", 1, 2, 2, 1); __PYX_ERR(0, 192, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_zpool_prop") < 0)) __PYX_ERR(0, 192, __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_prop = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parse_zpool_prop", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 192, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.parse_zpool_prop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_4parse_zpool_prop(__pyx_self, __pyx_v_prop, __pyx_v_value);

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

static PyObject *__pyx_pf_6libzfs_4parse_zpool_prop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value) {
  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;
  __Pyx_RefNannySetupContext("parse_zpool_prop", 0);

  /* "converter.pxi":193
 * 
 * def parse_zpool_prop(prop, value):
 *     try:             # <<<<<<<<<<<<<<
 *         return ZPOOL_PROPERTY_CONVERTERS[prop].to_native(value)
 *     except KeyError:
 */
  {
    __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:*/ {

      /* "converter.pxi":194
 * def parse_zpool_prop(prop, value):
 *     try:
 *         return ZPOOL_PROPERTY_CONVERTERS[prop].to_native(value)             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         return value
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZPOOL_PROPERTY_CONVERTERS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 194, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyObject_GetItem(__pyx_t_5, __pyx_v_prop); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 194, __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_to_native); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 194, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      if (!__pyx_t_6) {
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 194, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
      } else {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 194, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_value);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 194, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "converter.pxi":193
 * 
 * def parse_zpool_prop(prop, value):
 *     try:             # <<<<<<<<<<<<<<
 *         return ZPOOL_PROPERTY_CONVERTERS[prop].to_native(value)
 *     except KeyError:
 */
    }
    __pyx_L3_error:;
    __Pyx_PyThreadState_assign
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "converter.pxi":195
 *     try:
 *         return ZPOOL_PROPERTY_CONVERTERS[prop].to_native(value)
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         return value
 * 
 */
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_8) {
      __Pyx_AddTraceback("libzfs.parse_zpool_prop", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_7) < 0) __PYX_ERR(0, 195, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_7);

      /* "converter.pxi":196
 *         return ZPOOL_PROPERTY_CONVERTERS[prop].to_native(value)
 *     except KeyError:
 *         return value             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_value);
      __pyx_r = __pyx_v_value;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "converter.pxi":193
 * 
 * def parse_zpool_prop(prop, value):
 *     try:             # <<<<<<<<<<<<<<
 *         return ZPOOL_PROPERTY_CONVERTERS[prop].to_native(value)
 *     except KeyError:
 */
    __Pyx_PyThreadState_assign
    __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_PyThreadState_assign
    __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_PyThreadState_assign
    __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;
  }

  /* "converter.pxi":192
 * 
 * 
 * def parse_zpool_prop(prop, value):             # <<<<<<<<<<<<<<
 *     try:
 *         return ZPOOL_PROPERTY_CONVERTERS[prop].to_native(value)
 */

  /* 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("libzfs.parse_zpool_prop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "converter.pxi":199
 * 
 * 
 * def serialize_zpool_prop(prop, value):             # <<<<<<<<<<<<<<
 *     try:
 *         return ZPOOL_PROPERTY_CONVERTERS[prop].to_property(value)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7serialize_zpool_prop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_7serialize_zpool_prop = {"serialize_zpool_prop", (PyCFunction)__pyx_pw_6libzfs_7serialize_zpool_prop, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6libzfs_7serialize_zpool_prop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_prop = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize_zpool_prop (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("serialize_zpool_prop", 1, 2, 2, 1); __PYX_ERR(0, 199, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize_zpool_prop") < 0)) __PYX_ERR(0, 199, __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_prop = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize_zpool_prop", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 199, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.serialize_zpool_prop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_6serialize_zpool_prop(__pyx_self, __pyx_v_prop, __pyx_v_value);

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

static PyObject *__pyx_pf_6libzfs_6serialize_zpool_prop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value) {
  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;
  __Pyx_RefNannySetupContext("serialize_zpool_prop", 0);

  /* "converter.pxi":200
 * 
 * def serialize_zpool_prop(prop, value):
 *     try:             # <<<<<<<<<<<<<<
 *         return ZPOOL_PROPERTY_CONVERTERS[prop].to_property(value)
 *     except KeyError:
 */
  {
    __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:*/ {

      /* "converter.pxi":201
 * def serialize_zpool_prop(prop, value):
 *     try:
 *         return ZPOOL_PROPERTY_CONVERTERS[prop].to_property(value)             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         return value
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZPOOL_PROPERTY_CONVERTERS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 201, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyObject_GetItem(__pyx_t_5, __pyx_v_prop); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 201, __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_to_property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 201, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      if (!__pyx_t_6) {
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
      } else {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 201, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_value);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "converter.pxi":200
 * 
 * def serialize_zpool_prop(prop, value):
 *     try:             # <<<<<<<<<<<<<<
 *         return ZPOOL_PROPERTY_CONVERTERS[prop].to_property(value)
 *     except KeyError:
 */
    }
    __pyx_L3_error:;
    __Pyx_PyThreadState_assign
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "converter.pxi":202
 *     try:
 *         return ZPOOL_PROPERTY_CONVERTERS[prop].to_property(value)
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         return value
 */
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_8) {
      __Pyx_AddTraceback("libzfs.serialize_zpool_prop", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_7) < 0) __PYX_ERR(0, 202, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_7);

      /* "converter.pxi":203
 *         return ZPOOL_PROPERTY_CONVERTERS[prop].to_property(value)
 *     except KeyError:
 *         return value             # <<<<<<<<<<<<<<
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_value);
      __pyx_r = __pyx_v_value;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "converter.pxi":200
 * 
 * def serialize_zpool_prop(prop, value):
 *     try:             # <<<<<<<<<<<<<<
 *         return ZPOOL_PROPERTY_CONVERTERS[prop].to_property(value)
 *     except KeyError:
 */
    __Pyx_PyThreadState_assign
    __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_PyThreadState_assign
    __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_PyThreadState_assign
    __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;
  }

  /* "converter.pxi":199
 * 
 * 
 * def serialize_zpool_prop(prop, value):             # <<<<<<<<<<<<<<
 *     try:
 *         return ZPOOL_PROPERTY_CONVERTERS[prop].to_property(value)
 */

  /* 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("libzfs.serialize_zpool_prop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":276
 * 
 * class DiffRecord(object):
 *     def __init__(self, raw):             # <<<<<<<<<<<<<<
 *         timestamp, cmd, typ, rest = raw.split(maxsplit=3)
 *         paths = rest.split('->', maxsplit=2)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10DiffRecord_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_10DiffRecord_1__init__ = {"__init__", (PyCFunction)__pyx_pw_6libzfs_10DiffRecord_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6libzfs_10DiffRecord_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_raw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_raw,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_raw)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(1, 276, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 276, __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_raw = 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(1, 276, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.DiffRecord.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_10DiffRecord___init__(__pyx_self, __pyx_v_self, __pyx_v_raw);

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

static PyObject *__pyx_pf_6libzfs_10DiffRecord___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_raw) {
  PyObject *__pyx_v_timestamp = NULL;
  PyObject *__pyx_v_cmd = NULL;
  PyObject *__pyx_v_typ = NULL;
  PyObject *__pyx_v_rest = NULL;
  PyObject *__pyx_v_paths = 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)(PyObject *);
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "libzfs.pyx":277
 * class DiffRecord(object):
 *     def __init__(self, raw):
 *         timestamp, cmd, typ, rest = raw.split(maxsplit=3)             # <<<<<<<<<<<<<<
 *         paths = rest.split('->', maxsplit=2)
 *         self.raw = raw
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_raw, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_maxsplit, __pyx_int_3) < 0) __PYX_ERR(1, 277, __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(1, 277, __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(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
    PyObject* sequence = __pyx_t_3;
    #if CYTHON_COMPILING_IN_CPYTHON
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 4)) {
      if (size > 4) __Pyx_RaiseTooManyValuesError(4);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(1, 277, __pyx_L1_error)
    }
    #if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 3); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 3); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_1,&__pyx_t_4,&__pyx_t_5};
      for (i=0; i < 4; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(1, 277, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    Py_ssize_t index = -1;
    PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_1,&__pyx_t_4,&__pyx_t_5};
    __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
    for (index=0; index < 4; index++) {
      PyObject* item = __pyx_t_7(__pyx_t_6); if (unlikely(!item)) goto __pyx_L3_unpacking_failed;
      __Pyx_GOTREF(item);
      *(temps[index]) = item;
    }
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 4) < 0) __PYX_ERR(1, 277, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(1, 277, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_timestamp = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_cmd = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_typ = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_rest = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "libzfs.pyx":278
 *     def __init__(self, raw):
 *         timestamp, cmd, typ, rest = raw.split(maxsplit=3)
 *         paths = rest.split('->', maxsplit=2)             # <<<<<<<<<<<<<<
 *         self.raw = raw
 *         self.timestamp = datetime.utcfromtimestamp(float(timestamp))
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rest, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_maxsplit, __pyx_int_2) < 0) __PYX_ERR(1, 278, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__10, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_paths = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "libzfs.pyx":279
 *         timestamp, cmd, typ, rest = raw.split(maxsplit=3)
 *         paths = rest.split('->', maxsplit=2)
 *         self.raw = raw             # <<<<<<<<<<<<<<
 *         self.timestamp = datetime.utcfromtimestamp(float(timestamp))
 *         self.cmd = DiffRecordType(cmd)
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_raw, __pyx_v_raw) < 0) __PYX_ERR(1, 279, __pyx_L1_error)

  /* "libzfs.pyx":280
 *         paths = rest.split('->', maxsplit=2)
 *         self.raw = raw
 *         self.timestamp = datetime.utcfromtimestamp(float(timestamp))             # <<<<<<<<<<<<<<
 *         self.cmd = DiffRecordType(cmd)
 *         self.type = DiffFileType(typ)
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_utcfromtimestamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyNumber_Float(__pyx_v_timestamp); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_1) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 280, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = NULL;
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_timestamp, __pyx_t_4) < 0) __PYX_ERR(1, 280, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "libzfs.pyx":281
 *         self.raw = raw
 *         self.timestamp = datetime.utcfromtimestamp(float(timestamp))
 *         self.cmd = DiffRecordType(cmd)             # <<<<<<<<<<<<<<
 *         self.type = DiffFileType(typ)
 *         self.path = paths[0].strip()
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_DiffRecordType); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_cmd); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
    __Pyx_INCREF(__pyx_v_cmd);
    __Pyx_GIVEREF(__pyx_v_cmd);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_cmd);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 281, __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 (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cmd, __pyx_t_4) < 0) __PYX_ERR(1, 281, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "libzfs.pyx":282
 *         self.timestamp = datetime.utcfromtimestamp(float(timestamp))
 *         self.cmd = DiffRecordType(cmd)
 *         self.type = DiffFileType(typ)             # <<<<<<<<<<<<<<
 *         self.path = paths[0].strip()
 * 
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_DiffFileType); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_typ); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = NULL;
    __Pyx_INCREF(__pyx_v_typ);
    __Pyx_GIVEREF(__pyx_v_typ);
    PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_typ);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_type, __pyx_t_4) < 0) __PYX_ERR(1, 282, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "libzfs.pyx":283
 *         self.cmd = DiffRecordType(cmd)
 *         self.type = DiffFileType(typ)
 *         self.path = paths[0].strip()             # <<<<<<<<<<<<<<
 * 
 *         if self.cmd == DiffRecordType.RENAME:
 */
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_paths, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 283, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 283, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_path, __pyx_t_4) < 0) __PYX_ERR(1, 283, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "libzfs.pyx":285
 *         self.path = paths[0].strip()
 * 
 *         if self.cmd == DiffRecordType.RENAME:             # <<<<<<<<<<<<<<
 *             self.oldpath = paths[1].strip()
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cmd); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DiffRecordType); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_RENAME); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 285, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 285, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_8) {

    /* "libzfs.pyx":286
 * 
 *         if self.cmd == DiffRecordType.RENAME:
 *             self.oldpath = paths[1].strip()             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_paths, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strip); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(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);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 286, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 286, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_oldpath, __pyx_t_2) < 0) __PYX_ERR(1, 286, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "libzfs.pyx":285
 *         self.path = paths[0].strip()
 * 
 *         if self.cmd == DiffRecordType.RENAME:             # <<<<<<<<<<<<<<
 *             self.oldpath = paths[1].strip()
 * 
 */
  }

  /* "libzfs.pyx":276
 * 
 * class DiffRecord(object):
 *     def __init__(self, raw):             # <<<<<<<<<<<<<<
 *         timestamp, cmd, typ, rest = raw.split(maxsplit=3)
 *         paths = rest.split('->', maxsplit=2)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("libzfs.DiffRecord.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_timestamp);
  __Pyx_XDECREF(__pyx_v_cmd);
  __Pyx_XDECREF(__pyx_v_typ);
  __Pyx_XDECREF(__pyx_v_rest);
  __Pyx_XDECREF(__pyx_v_paths);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":288
 *             self.oldpath = paths[1].strip()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.raw
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10DiffRecord_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_10DiffRecord_3__str__ = {"__str__", (PyCFunction)__pyx_pw_6libzfs_10DiffRecord_3__str__, METH_O, 0};
static PyObject *__pyx_pw_6libzfs_10DiffRecord_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10DiffRecord_2__str__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10DiffRecord_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "libzfs.pyx":289
 * 
 *     def __str__(self):
 *         return self.raw             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_raw); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":288
 *             self.oldpath = paths[1].strip()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.raw
 * 
 */

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

/* "libzfs.pyx":291
 *         return self.raw
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10DiffRecord_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_10DiffRecord_5__repr__ = {"__repr__", (PyCFunction)__pyx_pw_6libzfs_10DiffRecord_5__repr__, METH_O, 0};
static PyObject *__pyx_pw_6libzfs_10DiffRecord_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10DiffRecord_4__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10DiffRecord_4__repr__(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;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "libzfs.pyx":292
 * 
 *     def __repr__(self):
 *         return str(self)             # <<<<<<<<<<<<<<
 * 
 *     def __getstate__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 292, __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;

  /* "libzfs.pyx":291
 *         return self.raw
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

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

/* "libzfs.pyx":294
 *         return str(self)
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return {
 *             'timestamp': self.timestamp,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10DiffRecord_7__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_10DiffRecord_7__getstate__ = {"__getstate__", (PyCFunction)__pyx_pw_6libzfs_10DiffRecord_7__getstate__, METH_O, 0};
static PyObject *__pyx_pw_6libzfs_10DiffRecord_7__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10DiffRecord_6__getstate__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10DiffRecord_6__getstate__(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;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__getstate__", 0);

  /* "libzfs.pyx":295
 * 
 *     def __getstate__(self):
 *         return {             # <<<<<<<<<<<<<<
 *             'timestamp': self.timestamp,
 *             'cmd': self.cmd.name,
 */
  __Pyx_XDECREF(__pyx_r);

  /* "libzfs.pyx":296
 *     def __getstate__(self):
 *         return {
 *             'timestamp': self.timestamp,             # <<<<<<<<<<<<<<
 *             'cmd': self.cmd.name,
 *             'type': self.type.name,
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timestamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_timestamp, __pyx_t_2) < 0) __PYX_ERR(1, 296, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":297
 *         return {
 *             'timestamp': self.timestamp,
 *             'cmd': self.cmd.name,             # <<<<<<<<<<<<<<
 *             'type': self.type.name,
 *             'path': self.path,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cmd); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_cmd, __pyx_t_3) < 0) __PYX_ERR(1, 296, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "libzfs.pyx":298
 *             'timestamp': self.timestamp,
 *             'cmd': self.cmd.name,
 *             'type': self.type.name,             # <<<<<<<<<<<<<<
 *             'path': self.path,
 *             'oldpath': getattr(self, 'oldpath', None)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_type, __pyx_t_2) < 0) __PYX_ERR(1, 296, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":299
 *             'cmd': self.cmd.name,
 *             'type': self.type.name,
 *             'path': self.path,             # <<<<<<<<<<<<<<
 *             'oldpath': getattr(self, 'oldpath', None)
 *         }
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_path, __pyx_t_2) < 0) __PYX_ERR(1, 296, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":300
 *             'type': self.type.name,
 *             'path': self.path,
 *             'oldpath': getattr(self, 'oldpath', None)             # <<<<<<<<<<<<<<
 *         }
 * 
 */
  __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_self, __pyx_n_s_oldpath, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_oldpath, __pyx_t_2) < 0) __PYX_ERR(1, 296, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":294
 *         return str(self)
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return {
 *             'timestamp': self.timestamp,
 */

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

/* "libzfs.pyx":311
 * 
 * class ZFSException(RuntimeError):
 *     def __init__(self, code, message):             # <<<<<<<<<<<<<<
 *         super(ZFSException, self).__init__(message)
 *         self.code = code
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZFSException_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_12ZFSException_1__init__ = {"__init__", (PyCFunction)__pyx_pw_6libzfs_12ZFSException_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6libzfs_12ZFSException_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_code = 0;
  PyObject *__pyx_v_message = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_code,&__pyx_n_s_message,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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_code)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(1, 311, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(1, 311, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 311, __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_code = values[1];
    __pyx_v_message = 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(1, 311, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSException.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_12ZFSException___init__(__pyx_self, __pyx_v_self, __pyx_v_code, __pyx_v_message);

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

static PyObject *__pyx_pf_6libzfs_12ZFSException___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_code, PyObject *__pyx_v_message) {
  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_RefNannySetupContext("__init__", 0);

  /* "libzfs.pyx":312
 * class ZFSException(RuntimeError):
 *     def __init__(self, code, message):
 *         super(ZFSException, self).__init__(message)             # <<<<<<<<<<<<<<
 *         self.code = code
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 312, __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_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
    __Pyx_INCREF(__pyx_v_message);
    __Pyx_GIVEREF(__pyx_v_message);
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_message);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 312, __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_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":313
 *     def __init__(self, code, message):
 *         super(ZFSException, self).__init__(message)
 *         self.code = code             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_code, __pyx_v_code) < 0) __PYX_ERR(1, 313, __pyx_L1_error)

  /* "libzfs.pyx":311
 * 
 * class ZFSException(RuntimeError):
 *     def __init__(self, code, message):             # <<<<<<<<<<<<<<
 *         super(ZFSException, self).__init__(message)
 *         self.code = code
 */

  /* 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("libzfs.ZFSException.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":321
 *     cdef char *history_prefix
 * 
 *     def __cinit__(self, history=False, history_prefix=''):             # <<<<<<<<<<<<<<
 *         self.handle = libzfs.libzfs_init()
 *         if isinstance(history, bool):
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_3ZFS_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6libzfs_3ZFS_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_history = 0;
  PyObject *__pyx_v_history_prefix = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_history,&__pyx_n_s_history_prefix,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_False);
    values[1] = ((PyObject *)__pyx_kp_s__11);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_history);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_history_prefix);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 321, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_history = values[0];
    __pyx_v_history_prefix = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 321, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFS.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_3ZFS___cinit__(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self), __pyx_v_history, __pyx_v_history_prefix);

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

static int __pyx_pf_6libzfs_3ZFS___cinit__(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_history, PyObject *__pyx_v_history_prefix) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  char *__pyx_t_10;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "libzfs.pyx":322
 * 
 *     def __cinit__(self, history=False, history_prefix=''):
 *         self.handle = libzfs.libzfs_init()             # <<<<<<<<<<<<<<
 *         if isinstance(history, bool):
 *             self.history = history
 */
  __pyx_v_self->handle = libzfs_init();

  /* "libzfs.pyx":323
 *     def __cinit__(self, history=False, history_prefix=''):
 *         self.handle = libzfs.libzfs_init()
 *         if isinstance(history, bool):             # <<<<<<<<<<<<<<
 *             self.history = history
 *         else:
 */
  __pyx_t_1 = ((PyObject*)&PyBool_Type);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_history, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 323, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "libzfs.pyx":324
 *         self.handle = libzfs.libzfs_init()
 *         if isinstance(history, bool):
 *             self.history = history             # <<<<<<<<<<<<<<
 *         else:
 *             raise ZFSException(Error.BADTYPE, 'history is a boolean parameter')
 */
    __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_history); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 324, __pyx_L1_error)
    __pyx_v_self->history = __pyx_t_4;

    /* "libzfs.pyx":323
 *     def __cinit__(self, history=False, history_prefix=''):
 *         self.handle = libzfs.libzfs_init()
 *         if isinstance(history, bool):             # <<<<<<<<<<<<<<
 *             self.history = history
 *         else:
 */
    goto __pyx_L3;
  }

  /* "libzfs.pyx":326
 *             self.history = history
 *         else:
 *             raise ZFSException(Error.BADTYPE, 'history is a boolean parameter')             # <<<<<<<<<<<<<<
 * 
 *         if self.history:
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_BADTYPE); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 326, __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_7);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_7);
    __Pyx_INCREF(__pyx_kp_s_history_is_a_boolean_parameter);
    __Pyx_GIVEREF(__pyx_kp_s_history_is_a_boolean_parameter);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_kp_s_history_is_a_boolean_parameter);
    __pyx_t_7 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 326, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "libzfs.pyx":328
 *             raise ZFSException(Error.BADTYPE, 'history is a boolean parameter')
 * 
 *         if self.history:             # <<<<<<<<<<<<<<
 *             if isinstance(history_prefix, str):
 *                 self.history_prefix = history_prefix
 */
  __pyx_t_3 = (__pyx_v_self->history != 0);
  if (__pyx_t_3) {

    /* "libzfs.pyx":329
 * 
 *         if self.history:
 *             if isinstance(history_prefix, str):             # <<<<<<<<<<<<<<
 *                 self.history_prefix = history_prefix
 *             else:
 */
    __pyx_t_3 = PyString_Check(__pyx_v_history_prefix); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    if (__pyx_t_2) {

      /* "libzfs.pyx":330
 *         if self.history:
 *             if isinstance(history_prefix, str):
 *                 self.history_prefix = history_prefix             # <<<<<<<<<<<<<<
 *             else:
 *                 raise ZFSException(Error.BADTYPE, 'history_prefix is a string parameter')
 */
      __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_history_prefix); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(1, 330, __pyx_L1_error)
      __pyx_v_self->history_prefix = __pyx_t_10;

      /* "libzfs.pyx":329
 * 
 *         if self.history:
 *             if isinstance(history_prefix, str):             # <<<<<<<<<<<<<<
 *                 self.history_prefix = history_prefix
 *             else:
 */
      goto __pyx_L5;
    }

    /* "libzfs.pyx":332
 *                 self.history_prefix = history_prefix
 *             else:
 *                 raise ZFSException(Error.BADTYPE, 'history_prefix is a string parameter')             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
    /*else*/ {
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 332, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 332, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_BADTYPE); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 332, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && 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_8 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 332, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_9) {
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); __pyx_t_9 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_t_7);
      __Pyx_INCREF(__pyx_kp_s_history_prefix_is_a_string_param);
      __Pyx_GIVEREF(__pyx_kp_s_history_prefix_is_a_string_param);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_kp_s_history_prefix_is_a_string_param);
      __pyx_t_7 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 332, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(1, 332, __pyx_L1_error)
    }
    __pyx_L5:;

    /* "libzfs.pyx":328
 *             raise ZFSException(Error.BADTYPE, 'history is a boolean parameter')
 * 
 *         if self.history:             # <<<<<<<<<<<<<<
 *             if isinstance(history_prefix, str):
 *                 self.history_prefix = history_prefix
 */
  }

  /* "libzfs.pyx":321
 *     cdef char *history_prefix
 * 
 *     def __cinit__(self, history=False, history_prefix=''):             # <<<<<<<<<<<<<<
 *         self.handle = libzfs.libzfs_init()
 *         if isinstance(history, bool):
 */

  /* function exit code */
  __pyx_r = 0;
  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_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("libzfs.ZFS.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":334
 *                 raise ZFSException(Error.BADTYPE, 'history_prefix is a string parameter')
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         libzfs.libzfs_fini(self.handle)
 * 
 */

/* Python wrapper */
static void __pyx_pw_6libzfs_3ZFS_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_6libzfs_3ZFS_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_6libzfs_3ZFS_2__dealloc__(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self));

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

static void __pyx_pf_6libzfs_3ZFS_2__dealloc__(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "libzfs.pyx":335
 * 
 *     def __dealloc__(self):
 *         libzfs.libzfs_fini(self.handle)             # <<<<<<<<<<<<<<
 * 
 *     def __getstate__(self):
 */
  libzfs_fini(__pyx_v_self->handle);

  /* "libzfs.pyx":334
 *                 raise ZFSException(Error.BADTYPE, 'history_prefix is a string parameter')
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         libzfs.libzfs_fini(self.handle)
 * 
 */

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

/* "libzfs.pyx":337
 *         libzfs.libzfs_fini(self.handle)
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return [p.__getstate__() for p in self.pools]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_5__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_3ZFS_5__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_3ZFS_4__getstate__(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_3ZFS_4__getstate__(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self) {
  PyObject *__pyx_v_p = 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;
  __Pyx_RefNannySetupContext("__getstate__", 0);

  /* "libzfs.pyx":338
 * 
 *     def __getstate__(self):
 *         return [p.__getstate__() for p in self.pools]             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pools); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  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(1, 338, __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(1, 338, __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_COMPILING_IN_CPYTHON
        __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(1, 338, __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(1, 338, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __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(1, 338, __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(1, 338, __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(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 338, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_n_s_getstate); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 338, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (__pyx_t_7) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 338, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 338, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(1, 338, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":337
 *         libzfs.libzfs_fini(self.handle)
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return [p.__getstate__() for p in self.pools]
 * 
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("libzfs.ZFS.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":341
 * 
 *     @staticmethod
 *     cdef int __iterate_pools(libzfs.zpool_handle_t *handle, void *arg) nogil:             # <<<<<<<<<<<<<<
 *         with gil:
 *             pools = <object>arg
 */

static int __pyx_f_6libzfs_3ZFS___iterate_pools(zpool_handle_t *__pyx_v_handle, void *__pyx_v_arg) {
  PyObject *__pyx_v_pools = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("__iterate_pools", 1);

  /* "libzfs.pyx":342
 *     @staticmethod
 *     cdef int __iterate_pools(libzfs.zpool_handle_t *handle, void *arg) nogil:
 *         with gil:             # <<<<<<<<<<<<<<
 *             pools = <object>arg
 *             pools.append(<uintptr_t>handle)
 */
  /*try:*/ {
    {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
        #endif
        /*try:*/ {

          /* "libzfs.pyx":343
 *     cdef int __iterate_pools(libzfs.zpool_handle_t *handle, void *arg) nogil:
 *         with gil:
 *             pools = <object>arg             # <<<<<<<<<<<<<<
 *             pools.append(<uintptr_t>handle)
 * 
 */
          __pyx_t_1 = ((PyObject *)__pyx_v_arg);
          __Pyx_INCREF(__pyx_t_1);
          __pyx_v_pools = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "libzfs.pyx":344
 *         with gil:
 *             pools = <object>arg
 *             pools.append(<uintptr_t>handle)             # <<<<<<<<<<<<<<
 * 
 *     cdef object get_error(self):
 */
          __pyx_t_1 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 344, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_pools, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 344, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }

        /* "libzfs.pyx":342
 *     @staticmethod
 *     cdef int __iterate_pools(libzfs.zpool_handle_t *handle, void *arg) nogil:
 *         with gil:             # <<<<<<<<<<<<<<
 *             pools = <object>arg
 *             pools.append(<uintptr_t>handle)
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            PyGILState_Release(__pyx_gilstate_save);
            #endif
            goto __pyx_L8;
          }
          __pyx_L7_error: {
            #ifdef WITH_THREAD
            PyGILState_Release(__pyx_gilstate_save);
            #endif
            goto __pyx_L4_error;
          }
          __pyx_L8:;
        }
    }
  }
  /*finally:*/ {
    /*normal exit:*/{
      #ifdef WITH_THREAD
      __pyx_gilstate_save = PyGILState_Ensure();
      #endif
      goto __pyx_L5;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
    __pyx_L5:;
  }

  /* "libzfs.pyx":341
 * 
 *     @staticmethod
 *     cdef int __iterate_pools(libzfs.zpool_handle_t *handle, void *arg) nogil:             # <<<<<<<<<<<<<<
 *         with gil:
 *             pools = <object>arg
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("libzfs.ZFS.__iterate_pools", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 1);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pools);
  #ifdef WITH_THREAD
  PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "libzfs.pyx":346
 *             pools.append(<uintptr_t>handle)
 * 
 *     cdef object get_error(self):             # <<<<<<<<<<<<<<
 *         return ZFSException(
 *             Error(libzfs.libzfs_errno(self.handle)),
 */

static PyObject *__pyx_f_6libzfs_3ZFS_get_error(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self) {
  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;
  Py_ssize_t __pyx_t_8;
  __Pyx_RefNannySetupContext("get_error", 0);

  /* "libzfs.pyx":347
 * 
 *     cdef object get_error(self):
 *         return ZFSException(             # <<<<<<<<<<<<<<
 *             Error(libzfs.libzfs_errno(self.handle)),
 *             libzfs.libzfs_error_description(self.handle)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "libzfs.pyx":348
 *     cdef object get_error(self):
 *         return ZFSException(
 *             Error(libzfs.libzfs_errno(self.handle)),             # <<<<<<<<<<<<<<
 *             libzfs.libzfs_error_description(self.handle)
 *         )
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_int(libzfs_errno(__pyx_v_self->handle)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 348, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 348, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __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+1, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 348, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "libzfs.pyx":349
 *         return ZFSException(
 *             Error(libzfs.libzfs_errno(self.handle)),
 *             libzfs.libzfs_error_description(self.handle)             # <<<<<<<<<<<<<<
 *         )
 * 
 */
  __pyx_t_4 = __Pyx_PyUnicode_FromString(libzfs_error_description(__pyx_v_self->handle)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_8 = 1;
    }
  }
  __pyx_t_5 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_7) {
    __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
  }
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_8, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_8, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 347, __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":346
 *             pools.append(<uintptr_t>handle)
 * 
 *     cdef object get_error(self):             # <<<<<<<<<<<<<<
 *         return ZFSException(
 *             Error(libzfs.libzfs_errno(self.handle)),
 */

  /* 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_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("libzfs.ZFS.get_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":352
 *         )
 * 
 *     cdef ZFSVdev make_vdev_tree(self, topology):             # <<<<<<<<<<<<<<
 *         cdef ZFSVdev root
 *         root = ZFSVdev(self, 'root')
 */

static struct __pyx_obj_6libzfs_ZFSVdev *__pyx_f_6libzfs_3ZFS_make_vdev_tree(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_topology) {
  struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_root = 0;
  PyObject *__pyx_v_i = NULL;
  struct __pyx_obj_6libzfs_ZFSVdev *__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;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_RefNannySetupContext("make_vdev_tree", 0);

  /* "libzfs.pyx":354
 *     cdef ZFSVdev make_vdev_tree(self, topology):
 *         cdef ZFSVdev root
 *         root = ZFSVdev(self, 'root')             # <<<<<<<<<<<<<<
 *         root.children = topology.get('data', [])
 * 
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 354, __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_n_s_root);
  __Pyx_GIVEREF(__pyx_n_s_root);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_root);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_ZFSVdev), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_root = ((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "libzfs.pyx":355
 *         cdef ZFSVdev root
 *         root = ZFSVdev(self, 'root')
 *         root.children = topology.get('data', [])             # <<<<<<<<<<<<<<
 * 
 *         if 'cache' in topology:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_topology, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 355, __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_n_s_data);
  __Pyx_GIVEREF(__pyx_n_s_data);
  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_n_s_data);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_root), __pyx_n_s_children, __pyx_t_2) < 0) __PYX_ERR(1, 355, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":357
 *         root.children = topology.get('data', [])
 * 
 *         if 'cache' in topology:             # <<<<<<<<<<<<<<
 *             root.nvlist['l2cache'] = [(<ZFSVdev>i).nvlist for i in topology['cache']]
 * 
 */
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_cache, __pyx_v_topology, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(1, 357, __pyx_L1_error)
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {

    /* "libzfs.pyx":358
 * 
 *         if 'cache' in topology:
 *             root.nvlist['l2cache'] = [(<ZFSVdev>i).nvlist for i in topology['cache']]             # <<<<<<<<<<<<<<
 * 
 *         if 'spare' in topology:
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_GetItem(__pyx_v_topology, __pyx_n_s_cache); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 358, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 358, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_6))) {
          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 358, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 358, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 358, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 358, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_9(__pyx_t_6);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 358, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
      __pyx_t_1 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_i)->nvlist))) __PYX_ERR(1, 358, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_root->nvlist), __pyx_n_s_l2cache, __pyx_t_2) < 0)) __PYX_ERR(1, 358, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "libzfs.pyx":357
 *         root.children = topology.get('data', [])
 * 
 *         if 'cache' in topology:             # <<<<<<<<<<<<<<
 *             root.nvlist['l2cache'] = [(<ZFSVdev>i).nvlist for i in topology['cache']]
 * 
 */
  }

  /* "libzfs.pyx":360
 *             root.nvlist['l2cache'] = [(<ZFSVdev>i).nvlist for i in topology['cache']]
 * 
 *         if 'spare' in topology:             # <<<<<<<<<<<<<<
 *             root.nvlist['spares'] = [(<ZFSVdev>i).nvlist for i in topology['spare']]
 * 
 */
  __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_spare, __pyx_v_topology, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 360, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_8 != 0);
  if (__pyx_t_7) {

    /* "libzfs.pyx":361
 * 
 *         if 'spare' in topology:
 *             root.nvlist['spares'] = [(<ZFSVdev>i).nvlist for i in topology['spare']]             # <<<<<<<<<<<<<<
 * 
 *         if 'log' in topology:
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 361, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PyObject_GetItem(__pyx_v_topology, __pyx_n_s_spare); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 361, __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_5 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 361, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 361, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 361, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 361, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 361, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 361, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__pyx_t_1);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 361, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6);
      __pyx_t_6 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_i)->nvlist))) __PYX_ERR(1, 361, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_root->nvlist), __pyx_n_s_spares, __pyx_t_2) < 0)) __PYX_ERR(1, 361, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "libzfs.pyx":360
 *             root.nvlist['l2cache'] = [(<ZFSVdev>i).nvlist for i in topology['cache']]
 * 
 *         if 'spare' in topology:             # <<<<<<<<<<<<<<
 *             root.nvlist['spares'] = [(<ZFSVdev>i).nvlist for i in topology['spare']]
 * 
 */
  }

  /* "libzfs.pyx":363
 *             root.nvlist['spares'] = [(<ZFSVdev>i).nvlist for i in topology['spare']]
 * 
 *         if 'log' in topology:             # <<<<<<<<<<<<<<
 *             for i in topology['log']:
 *                 (<ZFSVdev>i).nvlist['is_log'] = 1L
 */
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_log, __pyx_v_topology, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(1, 363, __pyx_L1_error)
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {

    /* "libzfs.pyx":364
 * 
 *         if 'log' in topology:
 *             for i in topology['log']:             # <<<<<<<<<<<<<<
 *                 (<ZFSVdev>i).nvlist['is_log'] = 1L
 *                 root.add_child_vdev(i)
 */
    __pyx_t_2 = PyObject_GetItem(__pyx_v_topology, __pyx_n_s_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 364, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 364, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 364, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 364, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 364, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 364, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 364, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_9(__pyx_t_1);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 364, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "libzfs.pyx":365
 *         if 'log' in topology:
 *             for i in topology['log']:
 *                 (<ZFSVdev>i).nvlist['is_log'] = 1L             # <<<<<<<<<<<<<<
 *                 root.add_child_vdev(i)
 * 
 */
      if (unlikely(PyObject_SetItem(((PyObject *)((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_i)->nvlist), __pyx_n_s_is_log, __pyx_int_1L) < 0)) __PYX_ERR(1, 365, __pyx_L1_error)

      /* "libzfs.pyx":366
 *             for i in topology['log']:
 *                 (<ZFSVdev>i).nvlist['is_log'] = 1L
 *                 root.add_child_vdev(i)             # <<<<<<<<<<<<<<
 * 
 *         return root
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_root), __pyx_n_s_add_child_vdev); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 366, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      if (!__pyx_t_3) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 366, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 366, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_v_i);
        __Pyx_GIVEREF(__pyx_v_i);
        PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_i);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 366, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "libzfs.pyx":364
 * 
 *         if 'log' in topology:
 *             for i in topology['log']:             # <<<<<<<<<<<<<<
 *                 (<ZFSVdev>i).nvlist['is_log'] = 1L
 *                 root.add_child_vdev(i)
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "libzfs.pyx":363
 *             root.nvlist['spares'] = [(<ZFSVdev>i).nvlist for i in topology['spare']]
 * 
 *         if 'log' in topology:             # <<<<<<<<<<<<<<
 *             for i in topology['log']:
 *                 (<ZFSVdev>i).nvlist['is_log'] = 1L
 */
  }

  /* "libzfs.pyx":368
 *                 root.add_child_vdev(i)
 * 
 *         return root             # <<<<<<<<<<<<<<
 * 
 *     property errno:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_root));
  __pyx_r = __pyx_v_root;
  goto __pyx_L0;

  /* "libzfs.pyx":352
 *         )
 * 
 *     cdef ZFSVdev make_vdev_tree(self, topology):             # <<<<<<<<<<<<<<
 *         cdef ZFSVdev root
 *         root = ZFSVdev(self, 'root')
 */

  /* 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("libzfs.ZFS.make_vdev_tree", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_root);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":371
 * 
 *     property errno:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return Error(libzfs.libzfs_errno(self.handle))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_5errno_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_3ZFS_5errno_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_3ZFS_5errno___get__(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_3ZFS_5errno___get__(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self) {
  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;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":372
 *     property errno:
 *         def __get__(self):
 *             return Error(libzfs.libzfs_errno(self.handle))             # <<<<<<<<<<<<<<
 * 
 *     property errstr:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(libzfs_errno(__pyx_v_self->handle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 372, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 372, __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":371
 * 
 *     property errno:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return Error(libzfs.libzfs_errno(self.handle))
 * 
 */

  /* 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("libzfs.ZFS.errno.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":375
 * 
 *     property errstr:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return libzfs.libzfs_error_description(self.handle)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_6errstr_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_3ZFS_6errstr_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_3ZFS_6errstr___get__(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_3ZFS_6errstr___get__(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":376
 *     property errstr:
 *         def __get__(self):
 *             return libzfs.libzfs_error_description(self.handle)             # <<<<<<<<<<<<<<
 * 
 *     property pools:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyUnicode_FromString(libzfs_error_description(__pyx_v_self->handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":375
 * 
 *     property errstr:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return libzfs.libzfs_error_description(self.handle)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("libzfs.ZFS.errstr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6libzfs_3ZFS_5pools_2generator2(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "libzfs.pyx":379
 * 
 *     property pools:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSPool pool
 *             pools = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_5pools_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_3ZFS_5pools_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_3ZFS_5pools___get__(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_3ZFS_5pools___get__(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_2___get__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_cur_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_2___get__ *)__pyx_tp_new_6libzfs___pyx_scope_struct_2___get__(__pyx_ptype_6libzfs___pyx_scope_struct_2___get__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6libzfs_3ZFS_5pools_2generator2, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_ZFS___get); if (unlikely(!gen)) __PYX_ERR(1, 379, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("libzfs.ZFS.pools.__get__", __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_6libzfs_3ZFS_5pools_2generator2(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6libzfs___pyx_scope_struct_2___get__ *__pyx_cur_scope = ((struct __pyx_obj_6libzfs___pyx_scope_struct_2___get__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  uintptr_t __pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L10_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(1, 379, __pyx_L1_error)

  /* "libzfs.pyx":381
 *         def __get__(self):
 *             cdef ZFSPool pool
 *             pools = []             # <<<<<<<<<<<<<<
 * 
 *             with nogil:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_pools = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":383
 *             pools = []
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 libzfs.zpool_iter(self.handle, self.__iterate_pools, <void*>pools)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":384
 * 
 *             with nogil:
 *                 libzfs.zpool_iter(self.handle, self.__iterate_pools, <void*>pools)             # <<<<<<<<<<<<<<
 * 
 *             for h in pools:
 */
        zpool_iter(__pyx_cur_scope->__pyx_v_self->handle, ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->__pyx___iterate_pools, ((void *)__pyx_cur_scope->__pyx_v_pools));
      }

      /* "libzfs.pyx":383
 *             pools = []
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 libzfs.zpool_iter(self.handle, self.__iterate_pools, <void*>pools)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L6;
        }
        __pyx_L6:;
      }
  }

  /* "libzfs.pyx":386
 *                 libzfs.zpool_iter(self.handle, self.__iterate_pools, <void*>pools)
 * 
 *             for h in pools:             # <<<<<<<<<<<<<<
 *                 pool = ZFSPool.__new__(ZFSPool)
 *                 pool.root = self
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_pools; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 386, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_h);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_h, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":387
 * 
 *             for h in pools:
 *                 pool = ZFSPool.__new__(ZFSPool)             # <<<<<<<<<<<<<<
 *                 pool.root = self
 *                 pool.handle = <libzfs.zpool_handle_t*><uintptr_t>h
 */
    __pyx_t_3 = __pyx_tp_new_6libzfs_ZFSPool(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSPool), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6libzfs_ZFSPool)))) __PYX_ERR(1, 387, __pyx_L1_error)
    __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_pool));
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_pool, ((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_t_3));
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":388
 *             for h in pools:
 *                 pool = ZFSPool.__new__(ZFSPool)
 *                 pool.root = self             # <<<<<<<<<<<<<<
 *                 pool.handle = <libzfs.zpool_handle_t*><uintptr_t>h
 *                 if pool.name == '$import':
 */
    __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_pool->root);
    __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_pool->root));
    __pyx_cur_scope->__pyx_v_pool->root = __pyx_cur_scope->__pyx_v_self;

    /* "libzfs.pyx":389
 *                 pool = ZFSPool.__new__(ZFSPool)
 *                 pool.root = self
 *                 pool.handle = <libzfs.zpool_handle_t*><uintptr_t>h             # <<<<<<<<<<<<<<
 *                 if pool.name == '$import':
 *                     continue
 */
    __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_cur_scope->__pyx_v_h); if (unlikely((__pyx_t_4 == (uintptr_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 389, __pyx_L1_error)
    __pyx_cur_scope->__pyx_v_pool->handle = ((zpool_handle_t *)((uintptr_t)__pyx_t_4));

    /* "libzfs.pyx":390
 *                 pool.root = self
 *                 pool.handle = <libzfs.zpool_handle_t*><uintptr_t>h
 *                 if pool.name == '$import':             # <<<<<<<<<<<<<<
 *                     continue
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_pool), __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s_import, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 390, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_5) {

      /* "libzfs.pyx":391
 *                 pool.handle = <libzfs.zpool_handle_t*><uintptr_t>h
 *                 if pool.name == '$import':
 *                     continue             # <<<<<<<<<<<<<<
 * 
 *                 yield pool
 */
      goto __pyx_L7_continue;

      /* "libzfs.pyx":390
 *                 pool.root = self
 *                 pool.handle = <libzfs.zpool_handle_t*><uintptr_t>h
 *                 if pool.name == '$import':             # <<<<<<<<<<<<<<
 *                     continue
 * 
 */
    }

    /* "libzfs.pyx":393
 *                     continue
 * 
 *                 yield pool             # <<<<<<<<<<<<<<
 * 
 *     property datasets:
 */
    __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_pool));
    __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_pool);
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L10_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 393, __pyx_L1_error)

    /* "libzfs.pyx":386
 *                 libzfs.zpool_iter(self.handle, self.__iterate_pools, <void*>pools)
 * 
 *             for h in pools:             # <<<<<<<<<<<<<<
 *                 pool = ZFSPool.__new__(ZFSPool)
 *                 pool.root = self
 */
    __pyx_L7_continue:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":379
 * 
 *     property pools:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSPool pool
 *             pools = []
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6libzfs_3ZFS_8datasets_2generator3(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "libzfs.pyx":396
 * 
 *     property datasets:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             for p in self.pools:
 *                 try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_8datasets_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_3ZFS_8datasets_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_3ZFS_8datasets___get__(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_3ZFS_8datasets___get__(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_3___get__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_cur_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_3___get__ *)__pyx_tp_new_6libzfs___pyx_scope_struct_3___get__(__pyx_ptype_6libzfs___pyx_scope_struct_3___get__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6libzfs_3ZFS_8datasets_2generator3, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_ZFS___get); if (unlikely(!gen)) __PYX_ERR(1, 396, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("libzfs.ZFS.datasets.__get__", __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_6libzfs_3ZFS_8datasets_2generator3(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6libzfs___pyx_scope_struct_3___get__ *__pyx_cur_scope = ((struct __pyx_obj_6libzfs___pyx_scope_struct_3___get__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  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;
  PyObject *__pyx_t_12 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L14_resume_from_yield;
    case 2: goto __pyx_L17_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(1, 396, __pyx_L1_error)

  /* "libzfs.pyx":397
 *     property datasets:
 *         def __get__(self):
 *             for p in self.pools:             # <<<<<<<<<<<<<<
 *                 try:
 *                     yield p.root_dataset
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_pools); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 397, __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_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 397, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 397, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 397, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 397, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 397, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 397, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_p);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_p, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;

    /* "libzfs.pyx":398
 *         def __get__(self):
 *             for p in self.pools:
 *                 try:             # <<<<<<<<<<<<<<
 *                     yield p.root_dataset
 *                     for c in p.root_dataset.children_recursive:
 */
    {
      __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:*/ {

        /* "libzfs.pyx":399
 *             for p in self.pools:
 *                 try:
 *                     yield p.root_dataset             # <<<<<<<<<<<<<<
 *                     for c in p.root_dataset.children_recursive:
 *                         yield c
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_p, __pyx_n_s_root_dataset); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 399, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        __Pyx_XGIVEREF(__pyx_t_2);
        __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
        __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
        __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
        __Pyx_XGIVEREF(__pyx_t_5);
        __pyx_cur_scope->__pyx_t_3 = __pyx_t_5;
        __Pyx_XGIVEREF(__pyx_t_6);
        __pyx_cur_scope->__pyx_t_4 = __pyx_t_6;
        __Pyx_XGIVEREF(__pyx_t_7);
        __pyx_cur_scope->__pyx_t_5 = __pyx_t_7;
        __Pyx_XGIVEREF(__pyx_r);
        __Pyx_RefNannyFinishContext();
        /* return from generator, yielding value */
        __pyx_generator->resume_label = 1;
        return __pyx_r;
        __pyx_L14_resume_from_yield:;
        __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
        __pyx_cur_scope->__pyx_t_0 = 0;
        __Pyx_XGOTREF(__pyx_t_2);
        __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
        __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
        __pyx_t_5 = __pyx_cur_scope->__pyx_t_3;
        __pyx_cur_scope->__pyx_t_3 = 0;
        __Pyx_XGOTREF(__pyx_t_5);
        __pyx_t_6 = __pyx_cur_scope->__pyx_t_4;
        __pyx_cur_scope->__pyx_t_4 = 0;
        __Pyx_XGOTREF(__pyx_t_6);
        __pyx_t_7 = __pyx_cur_scope->__pyx_t_5;
        __pyx_cur_scope->__pyx_t_5 = 0;
        __Pyx_XGOTREF(__pyx_t_7);
        if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 399, __pyx_L6_error)

        /* "libzfs.pyx":400
 *                 try:
 *                     yield p.root_dataset
 *                     for c in p.root_dataset.children_recursive:             # <<<<<<<<<<<<<<
 *                         yield c
 *                 except ZFSException:
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_p, __pyx_n_s_root_dataset); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 400, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_children_recursive); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 400, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
          __pyx_t_1 = __pyx_t_8; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
          __pyx_t_10 = NULL;
        } else {
          __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 400, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 400, __pyx_L6_error)
        }
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        for (;;) {
          if (likely(!__pyx_t_10)) {
            if (likely(PyList_CheckExact(__pyx_t_1))) {
              if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
              #if CYTHON_COMPILING_IN_CPYTHON
              __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 400, __pyx_L6_error)
              #else
              __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 400, __pyx_L6_error)
              __Pyx_GOTREF(__pyx_t_8);
              #endif
            } else {
              if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
              #if CYTHON_COMPILING_IN_CPYTHON
              __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 400, __pyx_L6_error)
              #else
              __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 400, __pyx_L6_error)
              __Pyx_GOTREF(__pyx_t_8);
              #endif
            }
          } else {
            __pyx_t_8 = __pyx_t_10(__pyx_t_1);
            if (unlikely(!__pyx_t_8)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(1, 400, __pyx_L6_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_8);
          }
          __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_c);
          __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_c, __pyx_t_8);
          __Pyx_GIVEREF(__pyx_t_8);
          __pyx_t_8 = 0;

          /* "libzfs.pyx":401
 *                     yield p.root_dataset
 *                     for c in p.root_dataset.children_recursive:
 *                         yield c             # <<<<<<<<<<<<<<
 *                 except ZFSException:
 *                     continue
 */
          __Pyx_INCREF(__pyx_cur_scope->__pyx_v_c);
          __pyx_r = __pyx_cur_scope->__pyx_v_c;
          __Pyx_XGIVEREF(__pyx_t_1);
          __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
          __Pyx_XGIVEREF(__pyx_t_2);
          __pyx_cur_scope->__pyx_t_3 = __pyx_t_2;
          __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
          __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
          __Pyx_XGIVEREF(__pyx_t_5);
          __pyx_cur_scope->__pyx_t_4 = __pyx_t_5;
          __Pyx_XGIVEREF(__pyx_t_6);
          __pyx_cur_scope->__pyx_t_5 = __pyx_t_6;
          __Pyx_XGIVEREF(__pyx_t_7);
          __pyx_cur_scope->__pyx_t_6 = __pyx_t_7;
          __pyx_cur_scope->__pyx_t_7 = __pyx_t_9;
          __pyx_cur_scope->__pyx_t_8 = __pyx_t_10;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          /* return from generator, yielding value */
          __pyx_generator->resume_label = 2;
          return __pyx_r;
          __pyx_L17_resume_from_yield:;
          __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
          __pyx_cur_scope->__pyx_t_0 = 0;
          __Pyx_XGOTREF(__pyx_t_1);
          __pyx_t_2 = __pyx_cur_scope->__pyx_t_3;
          __pyx_cur_scope->__pyx_t_3 = 0;
          __Pyx_XGOTREF(__pyx_t_2);
          __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
          __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
          __pyx_t_5 = __pyx_cur_scope->__pyx_t_4;
          __pyx_cur_scope->__pyx_t_4 = 0;
          __Pyx_XGOTREF(__pyx_t_5);
          __pyx_t_6 = __pyx_cur_scope->__pyx_t_5;
          __pyx_cur_scope->__pyx_t_5 = 0;
          __Pyx_XGOTREF(__pyx_t_6);
          __pyx_t_7 = __pyx_cur_scope->__pyx_t_6;
          __pyx_cur_scope->__pyx_t_6 = 0;
          __Pyx_XGOTREF(__pyx_t_7);
          __pyx_t_9 = __pyx_cur_scope->__pyx_t_7;
          __pyx_t_10 = __pyx_cur_scope->__pyx_t_8;
          if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 401, __pyx_L6_error)

          /* "libzfs.pyx":400
 *                 try:
 *                     yield p.root_dataset
 *                     for c in p.root_dataset.children_recursive:             # <<<<<<<<<<<<<<
 *                         yield c
 *                 except ZFSException:
 */
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "libzfs.pyx":398
 *         def __get__(self):
 *             for p in self.pools:
 *                 try:             # <<<<<<<<<<<<<<
 *                     yield p.root_dataset
 *                     for c in p.root_dataset.children_recursive:
 */
      }
      __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_L13_try_end;
      __pyx_L6_error:;
      __Pyx_PyThreadState_assign
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "libzfs.pyx":402
 *                     for c in p.root_dataset.children_recursive:
 *                         yield c
 *                 except ZFSException:             # <<<<<<<<<<<<<<
 *                     continue
 * 
 */
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 402, __pyx_L8_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_11) {
        __Pyx_AddTraceback("libzfs.ZFS.datasets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_12) < 0) __PYX_ERR(1, 402, __pyx_L8_except_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GOTREF(__pyx_t_12);

        /* "libzfs.pyx":403
 *                         yield c
 *                 except ZFSException:
 *                     continue             # <<<<<<<<<<<<<<
 * 
 *     property snapshots:
 */
        goto __pyx_L19_except_continue;
        __pyx_L19_except_continue:;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L12_try_continue;
      }
      goto __pyx_L8_except_error;
      __pyx_L8_except_error:;

      /* "libzfs.pyx":398
 *         def __get__(self):
 *             for p in self.pools:
 *                 try:             # <<<<<<<<<<<<<<
 *                     yield p.root_dataset
 *                     for c in p.root_dataset.children_recursive:
 */
      __Pyx_PyThreadState_assign
      __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_L12_try_continue:;
      __Pyx_PyThreadState_assign
      __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_L4_continue;
      __pyx_L13_try_end:;
    }

    /* "libzfs.pyx":397
 *     property datasets:
 *         def __get__(self):
 *             for p in self.pools:             # <<<<<<<<<<<<<<
 *                 try:
 *                     yield p.root_dataset
 */
    __pyx_L4_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":396
 * 
 *     property datasets:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             for p in self.pools:
 *                 try:
 */

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6libzfs_3ZFS_9snapshots_2generator4(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "libzfs.pyx":406
 * 
 *     property snapshots:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             for p in self.pools:
 *                 try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_9snapshots_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_3ZFS_9snapshots_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_3ZFS_9snapshots___get__(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_3ZFS_9snapshots___get__(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_4___get__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_cur_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_4___get__ *)__pyx_tp_new_6libzfs___pyx_scope_struct_4___get__(__pyx_ptype_6libzfs___pyx_scope_struct_4___get__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6libzfs_3ZFS_9snapshots_2generator4, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_ZFS___get); if (unlikely(!gen)) __PYX_ERR(1, 406, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("libzfs.ZFS.snapshots.__get__", __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_6libzfs_3ZFS_9snapshots_2generator4(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6libzfs___pyx_scope_struct_4___get__ *__pyx_cur_scope = ((struct __pyx_obj_6libzfs___pyx_scope_struct_4___get__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  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;
  PyObject *__pyx_t_12 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L16_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(1, 406, __pyx_L1_error)

  /* "libzfs.pyx":407
 *     property snapshots:
 *         def __get__(self):
 *             for p in self.pools:             # <<<<<<<<<<<<<<
 *                 try:
 *                     for c in p.root_dataset.snapshots_recursive:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_pools); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 407, __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_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 407, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 407, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 407, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 407, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 407, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 407, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_p);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_p, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;

    /* "libzfs.pyx":408
 *         def __get__(self):
 *             for p in self.pools:
 *                 try:             # <<<<<<<<<<<<<<
 *                     for c in p.root_dataset.snapshots_recursive:
 *                         yield c
 */
    {
      __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:*/ {

        /* "libzfs.pyx":409
 *             for p in self.pools:
 *                 try:
 *                     for c in p.root_dataset.snapshots_recursive:             # <<<<<<<<<<<<<<
 *                         yield c
 *                 except ZFSException:
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_p, __pyx_n_s_root_dataset); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 409, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_snapshots_recursive); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 409, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
          __pyx_t_1 = __pyx_t_8; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
          __pyx_t_10 = NULL;
        } else {
          __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 409, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 409, __pyx_L6_error)
        }
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        for (;;) {
          if (likely(!__pyx_t_10)) {
            if (likely(PyList_CheckExact(__pyx_t_1))) {
              if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
              #if CYTHON_COMPILING_IN_CPYTHON
              __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 409, __pyx_L6_error)
              #else
              __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 409, __pyx_L6_error)
              __Pyx_GOTREF(__pyx_t_8);
              #endif
            } else {
              if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
              #if CYTHON_COMPILING_IN_CPYTHON
              __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 409, __pyx_L6_error)
              #else
              __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 409, __pyx_L6_error)
              __Pyx_GOTREF(__pyx_t_8);
              #endif
            }
          } else {
            __pyx_t_8 = __pyx_t_10(__pyx_t_1);
            if (unlikely(!__pyx_t_8)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(1, 409, __pyx_L6_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_8);
          }
          __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_c);
          __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_c, __pyx_t_8);
          __Pyx_GIVEREF(__pyx_t_8);
          __pyx_t_8 = 0;

          /* "libzfs.pyx":410
 *                 try:
 *                     for c in p.root_dataset.snapshots_recursive:
 *                         yield c             # <<<<<<<<<<<<<<
 *                 except ZFSException:
 *                     continue
 */
          __Pyx_INCREF(__pyx_cur_scope->__pyx_v_c);
          __pyx_r = __pyx_cur_scope->__pyx_v_c;
          __Pyx_XGIVEREF(__pyx_t_1);
          __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
          __Pyx_XGIVEREF(__pyx_t_2);
          __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
          __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
          __pyx_cur_scope->__pyx_t_3 = __pyx_t_4;
          __Pyx_XGIVEREF(__pyx_t_5);
          __pyx_cur_scope->__pyx_t_4 = __pyx_t_5;
          __Pyx_XGIVEREF(__pyx_t_6);
          __pyx_cur_scope->__pyx_t_5 = __pyx_t_6;
          __Pyx_XGIVEREF(__pyx_t_7);
          __pyx_cur_scope->__pyx_t_6 = __pyx_t_7;
          __pyx_cur_scope->__pyx_t_7 = __pyx_t_9;
          __pyx_cur_scope->__pyx_t_8 = __pyx_t_10;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          /* return from generator, yielding value */
          __pyx_generator->resume_label = 1;
          return __pyx_r;
          __pyx_L16_resume_from_yield:;
          __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
          __pyx_cur_scope->__pyx_t_0 = 0;
          __Pyx_XGOTREF(__pyx_t_1);
          __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
          __pyx_cur_scope->__pyx_t_1 = 0;
          __Pyx_XGOTREF(__pyx_t_2);
          __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
          __pyx_t_4 = __pyx_cur_scope->__pyx_t_3;
          __pyx_t_5 = __pyx_cur_scope->__pyx_t_4;
          __pyx_cur_scope->__pyx_t_4 = 0;
          __Pyx_XGOTREF(__pyx_t_5);
          __pyx_t_6 = __pyx_cur_scope->__pyx_t_5;
          __pyx_cur_scope->__pyx_t_5 = 0;
          __Pyx_XGOTREF(__pyx_t_6);
          __pyx_t_7 = __pyx_cur_scope->__pyx_t_6;
          __pyx_cur_scope->__pyx_t_6 = 0;
          __Pyx_XGOTREF(__pyx_t_7);
          __pyx_t_9 = __pyx_cur_scope->__pyx_t_7;
          __pyx_t_10 = __pyx_cur_scope->__pyx_t_8;
          if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 410, __pyx_L6_error)

          /* "libzfs.pyx":409
 *             for p in self.pools:
 *                 try:
 *                     for c in p.root_dataset.snapshots_recursive:             # <<<<<<<<<<<<<<
 *                         yield c
 *                 except ZFSException:
 */
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "libzfs.pyx":408
 *         def __get__(self):
 *             for p in self.pools:
 *                 try:             # <<<<<<<<<<<<<<
 *                     for c in p.root_dataset.snapshots_recursive:
 *                         yield c
 */
      }
      __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_L13_try_end;
      __pyx_L6_error:;
      __Pyx_PyThreadState_assign
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "libzfs.pyx":411
 *                     for c in p.root_dataset.snapshots_recursive:
 *                         yield c
 *                 except ZFSException:             # <<<<<<<<<<<<<<
 *                     continue
 * 
 */
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 411, __pyx_L8_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_11) {
        __Pyx_AddTraceback("libzfs.ZFS.snapshots.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_12) < 0) __PYX_ERR(1, 411, __pyx_L8_except_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GOTREF(__pyx_t_12);

        /* "libzfs.pyx":412
 *                         yield c
 *                 except ZFSException:
 *                     continue             # <<<<<<<<<<<<<<
 * 
 *     def get(self, name):
 */
        goto __pyx_L18_except_continue;
        __pyx_L18_except_continue:;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L12_try_continue;
      }
      goto __pyx_L8_except_error;
      __pyx_L8_except_error:;

      /* "libzfs.pyx":408
 *         def __get__(self):
 *             for p in self.pools:
 *                 try:             # <<<<<<<<<<<<<<
 *                     for c in p.root_dataset.snapshots_recursive:
 *                         yield c
 */
      __Pyx_PyThreadState_assign
      __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_L12_try_continue:;
      __Pyx_PyThreadState_assign
      __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_L4_continue;
      __pyx_L13_try_end:;
    }

    /* "libzfs.pyx":407
 *     property snapshots:
 *         def __get__(self):
 *             for p in self.pools:             # <<<<<<<<<<<<<<
 *                 try:
 *                     for c in p.root_dataset.snapshots_recursive:
 */
    __pyx_L4_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":406
 * 
 *     property snapshots:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             for p in self.pools:
 *                 try:
 */

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":414
 *                     continue
 * 
 *     def get(self, name):             # <<<<<<<<<<<<<<
 *         cdef const char *c_name = name
 *         cdef libzfs.zpool_handle_t* handle = NULL
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_7get(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_pw_6libzfs_3ZFS_7get(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_3ZFS_6get(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self), ((PyObject *)__pyx_v_name));

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

static PyObject *__pyx_pf_6libzfs_3ZFS_6get(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_name) {
  char const *__pyx_v_c_name;
  zpool_handle_t *__pyx_v_handle;
  struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_pool = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char const *__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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  __Pyx_RefNannySetupContext("get", 0);

  /* "libzfs.pyx":415
 * 
 *     def get(self, name):
 *         cdef const char *c_name = name             # <<<<<<<<<<<<<<
 *         cdef libzfs.zpool_handle_t* handle = NULL
 *         cdef ZFSPool pool
 */
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(1, 415, __pyx_L1_error)
  __pyx_v_c_name = __pyx_t_1;

  /* "libzfs.pyx":416
 *     def get(self, name):
 *         cdef const char *c_name = name
 *         cdef libzfs.zpool_handle_t* handle = NULL             # <<<<<<<<<<<<<<
 *         cdef ZFSPool pool
 * 
 */
  __pyx_v_handle = NULL;

  /* "libzfs.pyx":419
 *         cdef ZFSPool pool
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             handle = libzfs.zpool_open_canfail(self.handle, c_name)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":420
 * 
 *         with nogil:
 *             handle = libzfs.zpool_open_canfail(self.handle, c_name)             # <<<<<<<<<<<<<<
 * 
 *         if handle == NULL:
 */
        __pyx_v_handle = zpool_open_canfail(__pyx_v_self->handle, __pyx_v_c_name);
      }

      /* "libzfs.pyx":419
 *         cdef ZFSPool pool
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             handle = libzfs.zpool_open_canfail(self.handle, c_name)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":422
 *             handle = libzfs.zpool_open_canfail(self.handle, c_name)
 * 
 *         if handle == NULL:             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOENT, 'Pool {0} not found'.format(name))
 * 
 */
  __pyx_t_2 = ((__pyx_v_handle == NULL) != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":423
 * 
 *         if handle == NULL:
 *             raise ZFSException(Error.NOENT, 'Pool {0} not found'.format(name))             # <<<<<<<<<<<<<<
 * 
 *         pool = ZFSPool.__new__(ZFSPool)
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_NOENT); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Pool_0_not_found, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && 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);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 423, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 423, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_INCREF(__pyx_v_name);
      __Pyx_GIVEREF(__pyx_v_name);
      PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_name);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 423, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_10 = 1;
      }
    }
    __pyx_t_9 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_t_5);
    __pyx_t_6 = 0;
    __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __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(1, 423, __pyx_L1_error)

    /* "libzfs.pyx":422
 *             handle = libzfs.zpool_open_canfail(self.handle, c_name)
 * 
 *         if handle == NULL:             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOENT, 'Pool {0} not found'.format(name))
 * 
 */
  }

  /* "libzfs.pyx":425
 *             raise ZFSException(Error.NOENT, 'Pool {0} not found'.format(name))
 * 
 *         pool = ZFSPool.__new__(ZFSPool)             # <<<<<<<<<<<<<<
 *         pool.root = self
 *         pool.handle = handle
 */
  __pyx_t_3 = __pyx_tp_new_6libzfs_ZFSPool(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSPool), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6libzfs_ZFSPool)))) __PYX_ERR(1, 425, __pyx_L1_error)
  __pyx_v_pool = ((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "libzfs.pyx":426
 * 
 *         pool = ZFSPool.__new__(ZFSPool)
 *         pool.root = self             # <<<<<<<<<<<<<<
 *         pool.handle = handle
 *         return pool
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_pool->root);
  __Pyx_DECREF(((PyObject *)__pyx_v_pool->root));
  __pyx_v_pool->root = __pyx_v_self;

  /* "libzfs.pyx":427
 *         pool = ZFSPool.__new__(ZFSPool)
 *         pool.root = self
 *         pool.handle = handle             # <<<<<<<<<<<<<<
 *         return pool
 * 
 */
  __pyx_v_pool->handle = __pyx_v_handle;

  /* "libzfs.pyx":428
 *         pool.root = self
 *         pool.handle = handle
 *         return pool             # <<<<<<<<<<<<<<
 * 
 *     def find_import(self, cachefile=None, name=None, destroyed=False, search_paths=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_pool));
  __pyx_r = ((PyObject *)__pyx_v_pool);
  goto __pyx_L0;

  /* "libzfs.pyx":414
 *                     continue
 * 
 *     def get(self, name):             # <<<<<<<<<<<<<<
 *         cdef const char *c_name = name
 *         cdef libzfs.zpool_handle_t* handle = NULL
 */

  /* function exit code */
  __pyx_L1_error:;
  __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);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("libzfs.ZFS.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pool);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6libzfs_3ZFS_10generator5(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "libzfs.pyx":430
 *         return pool
 * 
 *     def find_import(self, cachefile=None, name=None, destroyed=False, search_paths=None):             # <<<<<<<<<<<<<<
 *         cdef ZFSImportablePool pool
 *         cdef libzfs.importargs_t iargs
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_9find_import(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_3ZFS_9find_import(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cachefile = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_destroyed = 0;
  PyObject *__pyx_v_search_paths = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("find_import (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cachefile,&__pyx_n_s_name_2,&__pyx_n_s_destroyed,&__pyx_n_s_search_paths,0};
    PyObject* values[4] = {0,0,0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_False);
    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);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cachefile);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name_2);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_destroyed);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_search_paths);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "find_import") < 0)) __PYX_ERR(1, 430, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cachefile = values[0];
    __pyx_v_name = values[1];
    __pyx_v_destroyed = values[2];
    __pyx_v_search_paths = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("find_import", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 430, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFS.find_import", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_3ZFS_8find_import(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self), __pyx_v_cachefile, __pyx_v_name, __pyx_v_destroyed, __pyx_v_search_paths);

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

static PyObject *__pyx_pf_6libzfs_3ZFS_8find_import(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_cachefile, PyObject *__pyx_v_name, PyObject *__pyx_v_destroyed, PyObject *__pyx_v_search_paths) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_5_find_import *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("find_import", 0);
  __pyx_cur_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_5_find_import *)__pyx_tp_new_6libzfs___pyx_scope_struct_5_find_import(__pyx_ptype_6libzfs___pyx_scope_struct_5_find_import, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __pyx_cur_scope->__pyx_v_cachefile = __pyx_v_cachefile;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_cachefile);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_cachefile);
  __pyx_cur_scope->__pyx_v_name = __pyx_v_name;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_name);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_name);
  __pyx_cur_scope->__pyx_v_destroyed = __pyx_v_destroyed;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_destroyed);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_destroyed);
  __pyx_cur_scope->__pyx_v_search_paths = __pyx_v_search_paths;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_search_paths);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_search_paths);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6libzfs_3ZFS_10generator5, (PyObject *) __pyx_cur_scope, __pyx_n_s_find_import, __pyx_n_s_ZFS_find_import); if (unlikely(!gen)) __PYX_ERR(1, 430, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("libzfs.ZFS.find_import", __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_6libzfs_3ZFS_10generator5(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6libzfs___pyx_scope_struct_5_find_import *__pyx_cur_scope = ((struct __pyx_obj_6libzfs___pyx_scope_struct_5_find_import *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  int __pyx_t_13;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L20_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(1, 430, __pyx_L1_error)

  /* "libzfs.pyx":433
 *         cdef ZFSImportablePool pool
 *         cdef libzfs.importargs_t iargs
 *         cdef char* paths = "/dev"             # <<<<<<<<<<<<<<
 *         cdef char* c_name
 *         cdef nvpair.nvlist_t* result
 */
  __pyx_cur_scope->__pyx_v_paths = ((char *)"/dev");

  /* "libzfs.pyx":437
 *         cdef nvpair.nvlist_t* result
 * 
 *         iargs.path = &paths             # <<<<<<<<<<<<<<
 *         iargs.paths = 1
 *         iargs.poolname = NULL
 */
  __pyx_cur_scope->__pyx_v_iargs.path = (&__pyx_cur_scope->__pyx_v_paths);

  /* "libzfs.pyx":438
 * 
 *         iargs.path = &paths
 *         iargs.paths = 1             # <<<<<<<<<<<<<<
 *         iargs.poolname = NULL
 *         iargs.guid = 0
 */
  __pyx_cur_scope->__pyx_v_iargs.paths = 1;

  /* "libzfs.pyx":439
 *         iargs.path = &paths
 *         iargs.paths = 1
 *         iargs.poolname = NULL             # <<<<<<<<<<<<<<
 *         iargs.guid = 0
 *         iargs.cachefile = NULL
 */
  __pyx_cur_scope->__pyx_v_iargs.poolname = NULL;

  /* "libzfs.pyx":440
 *         iargs.paths = 1
 *         iargs.poolname = NULL
 *         iargs.guid = 0             # <<<<<<<<<<<<<<
 *         iargs.cachefile = NULL
 * 
 */
  __pyx_cur_scope->__pyx_v_iargs.guid = 0;

  /* "libzfs.pyx":441
 *         iargs.poolname = NULL
 *         iargs.guid = 0
 *         iargs.cachefile = NULL             # <<<<<<<<<<<<<<
 * 
 *         if name:
 */
  __pyx_cur_scope->__pyx_v_iargs.cachefile = NULL;

  /* "libzfs.pyx":443
 *         iargs.cachefile = NULL
 * 
 *         if name:             # <<<<<<<<<<<<<<
 *             encoded = name.encode('utf-8')
 *             c_name = encoded
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_name); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 443, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "libzfs.pyx":444
 * 
 *         if name:
 *             encoded = name.encode('utf-8')             # <<<<<<<<<<<<<<
 *             c_name = encoded
 *             iargs.poolname = c_name
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 444, __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_encoded = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "libzfs.pyx":445
 *         if name:
 *             encoded = name.encode('utf-8')
 *             c_name = encoded             # <<<<<<<<<<<<<<
 *             iargs.poolname = c_name
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_cur_scope->__pyx_v_encoded); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 445, __pyx_L1_error)
    __pyx_cur_scope->__pyx_v_c_name = __pyx_t_4;

    /* "libzfs.pyx":446
 *             encoded = name.encode('utf-8')
 *             c_name = encoded
 *             iargs.poolname = c_name             # <<<<<<<<<<<<<<
 * 
 *         if search_paths:
 */
    __pyx_cur_scope->__pyx_v_iargs.poolname = __pyx_cur_scope->__pyx_v_c_name;

    /* "libzfs.pyx":443
 *         iargs.cachefile = NULL
 * 
 *         if name:             # <<<<<<<<<<<<<<
 *             encoded = name.encode('utf-8')
 *             c_name = encoded
 */
  }

  /* "libzfs.pyx":448
 *             iargs.poolname = c_name
 * 
 *         if search_paths:             # <<<<<<<<<<<<<<
 *             iargs.path = <char **>malloc(len(search_paths) * sizeof(char *))
 *             iargs.paths = len(search_paths)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_search_paths); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 448, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "libzfs.pyx":449
 * 
 *         if search_paths:
 *             iargs.path = <char **>malloc(len(search_paths) * sizeof(char *))             # <<<<<<<<<<<<<<
 *             iargs.paths = len(search_paths)
 *             for i, p in enumerate(search_paths):
 */
    __pyx_t_5 = PyObject_Length(__pyx_cur_scope->__pyx_v_search_paths); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(1, 449, __pyx_L1_error)
    __pyx_cur_scope->__pyx_v_iargs.path = ((char **)malloc((__pyx_t_5 * (sizeof(char *)))));

    /* "libzfs.pyx":450
 *         if search_paths:
 *             iargs.path = <char **>malloc(len(search_paths) * sizeof(char *))
 *             iargs.paths = len(search_paths)             # <<<<<<<<<<<<<<
 *             for i, p in enumerate(search_paths):
 *                 iargs.path[i] = <char *>p
 */
    __pyx_t_5 = PyObject_Length(__pyx_cur_scope->__pyx_v_search_paths); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(1, 450, __pyx_L1_error)
    __pyx_cur_scope->__pyx_v_iargs.paths = __pyx_t_5;

    /* "libzfs.pyx":451
 *             iargs.path = <char **>malloc(len(search_paths) * sizeof(char *))
 *             iargs.paths = len(search_paths)
 *             for i, p in enumerate(search_paths):             # <<<<<<<<<<<<<<
 *                 iargs.path[i] = <char *>p
 * 
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_3 = __pyx_int_0;
    if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_search_paths)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_search_paths)) {
      __pyx_t_2 = __pyx_cur_scope->__pyx_v_search_paths; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_search_paths); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 451, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 451, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 451, __pyx_L1_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 451, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 451, __pyx_L1_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 451, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        }
      } else {
        __pyx_t_7 = __pyx_t_6(__pyx_t_2);
        if (unlikely(!__pyx_t_7)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 451, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_p);
      __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_p, __pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_7);
      __pyx_t_7 = 0;
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
      __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 451, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3);
      __pyx_t_3 = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "libzfs.pyx":452
 *             iargs.paths = len(search_paths)
 *             for i, p in enumerate(search_paths):
 *                 iargs.path[i] = <char *>p             # <<<<<<<<<<<<<<
 * 
 *         if cachefile:
 */
      __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_cur_scope->__pyx_v_p); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 452, __pyx_L1_error)
      __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_cur_scope->__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 452, __pyx_L1_error)
      (__pyx_cur_scope->__pyx_v_iargs.path[__pyx_t_8]) = ((char *)__pyx_t_4);

      /* "libzfs.pyx":451
 *             iargs.path = <char **>malloc(len(search_paths) * sizeof(char *))
 *             iargs.paths = len(search_paths)
 *             for i, p in enumerate(search_paths):             # <<<<<<<<<<<<<<
 *                 iargs.path[i] = <char *>p
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "libzfs.pyx":448
 *             iargs.poolname = c_name
 * 
 *         if search_paths:             # <<<<<<<<<<<<<<
 *             iargs.path = <char **>malloc(len(search_paths) * sizeof(char *))
 *             iargs.paths = len(search_paths)
 */
  }

  /* "libzfs.pyx":454
 *                 iargs.path[i] = <char *>p
 * 
 *         if cachefile:             # <<<<<<<<<<<<<<
 *             iargs.cachefile = cachefile
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_cachefile); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 454, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "libzfs.pyx":455
 * 
 *         if cachefile:
 *             iargs.cachefile = cachefile             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */
    __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_cur_scope->__pyx_v_cachefile); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 455, __pyx_L1_error)
    __pyx_cur_scope->__pyx_v_iargs.cachefile = __pyx_t_4;

    /* "libzfs.pyx":454
 *                 iargs.path[i] = <char *>p
 * 
 *         if cachefile:             # <<<<<<<<<<<<<<
 *             iargs.cachefile = cachefile
 * 
 */
  }

  /* "libzfs.pyx":457
 *             iargs.cachefile = cachefile
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = libzfs.zpool_search_import(self.handle, &iargs)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":458
 * 
 *         with nogil:
 *             result = libzfs.zpool_search_import(self.handle, &iargs)             # <<<<<<<<<<<<<<
 * 
 *         if result is NULL:
 */
        __pyx_cur_scope->__pyx_v_result = zpool_search_import(__pyx_cur_scope->__pyx_v_self->handle, (&__pyx_cur_scope->__pyx_v_iargs));
      }

      /* "libzfs.pyx":457
 *             iargs.cachefile = cachefile
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = libzfs.zpool_search_import(self.handle, &iargs)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L11;
        }
        __pyx_L11:;
      }
  }

  /* "libzfs.pyx":460
 *             result = libzfs.zpool_search_import(self.handle, &iargs)
 * 
 *         if result is NULL:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_result == NULL) != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":461
 * 
 *         if result is NULL:
 *             return             # <<<<<<<<<<<<<<
 * 
 *         nv = NVList(nvlist=<uintptr_t>result)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = NULL;
    goto __pyx_L0;

    /* "libzfs.pyx":460
 *             result = libzfs.zpool_search_import(self.handle, &iargs)
 * 
 *         if result is NULL:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "libzfs.pyx":463
 *             return
 * 
 *         nv = NVList(nvlist=<uintptr_t>result)             # <<<<<<<<<<<<<<
 *         for name, config in nv.items(raw=True):
 *             pool = ZFSImportablePool.__new__(ZFSImportablePool)
 */
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_cur_scope->__pyx_v_result)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_nvlist, __pyx_t_2) < 0) __PYX_ERR(1, 463, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_NVList), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_nv = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "libzfs.pyx":464
 * 
 *         nv = NVList(nvlist=<uintptr_t>result)
 *         for name, config in nv.items(raw=True):             # <<<<<<<<<<<<<<
 *             pool = ZFSImportablePool.__new__(ZFSImportablePool)
 *             pool.name = name
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_nv), __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_raw, Py_True) < 0) __PYX_ERR(1, 464, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
    __pyx_t_3 = __pyx_t_7; __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_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 464, __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(1, 464, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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_COMPILING_IN_CPYTHON
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 464, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 464, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 464, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 464, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 464, __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;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(1, 464, __pyx_L1_error)
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 464, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 464, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      #endif
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_10 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 464, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
      index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L15_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L15_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(1, 464, __pyx_L1_error)
      __pyx_t_11 = NULL;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L16_unpacking_done;
      __pyx_L15_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_11 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(1, 464, __pyx_L1_error)
      __pyx_L16_unpacking_done:;
    }
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_name);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_name, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_config);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_config, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    __pyx_t_9 = 0;

    /* "libzfs.pyx":465
 *         nv = NVList(nvlist=<uintptr_t>result)
 *         for name, config in nv.items(raw=True):
 *             pool = ZFSImportablePool.__new__(ZFSImportablePool)             # <<<<<<<<<<<<<<
 *             pool.name = name
 *             pool.free = False
 */
    __pyx_t_7 = __pyx_tp_new_6libzfs_ZFSImportablePool(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSImportablePool), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (!(likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_6libzfs_ZFSImportablePool)))) __PYX_ERR(1, 465, __pyx_L1_error)
    __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_pool));
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_pool, ((struct __pyx_obj_6libzfs_ZFSImportablePool *)__pyx_t_7));
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_7 = 0;

    /* "libzfs.pyx":466
 *         for name, config in nv.items(raw=True):
 *             pool = ZFSImportablePool.__new__(ZFSImportablePool)
 *             pool.name = name             # <<<<<<<<<<<<<<
 *             pool.free = False
 *             pool.nvlist = config
 */
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_name);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_name);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_pool->name);
    __Pyx_DECREF(__pyx_cur_scope->__pyx_v_pool->name);
    __pyx_cur_scope->__pyx_v_pool->name = __pyx_cur_scope->__pyx_v_name;

    /* "libzfs.pyx":467
 *             pool = ZFSImportablePool.__new__(ZFSImportablePool)
 *             pool.name = name
 *             pool.free = False             # <<<<<<<<<<<<<<
 *             pool.nvlist = config
 * 
 */
    __pyx_cur_scope->__pyx_v_pool->__pyx_base.free = 0;

    /* "libzfs.pyx":468
 *             pool.name = name
 *             pool.free = False
 *             pool.nvlist = config             # <<<<<<<<<<<<<<
 * 
 *             # Skip destroyed pools
 */
    if (!(likely(((__pyx_cur_scope->__pyx_v_config) == Py_None) || likely(__Pyx_TypeTest(__pyx_cur_scope->__pyx_v_config, __pyx_ptype_6libzfs_NVList))))) __PYX_ERR(1, 468, __pyx_L1_error)
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_config;
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_pool->nvlist);
    __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_pool->nvlist));
    __pyx_cur_scope->__pyx_v_pool->nvlist = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_7);
    __pyx_t_7 = 0;

    /* "libzfs.pyx":471
 * 
 *             # Skip destroyed pools
 *             if config['state'] == PoolState.DESTROYED and not destroyed:             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
    __pyx_t_7 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_config, __pyx_n_s_state); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 471, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_PoolState); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 471, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_DESTROYED); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 471, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyObject_RichCompare(__pyx_t_7, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 471, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(1, 471, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_12) {
    } else {
      __pyx_t_1 = __pyx_t_12;
      goto __pyx_L18_bool_binop_done;
    }
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_destroyed); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(1, 471, __pyx_L1_error)
    __pyx_t_13 = ((!__pyx_t_12) != 0);
    __pyx_t_1 = __pyx_t_13;
    __pyx_L18_bool_binop_done:;
    if (__pyx_t_1) {

      /* "libzfs.pyx":472
 *             # Skip destroyed pools
 *             if config['state'] == PoolState.DESTROYED and not destroyed:
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             yield pool
 */
      goto __pyx_L13_continue;

      /* "libzfs.pyx":471
 * 
 *             # Skip destroyed pools
 *             if config['state'] == PoolState.DESTROYED and not destroyed:             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
    }

    /* "libzfs.pyx":474
 *                 continue
 * 
 *             yield pool             # <<<<<<<<<<<<<<
 * 
 *     def import_pool(self, ZFSImportablePool pool, newname, opts):
 */
    __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_pool));
    __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_pool);
    __Pyx_XGIVEREF(__pyx_t_3);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_3;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L20_resume_from_yield:;
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_3);
    __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 474, __pyx_L1_error)

    /* "libzfs.pyx":464
 * 
 *         nv = NVList(nvlist=<uintptr_t>result)
 *         for name, config in nv.items(raw=True):             # <<<<<<<<<<<<<<
 *             pool = ZFSImportablePool.__new__(ZFSImportablePool)
 *             pool.name = name
 */
    __pyx_L13_continue:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "libzfs.pyx":430
 *         return pool
 * 
 *     def find_import(self, cachefile=None, name=None, destroyed=False, search_paths=None):             # <<<<<<<<<<<<<<
 *         cdef ZFSImportablePool pool
 *         cdef libzfs.importargs_t iargs
 */

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

/* "libzfs.pyx":476
 *             yield pool
 * 
 *     def import_pool(self, ZFSImportablePool pool, newname, opts):             # <<<<<<<<<<<<<<
 *         cdef const char *c_newname = newname
 *         cdef NVList copts = NVList(otherdict=opts)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_12import_pool(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_3ZFS_12import_pool(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_pool = 0;
  PyObject *__pyx_v_newname = 0;
  PyObject *__pyx_v_opts = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("import_pool (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pool,&__pyx_n_s_newname,&__pyx_n_s_opts,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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pool)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_newname)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("import_pool", 1, 3, 3, 1); __PYX_ERR(1, 476, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_opts)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("import_pool", 1, 3, 3, 2); __PYX_ERR(1, 476, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "import_pool") < 0)) __PYX_ERR(1, 476, __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_pool = ((struct __pyx_obj_6libzfs_ZFSImportablePool *)values[0]);
    __pyx_v_newname = values[1];
    __pyx_v_opts = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("import_pool", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 476, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFS.import_pool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pool), __pyx_ptype_6libzfs_ZFSImportablePool, 1, "pool", 0))) __PYX_ERR(1, 476, __pyx_L1_error)
  __pyx_r = __pyx_pf_6libzfs_3ZFS_11import_pool(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self), __pyx_v_pool, __pyx_v_newname, __pyx_v_opts);

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

static PyObject *__pyx_pf_6libzfs_3ZFS_11import_pool(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_pool, PyObject *__pyx_v_newname, PyObject *__pyx_v_opts) {
  char const *__pyx_v_c_newname;
  struct __pyx_obj_6libzfs_NVList *__pyx_v_copts = 0;
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char const *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("import_pool", 0);

  /* "libzfs.pyx":477
 * 
 *     def import_pool(self, ZFSImportablePool pool, newname, opts):
 *         cdef const char *c_newname = newname             # <<<<<<<<<<<<<<
 *         cdef NVList copts = NVList(otherdict=opts)
 *         cdef int ret
 */
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_newname); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(1, 477, __pyx_L1_error)
  __pyx_v_c_newname = __pyx_t_1;

  /* "libzfs.pyx":478
 *     def import_pool(self, ZFSImportablePool pool, newname, opts):
 *         cdef const char *c_newname = newname
 *         cdef NVList copts = NVList(otherdict=opts)             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_otherdict, __pyx_v_opts) < 0) __PYX_ERR(1, 478, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_NVList), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_copts = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "libzfs.pyx":481
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zpool_import_props(
 *                 self.handle,
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":482
 * 
 *         with nogil:
 *             ret = libzfs.zpool_import_props(             # <<<<<<<<<<<<<<
 *                 self.handle,
 *                 pool.nvlist.handle,
 */
        __pyx_v_ret = zpool_import_props(__pyx_v_self->handle, __pyx_v_pool->nvlist->handle, __pyx_v_c_newname, __pyx_v_copts->handle, 0);
      }

      /* "libzfs.pyx":481
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zpool_import_props(
 *                 self.handle,
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":490
 *             )
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.get_error()
 * 
 */
  __pyx_t_4 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_4) {

    /* "libzfs.pyx":491
 * 
 *         if ret != 0:
 *             raise self.get_error()             # <<<<<<<<<<<<<<
 * 
 *         self.write_history('zpool import', str(pool.guid), newname if newname else pool.name)
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->__pyx_vtab)->get_error(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 491, __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(1, 491, __pyx_L1_error)

    /* "libzfs.pyx":490
 *             )
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.get_error()
 * 
 */
  }

  /* "libzfs.pyx":493
 *             raise self.get_error()
 * 
 *         self.write_history('zpool import', str(pool.guid), newname if newname else pool.name)             # <<<<<<<<<<<<<<
 * 
 *     def export_pool(self, ZFSPool pool):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_history); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pool), __pyx_n_s_guid); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_newname); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 493, __pyx_L1_error)
  if (__pyx_t_4) {
    __Pyx_INCREF(__pyx_v_newname);
    __pyx_t_6 = __pyx_v_newname;
  } else {
    __Pyx_INCREF(__pyx_v_pool->name);
    __pyx_t_6 = __pyx_v_pool->name;
  }
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_8 = 1;
    }
  }
  __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__pyx_t_7) {
    __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
  }
  __Pyx_INCREF(__pyx_kp_s_zpool_import);
  __Pyx_GIVEREF(__pyx_kp_s_zpool_import);
  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_kp_s_zpool_import);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_6);
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "libzfs.pyx":476
 *             yield pool
 * 
 *     def import_pool(self, ZFSImportablePool pool, newname, opts):             # <<<<<<<<<<<<<<
 *         cdef const char *c_newname = newname
 *         cdef NVList copts = NVList(otherdict=opts)
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("libzfs.ZFS.import_pool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_copts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":495
 *         self.write_history('zpool import', str(pool.guid), newname if newname else pool.name)
 * 
 *     def export_pool(self, ZFSPool pool):             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_14export_pool(PyObject *__pyx_v_self, PyObject *__pyx_v_pool); /*proto*/
static PyObject *__pyx_pw_6libzfs_3ZFS_14export_pool(PyObject *__pyx_v_self, PyObject *__pyx_v_pool) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("export_pool (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pool), __pyx_ptype_6libzfs_ZFSPool, 1, "pool", 0))) __PYX_ERR(1, 495, __pyx_L1_error)
  __pyx_r = __pyx_pf_6libzfs_3ZFS_13export_pool(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self), ((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_pool));

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

static PyObject *__pyx_pf_6libzfs_3ZFS_13export_pool(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_pool) {
  int __pyx_v_ret;
  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;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("export_pool", 0);

  /* "libzfs.pyx":498
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zpool_disable_datasets(pool.handle, True)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":499
 * 
 *         with nogil:
 *             ret = libzfs.zpool_disable_datasets(pool.handle, True)             # <<<<<<<<<<<<<<
 * 
 *         if ret != 0:
 */
        __pyx_v_ret = zpool_disable_datasets(__pyx_v_pool->handle, 1);
      }

      /* "libzfs.pyx":498
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zpool_disable_datasets(pool.handle, True)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":501
 *             ret = libzfs.zpool_disable_datasets(pool.handle, True)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.get_error()
 * 
 */
  __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":502
 * 
 *         if ret != 0:
 *             raise self.get_error()             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->__pyx_vtab)->get_error(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 502, __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(1, 502, __pyx_L1_error)

    /* "libzfs.pyx":501
 *             ret = libzfs.zpool_disable_datasets(pool.handle, True)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.get_error()
 * 
 */
  }

  /* "libzfs.pyx":504
 *             raise self.get_error()
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zpool_export(pool.handle, True, "export")
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":505
 * 
 *         with nogil:
 *             ret = libzfs.zpool_export(pool.handle, True, "export")             # <<<<<<<<<<<<<<
 * 
 *         if ret != 0:
 */
        __pyx_v_ret = zpool_export(__pyx_v_pool->handle, 1, ((char const *)"export"));
      }

      /* "libzfs.pyx":504
 *             raise self.get_error()
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zpool_export(pool.handle, True, "export")
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L9;
        }
        __pyx_L9:;
      }
  }

  /* "libzfs.pyx":507
 *             ret = libzfs.zpool_export(pool.handle, True, "export")
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.get_error()
 * 
 */
  __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":508
 * 
 *         if ret != 0:
 *             raise self.get_error()             # <<<<<<<<<<<<<<
 * 
 *         self.write_history('zpool export', str(pool.name))
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->__pyx_vtab)->get_error(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 508, __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(1, 508, __pyx_L1_error)

    /* "libzfs.pyx":507
 *             ret = libzfs.zpool_export(pool.handle, True, "export")
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.get_error()
 * 
 */
  }

  /* "libzfs.pyx":510
 *             raise self.get_error()
 * 
 *         self.write_history('zpool export', str(pool.name))             # <<<<<<<<<<<<<<
 * 
 *     def get_dataset(self, name):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_history); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pool), __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 510, __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_kp_s_zpool_export);
  __Pyx_GIVEREF(__pyx_kp_s_zpool_export);
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_zpool_export);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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;

  /* "libzfs.pyx":495
 *         self.write_history('zpool import', str(pool.guid), newname if newname else pool.name)
 * 
 *     def export_pool(self, ZFSPool pool):             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("libzfs.ZFS.export_pool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":512
 *         self.write_history('zpool export', str(pool.name))
 * 
 *     def get_dataset(self, name):             # <<<<<<<<<<<<<<
 *         cdef const char *c_name = name
 *         cdef libzfs.zfs_handle_t* handle = NULL
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_16get_dataset(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_pw_6libzfs_3ZFS_16get_dataset(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_dataset (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_3ZFS_15get_dataset(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self), ((PyObject *)__pyx_v_name));

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

static PyObject *__pyx_pf_6libzfs_3ZFS_15get_dataset(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_name) {
  char const *__pyx_v_c_name;
  zfs_handle_t *__pyx_v_handle;
  struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_pool = 0;
  struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_dataset = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char const *__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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  __Pyx_RefNannySetupContext("get_dataset", 0);

  /* "libzfs.pyx":513
 * 
 *     def get_dataset(self, name):
 *         cdef const char *c_name = name             # <<<<<<<<<<<<<<
 *         cdef libzfs.zfs_handle_t* handle = NULL
 *         cdef ZFSPool pool
 */
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(1, 513, __pyx_L1_error)
  __pyx_v_c_name = __pyx_t_1;

  /* "libzfs.pyx":514
 *     def get_dataset(self, name):
 *         cdef const char *c_name = name
 *         cdef libzfs.zfs_handle_t* handle = NULL             # <<<<<<<<<<<<<<
 *         cdef ZFSPool pool
 *         cdef ZFSDataset dataset
 */
  __pyx_v_handle = NULL;

  /* "libzfs.pyx":518
 *         cdef ZFSDataset dataset
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             handle = libzfs.zfs_open(self.handle, c_name, zfs.ZFS_TYPE_FILESYSTEM|zfs.ZFS_TYPE_VOLUME)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":519
 * 
 *         with nogil:
 *             handle = libzfs.zfs_open(self.handle, c_name, zfs.ZFS_TYPE_FILESYSTEM|zfs.ZFS_TYPE_VOLUME)             # <<<<<<<<<<<<<<
 * 
 *         if handle == NULL:
 */
        __pyx_v_handle = zfs_open(__pyx_v_self->handle, __pyx_v_c_name, (ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME));
      }

      /* "libzfs.pyx":518
 *         cdef ZFSDataset dataset
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             handle = libzfs.zfs_open(self.handle, c_name, zfs.ZFS_TYPE_FILESYSTEM|zfs.ZFS_TYPE_VOLUME)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":521
 *             handle = libzfs.zfs_open(self.handle, c_name, zfs.ZFS_TYPE_FILESYSTEM|zfs.ZFS_TYPE_VOLUME)
 * 
 *         if handle == NULL:             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOENT, 'Dataset {0} not found'.format(name))
 * 
 */
  __pyx_t_2 = ((__pyx_v_handle == NULL) != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":522
 * 
 *         if handle == NULL:
 *             raise ZFSException(Error.NOENT, 'Dataset {0} not found'.format(name))             # <<<<<<<<<<<<<<
 * 
 *         pool = ZFSPool.__new__(ZFSPool)
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_NOENT); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Dataset_0_not_found, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && 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);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 522, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 522, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_INCREF(__pyx_v_name);
      __Pyx_GIVEREF(__pyx_v_name);
      PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_name);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 522, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_10 = 1;
      }
    }
    __pyx_t_9 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_t_5);
    __pyx_t_6 = 0;
    __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __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(1, 522, __pyx_L1_error)

    /* "libzfs.pyx":521
 *             handle = libzfs.zfs_open(self.handle, c_name, zfs.ZFS_TYPE_FILESYSTEM|zfs.ZFS_TYPE_VOLUME)
 * 
 *         if handle == NULL:             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOENT, 'Dataset {0} not found'.format(name))
 * 
 */
  }

  /* "libzfs.pyx":524
 *             raise ZFSException(Error.NOENT, 'Dataset {0} not found'.format(name))
 * 
 *         pool = ZFSPool.__new__(ZFSPool)             # <<<<<<<<<<<<<<
 *         pool.root = self
 *         pool.free = False
 */
  __pyx_t_3 = __pyx_tp_new_6libzfs_ZFSPool(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSPool), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6libzfs_ZFSPool)))) __PYX_ERR(1, 524, __pyx_L1_error)
  __pyx_v_pool = ((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "libzfs.pyx":525
 * 
 *         pool = ZFSPool.__new__(ZFSPool)
 *         pool.root = self             # <<<<<<<<<<<<<<
 *         pool.free = False
 *         pool.handle = libzfs.zfs_get_pool_handle(handle)
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_pool->root);
  __Pyx_DECREF(((PyObject *)__pyx_v_pool->root));
  __pyx_v_pool->root = __pyx_v_self;

  /* "libzfs.pyx":526
 *         pool = ZFSPool.__new__(ZFSPool)
 *         pool.root = self
 *         pool.free = False             # <<<<<<<<<<<<<<
 *         pool.handle = libzfs.zfs_get_pool_handle(handle)
 *         dataset = ZFSDataset.__new__(ZFSDataset)
 */
  __pyx_v_pool->free = 0;

  /* "libzfs.pyx":527
 *         pool.root = self
 *         pool.free = False
 *         pool.handle = libzfs.zfs_get_pool_handle(handle)             # <<<<<<<<<<<<<<
 *         dataset = ZFSDataset.__new__(ZFSDataset)
 *         dataset.root = self
 */
  __pyx_v_pool->handle = zfs_get_pool_handle(__pyx_v_handle);

  /* "libzfs.pyx":528
 *         pool.free = False
 *         pool.handle = libzfs.zfs_get_pool_handle(handle)
 *         dataset = ZFSDataset.__new__(ZFSDataset)             # <<<<<<<<<<<<<<
 *         dataset.root = self
 *         dataset.pool = pool
 */
  __pyx_t_3 = __pyx_tp_new_6libzfs_ZFSDataset(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSDataset), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6libzfs_ZFSDataset)))) __PYX_ERR(1, 528, __pyx_L1_error)
  __pyx_v_dataset = ((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "libzfs.pyx":529
 *         pool.handle = libzfs.zfs_get_pool_handle(handle)
 *         dataset = ZFSDataset.__new__(ZFSDataset)
 *         dataset.root = self             # <<<<<<<<<<<<<<
 *         dataset.pool = pool
 *         dataset.handle = handle
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_dataset->__pyx_base.root);
  __Pyx_DECREF(((PyObject *)__pyx_v_dataset->__pyx_base.root));
  __pyx_v_dataset->__pyx_base.root = __pyx_v_self;

  /* "libzfs.pyx":530
 *         dataset = ZFSDataset.__new__(ZFSDataset)
 *         dataset.root = self
 *         dataset.pool = pool             # <<<<<<<<<<<<<<
 *         dataset.handle = handle
 *         return dataset
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_pool));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pool));
  __Pyx_GOTREF(__pyx_v_dataset->__pyx_base.pool);
  __Pyx_DECREF(((PyObject *)__pyx_v_dataset->__pyx_base.pool));
  __pyx_v_dataset->__pyx_base.pool = __pyx_v_pool;

  /* "libzfs.pyx":531
 *         dataset.root = self
 *         dataset.pool = pool
 *         dataset.handle = handle             # <<<<<<<<<<<<<<
 *         return dataset
 * 
 */
  __pyx_v_dataset->__pyx_base.handle = __pyx_v_handle;

  /* "libzfs.pyx":532
 *         dataset.pool = pool
 *         dataset.handle = handle
 *         return dataset             # <<<<<<<<<<<<<<
 * 
 *     def get_snapshot(self, name):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_dataset));
  __pyx_r = ((PyObject *)__pyx_v_dataset);
  goto __pyx_L0;

  /* "libzfs.pyx":512
 *         self.write_history('zpool export', str(pool.name))
 * 
 *     def get_dataset(self, name):             # <<<<<<<<<<<<<<
 *         cdef const char *c_name = name
 *         cdef libzfs.zfs_handle_t* handle = NULL
 */

  /* function exit code */
  __pyx_L1_error:;
  __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);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("libzfs.ZFS.get_dataset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pool);
  __Pyx_XDECREF((PyObject *)__pyx_v_dataset);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":534
 *         return dataset
 * 
 *     def get_snapshot(self, name):             # <<<<<<<<<<<<<<
 *         cdef libzfs.zfs_handle_t* handle = NULL
 *         cdef ZFSPool pool
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_18get_snapshot(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_pw_6libzfs_3ZFS_18get_snapshot(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_snapshot (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_3ZFS_17get_snapshot(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self), ((PyObject *)__pyx_v_name));

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

static PyObject *__pyx_pf_6libzfs_3ZFS_17get_snapshot(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_name) {
  zfs_handle_t *__pyx_v_handle;
  struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_pool = 0;
  struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_snap = 0;
  char const *__pyx_v_c_name;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char const *__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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  __Pyx_RefNannySetupContext("get_snapshot", 0);

  /* "libzfs.pyx":535
 * 
 *     def get_snapshot(self, name):
 *         cdef libzfs.zfs_handle_t* handle = NULL             # <<<<<<<<<<<<<<
 *         cdef ZFSPool pool
 *         cdef ZFSSnapshot snap
 */
  __pyx_v_handle = NULL;

  /* "libzfs.pyx":538
 *         cdef ZFSPool pool
 *         cdef ZFSSnapshot snap
 *         cdef const char *c_name = name             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(1, 538, __pyx_L1_error)
  __pyx_v_c_name = __pyx_t_1;

  /* "libzfs.pyx":540
 *         cdef const char *c_name = name
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             handle = libzfs.zfs_open(self.handle, c_name, zfs.ZFS_TYPE_SNAPSHOT)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":541
 * 
 *         with nogil:
 *             handle = libzfs.zfs_open(self.handle, c_name, zfs.ZFS_TYPE_SNAPSHOT)             # <<<<<<<<<<<<<<
 * 
 *         if handle == NULL:
 */
        __pyx_v_handle = zfs_open(__pyx_v_self->handle, __pyx_v_c_name, ZFS_TYPE_SNAPSHOT);
      }

      /* "libzfs.pyx":540
 *         cdef const char *c_name = name
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             handle = libzfs.zfs_open(self.handle, c_name, zfs.ZFS_TYPE_SNAPSHOT)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":543
 *             handle = libzfs.zfs_open(self.handle, c_name, zfs.ZFS_TYPE_SNAPSHOT)
 * 
 *         if handle == NULL:             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOENT, 'Snapshot {0} not found'.format(name))
 * 
 */
  __pyx_t_2 = ((__pyx_v_handle == NULL) != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":544
 * 
 *         if handle == NULL:
 *             raise ZFSException(Error.NOENT, 'Snapshot {0} not found'.format(name))             # <<<<<<<<<<<<<<
 * 
 *         pool = ZFSPool.__new__(ZFSPool)
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_NOENT); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Snapshot_0_not_found, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && 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);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 544, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 544, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_INCREF(__pyx_v_name);
      __Pyx_GIVEREF(__pyx_v_name);
      PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_name);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 544, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_10 = 1;
      }
    }
    __pyx_t_9 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_t_5);
    __pyx_t_6 = 0;
    __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __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(1, 544, __pyx_L1_error)

    /* "libzfs.pyx":543
 *             handle = libzfs.zfs_open(self.handle, c_name, zfs.ZFS_TYPE_SNAPSHOT)
 * 
 *         if handle == NULL:             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOENT, 'Snapshot {0} not found'.format(name))
 * 
 */
  }

  /* "libzfs.pyx":546
 *             raise ZFSException(Error.NOENT, 'Snapshot {0} not found'.format(name))
 * 
 *         pool = ZFSPool.__new__(ZFSPool)             # <<<<<<<<<<<<<<
 *         pool.root = self
 *         pool.free = False
 */
  __pyx_t_3 = __pyx_tp_new_6libzfs_ZFSPool(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSPool), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6libzfs_ZFSPool)))) __PYX_ERR(1, 546, __pyx_L1_error)
  __pyx_v_pool = ((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "libzfs.pyx":547
 * 
 *         pool = ZFSPool.__new__(ZFSPool)
 *         pool.root = self             # <<<<<<<<<<<<<<
 *         pool.free = False
 *         pool.handle = libzfs.zfs_get_pool_handle(handle)
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_pool->root);
  __Pyx_DECREF(((PyObject *)__pyx_v_pool->root));
  __pyx_v_pool->root = __pyx_v_self;

  /* "libzfs.pyx":548
 *         pool = ZFSPool.__new__(ZFSPool)
 *         pool.root = self
 *         pool.free = False             # <<<<<<<<<<<<<<
 *         pool.handle = libzfs.zfs_get_pool_handle(handle)
 *         snap = ZFSSnapshot.__new__(ZFSSnapshot)
 */
  __pyx_v_pool->free = 0;

  /* "libzfs.pyx":549
 *         pool.root = self
 *         pool.free = False
 *         pool.handle = libzfs.zfs_get_pool_handle(handle)             # <<<<<<<<<<<<<<
 *         snap = ZFSSnapshot.__new__(ZFSSnapshot)
 *         snap.root = self
 */
  __pyx_v_pool->handle = zfs_get_pool_handle(__pyx_v_handle);

  /* "libzfs.pyx":550
 *         pool.free = False
 *         pool.handle = libzfs.zfs_get_pool_handle(handle)
 *         snap = ZFSSnapshot.__new__(ZFSSnapshot)             # <<<<<<<<<<<<<<
 *         snap.root = self
 *         snap.pool = pool
 */
  __pyx_t_3 = __pyx_tp_new_6libzfs_ZFSSnapshot(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSSnapshot), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6libzfs_ZFSSnapshot)))) __PYX_ERR(1, 550, __pyx_L1_error)
  __pyx_v_snap = ((struct __pyx_obj_6libzfs_ZFSSnapshot *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "libzfs.pyx":551
 *         pool.handle = libzfs.zfs_get_pool_handle(handle)
 *         snap = ZFSSnapshot.__new__(ZFSSnapshot)
 *         snap.root = self             # <<<<<<<<<<<<<<
 *         snap.pool = pool
 *         snap.handle = handle
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_snap->__pyx_base.root);
  __Pyx_DECREF(((PyObject *)__pyx_v_snap->__pyx_base.root));
  __pyx_v_snap->__pyx_base.root = __pyx_v_self;

  /* "libzfs.pyx":552
 *         snap = ZFSSnapshot.__new__(ZFSSnapshot)
 *         snap.root = self
 *         snap.pool = pool             # <<<<<<<<<<<<<<
 *         snap.handle = handle
 *         return snap
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_pool));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pool));
  __Pyx_GOTREF(__pyx_v_snap->__pyx_base.pool);
  __Pyx_DECREF(((PyObject *)__pyx_v_snap->__pyx_base.pool));
  __pyx_v_snap->__pyx_base.pool = __pyx_v_pool;

  /* "libzfs.pyx":553
 *         snap.root = self
 *         snap.pool = pool
 *         snap.handle = handle             # <<<<<<<<<<<<<<
 *         return snap
 * 
 */
  __pyx_v_snap->__pyx_base.handle = __pyx_v_handle;

  /* "libzfs.pyx":554
 *         snap.pool = pool
 *         snap.handle = handle
 *         return snap             # <<<<<<<<<<<<<<
 * 
 *     def get_object(self, name):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_snap));
  __pyx_r = ((PyObject *)__pyx_v_snap);
  goto __pyx_L0;

  /* "libzfs.pyx":534
 *         return dataset
 * 
 *     def get_snapshot(self, name):             # <<<<<<<<<<<<<<
 *         cdef libzfs.zfs_handle_t* handle = NULL
 *         cdef ZFSPool pool
 */

  /* function exit code */
  __pyx_L1_error:;
  __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);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("libzfs.ZFS.get_snapshot", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pool);
  __Pyx_XDECREF((PyObject *)__pyx_v_snap);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":556
 *         return snap
 * 
 *     def get_object(self, name):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.get_dataset(name)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_20get_object(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_pw_6libzfs_3ZFS_20get_object(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_object (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_3ZFS_19get_object(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self), ((PyObject *)__pyx_v_name));

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

static PyObject *__pyx_pf_6libzfs_3ZFS_19get_object(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_v_err = 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;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  __Pyx_RefNannySetupContext("get_object", 0);

  /* "libzfs.pyx":557
 * 
 *     def get_object(self, name):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.get_dataset(name)
 *         except ZFSException as err:
 */
  {
    __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:*/ {

      /* "libzfs.pyx":558
 *     def get_object(self, name):
 *         try:
 *             return self.get_dataset(name)             # <<<<<<<<<<<<<<
 *         except ZFSException as err:
 *             if err.code == Error.NOENT:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_dataset); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 558, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      if (!__pyx_t_6) {
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 558, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
      } else {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 558, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_name);
        __Pyx_GIVEREF(__pyx_v_name);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_name);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 558, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "libzfs.pyx":557
 * 
 *     def get_object(self, name):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.get_dataset(name)
 *         except ZFSException as err:
 */
    }
    __pyx_L3_error:;
    __Pyx_PyThreadState_assign
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "libzfs.pyx":559
 *         try:
 *             return self.get_dataset(name)
 *         except ZFSException as err:             # <<<<<<<<<<<<<<
 *             if err.code == Error.NOENT:
 *                 return self.get_snapshot(name)
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 559, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_8) {
      __Pyx_AddTraceback("libzfs.ZFS.get_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_7) < 0) __PYX_ERR(1, 559, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_err = __pyx_t_5;

      /* "libzfs.pyx":560
 *             return self.get_dataset(name)
 *         except ZFSException as err:
 *             if err.code == Error.NOENT:             # <<<<<<<<<<<<<<
 *                 return self.get_snapshot(name)
 * 
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_err, __pyx_n_s_code); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 560, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 560, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_NOENT); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 560, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_6, __pyx_t_10, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 560, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(1, 560, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (__pyx_t_11) {

        /* "libzfs.pyx":561
 *         except ZFSException as err:
 *             if err.code == Error.NOENT:
 *                 return self.get_snapshot(name)             # <<<<<<<<<<<<<<
 * 
 *             raise err
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_snapshot); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 561, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_6 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
          }
        }
        if (!__pyx_t_6) {
          __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 561, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_9);
        } else {
          __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 561, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_6); __pyx_t_6 = NULL;
          __Pyx_INCREF(__pyx_v_name);
          __Pyx_GIVEREF(__pyx_v_name);
          PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_name);
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_12, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 561, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_r = __pyx_t_9;
        __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L6_except_return;

        /* "libzfs.pyx":560
 *             return self.get_dataset(name)
 *         except ZFSException as err:
 *             if err.code == Error.NOENT:             # <<<<<<<<<<<<<<
 *                 return self.get_snapshot(name)
 * 
 */
      }

      /* "libzfs.pyx":563
 *                 return self.get_snapshot(name)
 * 
 *             raise err             # <<<<<<<<<<<<<<
 * 
 *     def get_dataset_by_path(self, path):
 */
      __Pyx_Raise(__pyx_v_err, 0, 0, 0);
      __PYX_ERR(1, 563, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "libzfs.pyx":557
 * 
 *     def get_object(self, name):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.get_dataset(name)
 *         except ZFSException as err:
 */
    __Pyx_PyThreadState_assign
    __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_PyThreadState_assign
    __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_PyThreadState_assign
    __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;
  }

  /* "libzfs.pyx":556
 *         return snap
 * 
 *     def get_object(self, name):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.get_dataset(name)
 */

  /* 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_12);
  __Pyx_AddTraceback("libzfs.ZFS.get_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":565
 *             raise err
 * 
 *     def get_dataset_by_path(self, path):             # <<<<<<<<<<<<<<
 *         cdef libzfs.zfs_handle_t* handle = libzfs.zfs_path_to_zhandle(self.handle, path, zfs.ZFS_TYPE_DATASET)
 *         cdef ZFSPool pool
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_22get_dataset_by_path(PyObject *__pyx_v_self, PyObject *__pyx_v_path); /*proto*/
static PyObject *__pyx_pw_6libzfs_3ZFS_22get_dataset_by_path(PyObject *__pyx_v_self, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_dataset_by_path (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_3ZFS_21get_dataset_by_path(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self), ((PyObject *)__pyx_v_path));

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

static PyObject *__pyx_pf_6libzfs_3ZFS_21get_dataset_by_path(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_path) {
  zfs_handle_t *__pyx_v_handle;
  struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_pool = 0;
  struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_dataset = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  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;
  Py_ssize_t __pyx_t_10;
  __Pyx_RefNannySetupContext("get_dataset_by_path", 0);

  /* "libzfs.pyx":566
 * 
 *     def get_dataset_by_path(self, path):
 *         cdef libzfs.zfs_handle_t* handle = libzfs.zfs_path_to_zhandle(self.handle, path, zfs.ZFS_TYPE_DATASET)             # <<<<<<<<<<<<<<
 *         cdef ZFSPool pool
 *         cdef ZFSDataset dataset
 */
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_path); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(1, 566, __pyx_L1_error)
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_zfs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ZFS_TYPE_DATASET); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_handle = zfs_path_to_zhandle(__pyx_v_self->handle, __pyx_t_1, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "libzfs.pyx":569
 *         cdef ZFSPool pool
 *         cdef ZFSDataset dataset
 *         if handle == NULL:             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOENT, 'Dataset with path {0} not found'.format(path))
 * 
 */
  __pyx_t_4 = ((__pyx_v_handle == NULL) != 0);
  if (__pyx_t_4) {

    /* "libzfs.pyx":570
 *         cdef ZFSDataset dataset
 *         if handle == NULL:
 *             raise ZFSException(Error.NOENT, 'Dataset with path {0} not found'.format(path))             # <<<<<<<<<<<<<<
 * 
 *         pool = ZFSPool.__new__(ZFSPool)
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_NOENT); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Dataset_with_path_0_not_found, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && 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);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_INCREF(__pyx_v_path);
      __Pyx_GIVEREF(__pyx_v_path);
      PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_path);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_10 = 1;
      }
    }
    __pyx_t_9 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_t_5);
    __pyx_t_6 = 0;
    __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __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, 570, __pyx_L1_error)

    /* "libzfs.pyx":569
 *         cdef ZFSPool pool
 *         cdef ZFSDataset dataset
 *         if handle == NULL:             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOENT, 'Dataset with path {0} not found'.format(path))
 * 
 */
  }

  /* "libzfs.pyx":572
 *             raise ZFSException(Error.NOENT, 'Dataset with path {0} not found'.format(path))
 * 
 *         pool = ZFSPool.__new__(ZFSPool)             # <<<<<<<<<<<<<<
 *         pool.root = self
 *         pool.free = False
 */
  __pyx_t_3 = __pyx_tp_new_6libzfs_ZFSPool(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSPool), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6libzfs_ZFSPool)))) __PYX_ERR(1, 572, __pyx_L1_error)
  __pyx_v_pool = ((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "libzfs.pyx":573
 * 
 *         pool = ZFSPool.__new__(ZFSPool)
 *         pool.root = self             # <<<<<<<<<<<<<<
 *         pool.free = False
 *         pool.handle = libzfs.zfs_get_pool_handle(handle)
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_pool->root);
  __Pyx_DECREF(((PyObject *)__pyx_v_pool->root));
  __pyx_v_pool->root = __pyx_v_self;

  /* "libzfs.pyx":574
 *         pool = ZFSPool.__new__(ZFSPool)
 *         pool.root = self
 *         pool.free = False             # <<<<<<<<<<<<<<
 *         pool.handle = libzfs.zfs_get_pool_handle(handle)
 *         dataset = ZFSDataset.__new__(ZFSDataset)
 */
  __pyx_v_pool->free = 0;

  /* "libzfs.pyx":575
 *         pool.root = self
 *         pool.free = False
 *         pool.handle = libzfs.zfs_get_pool_handle(handle)             # <<<<<<<<<<<<<<
 *         dataset = ZFSDataset.__new__(ZFSDataset)
 *         dataset.root = self
 */
  __pyx_v_pool->handle = zfs_get_pool_handle(__pyx_v_handle);

  /* "libzfs.pyx":576
 *         pool.free = False
 *         pool.handle = libzfs.zfs_get_pool_handle(handle)
 *         dataset = ZFSDataset.__new__(ZFSDataset)             # <<<<<<<<<<<<<<
 *         dataset.root = self
 *         dataset.pool = pool
 */
  __pyx_t_3 = __pyx_tp_new_6libzfs_ZFSDataset(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSDataset), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6libzfs_ZFSDataset)))) __PYX_ERR(1, 576, __pyx_L1_error)
  __pyx_v_dataset = ((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "libzfs.pyx":577
 *         pool.handle = libzfs.zfs_get_pool_handle(handle)
 *         dataset = ZFSDataset.__new__(ZFSDataset)
 *         dataset.root = self             # <<<<<<<<<<<<<<
 *         dataset.pool = pool
 *         dataset.handle = handle
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_dataset->__pyx_base.root);
  __Pyx_DECREF(((PyObject *)__pyx_v_dataset->__pyx_base.root));
  __pyx_v_dataset->__pyx_base.root = __pyx_v_self;

  /* "libzfs.pyx":578
 *         dataset = ZFSDataset.__new__(ZFSDataset)
 *         dataset.root = self
 *         dataset.pool = pool             # <<<<<<<<<<<<<<
 *         dataset.handle = handle
 *         return dataset
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_pool));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pool));
  __Pyx_GOTREF(__pyx_v_dataset->__pyx_base.pool);
  __Pyx_DECREF(((PyObject *)__pyx_v_dataset->__pyx_base.pool));
  __pyx_v_dataset->__pyx_base.pool = __pyx_v_pool;

  /* "libzfs.pyx":579
 *         dataset.root = self
 *         dataset.pool = pool
 *         dataset.handle = handle             # <<<<<<<<<<<<<<
 *         return dataset
 * 
 */
  __pyx_v_dataset->__pyx_base.handle = __pyx_v_handle;

  /* "libzfs.pyx":580
 *         dataset.pool = pool
 *         dataset.handle = handle
 *         return dataset             # <<<<<<<<<<<<<<
 * 
 *     def create(self, name, topology, opts, fsopts):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_dataset));
  __pyx_r = ((PyObject *)__pyx_v_dataset);
  goto __pyx_L0;

  /* "libzfs.pyx":565
 *             raise err
 * 
 *     def get_dataset_by_path(self, path):             # <<<<<<<<<<<<<<
 *         cdef libzfs.zfs_handle_t* handle = libzfs.zfs_path_to_zhandle(self.handle, path, zfs.ZFS_TYPE_DATASET)
 *         cdef ZFSPool pool
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __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("libzfs.ZFS.get_dataset_by_path", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pool);
  __Pyx_XDECREF((PyObject *)__pyx_v_dataset);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":582
 *         return dataset
 * 
 *     def create(self, name, topology, opts, fsopts):             # <<<<<<<<<<<<<<
 *         cdef NVList root = self.make_vdev_tree(topology).nvlist
 *         cdef NVList copts = NVList(otherdict=opts)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_24create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_3ZFS_24create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_topology = 0;
  PyObject *__pyx_v_opts = 0;
  PyObject *__pyx_v_fsopts = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_2,&__pyx_n_s_topology,&__pyx_n_s_opts,&__pyx_n_s_fsopts,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);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_topology)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create", 1, 4, 4, 1); __PYX_ERR(1, 582, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_opts)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create", 1, 4, 4, 2); __PYX_ERR(1, 582, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fsopts)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create", 1, 4, 4, 3); __PYX_ERR(1, 582, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(1, 582, __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_topology = values[1];
    __pyx_v_opts = values[2];
    __pyx_v_fsopts = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 582, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFS.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_3ZFS_23create(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self), __pyx_v_name, __pyx_v_topology, __pyx_v_opts, __pyx_v_fsopts);

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

static PyObject *__pyx_pf_6libzfs_3ZFS_23create(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_topology, PyObject *__pyx_v_opts, PyObject *__pyx_v_fsopts) {
  struct __pyx_obj_6libzfs_NVList *__pyx_v_root = 0;
  struct __pyx_obj_6libzfs_NVList *__pyx_v_copts = 0;
  struct __pyx_obj_6libzfs_NVList *__pyx_v_cfsopts = 0;
  char const *__pyx_v_c_name;
  int __pyx_v_ret;
  PyObject *__pyx_v_hopts = NULL;
  PyObject *__pyx_v_hfsopts = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char const *__pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("create", 0);

  /* "libzfs.pyx":583
 * 
 *     def create(self, name, topology, opts, fsopts):
 *         cdef NVList root = self.make_vdev_tree(topology).nvlist             # <<<<<<<<<<<<<<
 *         cdef NVList copts = NVList(otherdict=opts)
 *         cdef NVList cfsopts = NVList(otherdict=fsopts)
 */
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->__pyx_vtab)->make_vdev_tree(__pyx_v_self, __pyx_v_topology)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((PyObject *)((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_t_1)->nvlist);
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_root = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "libzfs.pyx":584
 *     def create(self, name, topology, opts, fsopts):
 *         cdef NVList root = self.make_vdev_tree(topology).nvlist
 *         cdef NVList copts = NVList(otherdict=opts)             # <<<<<<<<<<<<<<
 *         cdef NVList cfsopts = NVList(otherdict=fsopts)
 *         cdef const char *c_name = name
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_otherdict, __pyx_v_opts) < 0) __PYX_ERR(1, 584, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_NVList), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_copts = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":585
 *         cdef NVList root = self.make_vdev_tree(topology).nvlist
 *         cdef NVList copts = NVList(otherdict=opts)
 *         cdef NVList cfsopts = NVList(otherdict=fsopts)             # <<<<<<<<<<<<<<
 *         cdef const char *c_name = name
 *         cdef int ret
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_otherdict, __pyx_v_fsopts) < 0) __PYX_ERR(1, 585, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_NVList), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cfsopts = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "libzfs.pyx":586
 *         cdef NVList copts = NVList(otherdict=opts)
 *         cdef NVList cfsopts = NVList(otherdict=fsopts)
 *         cdef const char *c_name = name             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 586, __pyx_L1_error)
  __pyx_v_c_name = __pyx_t_3;

  /* "libzfs.pyx":589
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zpool_create(
 *                 self.handle,
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":590
 * 
 *         with nogil:
 *             ret = libzfs.zpool_create(             # <<<<<<<<<<<<<<
 *                 self.handle,
 *                 c_name,
 */
        __pyx_v_ret = zpool_create(__pyx_v_self->handle, __pyx_v_c_name, __pyx_v_root->handle, __pyx_v_copts->handle, __pyx_v_cfsopts->handle);
      }

      /* "libzfs.pyx":589
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zpool_create(
 *                 self.handle,
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":598
 *             )
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise ZFSException(self.errno, self.errstr)
 * 
 */
  __pyx_t_4 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_4) {

    /* "libzfs.pyx":599
 * 
 *         if ret != 0:
 *             raise ZFSException(self.errno, self.errstr)             # <<<<<<<<<<<<<<
 * 
 *         if self.history:
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_errno); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_errstr); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && 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_8 = 1;
      }
    }
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __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(1, 599, __pyx_L1_error)

    /* "libzfs.pyx":598
 *             )
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise ZFSException(self.errno, self.errstr)
 * 
 */
  }

  /* "libzfs.pyx":601
 *             raise ZFSException(self.errno, self.errstr)
 * 
 *         if self.history:             # <<<<<<<<<<<<<<
 *             hopts = self.generate_history_opts(opts, '-o')
 *             hfsopts = self.generate_history_opts(fsopts, '-O')
 */
  __pyx_t_4 = (__pyx_v_self->history != 0);
  if (__pyx_t_4) {

    /* "libzfs.pyx":602
 * 
 *         if self.history:
 *             hopts = self.generate_history_opts(opts, '-o')             # <<<<<<<<<<<<<<
 *             hfsopts = self.generate_history_opts(fsopts, '-O')
 *             self.write_history(
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_generate_history_opts); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_8 = 1;
      }
    }
    __pyx_t_6 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_9) {
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); __pyx_t_9 = NULL;
    }
    __Pyx_INCREF(__pyx_v_opts);
    __Pyx_GIVEREF(__pyx_v_opts);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_v_opts);
    __Pyx_INCREF(__pyx_kp_s_o);
    __Pyx_GIVEREF(__pyx_kp_s_o);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_kp_s_o);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_hopts = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "libzfs.pyx":603
 *         if self.history:
 *             hopts = self.generate_history_opts(opts, '-o')
 *             hfsopts = self.generate_history_opts(fsopts, '-O')             # <<<<<<<<<<<<<<
 *             self.write_history(
 *                 'zpool create',
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_generate_history_opts); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_8 = 1;
      }
    }
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_v_fsopts);
    __Pyx_GIVEREF(__pyx_v_fsopts);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_fsopts);
    __Pyx_INCREF(__pyx_kp_s_O);
    __Pyx_GIVEREF(__pyx_kp_s_O);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_kp_s_O);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_hfsopts = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "libzfs.pyx":604
 *             hopts = self.generate_history_opts(opts, '-o')
 *             hfsopts = self.generate_history_opts(fsopts, '-O')
 *             self.write_history(             # <<<<<<<<<<<<<<
 *                 'zpool create',
 *                 hopts,
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_history); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 604, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "libzfs.pyx":609
 *                 hfsopts,
 *                 name,
 *                 self.history_vdevs_list(topology)             # <<<<<<<<<<<<<<
 *             )
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_history_vdevs_list); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && 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);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_topology); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
    } else {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_v_topology);
      __Pyx_GIVEREF(__pyx_v_topology);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_topology);
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_8 = 1;
      }
    }
    __pyx_t_7 = PyTuple_New(5+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 604, __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_INCREF(__pyx_kp_s_zpool_create);
    __Pyx_GIVEREF(__pyx_kp_s_zpool_create);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_kp_s_zpool_create);
    __Pyx_INCREF(__pyx_v_hopts);
    __Pyx_GIVEREF(__pyx_v_hopts);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_hopts);
    __Pyx_INCREF(__pyx_v_hfsopts);
    __Pyx_GIVEREF(__pyx_v_hfsopts);
    PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_8, __pyx_v_hfsopts);
    __Pyx_INCREF(__pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_8, __pyx_v_name);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_7, 4+__pyx_t_8, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 604, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "libzfs.pyx":601
 *             raise ZFSException(self.errno, self.errstr)
 * 
 *         if self.history:             # <<<<<<<<<<<<<<
 *             hopts = self.generate_history_opts(opts, '-o')
 *             hfsopts = self.generate_history_opts(fsopts, '-O')
 */
  }

  /* "libzfs.pyx":612
 *             )
 * 
 *         return self.get(name)             # <<<<<<<<<<<<<<
 * 
 *     def destroy(self, name):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(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);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    __Pyx_INCREF(__pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_name);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":582
 *         return dataset
 * 
 *     def create(self, name, topology, opts, fsopts):             # <<<<<<<<<<<<<<
 *         cdef NVList root = self.make_vdev_tree(topology).nvlist
 *         cdef NVList copts = NVList(otherdict=opts)
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("libzfs.ZFS.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_root);
  __Pyx_XDECREF((PyObject *)__pyx_v_copts);
  __Pyx_XDECREF((PyObject *)__pyx_v_cfsopts);
  __Pyx_XDECREF(__pyx_v_hopts);
  __Pyx_XDECREF(__pyx_v_hfsopts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":614
 *         return self.get(name)
 * 
 *     def destroy(self, name):             # <<<<<<<<<<<<<<
 *         cdef libzfs.zpool_handle_t* handle
 *         cdef const char *c_name = name
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_26destroy(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_pw_6libzfs_3ZFS_26destroy(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_3ZFS_25destroy(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self), ((PyObject *)__pyx_v_name));

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

static PyObject *__pyx_pf_6libzfs_3ZFS_25destroy(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_name) {
  zpool_handle_t *__pyx_v_handle;
  char const *__pyx_v_c_name;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char const *__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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  __Pyx_RefNannySetupContext("destroy", 0);

  /* "libzfs.pyx":616
 *     def destroy(self, name):
 *         cdef libzfs.zpool_handle_t* handle
 *         cdef const char *c_name = name             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(1, 616, __pyx_L1_error)
  __pyx_v_c_name = __pyx_t_1;

  /* "libzfs.pyx":618
 *         cdef const char *c_name = name
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             handle = libzfs.zpool_open(self.handle, c_name)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":619
 * 
 *         with nogil:
 *             handle = libzfs.zpool_open(self.handle, c_name)             # <<<<<<<<<<<<<<
 * 
 *         if handle == NULL:
 */
        __pyx_v_handle = zpool_open(__pyx_v_self->handle, __pyx_v_c_name);
      }

      /* "libzfs.pyx":618
 *         cdef const char *c_name = name
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             handle = libzfs.zpool_open(self.handle, c_name)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":621
 *             handle = libzfs.zpool_open(self.handle, c_name)
 * 
 *         if handle == NULL:             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOENT, 'Pool {0} not found'.format(name))
 * 
 */
  __pyx_t_2 = ((__pyx_v_handle == NULL) != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":622
 * 
 *         if handle == NULL:
 *             raise ZFSException(Error.NOENT, 'Pool {0} not found'.format(name))             # <<<<<<<<<<<<<<
 * 
 *         if libzfs.zpool_destroy(handle, "destroy") != 0:
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_NOENT); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Pool_0_not_found, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && 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);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 622, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 622, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_INCREF(__pyx_v_name);
      __Pyx_GIVEREF(__pyx_v_name);
      PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_name);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 622, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_10 = 1;
      }
    }
    __pyx_t_9 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_t_5);
    __pyx_t_6 = 0;
    __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __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(1, 622, __pyx_L1_error)

    /* "libzfs.pyx":621
 *             handle = libzfs.zpool_open(self.handle, c_name)
 * 
 *         if handle == NULL:             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOENT, 'Pool {0} not found'.format(name))
 * 
 */
  }

  /* "libzfs.pyx":624
 *             raise ZFSException(Error.NOENT, 'Pool {0} not found'.format(name))
 * 
 *         if libzfs.zpool_destroy(handle, "destroy") != 0:             # <<<<<<<<<<<<<<
 *             raise ZFSException(self.errno, self.errstr)
 * 
 */
  __pyx_t_2 = ((zpool_destroy(__pyx_v_handle, ((char const *)"destroy")) != 0) != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":625
 * 
 *         if libzfs.zpool_destroy(handle, "destroy") != 0:
 *             raise ZFSException(self.errno, self.errstr)             # <<<<<<<<<<<<<<
 * 
 *     def receive(self, name, fd, force=False, nomount=False, resumable=False, props=None, limitds=None):
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_errno); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_errstr); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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_10 = 1;
      }
    }
    __pyx_t_7 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 625, __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_9);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_10, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_10, __pyx_t_5);
    __pyx_t_9 = 0;
    __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __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(1, 625, __pyx_L1_error)

    /* "libzfs.pyx":624
 *             raise ZFSException(Error.NOENT, 'Pool {0} not found'.format(name))
 * 
 *         if libzfs.zpool_destroy(handle, "destroy") != 0:             # <<<<<<<<<<<<<<
 *             raise ZFSException(self.errno, self.errstr)
 * 
 */
  }

  /* "libzfs.pyx":614
 *         return self.get(name)
 * 
 *     def destroy(self, name):             # <<<<<<<<<<<<<<
 *         cdef libzfs.zpool_handle_t* handle
 *         cdef const char *c_name = name
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("libzfs.ZFS.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":627
 *             raise ZFSException(self.errno, self.errstr)
 * 
 *     def receive(self, name, fd, force=False, nomount=False, resumable=False, props=None, limitds=None):             # <<<<<<<<<<<<<<
 *         cdef libzfs.libzfs_handle_t *handle = self.handle,
 *         cdef libzfs.recvflags_t flags;
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_28receive(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_3ZFS_28receive(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_fd = 0;
  PyObject *__pyx_v_force = 0;
  PyObject *__pyx_v_nomount = 0;
  PyObject *__pyx_v_resumable = 0;
  PyObject *__pyx_v_props = 0;
  PyObject *__pyx_v_limitds = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("receive (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_2,&__pyx_n_s_fd,&__pyx_n_s_force,&__pyx_n_s_nomount,&__pyx_n_s_resumable,&__pyx_n_s_props,&__pyx_n_s_limitds,0};
    PyObject* values[7] = {0,0,0,0,0,0,0};
    values[2] = ((PyObject *)Py_False);
    values[3] = ((PyObject *)Py_False);
    values[4] = ((PyObject *)Py_False);
    values[5] = ((PyObject *)Py_None);
    values[6] = ((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  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fd)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("receive", 0, 2, 7, 1); __PYX_ERR(1, 627, __pyx_L3_error)
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_force);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nomount);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_resumable);
          if (value) { values[4] = value; kw_args--; }
        }
        case  5:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_props);
          if (value) { values[5] = value; kw_args--; }
        }
        case  6:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limitds);
          if (value) { values[6] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "receive") < 0)) __PYX_ERR(1, 627, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_name = values[0];
    __pyx_v_fd = values[1];
    __pyx_v_force = values[2];
    __pyx_v_nomount = values[3];
    __pyx_v_resumable = values[4];
    __pyx_v_props = values[5];
    __pyx_v_limitds = values[6];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("receive", 0, 2, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 627, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFS.receive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_3ZFS_27receive(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self), __pyx_v_name, __pyx_v_fd, __pyx_v_force, __pyx_v_nomount, __pyx_v_resumable, __pyx_v_props, __pyx_v_limitds);

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

static PyObject *__pyx_pf_6libzfs_3ZFS_27receive(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_fd, PyObject *__pyx_v_force, PyObject *__pyx_v_nomount, PyObject *__pyx_v_resumable, PyObject *__pyx_v_props, PyObject *__pyx_v_limitds) {
  libzfs_handle_t *__pyx_v_handle;
  recvflags_t __pyx_v_flags;
  struct __pyx_obj_6libzfs_NVList *__pyx_v_props_nvl = 0;
  struct __pyx_obj_6libzfs_NVList *__pyx_v_limitds_nvl = 0;
  nvlist_t *__pyx_v_c_props_nvl;
  nvlist_t *__pyx_v_c_limitds_nvl;
  char const *__pyx_v_c_name;
  int __pyx_v_c_fd;
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  libzfs_handle_t *__pyx_t_1;
  char const *__pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  nvlist_t *__pyx_t_7;
  __Pyx_RefNannySetupContext("receive", 0);

  /* "libzfs.pyx":628
 * 
 *     def receive(self, name, fd, force=False, nomount=False, resumable=False, props=None, limitds=None):
 *         cdef libzfs.libzfs_handle_t *handle = self.handle,             # <<<<<<<<<<<<<<
 *         cdef libzfs.recvflags_t flags;
 *         cdef NVList props_nvl = None
 */
  __pyx_t_1 = __pyx_v_self->handle;
  __pyx_v_handle = __pyx_t_1;

  /* "libzfs.pyx":630
 *         cdef libzfs.libzfs_handle_t *handle = self.handle,
 *         cdef libzfs.recvflags_t flags;
 *         cdef NVList props_nvl = None             # <<<<<<<<<<<<<<
 *         cdef NVList limitds_nvl = None
 *         cdef nvpair.nvlist_t *c_props_nvl = NULL
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_props_nvl = ((struct __pyx_obj_6libzfs_NVList *)Py_None);

  /* "libzfs.pyx":631
 *         cdef libzfs.recvflags_t flags;
 *         cdef NVList props_nvl = None
 *         cdef NVList limitds_nvl = None             # <<<<<<<<<<<<<<
 *         cdef nvpair.nvlist_t *c_props_nvl = NULL
 *         cdef nvpair.nvlist_t *c_limitds_nvl = NULL
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_limitds_nvl = ((struct __pyx_obj_6libzfs_NVList *)Py_None);

  /* "libzfs.pyx":632
 *         cdef NVList props_nvl = None
 *         cdef NVList limitds_nvl = None
 *         cdef nvpair.nvlist_t *c_props_nvl = NULL             # <<<<<<<<<<<<<<
 *         cdef nvpair.nvlist_t *c_limitds_nvl = NULL
 *         cdef const char *c_name = name
 */
  __pyx_v_c_props_nvl = NULL;

  /* "libzfs.pyx":633
 *         cdef NVList limitds_nvl = None
 *         cdef nvpair.nvlist_t *c_props_nvl = NULL
 *         cdef nvpair.nvlist_t *c_limitds_nvl = NULL             # <<<<<<<<<<<<<<
 *         cdef const char *c_name = name
 *         cdef int c_fd = fd
 */
  __pyx_v_c_limitds_nvl = NULL;

  /* "libzfs.pyx":634
 *         cdef nvpair.nvlist_t *c_props_nvl = NULL
 *         cdef nvpair.nvlist_t *c_limitds_nvl = NULL
 *         cdef const char *c_name = name             # <<<<<<<<<<<<<<
 *         cdef int c_fd = fd
 *         cdef int ret
 */
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 634, __pyx_L1_error)
  __pyx_v_c_name = __pyx_t_2;

  /* "libzfs.pyx":635
 *         cdef nvpair.nvlist_t *c_limitds_nvl = NULL
 *         cdef const char *c_name = name
 *         cdef int c_fd = fd             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_fd); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 635, __pyx_L1_error)
  __pyx_v_c_fd = __pyx_t_3;

  /* "libzfs.pyx":638
 *         cdef int ret
 * 
 *         memset(&flags, 0, sizeof(libzfs.recvflags_t))             # <<<<<<<<<<<<<<
 * 
 *         if force:
 */
  memset((&__pyx_v_flags), 0, (sizeof(recvflags_t)));

  /* "libzfs.pyx":640
 *         memset(&flags, 0, sizeof(libzfs.recvflags_t))
 * 
 *         if force:             # <<<<<<<<<<<<<<
 *             flags.force = True
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_force); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 640, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "libzfs.pyx":641
 * 
 *         if force:
 *             flags.force = True             # <<<<<<<<<<<<<<
 * 
 *         if nomount:
 */
    __pyx_v_flags.force = 1;

    /* "libzfs.pyx":640
 *         memset(&flags, 0, sizeof(libzfs.recvflags_t))
 * 
 *         if force:             # <<<<<<<<<<<<<<
 *             flags.force = True
 * 
 */
  }

  /* "libzfs.pyx":643
 *             flags.force = True
 * 
 *         if nomount:             # <<<<<<<<<<<<<<
 *             flags.nomount = True
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_nomount); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 643, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "libzfs.pyx":644
 * 
 *         if nomount:
 *             flags.nomount = True             # <<<<<<<<<<<<<<
 * 
 *         IF FREEBSD_VERSION >= 1003000:
 */
    __pyx_v_flags.nomount = 1;

    /* "libzfs.pyx":643
 *             flags.force = True
 * 
 *         if nomount:             # <<<<<<<<<<<<<<
 *             flags.nomount = True
 * 
 */
  }

  /* "libzfs.pyx":647
 * 
 *         IF FREEBSD_VERSION >= 1003000:
 *             if resumable:             # <<<<<<<<<<<<<<
 *                 flags.resumable = True
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_resumable); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 647, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "libzfs.pyx":648
 *         IF FREEBSD_VERSION >= 1003000:
 *             if resumable:
 *                 flags.resumable = True             # <<<<<<<<<<<<<<
 * 
 *         IF TRUEOS:
 */
    __pyx_v_flags.resumable = 1;

    /* "libzfs.pyx":647
 * 
 *         IF FREEBSD_VERSION >= 1003000:
 *             if resumable:             # <<<<<<<<<<<<<<
 *                 flags.resumable = True
 * 
 */
  }

  /* "libzfs.pyx":651
 * 
 *         IF TRUEOS:
 *             if props:             # <<<<<<<<<<<<<<
 *                 props_nvl = NVList(otherdict=props)
 *                 c_props_nvl = props_nvl.handle
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_props); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 651, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "libzfs.pyx":652
 *         IF TRUEOS:
 *             if props:
 *                 props_nvl = NVList(otherdict=props)             # <<<<<<<<<<<<<<
 *                 c_props_nvl = props_nvl.handle
 * 
 */
    __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_otherdict, __pyx_v_props) < 0) __PYX_ERR(1, 652, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_NVList), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_props_nvl, ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "libzfs.pyx":653
 *             if props:
 *                 props_nvl = NVList(otherdict=props)
 *                 c_props_nvl = props_nvl.handle             # <<<<<<<<<<<<<<
 * 
 *             if limitds:
 */
    __pyx_t_7 = __pyx_v_props_nvl->handle;
    __pyx_v_c_props_nvl = __pyx_t_7;

    /* "libzfs.pyx":651
 * 
 *         IF TRUEOS:
 *             if props:             # <<<<<<<<<<<<<<
 *                 props_nvl = NVList(otherdict=props)
 *                 c_props_nvl = props_nvl.handle
 */
  }

  /* "libzfs.pyx":655
 *                 c_props_nvl = props_nvl.handle
 * 
 *             if limitds:             # <<<<<<<<<<<<<<
 *                 limitds_nvl = NVList(otherdict=limitds)
 *                 c_limitds_nvl = limitds_nvl.handle
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_limitds); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 655, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "libzfs.pyx":656
 * 
 *             if limitds:
 *                 limitds_nvl = NVList(otherdict=limitds)             # <<<<<<<<<<<<<<
 *                 c_limitds_nvl = limitds_nvl.handle
 * 
 */
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 656, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_otherdict, __pyx_v_limitds) < 0) __PYX_ERR(1, 656, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_NVList), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 656, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF_SET(__pyx_v_limitds_nvl, ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "libzfs.pyx":657
 *             if limitds:
 *                 limitds_nvl = NVList(otherdict=limitds)
 *                 c_limitds_nvl = limitds_nvl.handle             # <<<<<<<<<<<<<<
 * 
 *             with nogil:
 */
    __pyx_t_7 = __pyx_v_limitds_nvl->handle;
    __pyx_v_c_limitds_nvl = __pyx_t_7;

    /* "libzfs.pyx":655
 *                 c_props_nvl = props_nvl.handle
 * 
 *             if limitds:             # <<<<<<<<<<<<<<
 *                 limitds_nvl = NVList(otherdict=limitds)
 *                 c_limitds_nvl = limitds_nvl.handle
 */
  }

  /* "libzfs.pyx":659
 *                 c_limitds_nvl = limitds_nvl.handle
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 ret = libzfs.zfs_receive(
 *                     handle,
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":660
 * 
 *             with nogil:
 *                 ret = libzfs.zfs_receive(             # <<<<<<<<<<<<<<
 *                     handle,
 *                     c_name,
 */
        __pyx_v_ret = zfs_receive(__pyx_v_handle, __pyx_v_c_name, (&__pyx_v_flags), __pyx_v_c_fd, __pyx_v_c_props_nvl, __pyx_v_c_limitds_nvl, NULL);
      }

      /* "libzfs.pyx":659
 *                 c_limitds_nvl = limitds_nvl.handle
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 ret = libzfs.zfs_receive(
 *                     handle,
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L10;
        }
        __pyx_L10:;
      }
  }

  /* "libzfs.pyx":680
 *                     ret = libzfs.zfs_receive(handle, c_name, c_props_nvl, &flags, c_fd)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.get_error()
 * 
 */
  __pyx_t_4 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_4) {

    /* "libzfs.pyx":681
 * 
 *         if ret != 0:
 *             raise self.get_error()             # <<<<<<<<<<<<<<
 * 
 *     def write_history(self, *args):
 */
    __pyx_t_5 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->__pyx_vtab)->get_error(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 681, __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(1, 681, __pyx_L1_error)

    /* "libzfs.pyx":680
 *                     ret = libzfs.zfs_receive(handle, c_name, c_props_nvl, &flags, c_fd)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.get_error()
 * 
 */
  }

  /* "libzfs.pyx":627
 *             raise ZFSException(self.errno, self.errstr)
 * 
 *     def receive(self, name, fd, force=False, nomount=False, resumable=False, props=None, limitds=None):             # <<<<<<<<<<<<<<
 *         cdef libzfs.libzfs_handle_t *handle = self.handle,
 *         cdef libzfs.recvflags_t flags;
 */

  /* 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_AddTraceback("libzfs.ZFS.receive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_props_nvl);
  __Pyx_XDECREF((PyObject *)__pyx_v_limitds_nvl);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":683
 *             raise self.get_error()
 * 
 *     def write_history(self, *args):             # <<<<<<<<<<<<<<
 *         cdef const char *c_message
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_30write_history(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_3ZFS_30write_history(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write_history (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "write_history", 0))) return NULL;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_6libzfs_3ZFS_29write_history(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self), __pyx_v_args);

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

/* "libzfs.pyx":688
 *         history_message = ""
 * 
 *         def eval_arg(argument):             # <<<<<<<<<<<<<<
 *             if isinstance(argument, str):
 *                 return eval_str(argument)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_13write_history_1eval_arg(PyObject *__pyx_self, PyObject *__pyx_v_argument); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_3ZFS_13write_history_1eval_arg = {"eval_arg", (PyCFunction)__pyx_pw_6libzfs_3ZFS_13write_history_1eval_arg, METH_O, 0};
static PyObject *__pyx_pw_6libzfs_3ZFS_13write_history_1eval_arg(PyObject *__pyx_self, PyObject *__pyx_v_argument) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("eval_arg (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_3ZFS_13write_history_eval_arg(__pyx_self, ((PyObject *)__pyx_v_argument));

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

static PyObject *__pyx_pf_6libzfs_3ZFS_13write_history_eval_arg(PyObject *__pyx_self, PyObject *__pyx_v_argument) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history *__pyx_cur_scope;
  struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("eval_arg", 0);
  __pyx_outer_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "libzfs.pyx":689
 * 
 *         def eval_arg(argument):
 *             if isinstance(argument, str):             # <<<<<<<<<<<<<<
 *                 return eval_str(argument)
 *             if isinstance(argument, dict):
 */
  __pyx_t_1 = PyString_Check(__pyx_v_argument); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":690
 *         def eval_arg(argument):
 *             if isinstance(argument, str):
 *                 return eval_str(argument)             # <<<<<<<<<<<<<<
 *             if isinstance(argument, dict):
 *                 return eval_dict(argument)
 */
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(!__pyx_cur_scope->__pyx_v_eval_str)) { __Pyx_RaiseClosureNameError("eval_str"); __PYX_ERR(1, 690, __pyx_L1_error) }
    __pyx_t_3 = __pyx_pf_6libzfs_3ZFS_13write_history_2eval_str(__pyx_cur_scope->__pyx_v_eval_str, __pyx_v_argument); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "libzfs.pyx":689
 * 
 *         def eval_arg(argument):
 *             if isinstance(argument, str):             # <<<<<<<<<<<<<<
 *                 return eval_str(argument)
 *             if isinstance(argument, dict):
 */
  }

  /* "libzfs.pyx":691
 *             if isinstance(argument, str):
 *                 return eval_str(argument)
 *             if isinstance(argument, dict):             # <<<<<<<<<<<<<<
 *                 return eval_dict(argument)
 *             if isinstance(argument, tuple):
 */
  __pyx_t_2 = PyDict_Check(__pyx_v_argument); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":692
 *                 return eval_str(argument)
 *             if isinstance(argument, dict):
 *                 return eval_dict(argument)             # <<<<<<<<<<<<<<
 *             if isinstance(argument, tuple):
 *                 return eval_tuple(argument)
 */
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(!__pyx_cur_scope->__pyx_v_eval_dict)) { __Pyx_RaiseClosureNameError("eval_dict"); __PYX_ERR(1, 692, __pyx_L1_error) }
    __pyx_t_3 = __pyx_pf_6libzfs_3ZFS_13write_history_4eval_dict(__pyx_cur_scope->__pyx_v_eval_dict, __pyx_v_argument); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "libzfs.pyx":691
 *             if isinstance(argument, str):
 *                 return eval_str(argument)
 *             if isinstance(argument, dict):             # <<<<<<<<<<<<<<
 *                 return eval_dict(argument)
 *             if isinstance(argument, tuple):
 */
  }

  /* "libzfs.pyx":693
 *             if isinstance(argument, dict):
 *                 return eval_dict(argument)
 *             if isinstance(argument, tuple):             # <<<<<<<<<<<<<<
 *                 return eval_tuple(argument)
 *             if isinstance(argument, list):
 */
  __pyx_t_1 = PyTuple_Check(__pyx_v_argument); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":694
 *                 return eval_dict(argument)
 *             if isinstance(argument, tuple):
 *                 return eval_tuple(argument)             # <<<<<<<<<<<<<<
 *             if isinstance(argument, list):
 *                 return eval_list(argument)
 */
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(!__pyx_cur_scope->__pyx_v_eval_tuple)) { __Pyx_RaiseClosureNameError("eval_tuple"); __PYX_ERR(1, 694, __pyx_L1_error) }
    __pyx_t_3 = __pyx_pf_6libzfs_3ZFS_13write_history_6eval_tuple(__pyx_cur_scope->__pyx_v_eval_tuple, __pyx_v_argument); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "libzfs.pyx":693
 *             if isinstance(argument, dict):
 *                 return eval_dict(argument)
 *             if isinstance(argument, tuple):             # <<<<<<<<<<<<<<
 *                 return eval_tuple(argument)
 *             if isinstance(argument, list):
 */
  }

  /* "libzfs.pyx":695
 *             if isinstance(argument, tuple):
 *                 return eval_tuple(argument)
 *             if isinstance(argument, list):             # <<<<<<<<<<<<<<
 *                 return eval_list(argument)
 *             if isinstance(argument, ZFSVdev):
 */
  __pyx_t_2 = PyList_Check(__pyx_v_argument); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":696
 *                 return eval_tuple(argument)
 *             if isinstance(argument, list):
 *                 return eval_list(argument)             # <<<<<<<<<<<<<<
 *             if isinstance(argument, ZFSVdev):
 *                 return eval_zfsvdev(argument)
 */
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(!__pyx_cur_scope->__pyx_v_eval_list)) { __Pyx_RaiseClosureNameError("eval_list"); __PYX_ERR(1, 696, __pyx_L1_error) }
    __pyx_t_3 = __pyx_pf_6libzfs_3ZFS_13write_history_8eval_list(__pyx_cur_scope->__pyx_v_eval_list, __pyx_v_argument); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "libzfs.pyx":695
 *             if isinstance(argument, tuple):
 *                 return eval_tuple(argument)
 *             if isinstance(argument, list):             # <<<<<<<<<<<<<<
 *                 return eval_list(argument)
 *             if isinstance(argument, ZFSVdev):
 */
  }

  /* "libzfs.pyx":697
 *             if isinstance(argument, list):
 *                 return eval_list(argument)
 *             if isinstance(argument, ZFSVdev):             # <<<<<<<<<<<<<<
 *                 return eval_zfsvdev(argument)
 * 
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_argument, __pyx_ptype_6libzfs_ZFSVdev); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":698
 *                 return eval_list(argument)
 *             if isinstance(argument, ZFSVdev):
 *                 return eval_zfsvdev(argument)             # <<<<<<<<<<<<<<
 * 
 *         def eval_str(argument):
 */
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(!__pyx_cur_scope->__pyx_v_eval_zfsvdev)) { __Pyx_RaiseClosureNameError("eval_zfsvdev"); __PYX_ERR(1, 698, __pyx_L1_error) }
    __pyx_t_3 = __pyx_pf_6libzfs_3ZFS_13write_history_10eval_zfsvdev(__pyx_cur_scope->__pyx_v_eval_zfsvdev, __pyx_v_argument); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "libzfs.pyx":697
 *             if isinstance(argument, list):
 *                 return eval_list(argument)
 *             if isinstance(argument, ZFSVdev):             # <<<<<<<<<<<<<<
 *                 return eval_zfsvdev(argument)
 * 
 */
  }

  /* "libzfs.pyx":688
 *         history_message = ""
 * 
 *         def eval_arg(argument):             # <<<<<<<<<<<<<<
 *             if isinstance(argument, str):
 *                 return eval_str(argument)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("libzfs.ZFS.write_history.eval_arg", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":700
 *                 return eval_zfsvdev(argument)
 * 
 *         def eval_str(argument):             # <<<<<<<<<<<<<<
 *             return " " + argument
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_13write_history_3eval_str(PyObject *__pyx_self, PyObject *__pyx_v_argument); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_3ZFS_13write_history_3eval_str = {"eval_str", (PyCFunction)__pyx_pw_6libzfs_3ZFS_13write_history_3eval_str, METH_O, 0};
static PyObject *__pyx_pw_6libzfs_3ZFS_13write_history_3eval_str(PyObject *__pyx_self, PyObject *__pyx_v_argument) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("eval_str (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_3ZFS_13write_history_2eval_str(__pyx_self, ((PyObject *)__pyx_v_argument));

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

static PyObject *__pyx_pf_6libzfs_3ZFS_13write_history_2eval_str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_argument) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("eval_str", 0);

  /* "libzfs.pyx":701
 * 
 *         def eval_str(argument):
 *             return " " + argument             # <<<<<<<<<<<<<<
 * 
 *         def eval_dict(argument):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyNumber_Add(__pyx_kp_s__13, __pyx_v_argument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":700
 *                 return eval_zfsvdev(argument)
 * 
 *         def eval_str(argument):             # <<<<<<<<<<<<<<
 *             return " " + argument
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("libzfs.ZFS.write_history.eval_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":703
 *             return " " + argument
 * 
 *         def eval_dict(argument):             # <<<<<<<<<<<<<<
 *             out = ""
 *             for tup in arg.items():
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_13write_history_5eval_dict(PyObject *__pyx_self, PyObject *__pyx_v_argument); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_3ZFS_13write_history_5eval_dict = {"eval_dict", (PyCFunction)__pyx_pw_6libzfs_3ZFS_13write_history_5eval_dict, METH_O, 0};
static PyObject *__pyx_pw_6libzfs_3ZFS_13write_history_5eval_dict(PyObject *__pyx_self, PyObject *__pyx_v_argument) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("eval_dict (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_3ZFS_13write_history_4eval_dict(__pyx_self, ((PyObject *)__pyx_v_argument));

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

static PyObject *__pyx_pf_6libzfs_3ZFS_13write_history_4eval_dict(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_argument) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history *__pyx_cur_scope;
  struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history *__pyx_outer_scope;
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_tup = 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 *);
  __Pyx_RefNannySetupContext("eval_dict", 0);
  __pyx_outer_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "libzfs.pyx":704
 * 
 *         def eval_dict(argument):
 *             out = ""             # <<<<<<<<<<<<<<
 *             for tup in arg.items():
 *                 out += eval_arg(tup)
 */
  __Pyx_INCREF(__pyx_kp_s__11);
  __pyx_v_out = __pyx_kp_s__11;

  /* "libzfs.pyx":705
 *         def eval_dict(argument):
 *             out = ""
 *             for tup in arg.items():             # <<<<<<<<<<<<<<
 *                 out += eval_arg(tup)
 *             return out
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_arg)) { __Pyx_RaiseClosureNameError("arg"); __PYX_ERR(1, 705, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_arg, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 705, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 705, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  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(1, 705, __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(1, 705, __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_COMPILING_IN_CPYTHON
        __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(1, 705, __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(1, 705, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __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(1, 705, __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(1, 705, __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(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 705, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_tup, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "libzfs.pyx":706
 *             out = ""
 *             for tup in arg.items():
 *                 out += eval_arg(tup)             # <<<<<<<<<<<<<<
 *             return out
 * 
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_eval_arg)) { __Pyx_RaiseClosureNameError("eval_arg"); __PYX_ERR(1, 706, __pyx_L1_error) }
    __pyx_t_1 = __pyx_pf_6libzfs_3ZFS_13write_history_eval_arg(__pyx_cur_scope->__pyx_v_eval_arg, __pyx_v_tup); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_out, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_out, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":705
 *         def eval_dict(argument):
 *             out = ""
 *             for tup in arg.items():             # <<<<<<<<<<<<<<
 *                 out += eval_arg(tup)
 *             return out
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":707
 *             for tup in arg.items():
 *                 out += eval_arg(tup)
 *             return out             # <<<<<<<<<<<<<<
 * 
 *         def eval_tuple(argument):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "libzfs.pyx":703
 *             return " " + argument
 * 
 *         def eval_dict(argument):             # <<<<<<<<<<<<<<
 *             out = ""
 *             for tup in arg.items():
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("libzfs.ZFS.write_history.eval_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_tup);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":709
 *             return out
 * 
 *         def eval_tuple(argument):             # <<<<<<<<<<<<<<
 *             if len(argument) == 2:
 *                 if isinstance(argument[1], str):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_13write_history_7eval_tuple(PyObject *__pyx_self, PyObject *__pyx_v_argument); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_3ZFS_13write_history_7eval_tuple = {"eval_tuple", (PyCFunction)__pyx_pw_6libzfs_3ZFS_13write_history_7eval_tuple, METH_O, 0};
static PyObject *__pyx_pw_6libzfs_3ZFS_13write_history_7eval_tuple(PyObject *__pyx_self, PyObject *__pyx_v_argument) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("eval_tuple (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_3ZFS_13write_history_6eval_tuple(__pyx_self, ((PyObject *)__pyx_v_argument));

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

static PyObject *__pyx_pf_6libzfs_3ZFS_13write_history_6eval_tuple(PyObject *__pyx_self, PyObject *__pyx_v_argument) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history *__pyx_cur_scope;
  struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history *__pyx_outer_scope;
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  __Pyx_RefNannySetupContext("eval_tuple", 0);
  __pyx_outer_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "libzfs.pyx":710
 * 
 *         def eval_tuple(argument):
 *             if len(argument) == 2:             # <<<<<<<<<<<<<<
 *                 if isinstance(argument[1], str):
 *                     return " " + str(argument[0]) + '=' + str(argument[1])
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_argument); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(1, 710, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 == 2) != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":711
 *         def eval_tuple(argument):
 *             if len(argument) == 2:
 *                 if isinstance(argument[1], str):             # <<<<<<<<<<<<<<
 *                     return " " + str(argument[0]) + '=' + str(argument[1])
 * 
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_argument, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 711, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyString_Check(__pyx_t_3); 
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = (__pyx_t_2 != 0);
    if (__pyx_t_4) {

      /* "libzfs.pyx":712
 *             if len(argument) == 2:
 *                 if isinstance(argument[1], str):
 *                     return " " + str(argument[0]) + '=' + str(argument[1])             # <<<<<<<<<<<<<<
 * 
 *             out = ""
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_argument, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 712, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 712, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 712, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyNumber_Add(__pyx_kp_s__13, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 712, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_kp_s__14); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 712, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_argument, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 712, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 712, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 712, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 712, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L0;

      /* "libzfs.pyx":711
 *         def eval_tuple(argument):
 *             if len(argument) == 2:
 *                 if isinstance(argument[1], str):             # <<<<<<<<<<<<<<
 *                     return " " + str(argument[0]) + '=' + str(argument[1])
 * 
 */
    }

    /* "libzfs.pyx":710
 * 
 *         def eval_tuple(argument):
 *             if len(argument) == 2:             # <<<<<<<<<<<<<<
 *                 if isinstance(argument[1], str):
 *                     return " " + str(argument[0]) + '=' + str(argument[1])
 */
  }

  /* "libzfs.pyx":714
 *                     return " " + str(argument[0]) + '=' + str(argument[1])
 * 
 *             out = ""             # <<<<<<<<<<<<<<
 *             for i in argument:
 *                 out += eval_arg(i)
 */
  __Pyx_INCREF(__pyx_kp_s__11);
  __pyx_v_out = __pyx_kp_s__11;

  /* "libzfs.pyx":715
 * 
 *             out = ""
 *             for i in argument:             # <<<<<<<<<<<<<<
 *                 out += eval_arg(i)
 *             return out
 */
  if (likely(PyList_CheckExact(__pyx_v_argument)) || PyTuple_CheckExact(__pyx_v_argument)) {
    __pyx_t_6 = __pyx_v_argument; __Pyx_INCREF(__pyx_t_6); __pyx_t_1 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_1 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_argument); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 715, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_6))) {
        if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(1, 715, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 715, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(1, 715, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 715, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_7(__pyx_t_6);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 715, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "libzfs.pyx":716
 *             out = ""
 *             for i in argument:
 *                 out += eval_arg(i)             # <<<<<<<<<<<<<<
 *             return out
 * 
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_eval_arg)) { __Pyx_RaiseClosureNameError("eval_arg"); __PYX_ERR(1, 716, __pyx_L1_error) }
    __pyx_t_5 = __pyx_pf_6libzfs_3ZFS_13write_history_eval_arg(__pyx_cur_scope->__pyx_v_eval_arg, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_out, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_out, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":715
 * 
 *             out = ""
 *             for i in argument:             # <<<<<<<<<<<<<<
 *                 out += eval_arg(i)
 *             return out
 */
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "libzfs.pyx":717
 *             for i in argument:
 *                 out += eval_arg(i)
 *             return out             # <<<<<<<<<<<<<<
 * 
 *         def eval_list(argument):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "libzfs.pyx":709
 *             return out
 * 
 *         def eval_tuple(argument):             # <<<<<<<<<<<<<<
 *             if len(argument) == 2:
 *                 if isinstance(argument[1], str):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("libzfs.ZFS.write_history.eval_tuple", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":719
 *             return out
 * 
 *         def eval_list(argument):             # <<<<<<<<<<<<<<
 *             out = ""
 *             for i in argument:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_13write_history_9eval_list(PyObject *__pyx_self, PyObject *__pyx_v_argument); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_3ZFS_13write_history_9eval_list = {"eval_list", (PyCFunction)__pyx_pw_6libzfs_3ZFS_13write_history_9eval_list, METH_O, 0};
static PyObject *__pyx_pw_6libzfs_3ZFS_13write_history_9eval_list(PyObject *__pyx_self, PyObject *__pyx_v_argument) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("eval_list (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_3ZFS_13write_history_8eval_list(__pyx_self, ((PyObject *)__pyx_v_argument));

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

static PyObject *__pyx_pf_6libzfs_3ZFS_13write_history_8eval_list(PyObject *__pyx_self, PyObject *__pyx_v_argument) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history *__pyx_cur_scope;
  struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history *__pyx_outer_scope;
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("eval_list", 0);
  __pyx_outer_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "libzfs.pyx":720
 * 
 *         def eval_list(argument):
 *             out = ""             # <<<<<<<<<<<<<<
 *             for i in argument:
 *                 out += eval_arg(i)
 */
  __Pyx_INCREF(__pyx_kp_s__11);
  __pyx_v_out = __pyx_kp_s__11;

  /* "libzfs.pyx":721
 *         def eval_list(argument):
 *             out = ""
 *             for i in argument:             # <<<<<<<<<<<<<<
 *                 out += eval_arg(i)
 *             return out
 */
  if (likely(PyList_CheckExact(__pyx_v_argument)) || PyTuple_CheckExact(__pyx_v_argument)) {
    __pyx_t_1 = __pyx_v_argument; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_argument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 721, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 721, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 721, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 721, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 721, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 721, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "libzfs.pyx":722
 *             out = ""
 *             for i in argument:
 *                 out += eval_arg(i)             # <<<<<<<<<<<<<<
 *             return out
 * 
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_eval_arg)) { __Pyx_RaiseClosureNameError("eval_arg"); __PYX_ERR(1, 722, __pyx_L1_error) }
    __pyx_t_4 = __pyx_pf_6libzfs_3ZFS_13write_history_eval_arg(__pyx_cur_scope->__pyx_v_eval_arg, __pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 722, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_out, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 722, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_out, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "libzfs.pyx":721
 *         def eval_list(argument):
 *             out = ""
 *             for i in argument:             # <<<<<<<<<<<<<<
 *                 out += eval_arg(i)
 *             return out
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":723
 *             for i in argument:
 *                 out += eval_arg(i)
 *             return out             # <<<<<<<<<<<<<<
 * 
 *         def eval_zfsvdev(argument):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "libzfs.pyx":719
 *             return out
 * 
 *         def eval_list(argument):             # <<<<<<<<<<<<<<
 *             out = ""
 *             for i in argument:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("libzfs.ZFS.write_history.eval_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":725
 *             return out
 * 
 *         def eval_zfsvdev(argument):             # <<<<<<<<<<<<<<
 *             disks = argument.disks
 *             if len(disks):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_13write_history_11eval_zfsvdev(PyObject *__pyx_self, PyObject *__pyx_v_argument); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_3ZFS_13write_history_11eval_zfsvdev = {"eval_zfsvdev", (PyCFunction)__pyx_pw_6libzfs_3ZFS_13write_history_11eval_zfsvdev, METH_O, 0};
static PyObject *__pyx_pw_6libzfs_3ZFS_13write_history_11eval_zfsvdev(PyObject *__pyx_self, PyObject *__pyx_v_argument) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("eval_zfsvdev (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_3ZFS_13write_history_10eval_zfsvdev(__pyx_self, ((PyObject *)__pyx_v_argument));

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

static PyObject *__pyx_pf_6libzfs_3ZFS_13write_history_10eval_zfsvdev(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_argument) {
  PyObject *__pyx_v_disks = NULL;
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_disk = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("eval_zfsvdev", 0);

  /* "libzfs.pyx":726
 * 
 *         def eval_zfsvdev(argument):
 *             disks = argument.disks             # <<<<<<<<<<<<<<
 *             if len(disks):
 *                 out = " " + str(argument.type)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_argument, __pyx_n_s_disks); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_disks = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "libzfs.pyx":727
 *         def eval_zfsvdev(argument):
 *             disks = argument.disks
 *             if len(disks):             # <<<<<<<<<<<<<<
 *                 out = " " + str(argument.type)
 *                 for disk in disks:
 */
  __pyx_t_2 = PyObject_Length(__pyx_v_disks); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 727, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "libzfs.pyx":728
 *             disks = argument.disks
 *             if len(disks):
 *                 out = " " + str(argument.type)             # <<<<<<<<<<<<<<
 *                 for disk in disks:
 *                     out += " " + disk
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_argument, __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Add(__pyx_kp_s__13, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_out = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "libzfs.pyx":729
 *             if len(disks):
 *                 out = " " + str(argument.type)
 *                 for disk in disks:             # <<<<<<<<<<<<<<
 *                     out += " " + disk
 *                 return  out
 */
    if (likely(PyList_CheckExact(__pyx_v_disks)) || PyTuple_CheckExact(__pyx_v_disks)) {
      __pyx_t_4 = __pyx_v_disks; __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_disks); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 729, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 729, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 729, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 729, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 729, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 729, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_5(__pyx_t_4);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 729, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_disk, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "libzfs.pyx":730
 *                 out = " " + str(argument.type)
 *                 for disk in disks:
 *                     out += " " + disk             # <<<<<<<<<<<<<<
 *                 return  out
 *             else:
 */
      __pyx_t_1 = PyNumber_Add(__pyx_kp_s__13, __pyx_v_disk); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 730, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_out, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 730, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_out, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "libzfs.pyx":729
 *             if len(disks):
 *                 out = " " + str(argument.type)
 *                 for disk in disks:             # <<<<<<<<<<<<<<
 *                     out += " " + disk
 *                 return  out
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "libzfs.pyx":731
 *                 for disk in disks:
 *                     out += " " + disk
 *                 return  out             # <<<<<<<<<<<<<<
 *             else:
 *                 return ""
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_out);
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "libzfs.pyx":727
 *         def eval_zfsvdev(argument):
 *             disks = argument.disks
 *             if len(disks):             # <<<<<<<<<<<<<<
 *                 out = " " + str(argument.type)
 *                 for disk in disks:
 */
  }

  /* "libzfs.pyx":733
 *                 return  out
 *             else:
 *                 return ""             # <<<<<<<<<<<<<<
 * 
 *         if self.history:
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_s__11);
    __pyx_r = __pyx_kp_s__11;
    goto __pyx_L0;
  }

  /* "libzfs.pyx":725
 *             return out
 * 
 *         def eval_zfsvdev(argument):             # <<<<<<<<<<<<<<
 *             disks = argument.disks
 *             if len(disks):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("libzfs.ZFS.write_history.eval_zfsvdev", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_disks);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_disk);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":683
 *             raise self.get_error()
 * 
 *     def write_history(self, *args):             # <<<<<<<<<<<<<<
 *         cdef const char *c_message
 * 
 */

static PyObject *__pyx_pf_6libzfs_3ZFS_29write_history(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_args) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history *__pyx_cur_scope;
  char const *__pyx_v_c_message;
  PyObject *__pyx_v_history_message = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  __Pyx_RefNannySetupContext("write_history", 0);
  __pyx_cur_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history *)__pyx_tp_new_6libzfs___pyx_scope_struct_6_write_history(__pyx_ptype_6libzfs___pyx_scope_struct_6_write_history, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);

  /* "libzfs.pyx":686
 *         cdef const char *c_message
 * 
 *         history_message = ""             # <<<<<<<<<<<<<<
 * 
 *         def eval_arg(argument):
 */
  __Pyx_INCREF(__pyx_kp_s__11);
  __pyx_v_history_message = __pyx_kp_s__11;

  /* "libzfs.pyx":688
 *         history_message = ""
 * 
 *         def eval_arg(argument):             # <<<<<<<<<<<<<<
 *             if isinstance(argument, str):
 *                 return eval_str(argument)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6libzfs_3ZFS_13write_history_1eval_arg, 0, __pyx_n_s_write_history_locals_eval_arg, ((PyObject*)__pyx_cur_scope), __pyx_n_s_libzfs, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_eval_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "libzfs.pyx":700
 *                 return eval_zfsvdev(argument)
 * 
 *         def eval_str(argument):             # <<<<<<<<<<<<<<
 *             return " " + argument
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6libzfs_3ZFS_13write_history_3eval_str, 0, __pyx_n_s_write_history_locals_eval_str, NULL, __pyx_n_s_libzfs, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_eval_str = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "libzfs.pyx":703
 *             return " " + argument
 * 
 *         def eval_dict(argument):             # <<<<<<<<<<<<<<
 *             out = ""
 *             for tup in arg.items():
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6libzfs_3ZFS_13write_history_5eval_dict, 0, __pyx_n_s_write_history_locals_eval_dict, ((PyObject*)__pyx_cur_scope), __pyx_n_s_libzfs, __pyx_d, ((PyObject *)__pyx_codeobj__20)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_eval_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "libzfs.pyx":709
 *             return out
 * 
 *         def eval_tuple(argument):             # <<<<<<<<<<<<<<
 *             if len(argument) == 2:
 *                 if isinstance(argument[1], str):
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6libzfs_3ZFS_13write_history_7eval_tuple, 0, __pyx_n_s_write_history_locals_eval_tuple, ((PyObject*)__pyx_cur_scope), __pyx_n_s_libzfs, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_eval_tuple = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "libzfs.pyx":719
 *             return out
 * 
 *         def eval_list(argument):             # <<<<<<<<<<<<<<
 *             out = ""
 *             for i in argument:
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6libzfs_3ZFS_13write_history_9eval_list, 0, __pyx_n_s_write_history_locals_eval_list, ((PyObject*)__pyx_cur_scope), __pyx_n_s_libzfs, __pyx_d, ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_eval_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "libzfs.pyx":725
 *             return out
 * 
 *         def eval_zfsvdev(argument):             # <<<<<<<<<<<<<<
 *             disks = argument.disks
 *             if len(disks):
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6libzfs_3ZFS_13write_history_11eval_zfsvdev, 0, __pyx_n_s_write_history_locals_eval_zfsvde, NULL, __pyx_n_s_libzfs, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_eval_zfsvdev = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "libzfs.pyx":735
 *                 return ""
 * 
 *         if self.history:             # <<<<<<<<<<<<<<
 *             history_message = self.history_prefix
 *             for arg in args:
 */
  __pyx_t_2 = (__pyx_v_self->history != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":736
 * 
 *         if self.history:
 *             history_message = self.history_prefix             # <<<<<<<<<<<<<<
 *             for arg in args:
 *                 history_message += eval_arg(arg)
 */
    __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_self->history_prefix); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_history_message, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "libzfs.pyx":737
 *         if self.history:
 *             history_message = self.history_prefix
 *             for arg in args:             # <<<<<<<<<<<<<<
 *                 history_message += eval_arg(arg)
 * 
 */
    __pyx_t_1 = __pyx_v_args; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    for (;;) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 737, __pyx_L1_error)
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 737, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_arg);
      __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_arg, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_4 = 0;

      /* "libzfs.pyx":738
 *             history_message = self.history_prefix
 *             for arg in args:
 *                 history_message += eval_arg(arg)             # <<<<<<<<<<<<<<
 * 
 *             c_message = history_message
 */
      __pyx_t_4 = __pyx_cur_scope->__pyx_v_arg;
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = __pyx_pf_6libzfs_3ZFS_13write_history_eval_arg(__pyx_cur_scope->__pyx_v_eval_arg, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 738, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_history_message, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 738, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_history_message, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "libzfs.pyx":737
 *         if self.history:
 *             history_message = self.history_prefix
 *             for arg in args:             # <<<<<<<<<<<<<<
 *                 history_message += eval_arg(arg)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "libzfs.pyx":740
 *                 history_message += eval_arg(arg)
 * 
 *             c_message = history_message             # <<<<<<<<<<<<<<
 * 
 *             with nogil:
 */
    __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_history_message); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(1, 740, __pyx_L1_error)
    __pyx_v_c_message = __pyx_t_6;

    /* "libzfs.pyx":742
 *             c_message = history_message
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 libzfs.zpool_log_history(self.handle, c_message)
 * 
 */
    {
        #ifdef WITH_THREAD
        PyThreadState *_save;
        Py_UNBLOCK_THREADS
        #endif
        /*try:*/ {

          /* "libzfs.pyx":743
 * 
 *             with nogil:
 *                 libzfs.zpool_log_history(self.handle, c_message)             # <<<<<<<<<<<<<<
 * 
 *     def generate_history_opts(self, opt_dict, prefix):
 */
          zpool_log_history(__pyx_v_self->handle, __pyx_v_c_message);
        }

        /* "libzfs.pyx":742
 *             c_message = history_message
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 libzfs.zpool_log_history(self.handle, c_message)
 * 
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            Py_BLOCK_THREADS
            #endif
            goto __pyx_L8;
          }
          __pyx_L8:;
        }
    }

    /* "libzfs.pyx":735
 *                 return ""
 * 
 *         if self.history:             # <<<<<<<<<<<<<<
 *             history_message = self.history_prefix
 *             for arg in args:
 */
  }

  /* "libzfs.pyx":683
 *             raise self.get_error()
 * 
 *     def write_history(self, *args):             # <<<<<<<<<<<<<<
 *         cdef const char *c_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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("libzfs.ZFS.write_history", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_history_message);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":745
 *                 libzfs.zpool_log_history(self.handle, c_message)
 * 
 *     def generate_history_opts(self, opt_dict, prefix):             # <<<<<<<<<<<<<<
 *         keys = []
 *         out_dict = {}
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_32generate_history_opts(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_3ZFS_32generate_history_opts(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_opt_dict = 0;
  PyObject *__pyx_v_prefix = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("generate_history_opts (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_opt_dict,&__pyx_n_s_prefix,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_opt_dict)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("generate_history_opts", 1, 2, 2, 1); __PYX_ERR(1, 745, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generate_history_opts") < 0)) __PYX_ERR(1, 745, __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_opt_dict = values[0];
    __pyx_v_prefix = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("generate_history_opts", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 745, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFS.generate_history_opts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_3ZFS_31generate_history_opts(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self), __pyx_v_opt_dict, __pyx_v_prefix);

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

static PyObject *__pyx_pf_6libzfs_3ZFS_31generate_history_opts(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_opt_dict, PyObject *__pyx_v_prefix) {
  PyObject *__pyx_v_keys = NULL;
  PyObject *__pyx_v_out_dict = NULL;
  PyObject *__pyx_v_key = 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;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("generate_history_opts", 0);

  /* "libzfs.pyx":746
 * 
 *     def generate_history_opts(self, opt_dict, prefix):
 *         keys = []             # <<<<<<<<<<<<<<
 *         out_dict = {}
 *         if isinstance(opt_dict, dict):
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_keys = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":747
 *     def generate_history_opts(self, opt_dict, prefix):
 *         keys = []
 *         out_dict = {}             # <<<<<<<<<<<<<<
 *         if isinstance(opt_dict, dict):
 *             for key in opt_dict.keys():
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out_dict = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":748
 *         keys = []
 *         out_dict = {}
 *         if isinstance(opt_dict, dict):             # <<<<<<<<<<<<<<
 *             for key in opt_dict.keys():
 *                 keys.append(key)
 */
  __pyx_t_2 = PyDict_Check(__pyx_v_opt_dict); 
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "libzfs.pyx":749
 *         out_dict = {}
 *         if isinstance(opt_dict, dict):
 *             for key in opt_dict.keys():             # <<<<<<<<<<<<<<
 *                 keys.append(key)
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_opt_dict, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 749, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 749, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 749, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 749, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 749, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 749, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 749, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 749, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_7(__pyx_t_4);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 749, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "libzfs.pyx":750
 *         if isinstance(opt_dict, dict):
 *             for key in opt_dict.keys():
 *                 keys.append(key)             # <<<<<<<<<<<<<<
 * 
 *             for key in keys:
 */
      __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_keys, __pyx_v_key); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(1, 750, __pyx_L1_error)

      /* "libzfs.pyx":749
 *         out_dict = {}
 *         if isinstance(opt_dict, dict):
 *             for key in opt_dict.keys():             # <<<<<<<<<<<<<<
 *                 keys.append(key)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "libzfs.pyx":752
 *                 keys.append(key)
 * 
 *             for key in keys:             # <<<<<<<<<<<<<<
 *                 out_dict[prefix + ' ' + key] = opt_dict[key]
 * 
 */
    __pyx_t_4 = __pyx_v_keys; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
    for (;;) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 752, __pyx_L1_error)
      #else
      __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 752, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "libzfs.pyx":753
 * 
 *             for key in keys:
 *                 out_dict[prefix + ' ' + key] = opt_dict[key]             # <<<<<<<<<<<<<<
 * 
 *         return out_dict
 */
      __pyx_t_1 = PyObject_GetItem(__pyx_v_opt_dict, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 753, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = PyNumber_Add(__pyx_v_prefix, __pyx_kp_s__13); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 753, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = PyNumber_Add(__pyx_t_5, __pyx_v_key); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 753, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(PyDict_SetItem(__pyx_v_out_dict, __pyx_t_9, __pyx_t_1) < 0)) __PYX_ERR(1, 753, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "libzfs.pyx":752
 *                 keys.append(key)
 * 
 *             for key in keys:             # <<<<<<<<<<<<<<
 *                 out_dict[prefix + ' ' + key] = opt_dict[key]
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "libzfs.pyx":748
 *         keys = []
 *         out_dict = {}
 *         if isinstance(opt_dict, dict):             # <<<<<<<<<<<<<<
 *             for key in opt_dict.keys():
 *                 keys.append(key)
 */
  }

  /* "libzfs.pyx":755
 *                 out_dict[prefix + ' ' + key] = opt_dict[key]
 * 
 *         return out_dict             # <<<<<<<<<<<<<<
 * 
 *     def history_vdevs_list(self, topology):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out_dict);
  __pyx_r = __pyx_v_out_dict;
  goto __pyx_L0;

  /* "libzfs.pyx":745
 *                 libzfs.zpool_log_history(self.handle, c_message)
 * 
 *     def generate_history_opts(self, opt_dict, prefix):             # <<<<<<<<<<<<<<
 *         keys = []
 *         out_dict = {}
 */

  /* 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_9);
  __Pyx_AddTraceback("libzfs.ZFS.generate_history_opts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_keys);
  __Pyx_XDECREF(__pyx_v_out_dict);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":757
 *         return out_dict
 * 
 *     def history_vdevs_list(self, topology):             # <<<<<<<<<<<<<<
 *         out = []
 *         if self.history:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_34history_vdevs_list(PyObject *__pyx_v_self, PyObject *__pyx_v_topology); /*proto*/
static PyObject *__pyx_pw_6libzfs_3ZFS_34history_vdevs_list(PyObject *__pyx_v_self, PyObject *__pyx_v_topology) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("history_vdevs_list (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_3ZFS_33history_vdevs_list(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self), ((PyObject *)__pyx_v_topology));

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

static PyObject *__pyx_pf_6libzfs_3ZFS_33history_vdevs_list(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_topology) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_data_vdevs = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("history_vdevs_list", 0);

  /* "libzfs.pyx":758
 * 
 *     def history_vdevs_list(self, topology):
 *         out = []             # <<<<<<<<<<<<<<
 *         if self.history:
 *             data_vdevs = topology.get('data', None)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":759
 *     def history_vdevs_list(self, topology):
 *         out = []
 *         if self.history:             # <<<<<<<<<<<<<<
 *             data_vdevs = topology.get('data', None)
 *             if data_vdevs:
 */
  __pyx_t_2 = (__pyx_v_self->history != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":760
 *         out = []
 *         if self.history:
 *             data_vdevs = topology.get('data', None)             # <<<<<<<<<<<<<<
 *             if data_vdevs:
 *                 if data_vdevs[0].type == 'disk':
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_topology, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_data_vdevs = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "libzfs.pyx":761
 *         if self.history:
 *             data_vdevs = topology.get('data', None)
 *             if data_vdevs:             # <<<<<<<<<<<<<<
 *                 if data_vdevs[0].type == 'disk':
 *                     data_vdevs = data_vdevs[0].disks[0]
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_data_vdevs); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 761, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "libzfs.pyx":762
 *             data_vdevs = topology.get('data', None)
 *             if data_vdevs:
 *                 if data_vdevs[0].type == 'disk':             # <<<<<<<<<<<<<<
 *                     data_vdevs = data_vdevs[0].disks[0]
 * 
 */
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_data_vdevs, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 762, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 762, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_disk, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 762, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_2) {

        /* "libzfs.pyx":763
 *             if data_vdevs:
 *                 if data_vdevs[0].type == 'disk':
 *                     data_vdevs = data_vdevs[0].disks[0]             # <<<<<<<<<<<<<<
 * 
 *                 out.append(data_vdevs)
 */
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_data_vdevs, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 763, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_disks); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 763, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 763, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF_SET(__pyx_v_data_vdevs, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "libzfs.pyx":762
 *             data_vdevs = topology.get('data', None)
 *             if data_vdevs:
 *                 if data_vdevs[0].type == 'disk':             # <<<<<<<<<<<<<<
 *                     data_vdevs = data_vdevs[0].disks[0]
 * 
 */
      }

      /* "libzfs.pyx":765
 *                     data_vdevs = data_vdevs[0].disks[0]
 * 
 *                 out.append(data_vdevs)             # <<<<<<<<<<<<<<
 * 
 *             if topology.get('cache', False):
 */
      __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_out, __pyx_v_data_vdevs); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 765, __pyx_L1_error)

      /* "libzfs.pyx":761
 *         if self.history:
 *             data_vdevs = topology.get('data', None)
 *             if data_vdevs:             # <<<<<<<<<<<<<<
 *                 if data_vdevs[0].type == 'disk':
 *                     data_vdevs = data_vdevs[0].disks[0]
 */
    }

    /* "libzfs.pyx":767
 *                 out.append(data_vdevs)
 * 
 *             if topology.get('cache', False):             # <<<<<<<<<<<<<<
 *                 out.append('cache')
 *                 out.append(topology.get('cache'))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_topology, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 767, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "libzfs.pyx":768
 * 
 *             if topology.get('cache', False):
 *                 out.append('cache')             # <<<<<<<<<<<<<<
 *                 out.append(topology.get('cache'))
 * 
 */
      __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_out, __pyx_n_s_cache); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 768, __pyx_L1_error)

      /* "libzfs.pyx":769
 *             if topology.get('cache', False):
 *                 out.append('cache')
 *                 out.append(topology.get('cache'))             # <<<<<<<<<<<<<<
 * 
 *             if topology.get('log', False):
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_topology, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_out, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 769, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "libzfs.pyx":767
 *                 out.append(data_vdevs)
 * 
 *             if topology.get('cache', False):             # <<<<<<<<<<<<<<
 *                 out.append('cache')
 *                 out.append(topology.get('cache'))
 */
    }

    /* "libzfs.pyx":771
 *                 out.append(topology.get('cache'))
 * 
 *             if topology.get('log', False):             # <<<<<<<<<<<<<<
 *                 out.append('log')
 *                 out.append(topology.get('log'))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_topology, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 771, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "libzfs.pyx":772
 * 
 *             if topology.get('log', False):
 *                 out.append('log')             # <<<<<<<<<<<<<<
 *                 out.append(topology.get('log'))
 * 
 */
      __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_out, __pyx_n_s_log); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 772, __pyx_L1_error)

      /* "libzfs.pyx":773
 *             if topology.get('log', False):
 *                 out.append('log')
 *                 out.append(topology.get('log'))             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_topology, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 773, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 773, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_out, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 773, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "libzfs.pyx":771
 *                 out.append(topology.get('cache'))
 * 
 *             if topology.get('log', False):             # <<<<<<<<<<<<<<
 *                 out.append('log')
 *                 out.append(topology.get('log'))
 */
    }

    /* "libzfs.pyx":759
 *     def history_vdevs_list(self, topology):
 *         out = []
 *         if self.history:             # <<<<<<<<<<<<<<
 *             data_vdevs = topology.get('data', None)
 *             if data_vdevs:
 */
  }

  /* "libzfs.pyx":775
 *                 out.append(topology.get('log'))
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     IF FREEBSD_VERSION >= 1003000:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "libzfs.pyx":757
 *         return out_dict
 * 
 *     def history_vdevs_list(self, topology):             # <<<<<<<<<<<<<<
 *         out = []
 *         if self.history:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("libzfs.ZFS.history_vdevs_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_data_vdevs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":778
 * 
 *     IF FREEBSD_VERSION >= 1003000:
 *         def send_resume(self, fd, token, flags=None):             # <<<<<<<<<<<<<<
 *             cdef libzfs.sendflags_t cflags
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_36send_resume(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_3ZFS_36send_resume(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fd = 0;
  PyObject *__pyx_v_token = 0;
  PyObject *__pyx_v_flags = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("send_resume (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fd,&__pyx_n_s_token,&__pyx_n_s_flags,0};
    PyObject* values[3] = {0,0,0};
    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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fd)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_token)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("send_resume", 0, 2, 3, 1); __PYX_ERR(1, 778, __pyx_L3_error)
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "send_resume") < 0)) __PYX_ERR(1, 778, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_fd = values[0];
    __pyx_v_token = values[1];
    __pyx_v_flags = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("send_resume", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 778, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFS.send_resume", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_3ZFS_35send_resume(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self), __pyx_v_fd, __pyx_v_token, __pyx_v_flags);

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

static PyObject *__pyx_pf_6libzfs_3ZFS_35send_resume(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_fd, PyObject *__pyx_v_token, PyObject *__pyx_v_flags) {
  sendflags_t __pyx_v_cflags;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  char const *__pyx_t_4;
  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 = NULL;
  __Pyx_RefNannySetupContext("send_resume", 0);

  /* "libzfs.pyx":781
 *             cdef libzfs.sendflags_t cflags
 * 
 *             memset(&cflags, 0, cython.sizeof(libzfs.sendflags_t))             # <<<<<<<<<<<<<<
 * 
 *             if flags:
 */
  memset((&__pyx_v_cflags), 0, (sizeof(sendflags_t)));

  /* "libzfs.pyx":783
 *             memset(&cflags, 0, cython.sizeof(libzfs.sendflags_t))
 * 
 *             if flags:             # <<<<<<<<<<<<<<
 *                 convert_sendflags(flags, &cflags)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_flags); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 783, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "libzfs.pyx":784
 * 
 *             if flags:
 *                 convert_sendflags(flags, &cflags)             # <<<<<<<<<<<<<<
 * 
 *             if libzfs.zfs_send_resume(self.handle, &cflags, fd, token) != 0:
 */
    __pyx_t_2 = __pyx_f_6libzfs_convert_sendflags(__pyx_v_flags, (&__pyx_v_cflags)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "libzfs.pyx":783
 *             memset(&cflags, 0, cython.sizeof(libzfs.sendflags_t))
 * 
 *             if flags:             # <<<<<<<<<<<<<<
 *                 convert_sendflags(flags, &cflags)
 * 
 */
  }

  /* "libzfs.pyx":786
 *                 convert_sendflags(flags, &cflags)
 * 
 *             if libzfs.zfs_send_resume(self.handle, &cflags, fd, token) != 0:             # <<<<<<<<<<<<<<
 *                 raise ZFSException(self.errno, self.errstr)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_fd); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 786, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_token); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 786, __pyx_L1_error)
  __pyx_t_1 = ((zfs_send_resume(__pyx_v_self->handle, (&__pyx_v_cflags), __pyx_t_3, __pyx_t_4) != 0) != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":787
 * 
 *             if libzfs.zfs_send_resume(self.handle, &cflags, fd, token) != 0:
 *                 raise ZFSException(self.errno, self.errstr)             # <<<<<<<<<<<<<<
 * 
 *         def describe_resume_token(self, token):
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_errno); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_errstr); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_9 = 1;
      }
    }
    __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7);
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(1, 787, __pyx_L1_error)

    /* "libzfs.pyx":786
 *                 convert_sendflags(flags, &cflags)
 * 
 *             if libzfs.zfs_send_resume(self.handle, &cflags, fd, token) != 0:             # <<<<<<<<<<<<<<
 *                 raise ZFSException(self.errno, self.errstr)
 * 
 */
  }

  /* "libzfs.pyx":778
 * 
 *     IF FREEBSD_VERSION >= 1003000:
 *         def send_resume(self, fd, token, flags=None):             # <<<<<<<<<<<<<<
 *             cdef libzfs.sendflags_t cflags
 * 
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("libzfs.ZFS.send_resume", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":789
 *                 raise ZFSException(self.errno, self.errstr)
 * 
 *         def describe_resume_token(self, token):             # <<<<<<<<<<<<<<
 *             cdef nvpair.nvlist_t *nvl
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_3ZFS_38describe_resume_token(PyObject *__pyx_v_self, PyObject *__pyx_v_token); /*proto*/
static PyObject *__pyx_pw_6libzfs_3ZFS_38describe_resume_token(PyObject *__pyx_v_self, PyObject *__pyx_v_token) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("describe_resume_token (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_3ZFS_37describe_resume_token(((struct __pyx_obj_6libzfs_ZFS *)__pyx_v_self), ((PyObject *)__pyx_v_token));

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

static PyObject *__pyx_pf_6libzfs_3ZFS_37describe_resume_token(struct __pyx_obj_6libzfs_ZFS *__pyx_v_self, PyObject *__pyx_v_token) {
  nvlist_t *__pyx_v_nvl;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char const *__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;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("describe_resume_token", 0);

  /* "libzfs.pyx":792
 *             cdef nvpair.nvlist_t *nvl
 * 
 *             nvl = libzfs.zfs_send_resume_token_to_nvlist(self.handle, token)             # <<<<<<<<<<<<<<
 *             if nvl == NULL:
 *                 raise ZFSException(self.errno, self.errstr)
 */
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_token); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(1, 792, __pyx_L1_error)
  __pyx_v_nvl = zfs_send_resume_token_to_nvlist(__pyx_v_self->handle, __pyx_t_1);

  /* "libzfs.pyx":793
 * 
 *             nvl = libzfs.zfs_send_resume_token_to_nvlist(self.handle, token)
 *             if nvl == NULL:             # <<<<<<<<<<<<<<
 *                 raise ZFSException(self.errno, self.errstr)
 * 
 */
  __pyx_t_2 = ((__pyx_v_nvl == NULL) != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":794
 *             nvl = libzfs.zfs_send_resume_token_to_nvlist(self.handle, token)
 *             if nvl == NULL:
 *                 raise ZFSException(self.errno, self.errstr)             # <<<<<<<<<<<<<<
 * 
 *             return dict(NVList(<uintptr_t>nvl))
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_errno); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_errstr); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_8 = 1;
      }
    }
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __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(1, 794, __pyx_L1_error)

    /* "libzfs.pyx":793
 * 
 *             nvl = libzfs.zfs_send_resume_token_to_nvlist(self.handle, token)
 *             if nvl == NULL:             # <<<<<<<<<<<<<<
 *                 raise ZFSException(self.errno, self.errstr)
 * 
 */
  }

  /* "libzfs.pyx":796
 *                 raise ZFSException(self.errno, self.errstr)
 * 
 *             return dict(NVList(<uintptr_t>nvl))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_nvl)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_NVList), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyDict_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":789
 *                 raise ZFSException(self.errno, self.errstr)
 * 
 *         def describe_resume_token(self, token):             # <<<<<<<<<<<<<<
 *             cdef nvpair.nvlist_t *nvl
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __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_9);
  __Pyx_AddTraceback("libzfs.ZFS.describe_resume_token", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":803
 *     cdef readonly ZFSPool pool
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise RuntimeError('ZPoolProperty cannot be instantiated by the user')
 * 
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_13ZPoolProperty_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6libzfs_13ZPoolProperty_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_6libzfs_13ZPoolProperty___init__(((struct __pyx_obj_6libzfs_ZPoolProperty *)__pyx_v_self));

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

static int __pyx_pf_6libzfs_13ZPoolProperty___init__(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "libzfs.pyx":804
 * 
 *     def __init__(self):
 *         raise RuntimeError('ZPoolProperty cannot be instantiated by the user')             # <<<<<<<<<<<<<<
 * 
 *     def __getstate__(self):
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 804, __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, 804, __pyx_L1_error)

  /* "libzfs.pyx":803
 *     cdef readonly ZFSPool pool
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise RuntimeError('ZPoolProperty cannot be instantiated by the user')
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("libzfs.ZPoolProperty.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":806
 *         raise RuntimeError('ZPoolProperty cannot be instantiated by the user')
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return {
 *             'value': self.value,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_13ZPoolProperty_3__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_13ZPoolProperty_3__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_13ZPoolProperty_2__getstate__(((struct __pyx_obj_6libzfs_ZPoolProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_13ZPoolProperty_2__getstate__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__getstate__", 0);

  /* "libzfs.pyx":807
 * 
 *     def __getstate__(self):
 *         return {             # <<<<<<<<<<<<<<
 *             'value': self.value,
 *             'rawvalue': self.rawvalue,
 */
  __Pyx_XDECREF(__pyx_r);

  /* "libzfs.pyx":808
 *     def __getstate__(self):
 *         return {
 *             'value': self.value,             # <<<<<<<<<<<<<<
 *             'rawvalue': self.rawvalue,
 *             'parsed': self.parsed,
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_value, __pyx_t_2) < 0) __PYX_ERR(1, 808, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":809
 *         return {
 *             'value': self.value,
 *             'rawvalue': self.rawvalue,             # <<<<<<<<<<<<<<
 *             'parsed': self.parsed,
 *             'source': self.source.name
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_rawvalue); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_rawvalue, __pyx_t_2) < 0) __PYX_ERR(1, 808, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":810
 *             'value': self.value,
 *             'rawvalue': self.rawvalue,
 *             'parsed': self.parsed,             # <<<<<<<<<<<<<<
 *             'source': self.source.name
 *         }
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parsed); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_parsed, __pyx_t_2) < 0) __PYX_ERR(1, 808, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":811
 *             'rawvalue': self.rawvalue,
 *             'parsed': self.parsed,
 *             'source': self.source.name             # <<<<<<<<<<<<<<
 *         }
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_source); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_source, __pyx_t_3) < 0) __PYX_ERR(1, 808, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":806
 *         raise RuntimeError('ZPoolProperty cannot be instantiated by the user')
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return {
 *             'value': self.value,
 */

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

/* "libzfs.pyx":814
 *         }
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<libzfs.ZPoolProperty name '{0}' value '{1}'>".format(self.name, self.value)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_13ZPoolProperty_5__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_13ZPoolProperty_5__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_13ZPoolProperty_4__str__(((struct __pyx_obj_6libzfs_ZPoolProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_13ZPoolProperty_4__str__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "libzfs.pyx":815
 * 
 *     def __str__(self):
 *         return "<libzfs.ZPoolProperty name '{0}' value '{1}'>".format(self.name, self.value)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_libzfs_ZPoolProperty_name_0_val, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 815, __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_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 815, __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":814
 *         }
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<libzfs.ZPoolProperty name '{0}' value '{1}'>".format(self.name, self.value)
 * 
 */

  /* 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_7);
  __Pyx_AddTraceback("libzfs.ZPoolProperty.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":817
 *         return "<libzfs.ZPoolProperty name '{0}' value '{1}'>".format(self.name, self.value)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_13ZPoolProperty_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_13ZPoolProperty_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_13ZPoolProperty_6__repr__(((struct __pyx_obj_6libzfs_ZPoolProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_13ZPoolProperty_6__repr__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "libzfs.pyx":818
 * 
 *     def __repr__(self):
 *         return str(self)             # <<<<<<<<<<<<<<
 * 
 *     property name:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 818, __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_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 818, __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;

  /* "libzfs.pyx":817
 *         return "<libzfs.ZPoolProperty name '{0}' value '{1}'>".format(self.name, self.value)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

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

/* "libzfs.pyx":821
 * 
 *     property name:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return libzfs.zpool_prop_to_name(self.propid)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_13ZPoolProperty_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_13ZPoolProperty_4name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_13ZPoolProperty_4name___get__(((struct __pyx_obj_6libzfs_ZPoolProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_13ZPoolProperty_4name___get__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":822
 *     property name:
 *         def __get__(self):
 *             return libzfs.zpool_prop_to_name(self.propid)             # <<<<<<<<<<<<<<
 * 
 *     property value:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyUnicode_FromString(zpool_prop_to_name(__pyx_v_self->propid)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":821
 * 
 *     property name:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return libzfs.zpool_prop_to_name(self.propid)
 * 
 */

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

/* "libzfs.pyx":825
 * 
 *     property value:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef char cstr[libzfs.ZPOOL_MAXPROPLEN]
 *             cdef int ret
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_13ZPoolProperty_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_13ZPoolProperty_5value_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_13ZPoolProperty_5value___get__(((struct __pyx_obj_6libzfs_ZPoolProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_13ZPoolProperty_5value___get__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self) {
  char __pyx_v_cstr[ZPOOL_MAXPROPLEN];
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":829
 *             cdef int ret
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 ret = libzfs.zpool_get_prop(self.pool.handle, self.propid, cstr, sizeof(cstr), NULL, False)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":830
 * 
 *             with nogil:
 *                 ret = libzfs.zpool_get_prop(self.pool.handle, self.propid, cstr, sizeof(cstr), NULL, False)             # <<<<<<<<<<<<<<
 * 
 *             if ret != 0:
 */
        __pyx_v_ret = zpool_get_prop(__pyx_v_self->pool->handle, __pyx_v_self->propid, __pyx_v_cstr, (sizeof(__pyx_v_cstr)), NULL, 0);
      }

      /* "libzfs.pyx":829
 *             cdef int ret
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 ret = libzfs.zpool_get_prop(self.pool.handle, self.propid, cstr, sizeof(cstr), NULL, False)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":832
 *                 ret = libzfs.zpool_get_prop(self.pool.handle, self.propid, cstr, sizeof(cstr), NULL, False)
 * 
 *             if ret != 0:             # <<<<<<<<<<<<<<
 *                 return '-'
 * 
 */
  __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":833
 * 
 *             if ret != 0:
 *                 return '-'             # <<<<<<<<<<<<<<
 * 
 *             return cstr
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_s__3);
    __pyx_r = __pyx_kp_s__3;
    goto __pyx_L0;

    /* "libzfs.pyx":832
 *                 ret = libzfs.zpool_get_prop(self.pool.handle, self.propid, cstr, sizeof(cstr), NULL, False)
 * 
 *             if ret != 0:             # <<<<<<<<<<<<<<
 *                 return '-'
 * 
 */
  }

  /* "libzfs.pyx":835
 *                 return '-'
 * 
 *             return cstr             # <<<<<<<<<<<<<<
 * 
 *         def __set__(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_FromString(__pyx_v_cstr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":825
 * 
 *     property value:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef char cstr[libzfs.ZPOOL_MAXPROPLEN]
 *             cdef int ret
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("libzfs.ZPoolProperty.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":837
 *             return cstr
 * 
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             cdef const char *c_name
 *             cdef const char *c_value = value
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_13ZPoolProperty_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6libzfs_13ZPoolProperty_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_13ZPoolProperty_5value_2__set__(((struct __pyx_obj_6libzfs_ZPoolProperty *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6libzfs_13ZPoolProperty_5value_2__set__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self, PyObject *__pyx_v_value) {
  char const *__pyx_v_c_name;
  char const *__pyx_v_c_value;
  int __pyx_v_ret;
  PyObject *__pyx_v_name = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  char const *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  char const *__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;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "libzfs.pyx":839
 *         def __set__(self, value):
 *             cdef const char *c_name
 *             cdef const char *c_value = value             # <<<<<<<<<<<<<<
 *             cdef int ret
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(1, 839, __pyx_L1_error)
  __pyx_v_c_value = __pyx_t_1;

  /* "libzfs.pyx":842
 *             cdef int ret
 * 
 *             name = self.name             # <<<<<<<<<<<<<<
 *             c_name = name
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_name = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "libzfs.pyx":843
 * 
 *             name = self.name
 *             c_name = name             # <<<<<<<<<<<<<<
 * 
 *             with nogil:
 */
  __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 843, __pyx_L1_error)
  __pyx_v_c_name = __pyx_t_3;

  /* "libzfs.pyx":845
 *             c_name = name
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 ret = libzfs.zpool_set_prop(self.pool.handle, c_name, c_value)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":846
 * 
 *             with nogil:
 *                 ret = libzfs.zpool_set_prop(self.pool.handle, c_name, c_value)             # <<<<<<<<<<<<<<
 * 
 *             if ret != 0:
 */
        __pyx_v_ret = zpool_set_prop(__pyx_v_self->pool->handle, __pyx_v_c_name, __pyx_v_c_value);
      }

      /* "libzfs.pyx":845
 *             c_name = name
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 ret = libzfs.zpool_set_prop(self.pool.handle, c_name, c_value)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":848
 *                 ret = libzfs.zpool_set_prop(self.pool.handle, c_name, c_value)
 * 
 *             if ret != 0:             # <<<<<<<<<<<<<<
 *                 raise self.pool.root.get_error()
 * 
 */
  __pyx_t_4 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_4) {

    /* "libzfs.pyx":849
 * 
 *             if ret != 0:
 *                 raise self.pool.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *             self.pool.root.write_history('zpool set', (self.name, str(value)), self.pool.name)
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->pool->root->__pyx_vtab)->get_error(__pyx_v_self->pool->root); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 849, __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(1, 849, __pyx_L1_error)

    /* "libzfs.pyx":848
 *                 ret = libzfs.zpool_set_prop(self.pool.handle, c_name, c_value)
 * 
 *             if ret != 0:             # <<<<<<<<<<<<<<
 *                 raise self.pool.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":851
 *                 raise self.pool.root.get_error()
 * 
 *             self.pool.root.write_history('zpool set', (self.name, str(value)), self.pool.name)             # <<<<<<<<<<<<<<
 * 
 *     property rawvalue:
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->pool->root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_value);
  __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_8);
  __pyx_t_6 = 0;
  __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->pool), __pyx_n_s_name_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_9 = 1;
    }
  }
  __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (__pyx_t_6) {
    __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __pyx_t_6 = NULL;
  }
  __Pyx_INCREF(__pyx_kp_s_zpool_set);
  __Pyx_GIVEREF(__pyx_kp_s_zpool_set);
  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_kp_s_zpool_set);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_8);
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":837
 *             return cstr
 * 
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             cdef const char *c_name
 *             cdef const char *c_value = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("libzfs.ZPoolProperty.value.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":854
 * 
 *     property rawvalue:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef char cstr[libzfs.ZPOOL_MAXPROPLEN]
 *             cdef int ret
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_13ZPoolProperty_8rawvalue_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_13ZPoolProperty_8rawvalue_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_13ZPoolProperty_8rawvalue___get__(((struct __pyx_obj_6libzfs_ZPoolProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_13ZPoolProperty_8rawvalue___get__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self) {
  char __pyx_v_cstr[ZPOOL_MAXPROPLEN];
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":858
 *             cdef int ret
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 ret = libzfs.zpool_get_prop(self.pool.handle, self.propid, cstr, sizeof(cstr), NULL, True)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":859
 * 
 *             with nogil:
 *                 ret = libzfs.zpool_get_prop(self.pool.handle, self.propid, cstr, sizeof(cstr), NULL, True)             # <<<<<<<<<<<<<<
 * 
 *             if ret != 0:
 */
        __pyx_v_ret = zpool_get_prop(__pyx_v_self->pool->handle, __pyx_v_self->propid, __pyx_v_cstr, (sizeof(__pyx_v_cstr)), NULL, 1);
      }

      /* "libzfs.pyx":858
 *             cdef int ret
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 ret = libzfs.zpool_get_prop(self.pool.handle, self.propid, cstr, sizeof(cstr), NULL, True)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":861
 *                 ret = libzfs.zpool_get_prop(self.pool.handle, self.propid, cstr, sizeof(cstr), NULL, True)
 * 
 *             if ret != 0:             # <<<<<<<<<<<<<<
 *                 return '-'
 * 
 */
  __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":862
 * 
 *             if ret != 0:
 *                 return '-'             # <<<<<<<<<<<<<<
 * 
 *             return cstr
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_s__3);
    __pyx_r = __pyx_kp_s__3;
    goto __pyx_L0;

    /* "libzfs.pyx":861
 *                 ret = libzfs.zpool_get_prop(self.pool.handle, self.propid, cstr, sizeof(cstr), NULL, True)
 * 
 *             if ret != 0:             # <<<<<<<<<<<<<<
 *                 return '-'
 * 
 */
  }

  /* "libzfs.pyx":864
 *                 return '-'
 * 
 *             return cstr             # <<<<<<<<<<<<<<
 * 
 *     property source:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_FromString(__pyx_v_cstr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":854
 * 
 *     property rawvalue:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef char cstr[libzfs.ZPOOL_MAXPROPLEN]
 *             cdef int ret
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("libzfs.ZPoolProperty.rawvalue.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":867
 * 
 *     property source:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef zfs.zprop_source_t src
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_13ZPoolProperty_6source_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_13ZPoolProperty_6source_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_13ZPoolProperty_6source___get__(((struct __pyx_obj_6libzfs_ZPoolProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_13ZPoolProperty_6source___get__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self) {
  zprop_source_t __pyx_v_src;
  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;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":870
 *             cdef zfs.zprop_source_t src
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 libzfs.zpool_get_prop(self.pool.handle, self.propid, NULL, 0, &src, True)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":871
 * 
 *             with nogil:
 *                 libzfs.zpool_get_prop(self.pool.handle, self.propid, NULL, 0, &src, True)             # <<<<<<<<<<<<<<
 * 
 *             return PropertySource(src)
 */
        zpool_get_prop(__pyx_v_self->pool->handle, __pyx_v_self->propid, NULL, 0, (&__pyx_v_src), 1);
      }

      /* "libzfs.pyx":870
 *             cdef zfs.zprop_source_t src
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 libzfs.zpool_get_prop(self.pool.handle, self.propid, NULL, 0, &src, True)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":873
 *                 libzfs.zpool_get_prop(self.pool.handle, self.propid, NULL, 0, &src, True)
 * 
 *             return PropertySource(src)             # <<<<<<<<<<<<<<
 * 
 *     property parsed:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PropertySource); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_zprop_source_t(__pyx_v_src); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 873, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 873, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 873, __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":867
 * 
 *     property source:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef zfs.zprop_source_t src
 * 
 */

  /* 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("libzfs.ZPoolProperty.source.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":876
 * 
 *     property parsed:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return parse_zpool_prop(self.name, self.rawvalue)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_13ZPoolProperty_6parsed_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_13ZPoolProperty_6parsed_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_13ZPoolProperty_6parsed___get__(((struct __pyx_obj_6libzfs_ZPoolProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_13ZPoolProperty_6parsed___get__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":877
 *     property parsed:
 *         def __get__(self):
 *             return parse_zpool_prop(self.name, self.rawvalue)             # <<<<<<<<<<<<<<
 * 
 *         def __set__(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_zpool_prop); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_rawvalue); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 877, __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_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 877, __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":876
 * 
 *     property parsed:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return parse_zpool_prop(self.name, self.rawvalue)
 * 
 */

  /* 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_7);
  __Pyx_AddTraceback("libzfs.ZPoolProperty.parsed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":879
 *             return parse_zpool_prop(self.name, self.rawvalue)
 * 
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.value = serialize_zpool_prop(self.name, value)
 * 
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_13ZPoolProperty_6parsed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6libzfs_13ZPoolProperty_6parsed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_13ZPoolProperty_6parsed_2__set__(((struct __pyx_obj_6libzfs_ZPoolProperty *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6libzfs_13ZPoolProperty_6parsed_2__set__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self, PyObject *__pyx_v_value) {
  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;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "libzfs.pyx":880
 * 
 *         def __set__(self, value):
 *             self.value = serialize_zpool_prop(self.name, value)             # <<<<<<<<<<<<<<
 * 
 *     property allowed_values:
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_serialize_zpool_prop); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_5 = 1;
    }
  }
  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 880, __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_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
  __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_3 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value, __pyx_t_1) < 0) __PYX_ERR(1, 880, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":879
 *             return parse_zpool_prop(self.name, self.rawvalue)
 * 
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.value = serialize_zpool_prop(self.name, value)
 * 
 */

  /* 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_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("libzfs.ZPoolProperty.parsed.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":883
 * 
 *     property allowed_values:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return libzfs.zfs_prop_values(self.propid)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_13ZPoolProperty_14allowed_values_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_13ZPoolProperty_14allowed_values_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_13ZPoolProperty_14allowed_values___get__(((struct __pyx_obj_6libzfs_ZPoolProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_13ZPoolProperty_14allowed_values___get__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":884
 *     property allowed_values:
 *         def __get__(self):
 *             return libzfs.zfs_prop_values(self.propid)             # <<<<<<<<<<<<<<
 * 
 *     def reset(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyUnicode_FromString(zfs_prop_values(__pyx_v_self->propid)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":883
 * 
 *     property allowed_values:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return libzfs.zfs_prop_values(self.propid)
 * 
 */

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

/* "libzfs.pyx":886
 *             return libzfs.zfs_prop_values(self.propid)
 * 
 *     def reset(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_13ZPoolProperty_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_13ZPoolProperty_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_13ZPoolProperty_8reset(((struct __pyx_obj_6libzfs_ZPoolProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_13ZPoolProperty_8reset(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":801
 * cdef class ZPoolProperty(object):
 *     cdef int propid
 *     cdef readonly ZFSPool pool             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_13ZPoolProperty_4pool_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_13ZPoolProperty_4pool_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_13ZPoolProperty_4pool___get__(((struct __pyx_obj_6libzfs_ZPoolProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_13ZPoolProperty_4pool___get__(struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->pool));
  __pyx_r = ((PyObject *)__pyx_v_self->pool);
  goto __pyx_L0;

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

/* "libzfs.pyx":895
 *     cdef zfs.zfeature_info_t *feature
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return {
 *             'name': self.name,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZPoolFeature_1__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_12ZPoolFeature_1__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_12ZPoolFeature___getstate__(((struct __pyx_obj_6libzfs_ZPoolFeature *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_12ZPoolFeature___getstate__(struct __pyx_obj_6libzfs_ZPoolFeature *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__getstate__", 0);

  /* "libzfs.pyx":896
 * 
 *     def __getstate__(self):
 *         return {             # <<<<<<<<<<<<<<
 *             'name': self.name,
 *             'guid': self.guid,
 */
  __Pyx_XDECREF(__pyx_r);

  /* "libzfs.pyx":897
 *     def __getstate__(self):
 *         return {
 *             'name': self.name,             # <<<<<<<<<<<<<<
 *             'guid': self.guid,
 *             'description': self.description,
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_name_2, __pyx_t_2) < 0) __PYX_ERR(1, 897, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":898
 *         return {
 *             'name': self.name,
 *             'guid': self.guid,             # <<<<<<<<<<<<<<
 *             'description': self.description,
 *             'state': self.state.name
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_guid); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_guid, __pyx_t_2) < 0) __PYX_ERR(1, 897, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":899
 *             'name': self.name,
 *             'guid': self.guid,
 *             'description': self.description,             # <<<<<<<<<<<<<<
 *             'state': self.state.name
 *         }
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_description); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_description, __pyx_t_2) < 0) __PYX_ERR(1, 897, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":900
 *             'guid': self.guid,
 *             'description': self.description,
 *             'state': self.state.name             # <<<<<<<<<<<<<<
 *         }
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_state, __pyx_t_3) < 0) __PYX_ERR(1, 897, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":895
 *     cdef zfs.zfeature_info_t *feature
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return {
 *             'name': self.name,
 */

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

/* "libzfs.pyx":904
 * 
 *     property name:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.feature.fi_uname
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZPoolFeature_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_12ZPoolFeature_4name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_12ZPoolFeature_4name___get__(((struct __pyx_obj_6libzfs_ZPoolFeature *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_12ZPoolFeature_4name___get__(struct __pyx_obj_6libzfs_ZPoolFeature *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":905
 *     property name:
 *         def __get__(self):
 *             return self.feature.fi_uname             # <<<<<<<<<<<<<<
 * 
 *     property guid:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_self->feature->fi_uname); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":904
 * 
 *     property name:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.feature.fi_uname
 * 
 */

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

/* "libzfs.pyx":908
 * 
 *     property guid:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.feature.fi_guid
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZPoolFeature_4guid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_12ZPoolFeature_4guid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_12ZPoolFeature_4guid___get__(((struct __pyx_obj_6libzfs_ZPoolFeature *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_12ZPoolFeature_4guid___get__(struct __pyx_obj_6libzfs_ZPoolFeature *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":909
 *     property guid:
 *         def __get__(self):
 *             return self.feature.fi_guid             # <<<<<<<<<<<<<<
 * 
 *     property description:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_self->feature->fi_guid); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":908
 * 
 *     property guid:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.feature.fi_guid
 * 
 */

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

/* "libzfs.pyx":912
 * 
 *     property description:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.feature.fi_desc
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZPoolFeature_11description_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_12ZPoolFeature_11description_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_12ZPoolFeature_11description___get__(((struct __pyx_obj_6libzfs_ZPoolFeature *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_12ZPoolFeature_11description___get__(struct __pyx_obj_6libzfs_ZPoolFeature *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":913
 *     property description:
 *         def __get__(self):
 *             return self.feature.fi_desc             # <<<<<<<<<<<<<<
 * 
 *     property state:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_self->feature->fi_desc); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":912
 * 
 *     property description:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.feature.fi_desc
 * 
 */

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

/* "libzfs.pyx":916
 * 
 *     property state:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.guid not in self.nvlist:
 *                 return FeatureState.DISABLED
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZPoolFeature_5state_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_12ZPoolFeature_5state_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_12ZPoolFeature_5state___get__(((struct __pyx_obj_6libzfs_ZPoolFeature *)__pyx_v_self));

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

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

  /* "libzfs.pyx":917
 *     property state:
 *         def __get__(self):
 *             if self.guid not in self.nvlist:             # <<<<<<<<<<<<<<
 *                 return FeatureState.DISABLED
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_guid); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, ((PyObject *)__pyx_v_self->nvlist), Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 917, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "libzfs.pyx":918
 *         def __get__(self):
 *             if self.guid not in self.nvlist:
 *                 return FeatureState.DISABLED             # <<<<<<<<<<<<<<
 * 
 *             if self.nvlist[self.guid] == 0:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_FeatureState); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 918, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_DISABLED); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 918, __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;

    /* "libzfs.pyx":917
 *     property state:
 *         def __get__(self):
 *             if self.guid not in self.nvlist:             # <<<<<<<<<<<<<<
 *                 return FeatureState.DISABLED
 * 
 */
  }

  /* "libzfs.pyx":920
 *                 return FeatureState.DISABLED
 * 
 *             if self.nvlist[self.guid] == 0:             # <<<<<<<<<<<<<<
 *                 return FeatureState.ENABLED
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_guid); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self->nvlist), __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 920, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "libzfs.pyx":921
 * 
 *             if self.nvlist[self.guid] == 0:
 *                 return FeatureState.ENABLED             # <<<<<<<<<<<<<<
 * 
 *             if self.nvlist[self.guid] > 0:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_FeatureState); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 921, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ENABLED); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 921, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "libzfs.pyx":920
 *                 return FeatureState.DISABLED
 * 
 *             if self.nvlist[self.guid] == 0:             # <<<<<<<<<<<<<<
 *                 return FeatureState.ENABLED
 * 
 */
  }

  /* "libzfs.pyx":923
 *                 return FeatureState.ENABLED
 * 
 *             if self.nvlist[self.guid] > 0:             # <<<<<<<<<<<<<<
 *                 return FeatureState.ACTIVE
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_guid); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetItem(((PyObject *)__pyx_v_self->nvlist), __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 923, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 923, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "libzfs.pyx":924
 * 
 *             if self.nvlist[self.guid] > 0:
 *                 return FeatureState.ACTIVE             # <<<<<<<<<<<<<<
 * 
 *     def enable(self):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_FeatureState); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 924, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ACTIVE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 924, __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;

    /* "libzfs.pyx":923
 *                 return FeatureState.ENABLED
 * 
 *             if self.nvlist[self.guid] > 0:             # <<<<<<<<<<<<<<
 *                 return FeatureState.ACTIVE
 * 
 */
  }

  /* "libzfs.pyx":916
 * 
 *     property state:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.guid not in self.nvlist:
 *                 return FeatureState.DISABLED
 */

  /* 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_AddTraceback("libzfs.ZPoolFeature.state.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":926
 *                 return FeatureState.ACTIVE
 * 
 *     def enable(self):             # <<<<<<<<<<<<<<
 *         cdef const char *c_name
 *         cdef int ret
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZPoolFeature_3enable(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_12ZPoolFeature_3enable(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("enable (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_12ZPoolFeature_2enable(((struct __pyx_obj_6libzfs_ZPoolFeature *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_12ZPoolFeature_2enable(struct __pyx_obj_6libzfs_ZPoolFeature *__pyx_v_self) {
  char const *__pyx_v_c_name;
  int __pyx_v_ret;
  PyObject *__pyx_v_name = 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;
  char const *__pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("enable", 0);

  /* "libzfs.pyx":930
 *         cdef int ret
 * 
 *         name = "feature@{0}".format(self.name)             # <<<<<<<<<<<<<<
 *         c_name = name
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_feature_0, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 930, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 930, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 930, __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_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "libzfs.pyx":931
 * 
 *         name = "feature@{0}".format(self.name)
 *         c_name = name             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */
  __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(1, 931, __pyx_L1_error)
  __pyx_v_c_name = __pyx_t_6;

  /* "libzfs.pyx":933
 *         c_name = name
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zpool_set_prop(self.pool.handle, c_name, "enabled")
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":934
 * 
 *         with nogil:
 *             ret = libzfs.zpool_set_prop(self.pool.handle, c_name, "enabled")             # <<<<<<<<<<<<<<
 * 
 *         if ret != 0:
 */
        __pyx_v_ret = zpool_set_prop(__pyx_v_self->pool->handle, __pyx_v_c_name, ((char const *)"enabled"));
      }

      /* "libzfs.pyx":933
 *         c_name = name
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zpool_set_prop(self.pool.handle, c_name, "enabled")
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":936
 *             ret = libzfs.zpool_set_prop(self.pool.handle, c_name, "enabled")
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.pool.root.get_error()
 * 
 */
  __pyx_t_7 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_7) {

    /* "libzfs.pyx":937
 * 
 *         if ret != 0:
 *             raise self.pool.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *         self.pool.root.write_history('zpool set', (self.name, 'enabled'), self.pool.name)
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->pool->root->__pyx_vtab)->get_error(__pyx_v_self->pool->root); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 937, __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, 937, __pyx_L1_error)

    /* "libzfs.pyx":936
 *             ret = libzfs.zpool_set_prop(self.pool.handle, c_name, "enabled")
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.pool.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":939
 *             raise self.pool.root.get_error()
 * 
 *         self.pool.root.write_history('zpool set', (self.name, 'enabled'), self.pool.name)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->pool->root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(__pyx_n_s_enabled);
  __Pyx_GIVEREF(__pyx_n_s_enabled);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_enabled);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->pool), __pyx_n_s_name_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_8 = 1;
    }
  }
  __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__pyx_t_4) {
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL;
  }
  __Pyx_INCREF(__pyx_kp_s_zpool_set);
  __Pyx_GIVEREF(__pyx_kp_s_zpool_set);
  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_kp_s_zpool_set);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":926
 *                 return FeatureState.ACTIVE
 * 
 *     def enable(self):             # <<<<<<<<<<<<<<
 *         cdef const char *c_name
 *         cdef int ret
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("libzfs.ZPoolFeature.enable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":891
 * 
 * cdef class ZPoolFeature(object):
 *     cdef readonly ZFSPool pool             # <<<<<<<<<<<<<<
 *     cdef NVList nvlist
 *     cdef zfs.zfeature_info_t *feature
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZPoolFeature_4pool_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_12ZPoolFeature_4pool_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_12ZPoolFeature_4pool___get__(((struct __pyx_obj_6libzfs_ZPoolFeature *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_12ZPoolFeature_4pool___get__(struct __pyx_obj_6libzfs_ZPoolFeature *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->pool));
  __pyx_r = ((PyObject *)__pyx_v_self->pool);
  goto __pyx_L0;

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

/* "libzfs.pyx":951
 *     cdef zfs.zprop_source_t csource
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise RuntimeError('ZFSProperty cannot be instantiated by the user')
 * 
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_11ZFSProperty_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6libzfs_11ZFSProperty_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_6libzfs_11ZFSProperty___init__(((struct __pyx_obj_6libzfs_ZFSProperty *)__pyx_v_self));

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

static int __pyx_pf_6libzfs_11ZFSProperty___init__(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "libzfs.pyx":952
 * 
 *     def __init__(self):
 *         raise RuntimeError('ZFSProperty cannot be instantiated by the user')             # <<<<<<<<<<<<<<
 * 
 *     def __getstate__(self):
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 952, __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, 952, __pyx_L1_error)

  /* "libzfs.pyx":951
 *     cdef zfs.zprop_source_t csource
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise RuntimeError('ZFSProperty cannot be instantiated by the user')
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("libzfs.ZFSProperty.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":954
 *         raise RuntimeError('ZFSProperty cannot be instantiated by the user')
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return {
 *             'value': self.value,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_3__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_3__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_11ZFSProperty_2__getstate__(((struct __pyx_obj_6libzfs_ZFSProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_11ZFSProperty_2__getstate__(struct __pyx_obj_6libzfs_ZFSProperty *__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_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__getstate__", 0);

  /* "libzfs.pyx":955
 * 
 *     def __getstate__(self):
 *         return {             # <<<<<<<<<<<<<<
 *             'value': self.value,
 *             'rawvalue': self.rawvalue,
 */
  __Pyx_XDECREF(__pyx_r);

  /* "libzfs.pyx":956
 *     def __getstate__(self):
 *         return {
 *             'value': self.value,             # <<<<<<<<<<<<<<
 *             'rawvalue': self.rawvalue,
 *             'parsed': self.parsed,
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_value, __pyx_t_2) < 0) __PYX_ERR(1, 956, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":957
 *         return {
 *             'value': self.value,
 *             'rawvalue': self.rawvalue,             # <<<<<<<<<<<<<<
 *             'parsed': self.parsed,
 *             'source': self.source.name if self.source else None
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_rawvalue); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_rawvalue, __pyx_t_2) < 0) __PYX_ERR(1, 956, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":958
 *             'value': self.value,
 *             'rawvalue': self.rawvalue,
 *             'parsed': self.parsed,             # <<<<<<<<<<<<<<
 *             'source': self.source.name if self.source else None
 *         }
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parsed); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_parsed, __pyx_t_2) < 0) __PYX_ERR(1, 956, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":959
 *             'rawvalue': self.rawvalue,
 *             'parsed': self.parsed,
 *             'source': self.source.name if self.source else None             # <<<<<<<<<<<<<<
 *         }
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 959, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __pyx_t_5;
    __pyx_t_5 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_2 = Py_None;
  }
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_source, __pyx_t_2) < 0) __PYX_ERR(1, 956, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":954
 *         raise RuntimeError('ZFSProperty cannot be instantiated by the user')
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return {
 *             'value': self.value,
 */

  /* 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_5);
  __Pyx_AddTraceback("libzfs.ZFSProperty.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":962
 *         }
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<libzfs.ZFSProperty name '{0}' value '{1}'>".format(self.name, self.value)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_5__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_5__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_11ZFSProperty_4__str__(((struct __pyx_obj_6libzfs_ZFSProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_11ZFSProperty_4__str__(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "libzfs.pyx":963
 * 
 *     def __str__(self):
 *         return "<libzfs.ZFSProperty name '{0}' value '{1}'>".format(self.name, self.value)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_libzfs_ZFSProperty_name_0_value, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 963, __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_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 963, __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":962
 *         }
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<libzfs.ZFSProperty name '{0}' value '{1}'>".format(self.name, self.value)
 * 
 */

  /* 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_7);
  __Pyx_AddTraceback("libzfs.ZFSProperty.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":965
 *         return "<libzfs.ZFSProperty name '{0}' value '{1}'>".format(self.name, self.value)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_11ZFSProperty_6__repr__(((struct __pyx_obj_6libzfs_ZFSProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_11ZFSProperty_6__repr__(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "libzfs.pyx":966
 * 
 *     def __repr__(self):
 *         return str(self)             # <<<<<<<<<<<<<<
 * 
 *     def refresh(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 966, __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_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 966, __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;

  /* "libzfs.pyx":965
 *         return "<libzfs.ZFSProperty name '{0}' value '{1}'>".format(self.name, self.value)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

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

/* "libzfs.pyx":968
 *         return str(self)
 * 
 *     def refresh(self):             # <<<<<<<<<<<<<<
 *         with nogil:
 *             self.cname = libzfs.zfs_prop_to_name(self.propid)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_9refresh(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_9refresh(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("refresh (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_11ZFSProperty_8refresh(((struct __pyx_obj_6libzfs_ZFSProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_11ZFSProperty_8refresh(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("refresh", 0);

  /* "libzfs.pyx":969
 * 
 *     def refresh(self):
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self.cname = libzfs.zfs_prop_to_name(self.propid)
 *             libzfs.zfs_prop_get(
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":970
 *     def refresh(self):
 *         with nogil:
 *             self.cname = libzfs.zfs_prop_to_name(self.propid)             # <<<<<<<<<<<<<<
 *             libzfs.zfs_prop_get(
 *                 self.dataset.handle, self.propid, self.cvalue, libzfs.ZFS_MAXPROPLEN,
 */
        __pyx_v_self->cname = zfs_prop_to_name(__pyx_v_self->propid);

        /* "libzfs.pyx":971
 *         with nogil:
 *             self.cname = libzfs.zfs_prop_to_name(self.propid)
 *             libzfs.zfs_prop_get(             # <<<<<<<<<<<<<<
 *                 self.dataset.handle, self.propid, self.cvalue, libzfs.ZFS_MAXPROPLEN,
 *                 &self.csource, self.csrcstr, MAX_DATASET_NAME_LEN,
 */
        zfs_prop_get(__pyx_v_self->dataset->handle, __pyx_v_self->propid, __pyx_v_self->cvalue, ZFS_MAXPROPLEN, (&__pyx_v_self->csource), __pyx_v_self->csrcstr, __pyx_e_6libzfs_MAX_DATASET_NAME_LEN, 0);

        /* "libzfs.pyx":977
 *             )
 * 
 *             libzfs.zfs_prop_get(             # <<<<<<<<<<<<<<
 *                 self.dataset.handle, self.propid, self.crawvalue, libzfs.ZFS_MAXPROPLEN,
 *                 NULL, NULL, 0,
 */
        zfs_prop_get(__pyx_v_self->dataset->handle, __pyx_v_self->propid, __pyx_v_self->crawvalue, ZFS_MAXPROPLEN, NULL, NULL, 0, 1);
      }

      /* "libzfs.pyx":969
 * 
 *     def refresh(self):
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self.cname = libzfs.zfs_prop_to_name(self.propid)
 *             libzfs.zfs_prop_get(
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":968
 *         return str(self)
 * 
 *     def refresh(self):             # <<<<<<<<<<<<<<
 *         with nogil:
 *             self.cname = libzfs.zfs_prop_to_name(self.propid)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":984
 * 
 *     property name:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.cname
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_4name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_11ZFSProperty_4name___get__(((struct __pyx_obj_6libzfs_ZFSProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_11ZFSProperty_4name___get__(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":985
 *     property name:
 *         def __get__(self):
 *             return self.cname             # <<<<<<<<<<<<<<
 * 
 *     property value:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_self->cname); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":984
 * 
 *     property name:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.cname
 * 
 */

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

/* "libzfs.pyx":988
 * 
 *     property value:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.cvalue
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_5value_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_11ZFSProperty_5value___get__(((struct __pyx_obj_6libzfs_ZFSProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_11ZFSProperty_5value___get__(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":989
 *     property value:
 *         def __get__(self):
 *             return self.cvalue             # <<<<<<<<<<<<<<
 * 
 *         def __set__(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_FromString(__pyx_v_self->cvalue); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":988
 * 
 *     property value:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.cvalue
 * 
 */

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

/* "libzfs.pyx":991
 *             return self.cvalue
 * 
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             cdef const char *c_value
 *             cdef int ret
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_11ZFSProperty_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6libzfs_11ZFSProperty_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_11ZFSProperty_5value_2__set__(((struct __pyx_obj_6libzfs_ZFSProperty *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6libzfs_11ZFSProperty_5value_2__set__(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self, PyObject *__pyx_v_value) {
  char const *__pyx_v_c_value;
  int __pyx_v_ret;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char const *__pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);

  /* "libzfs.pyx":995
 *             cdef int ret
 * 
 *             value = str(value)             # <<<<<<<<<<<<<<
 *             c_value = value
 * 
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "libzfs.pyx":996
 * 
 *             value = str(value)
 *             c_value = value             # <<<<<<<<<<<<<<
 * 
 *             with nogil:
 */
  __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 996, __pyx_L1_error)
  __pyx_v_c_value = __pyx_t_3;

  /* "libzfs.pyx":998
 *             c_value = value
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 ret = libzfs.zfs_prop_set(self.dataset.handle, self.cname, c_value)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":999
 * 
 *             with nogil:
 *                 ret = libzfs.zfs_prop_set(self.dataset.handle, self.cname, c_value)             # <<<<<<<<<<<<<<
 * 
 *             if ret != 0:
 */
        __pyx_v_ret = zfs_prop_set(__pyx_v_self->dataset->handle, __pyx_v_self->cname, __pyx_v_c_value);
      }

      /* "libzfs.pyx":998
 *             c_value = value
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 ret = libzfs.zfs_prop_set(self.dataset.handle, self.cname, c_value)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":1001
 *                 ret = libzfs.zfs_prop_set(self.dataset.handle, self.cname, c_value)
 * 
 *             if ret != 0:             # <<<<<<<<<<<<<<
 *                 raise self.dataset.root.get_error()
 * 
 */
  __pyx_t_4 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_4) {

    /* "libzfs.pyx":1002
 * 
 *             if ret != 0:
 *                 raise self.dataset.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *             self.dataset.root.write_history('zfs set', (self.name, str(value)), self.dataset.name)
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->dataset->root->__pyx_vtab)->get_error(__pyx_v_self->dataset->root); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1002, __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(1, 1002, __pyx_L1_error)

    /* "libzfs.pyx":1001
 *                 ret = libzfs.zfs_prop_set(self.dataset.handle, self.cname, c_value)
 * 
 *             if ret != 0:             # <<<<<<<<<<<<<<
 *                 raise self.dataset.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":1004
 *                 raise self.dataset.root.get_error()
 * 
 *             self.dataset.root.write_history('zfs set', (self.name, str(value)), self.dataset.name)             # <<<<<<<<<<<<<<
 * 
 *     property rawvalue:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->dataset->root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_value);
  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7);
  __pyx_t_5 = 0;
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->dataset), __pyx_n_s_name_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_8 = 1;
    }
  }
  __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1004, __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_INCREF(__pyx_kp_s_zfs_set);
  __Pyx_GIVEREF(__pyx_kp_s_zfs_set);
  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_kp_s_zfs_set);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_7);
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":991
 *             return self.cvalue
 * 
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             cdef const char *c_value
 *             cdef int ret
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("libzfs.ZFSProperty.value.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1007
 * 
 *     property rawvalue:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.crawvalue
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_8rawvalue_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_8rawvalue_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_11ZFSProperty_8rawvalue___get__(((struct __pyx_obj_6libzfs_ZFSProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_11ZFSProperty_8rawvalue___get__(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1008
 *     property rawvalue:
 *         def __get__(self):
 *             return self.crawvalue             # <<<<<<<<<<<<<<
 * 
 *     property source:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_FromString(__pyx_v_self->crawvalue); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1007
 * 
 *     property rawvalue:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.crawvalue
 * 
 */

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

/* "libzfs.pyx":1011
 * 
 *     property source:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return PropertySource(<int>self.csource)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_6source_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_6source_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_11ZFSProperty_6source___get__(((struct __pyx_obj_6libzfs_ZFSProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_11ZFSProperty_6source___get__(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self) {
  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;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1012
 *     property source:
 *         def __get__(self):
 *             return PropertySource(<int>self.csource)             # <<<<<<<<<<<<<<
 * 
 *     property parsed:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PropertySource); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(((int)__pyx_v_self->csource)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1012, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1012, __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1011
 * 
 *     property source:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return PropertySource(<int>self.csource)
 * 
 */

  /* 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("libzfs.ZFSProperty.source.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1015
 * 
 *     property parsed:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return parse_zfs_prop(self.name, self.rawvalue)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_6parsed_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_6parsed_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_11ZFSProperty_6parsed___get__(((struct __pyx_obj_6libzfs_ZFSProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_11ZFSProperty_6parsed___get__(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1016
 *     property parsed:
 *         def __get__(self):
 *             return parse_zfs_prop(self.name, self.rawvalue)             # <<<<<<<<<<<<<<
 * 
 *         def __set__(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_zfs_prop); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_rawvalue); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1016, __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_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1016, __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1015
 * 
 *     property parsed:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return parse_zfs_prop(self.name, self.rawvalue)
 * 
 */

  /* 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_7);
  __Pyx_AddTraceback("libzfs.ZFSProperty.parsed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1018
 *             return parse_zfs_prop(self.name, self.rawvalue)
 * 
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.value = serialize_zfs_prop(self.name, value)
 * 
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_11ZFSProperty_6parsed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6libzfs_11ZFSProperty_6parsed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_11ZFSProperty_6parsed_2__set__(((struct __pyx_obj_6libzfs_ZFSProperty *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6libzfs_11ZFSProperty_6parsed_2__set__(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self, PyObject *__pyx_v_value) {
  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;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "libzfs.pyx":1019
 * 
 *         def __set__(self, value):
 *             self.value = serialize_zfs_prop(self.name, value)             # <<<<<<<<<<<<<<
 * 
 *     property allowed_values:
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_serialize_zfs_prop); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_5 = 1;
    }
  }
  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1019, __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_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
  __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_3 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value, __pyx_t_1) < 0) __PYX_ERR(1, 1019, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":1018
 *             return parse_zfs_prop(self.name, self.rawvalue)
 * 
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.value = serialize_zfs_prop(self.name, value)
 * 
 */

  /* 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_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("libzfs.ZFSProperty.parsed.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1022
 * 
 *     property allowed_values:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return libzfs.zfs_prop_values(self.propid)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_14allowed_values_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_14allowed_values_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_11ZFSProperty_14allowed_values___get__(((struct __pyx_obj_6libzfs_ZFSProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_11ZFSProperty_14allowed_values___get__(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1023
 *     property allowed_values:
 *         def __get__(self):
 *             return libzfs.zfs_prop_values(self.propid)             # <<<<<<<<<<<<<<
 * 
 *     def inherit(self, recursive=False, bint received=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyUnicode_FromString(zfs_prop_values(__pyx_v_self->propid)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1022
 * 
 *     property allowed_values:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return libzfs.zfs_prop_values(self.propid)
 * 
 */

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

/* "libzfs.pyx":1025
 *             return libzfs.zfs_prop_values(self.propid)
 * 
 *     def inherit(self, recursive=False, bint received=False):             # <<<<<<<<<<<<<<
 *         cdef ZFSObject dset
 *         cdef int ret
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_11inherit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_11inherit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_recursive = 0;
  int __pyx_v_received;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inherit (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_recursive,&__pyx_n_s_received,0};
    PyObject* values[2] = {0,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  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_recursive);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_received);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inherit") < 0)) __PYX_ERR(1, 1025, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_recursive = values[0];
    if (values[1]) {
      __pyx_v_received = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_received == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1025, __pyx_L3_error)
    } else {
      __pyx_v_received = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inherit", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1025, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSProperty.inherit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_11ZFSProperty_10inherit(((struct __pyx_obj_6libzfs_ZFSProperty *)__pyx_v_self), __pyx_v_recursive, __pyx_v_received);

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

static PyObject *__pyx_pf_6libzfs_11ZFSProperty_10inherit(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self, PyObject *__pyx_v_recursive, int __pyx_v_received) {
  struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_dset = 0;
  int __pyx_v_ret;
  PyObject *__pyx_v_dsets = NULL;
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("inherit", 0);

  /* "libzfs.pyx":1029
 *         cdef int ret
 * 
 *         dsets = [self.dataset]             # <<<<<<<<<<<<<<
 *         if recursive:
 *             dsets = dsets.extend(list(self.dataset.children_recursive))
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->dataset));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->dataset));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->dataset));
  __pyx_v_dsets = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "libzfs.pyx":1030
 * 
 *         dsets = [self.dataset]
 *         if recursive:             # <<<<<<<<<<<<<<
 *             dsets = dsets.extend(list(self.dataset.children_recursive))
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_recursive); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1030, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "libzfs.pyx":1031
 *         dsets = [self.dataset]
 *         if recursive:
 *             dsets = dsets.extend(list(self.dataset.children_recursive))             # <<<<<<<<<<<<<<
 * 
 *         for d in dsets:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->dataset), __pyx_n_s_children_recursive); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1031, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1031, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __Pyx_PyList_Extend(__pyx_v_dsets, __pyx_t_3); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 1031, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_Owned_Py_None(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1031, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_dsets, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":1030
 * 
 *         dsets = [self.dataset]
 *         if recursive:             # <<<<<<<<<<<<<<
 *             dsets = dsets.extend(list(self.dataset.children_recursive))
 * 
 */
  }

  /* "libzfs.pyx":1033
 *             dsets = dsets.extend(list(self.dataset.children_recursive))
 * 
 *         for d in dsets:             # <<<<<<<<<<<<<<
 *             dset = <ZFSObject>d
 *             with nogil:
 */
  if (likely(PyList_CheckExact(__pyx_v_dsets)) || PyTuple_CheckExact(__pyx_v_dsets)) {
    __pyx_t_3 = __pyx_v_dsets; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_dsets); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1033, __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(1, 1033, __pyx_L1_error)
  }
  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_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 1033, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1033, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 1033, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1033, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 1033, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "libzfs.pyx":1034
 * 
 *         for d in dsets:
 *             dset = <ZFSObject>d             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 ret = libzfs.zfs_prop_inherit(dset.handle, self.cname, received)
 */
    __pyx_t_1 = __pyx_v_d;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_dset, ((struct __pyx_obj_6libzfs_ZFSObject *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "libzfs.pyx":1035
 *         for d in dsets:
 *             dset = <ZFSObject>d
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 ret = libzfs.zfs_prop_inherit(dset.handle, self.cname, received)
 * 
 */
    {
        #ifdef WITH_THREAD
        PyThreadState *_save;
        Py_UNBLOCK_THREADS
        #endif
        /*try:*/ {

          /* "libzfs.pyx":1036
 *             dset = <ZFSObject>d
 *             with nogil:
 *                 ret = libzfs.zfs_prop_inherit(dset.handle, self.cname, received)             # <<<<<<<<<<<<<<
 * 
 *             if ret != 0:
 */
          __pyx_v_ret = zfs_prop_inherit(__pyx_v_dset->handle, __pyx_v_self->cname, __pyx_v_received);
        }

        /* "libzfs.pyx":1035
 *         for d in dsets:
 *             dset = <ZFSObject>d
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 ret = libzfs.zfs_prop_inherit(dset.handle, self.cname, received)
 * 
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            Py_BLOCK_THREADS
            #endif
            goto __pyx_L10;
          }
          __pyx_L10:;
        }
    }

    /* "libzfs.pyx":1038
 *                 ret = libzfs.zfs_prop_inherit(dset.handle, self.cname, received)
 * 
 *             if ret != 0:             # <<<<<<<<<<<<<<
 *                 raise self.dataset.root.get_error()
 * 
 */
    __pyx_t_2 = ((__pyx_v_ret != 0) != 0);
    if (__pyx_t_2) {

      /* "libzfs.pyx":1039
 * 
 *             if ret != 0:
 *                 raise self.dataset.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *         self.dataset.root.write_history('zfs inherit', '-r' if recursive else '', self.dataset.name)
 */
      __pyx_t_1 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->dataset->root->__pyx_vtab)->get_error(__pyx_v_self->dataset->root); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1039, __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, 1039, __pyx_L1_error)

      /* "libzfs.pyx":1038
 *                 ret = libzfs.zfs_prop_inherit(dset.handle, self.cname, received)
 * 
 *             if ret != 0:             # <<<<<<<<<<<<<<
 *                 raise self.dataset.root.get_error()
 * 
 */
    }

    /* "libzfs.pyx":1033
 *             dsets = dsets.extend(list(self.dataset.children_recursive))
 * 
 *         for d in dsets:             # <<<<<<<<<<<<<<
 *             dset = <ZFSObject>d
 *             with nogil:
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "libzfs.pyx":1041
 *                 raise self.dataset.root.get_error()
 * 
 *         self.dataset.root.write_history('zfs inherit', '-r' if recursive else '', self.dataset.name)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->dataset->root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_recursive); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1041, __pyx_L1_error)
  if (__pyx_t_2) {
    __Pyx_INCREF(__pyx_kp_s_r);
    __pyx_t_7 = __pyx_kp_s_r;
  } else {
    __Pyx_INCREF(__pyx_kp_s__11);
    __pyx_t_7 = __pyx_kp_s__11;
  }
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->dataset), __pyx_n_s_name_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  __pyx_t_10 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (__pyx_t_9) {
    __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
  }
  __Pyx_INCREF(__pyx_kp_s_zfs_inherit);
  __Pyx_GIVEREF(__pyx_kp_s_zfs_inherit);
  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_5, __pyx_kp_s_zfs_inherit);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_5, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_5, __pyx_t_8);
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "libzfs.pyx":1025
 *             return libzfs.zfs_prop_values(self.propid)
 * 
 *     def inherit(self, recursive=False, bint received=False):             # <<<<<<<<<<<<<<
 *         cdef ZFSObject dset
 *         cdef int ret
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("libzfs.ZFSProperty.inherit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dset);
  __Pyx_XDECREF(__pyx_v_dsets);
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":943
 * 
 * cdef class ZFSProperty(object):
 *     cdef readonly ZFSObject dataset             # <<<<<<<<<<<<<<
 *     cdef int propid
 *     cdef const char *cname
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_7dataset_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSProperty_7dataset_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_11ZFSProperty_7dataset___get__(((struct __pyx_obj_6libzfs_ZFSProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_11ZFSProperty_7dataset___get__(struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->dataset));
  __pyx_r = ((PyObject *)__pyx_v_self->dataset);
  goto __pyx_L0;

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

/* "libzfs.pyx":1048
 *     cdef readonly name
 * 
 *     def __init__(self, value):             # <<<<<<<<<<<<<<
 *         self.values = {"value": value}
 * 
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_15ZFSUserProperty_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6libzfs_15ZFSUserProperty_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,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);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 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(1, 1048, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_value = 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(1, 1048, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSUserProperty.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_15ZFSUserProperty___init__(((struct __pyx_obj_6libzfs_ZFSUserProperty *)__pyx_v_self), __pyx_v_value);

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

static int __pyx_pf_6libzfs_15ZFSUserProperty___init__(struct __pyx_obj_6libzfs_ZFSUserProperty *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "libzfs.pyx":1049
 * 
 *     def __init__(self, value):
 *         self.values = {"value": value}             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_value, __pyx_v_value) < 0) __PYX_ERR(1, 1049, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->values);
  __Pyx_DECREF(__pyx_v_self->values);
  __pyx_v_self->values = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":1048
 *     cdef readonly name
 * 
 *     def __init__(self, value):             # <<<<<<<<<<<<<<
 *         self.values = {"value": value}
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("libzfs.ZFSUserProperty.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1051
 *         self.values = {"value": value}
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<libzfs.ZFSUserProperty name '{0}' value '{1}'>".format(self.name, self.value)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_15ZFSUserProperty_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_15ZFSUserProperty_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_15ZFSUserProperty_2__str__(((struct __pyx_obj_6libzfs_ZFSUserProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_15ZFSUserProperty_2__str__(struct __pyx_obj_6libzfs_ZFSUserProperty *__pyx_v_self) {
  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;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "libzfs.pyx":1052
 * 
 *     def __str__(self):
 *         return "<libzfs.ZFSUserProperty name '{0}' value '{1}'>".format(self.name, self.value)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_libzfs_ZFSUserProperty_name_0_v, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1052, __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_self->name);
  __Pyx_GIVEREF(__pyx_v_self->name);
  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self->name);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1051
 *         self.values = {"value": value}
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<libzfs.ZFSUserProperty name '{0}' value '{1}'>".format(self.name, self.value)
 * 
 */

  /* 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("libzfs.ZFSUserProperty.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1054
 *         return "<libzfs.ZFSUserProperty name '{0}' value '{1}'>".format(self.name, self.value)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_15ZFSUserProperty_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_15ZFSUserProperty_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_15ZFSUserProperty_4__repr__(((struct __pyx_obj_6libzfs_ZFSUserProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_15ZFSUserProperty_4__repr__(struct __pyx_obj_6libzfs_ZFSUserProperty *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "libzfs.pyx":1055
 * 
 *     def __repr__(self):
 *         return str(self)             # <<<<<<<<<<<<<<
 * 
 *     property value:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1055, __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_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1055, __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;

  /* "libzfs.pyx":1054
 *         return "<libzfs.ZFSUserProperty name '{0}' value '{1}'>".format(self.name, self.value)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

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

/* "libzfs.pyx":1058
 * 
 *     property value:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.values.get('value')
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_15ZFSUserProperty_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_15ZFSUserProperty_5value_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_15ZFSUserProperty_5value___get__(((struct __pyx_obj_6libzfs_ZFSUserProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_15ZFSUserProperty_5value___get__(struct __pyx_obj_6libzfs_ZFSUserProperty *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1059
 *     property value:
 *         def __get__(self):
 *             return self.values.get('value')             # <<<<<<<<<<<<<<
 * 
 *         def __set__(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(__pyx_v_self->values == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
    __PYX_ERR(1, 1059, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->values, __pyx_n_s_value, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1058
 * 
 *     property value:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.values.get('value')
 * 
 */

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

/* "libzfs.pyx":1061
 *             return self.values.get('value')
 * 
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             cdef const char *c_name
 *             cdef const char *c_value
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_15ZFSUserProperty_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6libzfs_15ZFSUserProperty_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_15ZFSUserProperty_5value_2__set__(((struct __pyx_obj_6libzfs_ZFSUserProperty *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6libzfs_15ZFSUserProperty_5value_2__set__(struct __pyx_obj_6libzfs_ZFSUserProperty *__pyx_v_self, PyObject *__pyx_v_value) {
  char const *__pyx_v_c_name;
  char const *__pyx_v_c_value;
  int __pyx_v_ret;
  PyObject *__pyx_v_str_value = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char const *__pyx_t_3;
  char const *__pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "libzfs.pyx":1066
 *             cdef int ret
 * 
 *             str_value = str(value)             # <<<<<<<<<<<<<<
 *             c_name = self.name
 *             c_value = str_value
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_str_value = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "libzfs.pyx":1067
 * 
 *             str_value = str(value)
 *             c_name = self.name             # <<<<<<<<<<<<<<
 *             c_value = str_value
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_self->name); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 1067, __pyx_L1_error)
  __pyx_v_c_name = __pyx_t_3;

  /* "libzfs.pyx":1068
 *             str_value = str(value)
 *             c_name = self.name
 *             c_value = str_value             # <<<<<<<<<<<<<<
 * 
 *             if self.dataset:
 */
  __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_str_value); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 1068, __pyx_L1_error)
  __pyx_v_c_value = __pyx_t_4;

  /* "libzfs.pyx":1070
 *             c_value = str_value
 * 
 *             if self.dataset:             # <<<<<<<<<<<<<<
 *                 with nogil:
 *                     ret = libzfs.zfs_prop_set(self.dataset.handle, c_name, c_value)
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->__pyx_base.dataset)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 1070, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "libzfs.pyx":1071
 * 
 *             if self.dataset:
 *                 with nogil:             # <<<<<<<<<<<<<<
 *                     ret = libzfs.zfs_prop_set(self.dataset.handle, c_name, c_value)
 * 
 */
    {
        #ifdef WITH_THREAD
        PyThreadState *_save;
        Py_UNBLOCK_THREADS
        #endif
        /*try:*/ {

          /* "libzfs.pyx":1072
 *             if self.dataset:
 *                 with nogil:
 *                     ret = libzfs.zfs_prop_set(self.dataset.handle, c_name, c_value)             # <<<<<<<<<<<<<<
 * 
 *                 if ret != 0:
 */
          __pyx_v_ret = zfs_prop_set(__pyx_v_self->__pyx_base.dataset->handle, __pyx_v_c_name, __pyx_v_c_value);
        }

        /* "libzfs.pyx":1071
 * 
 *             if self.dataset:
 *                 with nogil:             # <<<<<<<<<<<<<<
 *                     ret = libzfs.zfs_prop_set(self.dataset.handle, c_name, c_value)
 * 
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            Py_BLOCK_THREADS
            #endif
            goto __pyx_L6;
          }
          __pyx_L6:;
        }
    }

    /* "libzfs.pyx":1074
 *                     ret = libzfs.zfs_prop_set(self.dataset.handle, c_name, c_value)
 * 
 *                 if ret != 0:             # <<<<<<<<<<<<<<
 *                     raise self.dataset.root.get_error()
 * 
 */
    __pyx_t_5 = ((__pyx_v_ret != 0) != 0);
    if (__pyx_t_5) {

      /* "libzfs.pyx":1075
 * 
 *                 if ret != 0:
 *                     raise self.dataset.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *     property rawvalue:
 */
      __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->__pyx_base.dataset->root->__pyx_vtab)->get_error(__pyx_v_self->__pyx_base.dataset->root); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1075, __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(1, 1075, __pyx_L1_error)

      /* "libzfs.pyx":1074
 *                     ret = libzfs.zfs_prop_set(self.dataset.handle, c_name, c_value)
 * 
 *                 if ret != 0:             # <<<<<<<<<<<<<<
 *                     raise self.dataset.root.get_error()
 * 
 */
    }

    /* "libzfs.pyx":1070
 *             c_value = str_value
 * 
 *             if self.dataset:             # <<<<<<<<<<<<<<
 *                 with nogil:
 *                     ret = libzfs.zfs_prop_set(self.dataset.handle, c_name, c_value)
 */
  }

  /* "libzfs.pyx":1061
 *             return self.values.get('value')
 * 
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             cdef const char *c_name
 *             cdef const char *c_value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("libzfs.ZFSUserProperty.value.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1078
 * 
 *     property rawvalue:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_15ZFSUserProperty_8rawvalue_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_15ZFSUserProperty_8rawvalue_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_15ZFSUserProperty_8rawvalue___get__(((struct __pyx_obj_6libzfs_ZFSUserProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_15ZFSUserProperty_8rawvalue___get__(struct __pyx_obj_6libzfs_ZFSUserProperty *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1079
 *     property rawvalue:
 *         def __get__(self):
 *             return self.value             # <<<<<<<<<<<<<<
 * 
 *     property source:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1078
 * 
 *     property rawvalue:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.value
 * 
 */

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

/* "libzfs.pyx":1082
 * 
 *     property source:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             src = self.values.get('source')
 *             if not src:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_15ZFSUserProperty_6source_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_15ZFSUserProperty_6source_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_15ZFSUserProperty_6source___get__(((struct __pyx_obj_6libzfs_ZFSUserProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_15ZFSUserProperty_6source___get__(struct __pyx_obj_6libzfs_ZFSUserProperty *__pyx_v_self) {
  PyObject *__pyx_v_src = 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;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1083
 *     property source:
 *         def __get__(self):
 *             src = self.values.get('source')             # <<<<<<<<<<<<<<
 *             if not src:
 *                 return None
 */
  if (unlikely(__pyx_v_self->values == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
    __PYX_ERR(1, 1083, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->values, __pyx_n_s_source, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_src = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "libzfs.pyx":1084
 *         def __get__(self):
 *             src = self.values.get('source')
 *             if not src:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_src); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1084, __pyx_L1_error)
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (__pyx_t_3) {

    /* "libzfs.pyx":1085
 *             src = self.values.get('source')
 *             if not src:
 *                 return None             # <<<<<<<<<<<<<<
 * 
 *             if src == self.dataset.name:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;

    /* "libzfs.pyx":1084
 *         def __get__(self):
 *             src = self.values.get('source')
 *             if not src:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
  }

  /* "libzfs.pyx":1087
 *                 return None
 * 
 *             if src == self.dataset.name:             # <<<<<<<<<<<<<<
 *                 return PropertySource.LOCAL
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.dataset), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_src, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1087, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1087, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "libzfs.pyx":1088
 * 
 *             if src == self.dataset.name:
 *                 return PropertySource.LOCAL             # <<<<<<<<<<<<<<
 * 
 *             if src == '$recvd':
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_PropertySource); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1088, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_LOCAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1088, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "libzfs.pyx":1087
 *                 return None
 * 
 *             if src == self.dataset.name:             # <<<<<<<<<<<<<<
 *                 return PropertySource.LOCAL
 * 
 */
  }

  /* "libzfs.pyx":1090
 *                 return PropertySource.LOCAL
 * 
 *             if src == '$recvd':             # <<<<<<<<<<<<<<
 *                 return PropertySource.RECEIVED
 * 
 */
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_src, __pyx_kp_s_recvd, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1090, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "libzfs.pyx":1091
 * 
 *             if src == '$recvd':
 *                 return PropertySource.RECEIVED             # <<<<<<<<<<<<<<
 * 
 *             return PropertySource.INHERITED
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_PropertySource); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1091, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_RECEIVED); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1091, __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;

    /* "libzfs.pyx":1090
 *                 return PropertySource.LOCAL
 * 
 *             if src == '$recvd':             # <<<<<<<<<<<<<<
 *                 return PropertySource.RECEIVED
 * 
 */
  }

  /* "libzfs.pyx":1093
 *                 return PropertySource.RECEIVED
 * 
 *             return PropertySource.INHERITED             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_PropertySource); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_INHERITED); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1082
 * 
 *     property source:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             src = self.values.get('source')
 *             if not src:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("libzfs.ZFSUserProperty.source.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_src);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1046
 * cdef class ZFSUserProperty(ZFSProperty):
 *     cdef dict values
 *     cdef readonly name             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, value):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_15ZFSUserProperty_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_15ZFSUserProperty_4name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_15ZFSUserProperty_4name___get__(((struct __pyx_obj_6libzfs_ZFSUserProperty *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_15ZFSUserProperty_4name___get__(struct __pyx_obj_6libzfs_ZFSUserProperty *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->name);
  __pyx_r = __pyx_v_self->name;
  goto __pyx_L0;

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

/* "libzfs.pyx":1100
 *     cdef NVList nvlist
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return {
 *             'timestamp': self.timestamp,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_1__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_1__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_12ZFSVdevStats___getstate__(((struct __pyx_obj_6libzfs_ZFSVdevStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats___getstate__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__getstate__", 0);

  /* "libzfs.pyx":1101
 * 
 *     def __getstate__(self):
 *         return {             # <<<<<<<<<<<<<<
 *             'timestamp': self.timestamp,
 *             'read_errors': self.read_errors,
 */
  __Pyx_XDECREF(__pyx_r);

  /* "libzfs.pyx":1102
 *     def __getstate__(self):
 *         return {
 *             'timestamp': self.timestamp,             # <<<<<<<<<<<<<<
 *             'read_errors': self.read_errors,
 *             'write_errors': self.write_errors,
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_timestamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_timestamp, __pyx_t_2) < 0) __PYX_ERR(1, 1102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1103
 *         return {
 *             'timestamp': self.timestamp,
 *             'read_errors': self.read_errors,             # <<<<<<<<<<<<<<
 *             'write_errors': self.write_errors,
 *             'checksum_errors': self.checksum_errors,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read_errors); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_read_errors, __pyx_t_2) < 0) __PYX_ERR(1, 1102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1104
 *             'timestamp': self.timestamp,
 *             'read_errors': self.read_errors,
 *             'write_errors': self.write_errors,             # <<<<<<<<<<<<<<
 *             'checksum_errors': self.checksum_errors,
 *             'ops': self.ops,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_errors); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_write_errors, __pyx_t_2) < 0) __PYX_ERR(1, 1102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1105
 *             'read_errors': self.read_errors,
 *             'write_errors': self.write_errors,
 *             'checksum_errors': self.checksum_errors,             # <<<<<<<<<<<<<<
 *             'ops': self.ops,
 *             'bytes': self.bytes,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checksum_errors); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_checksum_errors, __pyx_t_2) < 0) __PYX_ERR(1, 1102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1106
 *             'write_errors': self.write_errors,
 *             'checksum_errors': self.checksum_errors,
 *             'ops': self.ops,             # <<<<<<<<<<<<<<
 *             'bytes': self.bytes,
 *             'size': self.size,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ops); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ops, __pyx_t_2) < 0) __PYX_ERR(1, 1102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1107
 *             'checksum_errors': self.checksum_errors,
 *             'ops': self.ops,
 *             'bytes': self.bytes,             # <<<<<<<<<<<<<<
 *             'size': self.size,
 *             'allocated': self.allocated,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_bytes, __pyx_t_2) < 0) __PYX_ERR(1, 1102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1108
 *             'ops': self.ops,
 *             'bytes': self.bytes,
 *             'size': self.size,             # <<<<<<<<<<<<<<
 *             'allocated': self.allocated,
 *             'configured_ashift': self.configured_ashift,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_size, __pyx_t_2) < 0) __PYX_ERR(1, 1102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1109
 *             'bytes': self.bytes,
 *             'size': self.size,
 *             'allocated': self.allocated,             # <<<<<<<<<<<<<<
 *             'configured_ashift': self.configured_ashift,
 *             'logical_ashift': self.logical_ashift,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_allocated); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_allocated, __pyx_t_2) < 0) __PYX_ERR(1, 1102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1110
 *             'size': self.size,
 *             'allocated': self.allocated,
 *             'configured_ashift': self.configured_ashift,             # <<<<<<<<<<<<<<
 *             'logical_ashift': self.logical_ashift,
 *             'physical_ashift': self.physical_ashift,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_configured_ashift); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_configured_ashift, __pyx_t_2) < 0) __PYX_ERR(1, 1102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1111
 *             'allocated': self.allocated,
 *             'configured_ashift': self.configured_ashift,
 *             'logical_ashift': self.logical_ashift,             # <<<<<<<<<<<<<<
 *             'physical_ashift': self.physical_ashift,
 *             'fragmentation': self.fragmentation
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_logical_ashift); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_logical_ashift, __pyx_t_2) < 0) __PYX_ERR(1, 1102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1112
 *             'configured_ashift': self.configured_ashift,
 *             'logical_ashift': self.logical_ashift,
 *             'physical_ashift': self.physical_ashift,             # <<<<<<<<<<<<<<
 *             'fragmentation': self.fragmentation
 *         }
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_physical_ashift); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_physical_ashift, __pyx_t_2) < 0) __PYX_ERR(1, 1102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1113
 *             'logical_ashift': self.logical_ashift,
 *             'physical_ashift': self.physical_ashift,
 *             'fragmentation': self.fragmentation             # <<<<<<<<<<<<<<
 *         }
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fragmentation); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fragmentation, __pyx_t_2) < 0) __PYX_ERR(1, 1102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1100
 *     cdef NVList nvlist
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return {
 *             'timestamp': self.timestamp,
 */

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

/* "libzfs.pyx":1117
 * 
 *     property timestamp:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][0]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_9timestamp_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_9timestamp_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_12ZFSVdevStats_9timestamp___get__(((struct __pyx_obj_6libzfs_ZFSVdevStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_9timestamp___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1118
 *     property timestamp:
 *         def __get__(self):
 *             return self.nvlist['vdev_stats'][0]             # <<<<<<<<<<<<<<
 * 
 *     property size:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_vdev_stats); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1118, __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;

  /* "libzfs.pyx":1117
 * 
 *     property timestamp:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][0]
 * 
 */

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

/* "libzfs.pyx":1121
 * 
 *     property size:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][4]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_4size_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_12ZFSVdevStats_4size___get__(((struct __pyx_obj_6libzfs_ZFSVdevStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_4size___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1122
 *     property size:
 *         def __get__(self):
 *             return self.nvlist['vdev_stats'][4]             # <<<<<<<<<<<<<<
 * 
 *     property allocated:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_vdev_stats); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1122, __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;

  /* "libzfs.pyx":1121
 * 
 *     property size:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][4]
 * 
 */

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

/* "libzfs.pyx":1125
 * 
 *     property allocated:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][3]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_9allocated_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_9allocated_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_12ZFSVdevStats_9allocated___get__(((struct __pyx_obj_6libzfs_ZFSVdevStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_9allocated___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1126
 *     property allocated:
 *         def __get__(self):
 *             return self.nvlist['vdev_stats'][3]             # <<<<<<<<<<<<<<
 * 
 *     property read_errors:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_vdev_stats); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1126, __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;

  /* "libzfs.pyx":1125
 * 
 *     property allocated:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][3]
 * 
 */

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

/* "libzfs.pyx":1129
 * 
 *     property read_errors:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][21]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_11read_errors_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_11read_errors_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_12ZFSVdevStats_11read_errors___get__(((struct __pyx_obj_6libzfs_ZFSVdevStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_11read_errors___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1130
 *     property read_errors:
 *         def __get__(self):
 *             return self.nvlist['vdev_stats'][21]             # <<<<<<<<<<<<<<
 * 
 *     property write_errors:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_vdev_stats); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 21, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1130, __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;

  /* "libzfs.pyx":1129
 * 
 *     property read_errors:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][21]
 * 
 */

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

/* "libzfs.pyx":1133
 * 
 *     property write_errors:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][22]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_12write_errors_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_12write_errors_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_12ZFSVdevStats_12write_errors___get__(((struct __pyx_obj_6libzfs_ZFSVdevStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_12write_errors___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1134
 *     property write_errors:
 *         def __get__(self):
 *             return self.nvlist['vdev_stats'][22]             # <<<<<<<<<<<<<<
 * 
 *     property checksum_errors:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_vdev_stats); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 22, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1134, __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;

  /* "libzfs.pyx":1133
 * 
 *     property write_errors:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][22]
 * 
 */

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

/* "libzfs.pyx":1137
 * 
 *     property checksum_errors:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][23]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_15checksum_errors_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_15checksum_errors_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_12ZFSVdevStats_15checksum_errors___get__(((struct __pyx_obj_6libzfs_ZFSVdevStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_15checksum_errors___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1138
 *     property checksum_errors:
 *         def __get__(self):
 *             return self.nvlist['vdev_stats'][23]             # <<<<<<<<<<<<<<
 * 
 *     property ops:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_vdev_stats); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 23, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1138, __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;

  /* "libzfs.pyx":1137
 * 
 *     property checksum_errors:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][23]
 * 
 */

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

/* "libzfs.pyx":1141
 * 
 *     property ops:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][8:13]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_3ops_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_3ops_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_12ZFSVdevStats_3ops___get__(((struct __pyx_obj_6libzfs_ZFSVdevStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_3ops___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1142
 *     property ops:
 *         def __get__(self):
 *             return self.nvlist['vdev_stats'][8:13]             # <<<<<<<<<<<<<<
 * 
 *     property bytes:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_vdev_stats); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_1, 8, 13, NULL, NULL, &__pyx_slice__34, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1142, __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;

  /* "libzfs.pyx":1141
 * 
 *     property ops:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][8:13]
 * 
 */

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

/* "libzfs.pyx":1145
 * 
 *     property bytes:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][14:19]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_5bytes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_5bytes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_12ZFSVdevStats_5bytes___get__(((struct __pyx_obj_6libzfs_ZFSVdevStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_5bytes___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1146
 *     property bytes:
 *         def __get__(self):
 *             return self.nvlist['vdev_stats'][14:19]             # <<<<<<<<<<<<<<
 * 
 *     property configured_ashift:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_vdev_stats); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_1, 14, 19, NULL, NULL, &__pyx_slice__35, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1146, __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;

  /* "libzfs.pyx":1145
 * 
 *     property bytes:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][14:19]
 * 
 */

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

/* "libzfs.pyx":1149
 * 
 *     property configured_ashift:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][26]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_17configured_ashift_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_17configured_ashift_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_12ZFSVdevStats_17configured_ashift___get__(((struct __pyx_obj_6libzfs_ZFSVdevStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_17configured_ashift___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1150
 *     property configured_ashift:
 *         def __get__(self):
 *             return self.nvlist['vdev_stats'][26]             # <<<<<<<<<<<<<<
 * 
 *     property logical_ashift:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_vdev_stats); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 26, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1150, __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;

  /* "libzfs.pyx":1149
 * 
 *     property configured_ashift:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][26]
 * 
 */

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

/* "libzfs.pyx":1153
 * 
 *     property logical_ashift:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][27]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_14logical_ashift_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_14logical_ashift_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_12ZFSVdevStats_14logical_ashift___get__(((struct __pyx_obj_6libzfs_ZFSVdevStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_14logical_ashift___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1154
 *     property logical_ashift:
 *         def __get__(self):
 *             return self.nvlist['vdev_stats'][27]             # <<<<<<<<<<<<<<
 * 
 *     property physical_ashift:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_vdev_stats); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 27, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1154, __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;

  /* "libzfs.pyx":1153
 * 
 *     property logical_ashift:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][27]
 * 
 */

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

/* "libzfs.pyx":1157
 * 
 *     property physical_ashift:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][28]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_15physical_ashift_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_15physical_ashift_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_12ZFSVdevStats_15physical_ashift___get__(((struct __pyx_obj_6libzfs_ZFSVdevStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_15physical_ashift___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1158
 *     property physical_ashift:
 *         def __get__(self):
 *             return self.nvlist['vdev_stats'][28]             # <<<<<<<<<<<<<<
 * 
 *     property fragmentation:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_vdev_stats); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 28, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1158, __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;

  /* "libzfs.pyx":1157
 * 
 *     property physical_ashift:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][28]
 * 
 */

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

/* "libzfs.pyx":1161
 * 
 *     property fragmentation:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][29]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_13fragmentation_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_13fragmentation_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_12ZFSVdevStats_13fragmentation___get__(((struct __pyx_obj_6libzfs_ZFSVdevStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_13fragmentation___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1162
 *     property fragmentation:
 *         def __get__(self):
 *             return self.nvlist['vdev_stats'][29]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_vdev_stats); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 29, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1162, __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;

  /* "libzfs.pyx":1161
 * 
 *     property fragmentation:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['vdev_stats'][29]
 * 
 */

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

/* "libzfs.pyx":1097
 * 
 * cdef class ZFSVdevStats(object):
 *     cdef readonly ZFSVdev vdev             # <<<<<<<<<<<<<<
 *     cdef NVList nvlist
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_4vdev_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_12ZFSVdevStats_4vdev_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_12ZFSVdevStats_4vdev___get__(((struct __pyx_obj_6libzfs_ZFSVdevStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_12ZFSVdevStats_4vdev___get__(struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->vdev));
  __pyx_r = ((PyObject *)__pyx_v_self->vdev);
  goto __pyx_L0;

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

/* "libzfs.pyx":1172
 *     cdef NVList nvlist
 * 
 *     def __init__(self, ZFS root, typ, ZFSPool pool=None):             # <<<<<<<<<<<<<<
 *         self.root = root
 *         self.zpool = pool
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_7ZFSVdev_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6libzfs_7ZFSVdev_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_6libzfs_ZFS *__pyx_v_root = 0;
  PyObject *__pyx_v_typ = 0;
  struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_pool = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_root,&__pyx_n_s_typ,&__pyx_n_s_pool,0};
    PyObject* values[3] = {0,0,0};
    values[2] = (PyObject *)((struct __pyx_obj_6libzfs_ZFSPool *)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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_root)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_typ)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(1, 1172, __pyx_L3_error)
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pool);
          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(1, 1172, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_root = ((struct __pyx_obj_6libzfs_ZFS *)values[0]);
    __pyx_v_typ = values[1];
    __pyx_v_pool = ((struct __pyx_obj_6libzfs_ZFSPool *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1172, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSVdev.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_6libzfs_ZFS, 1, "root", 0))) __PYX_ERR(1, 1172, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pool), __pyx_ptype_6libzfs_ZFSPool, 1, "pool", 0))) __PYX_ERR(1, 1172, __pyx_L1_error)
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev___init__(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self), __pyx_v_root, __pyx_v_typ, __pyx_v_pool);

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

static int __pyx_pf_6libzfs_7ZFSVdev___init__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, struct __pyx_obj_6libzfs_ZFS *__pyx_v_root, PyObject *__pyx_v_typ, struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_pool) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "libzfs.pyx":1173
 * 
 *     def __init__(self, ZFS root, typ, ZFSPool pool=None):
 *         self.root = root             # <<<<<<<<<<<<<<
 *         self.zpool = pool
 *         self.nvlist = NVList()
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_root));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_root));
  __Pyx_GOTREF(__pyx_v_self->root);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->root));
  __pyx_v_self->root = __pyx_v_root;

  /* "libzfs.pyx":1174
 *     def __init__(self, ZFS root, typ, ZFSPool pool=None):
 *         self.root = root
 *         self.zpool = pool             # <<<<<<<<<<<<<<
 *         self.nvlist = NVList()
 *         self.type = typ
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_pool));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pool));
  __Pyx_GOTREF(__pyx_v_self->zpool);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->zpool));
  __pyx_v_self->zpool = __pyx_v_pool;

  /* "libzfs.pyx":1175
 *         self.root = root
 *         self.zpool = pool
 *         self.nvlist = NVList()             # <<<<<<<<<<<<<<
 *         self.type = typ
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_NVList), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->nvlist);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->nvlist));
  __pyx_v_self->nvlist = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":1176
 *         self.zpool = pool
 *         self.nvlist = NVList()
 *         self.type = typ             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type, __pyx_v_typ) < 0) __PYX_ERR(1, 1176, __pyx_L1_error)

  /* "libzfs.pyx":1172
 *     cdef NVList nvlist
 * 
 *     def __init__(self, ZFS root, typ, ZFSPool pool=None):             # <<<<<<<<<<<<<<
 *         self.root = root
 *         self.zpool = pool
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("libzfs.ZFSVdev.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1178
 *         self.type = typ
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         if self.path:
 *             return "<libzfs.ZFSVdev type '{0}', path '{1}'>".format(self.type, self.path)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_2__str__(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_2__str__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "libzfs.pyx":1179
 * 
 *     def __str__(self):
 *         if self.path:             # <<<<<<<<<<<<<<
 *             return "<libzfs.ZFSVdev type '{0}', path '{1}'>".format(self.type, self.path)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1179, __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(1, 1179, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "libzfs.pyx":1180
 *     def __str__(self):
 *         if self.path:
 *             return "<libzfs.ZFSVdev type '{0}', path '{1}'>".format(self.type, self.path)             # <<<<<<<<<<<<<<
 * 
 *         return "<libzfs.ZFSVdev type '{0}'>".format(self.type)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_libzfs_ZFSVdev_type_0_path_1, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_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_7 = 1;
      }
    }
    __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1180, __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_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "libzfs.pyx":1179
 * 
 *     def __str__(self):
 *         if self.path:             # <<<<<<<<<<<<<<
 *             return "<libzfs.ZFSVdev type '{0}', path '{1}'>".format(self.type, self.path)
 * 
 */
  }

  /* "libzfs.pyx":1182
 *             return "<libzfs.ZFSVdev type '{0}', path '{1}'>".format(self.type, self.path)
 * 
 *         return "<libzfs.ZFSVdev type '{0}'>".format(self.type)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_libzfs_ZFSVdev_type_0, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1182, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_8);
    __pyx_t_8 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1182, __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1178
 *         self.type = typ
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         if self.path:
 *             return "<libzfs.ZFSVdev type '{0}', path '{1}'>".format(self.type, self.path)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("libzfs.ZFSVdev.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1184
 *         return "<libzfs.ZFSVdev type '{0}'>".format(self.type)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_4__repr__(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_4__repr__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "libzfs.pyx":1185
 * 
 *     def __repr__(self):
 *         return str(self)             # <<<<<<<<<<<<<<
 * 
 *     def __getstate__(self, recursive=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1185, __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_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1185, __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;

  /* "libzfs.pyx":1184
 *         return "<libzfs.ZFSVdev type '{0}'>".format(self.type)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

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

/* "libzfs.pyx":1187
 *         return str(self)
 * 
 *     def __getstate__(self, recursive=True):             # <<<<<<<<<<<<<<
 *         ret = {
 *             'type': self.type,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_7__getstate__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_7__getstate__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_recursive = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_recursive,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);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_recursive);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getstate__") < 0)) __PYX_ERR(1, 1187, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_recursive = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getstate__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1187, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSVdev.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_6__getstate__(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self), __pyx_v_recursive);

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_6__getstate__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, PyObject *__pyx_v_recursive) {
  PyObject *__pyx_v_ret = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("__getstate__", 0);

  /* "libzfs.pyx":1189
 *     def __getstate__(self, recursive=True):
 *         ret = {
 *             'type': self.type,             # <<<<<<<<<<<<<<
 *             'path': self.path,
 *             'guid': str(self.guid),
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_type, __pyx_t_2) < 0) __PYX_ERR(1, 1189, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1190
 *         ret = {
 *             'type': self.type,
 *             'path': self.path,             # <<<<<<<<<<<<<<
 *             'guid': str(self.guid),
 *             'status': self.status,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_path, __pyx_t_2) < 0) __PYX_ERR(1, 1189, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1191
 *             'type': self.type,
 *             'path': self.path,
 *             'guid': str(self.guid),             # <<<<<<<<<<<<<<
 *             'status': self.status,
 *             'stats': self.stats.__getstate__()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_guid); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1191, __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_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_guid, __pyx_t_2) < 0) __PYX_ERR(1, 1189, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1192
 *             'path': self.path,
 *             'guid': str(self.guid),
 *             'status': self.status,             # <<<<<<<<<<<<<<
 *             'stats': self.stats.__getstate__()
 *         }
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_status, __pyx_t_2) < 0) __PYX_ERR(1, 1189, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1193
 *             'guid': str(self.guid),
 *             'status': self.status,
 *             'stats': self.stats.__getstate__()             # <<<<<<<<<<<<<<
 *         }
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_stats); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getstate); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(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);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1193, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1193, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_stats, __pyx_t_2) < 0) __PYX_ERR(1, 1189, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_ret = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":1196
 *         }
 * 
 *         if recursive:             # <<<<<<<<<<<<<<
 *             ret['children'] = [i.__getstate__() for i in self.children]
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_recursive); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 1196, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "libzfs.pyx":1197
 * 
 *         if recursive:
 *             ret['children'] = [i.__getstate__() for i in self.children]             # <<<<<<<<<<<<<<
 * 
 *         return ret
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_children); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1197, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 1197, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1197, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 1197, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1197, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_7(__pyx_t_4);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 1197, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_i, __pyx_n_s_getstate); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && 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);
        }
      }
      if (__pyx_t_8) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1197, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1197, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(1, 1197, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_ret, __pyx_n_s_children, __pyx_t_1) < 0)) __PYX_ERR(1, 1197, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "libzfs.pyx":1196
 *         }
 * 
 *         if recursive:             # <<<<<<<<<<<<<<
 *             ret['children'] = [i.__getstate__() for i in self.children]
 * 
 */
  }

  /* "libzfs.pyx":1199
 *             ret['children'] = [i.__getstate__() for i in self.children]
 * 
 *         return ret             # <<<<<<<<<<<<<<
 * 
 *     def add_child_vdev(self, ZFSVdev vdev):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "libzfs.pyx":1187
 *         return str(self)
 * 
 *     def __getstate__(self, recursive=True):             # <<<<<<<<<<<<<<
 *         ret = {
 *             'type': self.type,
 */

  /* 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_8);
  __Pyx_AddTraceback("libzfs.ZFSVdev.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1201
 *         return ret
 * 
 *     def add_child_vdev(self, ZFSVdev vdev):             # <<<<<<<<<<<<<<
 *         if 'children' not in self.nvlist:
 *             self.nvlist.set('children', [], nvpair.DATA_TYPE_NVLIST_ARRAY)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_9add_child_vdev(PyObject *__pyx_v_self, PyObject *__pyx_v_vdev); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_9add_child_vdev(PyObject *__pyx_v_self, PyObject *__pyx_v_vdev) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_child_vdev (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vdev), __pyx_ptype_6libzfs_ZFSVdev, 1, "vdev", 0))) __PYX_ERR(1, 1201, __pyx_L1_error)
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_8add_child_vdev(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self), ((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_vdev));

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_8add_child_vdev(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_vdev) {
  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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("add_child_vdev", 0);

  /* "libzfs.pyx":1202
 * 
 *     def add_child_vdev(self, ZFSVdev vdev):
 *         if 'children' not in self.nvlist:             # <<<<<<<<<<<<<<
 *             self.nvlist.set('children', [], nvpair.DATA_TYPE_NVLIST_ARRAY)
 * 
 */
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_children, ((PyObject *)__pyx_v_self->nvlist), Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1202, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":1203
 *     def add_child_vdev(self, ZFSVdev vdev):
 *         if 'children' not in self.nvlist:
 *             self.nvlist.set('children', [], nvpair.DATA_TYPE_NVLIST_ARRAY)             # <<<<<<<<<<<<<<
 * 
 *         self.nvlist['children'] = self.nvlist.get_raw('children') + [vdev.nvlist]
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_set); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyInt_From_data_type_t(DATA_TYPE_NVLIST_ARRAY); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_8 = 1;
      }
    }
    __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(__pyx_n_s_children);
    __Pyx_GIVEREF(__pyx_n_s_children);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_n_s_children);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_6);
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "libzfs.pyx":1202
 * 
 *     def add_child_vdev(self, ZFSVdev vdev):
 *         if 'children' not in self.nvlist:             # <<<<<<<<<<<<<<
 *             self.nvlist.set('children', [], nvpair.DATA_TYPE_NVLIST_ARRAY)
 * 
 */
  }

  /* "libzfs.pyx":1205
 *             self.nvlist.set('children', [], nvpair.DATA_TYPE_NVLIST_ARRAY)
 * 
 *         self.nvlist['children'] = self.nvlist.get_raw('children') + [vdev.nvlist]             # <<<<<<<<<<<<<<
 * 
 *     def attach(self, ZFSVdev vdev):
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_6libzfs_NVList *)__pyx_v_self->nvlist->__pyx_vtab)->get_raw(__pyx_v_self->nvlist, __pyx_n_s_children); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)__pyx_v_vdev->nvlist));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_vdev->nvlist));
  PyList_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_vdev->nvlist));
  __pyx_t_9 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_children, __pyx_t_9) < 0)) __PYX_ERR(1, 1205, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "libzfs.pyx":1201
 *         return ret
 * 
 *     def add_child_vdev(self, ZFSVdev vdev):             # <<<<<<<<<<<<<<
 *         if 'children' not in self.nvlist:
 *             self.nvlist.set('children', [], nvpair.DATA_TYPE_NVLIST_ARRAY)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("libzfs.ZFSVdev.add_child_vdev", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1207
 *         self.nvlist['children'] = self.nvlist.get_raw('children') + [vdev.nvlist]
 * 
 *     def attach(self, ZFSVdev vdev):             # <<<<<<<<<<<<<<
 *         cdef const char *command = 'zpool attach'
 *         cdef ZFSVdev root
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_11attach(PyObject *__pyx_v_self, PyObject *__pyx_v_vdev); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_11attach(PyObject *__pyx_v_self, PyObject *__pyx_v_vdev) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("attach (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vdev), __pyx_ptype_6libzfs_ZFSVdev, 1, "vdev", 0))) __PYX_ERR(1, 1207, __pyx_L1_error)
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_10attach(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self), ((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_vdev));

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_10attach(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_vdev) {
  char const *__pyx_v_command;
  struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_root = 0;
  PyObject *__pyx_v_first_child = 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;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  char const *__pyx_t_9;
  char const *__pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_RefNannySetupContext("attach", 0);

  /* "libzfs.pyx":1208
 * 
 *     def attach(self, ZFSVdev vdev):
 *         cdef const char *command = 'zpool attach'             # <<<<<<<<<<<<<<
 *         cdef ZFSVdev root
 * 
 */
  __pyx_v_command = ((char const *)"zpool attach");

  /* "libzfs.pyx":1211
 *         cdef ZFSVdev root
 * 
 *         if self.type not in ('mirror', 'disk', 'file'):             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOTSUP, "Can attach disks to mirrors and stripes only")
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_mirror, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1211, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_disk, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1211, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_file, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1211, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "libzfs.pyx":1212
 * 
 *         if self.type not in ('mirror', 'disk', 'file'):
 *             raise ZFSException(Error.NOTSUP, "Can attach disks to mirrors and stripes only")             # <<<<<<<<<<<<<<
 * 
 *         if self.type == 'mirror':
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_NOTSUP); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_6);
    __Pyx_INCREF(__pyx_kp_s_Can_attach_disks_to_mirrors_and);
    __Pyx_GIVEREF(__pyx_kp_s_Can_attach_disks_to_mirrors_and);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_kp_s_Can_attach_disks_to_mirrors_and);
    __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 1212, __pyx_L1_error)

    /* "libzfs.pyx":1211
 *         cdef ZFSVdev root
 * 
 *         if self.type not in ('mirror', 'disk', 'file'):             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOTSUP, "Can attach disks to mirrors and stripes only")
 * 
 */
  }

  /* "libzfs.pyx":1214
 *             raise ZFSException(Error.NOTSUP, "Can attach disks to mirrors and stripes only")
 * 
 *         if self.type == 'mirror':             # <<<<<<<<<<<<<<
 *             first_child = next(self.children)
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_mirror, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1214, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "libzfs.pyx":1215
 * 
 *         if self.type == 'mirror':
 *             first_child = next(self.children)             # <<<<<<<<<<<<<<
 *         else:
 *             first_child = self
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyIter_Next(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_first_child = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "libzfs.pyx":1214
 *             raise ZFSException(Error.NOTSUP, "Can attach disks to mirrors and stripes only")
 * 
 *         if self.type == 'mirror':             # <<<<<<<<<<<<<<
 *             first_child = next(self.children)
 *         else:
 */
    goto __pyx_L7;
  }

  /* "libzfs.pyx":1217
 *             first_child = next(self.children)
 *         else:
 *             first_child = self             # <<<<<<<<<<<<<<
 * 
 *         root = self.root.make_vdev_tree({
 */
  /*else*/ {
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __pyx_v_first_child = ((PyObject *)__pyx_v_self);
  }
  __pyx_L7:;

  /* "libzfs.pyx":1220
 * 
 *         root = self.root.make_vdev_tree({
 *             'data': [vdev]             # <<<<<<<<<<<<<<
 *         })
 * 
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_vdev));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_vdev));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_vdev));
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_data, __pyx_t_1) < 0) __PYX_ERR(1, 1220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":1219
 *             first_child = self
 * 
 *         root = self.root.make_vdev_tree({             # <<<<<<<<<<<<<<
 *             'data': [vdev]
 *         })
 */
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->root->__pyx_vtab)->make_vdev_tree(__pyx_v_self->root, __pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_root = ((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":1225
 *         if libzfs.zpool_vdev_attach(
 *             self.zpool.handle,
 *             first_child.path,             # <<<<<<<<<<<<<<
 *             vdev.path,
 *             root.nvlist.handle,
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_first_child, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(1, 1225, __pyx_L1_error)

  /* "libzfs.pyx":1226
 *             self.zpool.handle,
 *             first_child.path,
 *             vdev.path,             # <<<<<<<<<<<<<<
 *             root.nvlist.handle,
 *             False) != 0:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_vdev), __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(1, 1226, __pyx_L1_error)

  /* "libzfs.pyx":1228
 *             vdev.path,
 *             root.nvlist.handle,
 *             False) != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_3 = ((zpool_vdev_attach(__pyx_v_self->zpool->handle, __pyx_t_9, __pyx_t_10, __pyx_v_root->nvlist->handle, 0) != 0) != 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "libzfs.pyx":1223
 *         })
 * 
 *         if libzfs.zpool_vdev_attach(             # <<<<<<<<<<<<<<
 *             self.zpool.handle,
 *             first_child.path,
 */
  if (__pyx_t_3) {

    /* "libzfs.pyx":1229
 *             root.nvlist.handle,
 *             False) != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *         self.root.write_history(command, self.zpool.name, first_child.path, vdev.path)
 */
    __pyx_t_4 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->root->__pyx_vtab)->get_error(__pyx_v_self->root); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 1229, __pyx_L1_error)

    /* "libzfs.pyx":1223
 *         })
 * 
 *         if libzfs.zpool_vdev_attach(             # <<<<<<<<<<<<<<
 *             self.zpool.handle,
 *             first_child.path,
 */
  }

  /* "libzfs.pyx":1231
 *             raise self.root.get_error()
 * 
 *         self.root.write_history(command, self.zpool.name, first_child.path, vdev.path)             # <<<<<<<<<<<<<<
 * 
 *     def replace(self, ZFSVdev vdev):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyUnicode_FromString(__pyx_v_command); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->zpool), __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_first_child, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_vdev), __pyx_n_s_path); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_7 = 1;
    }
  }
  __pyx_t_13 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (__pyx_t_12) {
    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL;
  }
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_7, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_7, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_7, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_13, 3+__pyx_t_7, __pyx_t_11);
  __pyx_t_8 = 0;
  __pyx_t_6 = 0;
  __pyx_t_5 = 0;
  __pyx_t_11 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "libzfs.pyx":1207
 *         self.nvlist['children'] = self.nvlist.get_raw('children') + [vdev.nvlist]
 * 
 *     def attach(self, ZFSVdev vdev):             # <<<<<<<<<<<<<<
 *         cdef const char *command = 'zpool attach'
 *         cdef ZFSVdev root
 */

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("libzfs.ZFSVdev.attach", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_root);
  __Pyx_XDECREF(__pyx_v_first_child);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1233
 *         self.root.write_history(command, self.zpool.name, first_child.path, vdev.path)
 * 
 *     def replace(self, ZFSVdev vdev):             # <<<<<<<<<<<<<<
 *         cdef const char *command = 'zpool replace'
 *         cdef ZFSVdev root
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_13replace(PyObject *__pyx_v_self, PyObject *__pyx_v_vdev); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_13replace(PyObject *__pyx_v_self, PyObject *__pyx_v_vdev) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("replace (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vdev), __pyx_ptype_6libzfs_ZFSVdev, 1, "vdev", 0))) __PYX_ERR(1, 1233, __pyx_L1_error)
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_12replace(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self), ((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_vdev));

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_12replace(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_vdev) {
  char const *__pyx_v_command;
  struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_root = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  char const *__pyx_t_9;
  char const *__pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_RefNannySetupContext("replace", 0);

  /* "libzfs.pyx":1234
 * 
 *     def replace(self, ZFSVdev vdev):
 *         cdef const char *command = 'zpool replace'             # <<<<<<<<<<<<<<
 *         cdef ZFSVdev root
 * 
 */
  __pyx_v_command = ((char const *)"zpool replace");

  /* "libzfs.pyx":1237
 *         cdef ZFSVdev root
 * 
 *         if self.type == 'file':             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOTSUP, "Can replace disks only")
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_file, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1237, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "libzfs.pyx":1238
 * 
 *         if self.type == 'file':
 *             raise ZFSException(Error.NOTSUP, "Can replace disks only")             # <<<<<<<<<<<<<<
 * 
 *         if not self.parent:
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_NOTSUP); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1238, __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_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_6 = 1;
      }
    }
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1238, __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_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_5);
    __Pyx_INCREF(__pyx_kp_s_Can_replace_disks_only);
    __Pyx_GIVEREF(__pyx_kp_s_Can_replace_disks_only);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_kp_s_Can_replace_disks_only);
    __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 1238, __pyx_L1_error)

    /* "libzfs.pyx":1237
 *         cdef ZFSVdev root
 * 
 *         if self.type == 'file':             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOTSUP, "Can replace disks only")
 * 
 */
  }

  /* "libzfs.pyx":1240
 *             raise ZFSException(Error.NOTSUP, "Can replace disks only")
 * 
 *         if not self.parent:             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOTSUP, "Cannot replace a top-level vdev")
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->parent)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1240, __pyx_L1_error)
  __pyx_t_8 = ((!__pyx_t_2) != 0);
  if (__pyx_t_8) {

    /* "libzfs.pyx":1241
 * 
 *         if not self.parent:
 *             raise ZFSException(Error.NOTSUP, "Cannot replace a top-level vdev")             # <<<<<<<<<<<<<<
 * 
 *         if self.parent.type not in ('mirror', 'raidz1', 'raidz2', 'raidz3'):
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_NOTSUP); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && 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_6 = 1;
      }
    }
    __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_t_5);
    __Pyx_INCREF(__pyx_kp_s_Cannot_replace_a_top_level_vdev);
    __Pyx_GIVEREF(__pyx_kp_s_Cannot_replace_a_top_level_vdev);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_kp_s_Cannot_replace_a_top_level_vdev);
    __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1241, __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_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 1241, __pyx_L1_error)

    /* "libzfs.pyx":1240
 *             raise ZFSException(Error.NOTSUP, "Can replace disks only")
 * 
 *         if not self.parent:             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOTSUP, "Cannot replace a top-level vdev")
 * 
 */
  }

  /* "libzfs.pyx":1243
 *             raise ZFSException(Error.NOTSUP, "Cannot replace a top-level vdev")
 * 
 *         if self.parent.type not in ('mirror', 'raidz1', 'raidz2', 'raidz3'):             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOTSUP, "Can replace disks in mirror and raidz* vdevs only")
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->parent), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_mirror, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1243, __pyx_L1_error)
  if (__pyx_t_2) {
  } else {
    __pyx_t_8 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_raidz1, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1243, __pyx_L1_error)
  if (__pyx_t_2) {
  } else {
    __pyx_t_8 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_raidz2, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1243, __pyx_L1_error)
  if (__pyx_t_2) {
  } else {
    __pyx_t_8 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_raidz3, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1243, __pyx_L1_error)
  __pyx_t_8 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = (__pyx_t_8 != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":1244
 * 
 *         if self.parent.type not in ('mirror', 'raidz1', 'raidz2', 'raidz3'):
 *             raise ZFSException(Error.NOTSUP, "Can replace disks in mirror and raidz* vdevs only")             # <<<<<<<<<<<<<<
 * 
 *         root = self.root.make_vdev_tree({
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_NOTSUP); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1244, __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_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_6 = 1;
      }
    }
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1244, __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_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_5);
    __Pyx_INCREF(__pyx_kp_s_Can_replace_disks_in_mirror_and);
    __Pyx_GIVEREF(__pyx_kp_s_Can_replace_disks_in_mirror_and);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_kp_s_Can_replace_disks_in_mirror_and);
    __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 1244, __pyx_L1_error)

    /* "libzfs.pyx":1243
 *             raise ZFSException(Error.NOTSUP, "Cannot replace a top-level vdev")
 * 
 *         if self.parent.type not in ('mirror', 'raidz1', 'raidz2', 'raidz3'):             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOTSUP, "Can replace disks in mirror and raidz* vdevs only")
 * 
 */
  }

  /* "libzfs.pyx":1247
 * 
 *         root = self.root.make_vdev_tree({
 *             'data': [vdev]             # <<<<<<<<<<<<<<
 *         })
 * 
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_vdev));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_vdev));
  PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_vdev));
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_data, __pyx_t_3) < 0) __PYX_ERR(1, 1247, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "libzfs.pyx":1246
 *             raise ZFSException(Error.NOTSUP, "Can replace disks in mirror and raidz* vdevs only")
 * 
 *         root = self.root.make_vdev_tree({             # <<<<<<<<<<<<<<
 *             'data': [vdev]
 *         })
 */
  __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->root->__pyx_vtab)->make_vdev_tree(__pyx_v_self->root, __pyx_t_1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_root = ((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "libzfs.pyx":1252
 *         if libzfs.zpool_vdev_attach(
 *             self.zpool.handle,
 *             self.path,             # <<<<<<<<<<<<<<
 *             vdev.path,
 *             root.nvlist.handle,
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_t_3); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(1, 1252, __pyx_L1_error)

  /* "libzfs.pyx":1253
 *             self.zpool.handle,
 *             self.path,
 *             vdev.path,             # <<<<<<<<<<<<<<
 *             root.nvlist.handle,
 *             True) != 0:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_vdev), __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(1, 1253, __pyx_L1_error)

  /* "libzfs.pyx":1255
 *             vdev.path,
 *             root.nvlist.handle,
 *             True) != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_2 = ((zpool_vdev_attach(__pyx_v_self->zpool->handle, __pyx_t_9, __pyx_t_10, __pyx_v_root->nvlist->handle, 1) != 0) != 0);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":1250
 *         })
 * 
 *         if libzfs.zpool_vdev_attach(             # <<<<<<<<<<<<<<
 *             self.zpool.handle,
 *             self.path,
 */
  if (__pyx_t_2) {

    /* "libzfs.pyx":1256
 *             root.nvlist.handle,
 *             True) != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *         self.root.write_history(command, self.zpool.name, self.path, vdev.path)
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->root->__pyx_vtab)->get_error(__pyx_v_self->root); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1256, __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, 1256, __pyx_L1_error)

    /* "libzfs.pyx":1250
 *         })
 * 
 *         if libzfs.zpool_vdev_attach(             # <<<<<<<<<<<<<<
 *             self.zpool.handle,
 *             self.path,
 */
  }

  /* "libzfs.pyx":1258
 *             raise self.root.get_error()
 * 
 *         self.root.write_history(command, self.zpool.name, self.path, vdev.path)             # <<<<<<<<<<<<<<
 * 
 *     def detach(self):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyUnicode_FromString(__pyx_v_command); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->zpool), __pyx_n_s_name_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_vdev), __pyx_n_s_path); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  __pyx_t_13 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (__pyx_t_12) {
    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL;
  }
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_6, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_6, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_6, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_13, 3+__pyx_t_6, __pyx_t_11);
  __pyx_t_7 = 0;
  __pyx_t_5 = 0;
  __pyx_t_4 = 0;
  __pyx_t_11 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":1233
 *         self.root.write_history(command, self.zpool.name, first_child.path, vdev.path)
 * 
 *     def replace(self, ZFSVdev vdev):             # <<<<<<<<<<<<<<
 *         cdef const char *command = 'zpool replace'
 *         cdef ZFSVdev root
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("libzfs.ZFSVdev.replace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_root);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1260
 *         self.root.write_history(command, self.zpool.name, self.path, vdev.path)
 * 
 *     def detach(self):             # <<<<<<<<<<<<<<
 *         cdef const char *command = 'zpool detach'
 *         if self.type not in ('file', 'disk'):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_15detach(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_15detach(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("detach (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_14detach(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_14detach(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self) {
  char const *__pyx_v_command;
  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;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("detach", 0);

  /* "libzfs.pyx":1261
 * 
 *     def detach(self):
 *         cdef const char *command = 'zpool detach'             # <<<<<<<<<<<<<<
 *         if self.type not in ('file', 'disk'):
 *             raise ZFSException(Error.NOTSUP, "Cannot detach virtual vdevs")
 */
  __pyx_v_command = ((char const *)"zpool detach");

  /* "libzfs.pyx":1262
 *     def detach(self):
 *         cdef const char *command = 'zpool detach'
 *         if self.type not in ('file', 'disk'):             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOTSUP, "Cannot detach virtual vdevs")
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_file, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1262, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_disk, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1262, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "libzfs.pyx":1263
 *         cdef const char *command = 'zpool detach'
 *         if self.type not in ('file', 'disk'):
 *             raise ZFSException(Error.NOTSUP, "Cannot detach virtual vdevs")             # <<<<<<<<<<<<<<
 * 
 *         if self.parent.type not in ('mirror', 'spare'):
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_NOTSUP); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_6);
    __Pyx_INCREF(__pyx_kp_s_Cannot_detach_virtual_vdevs);
    __Pyx_GIVEREF(__pyx_kp_s_Cannot_detach_virtual_vdevs);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_kp_s_Cannot_detach_virtual_vdevs);
    __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 1263, __pyx_L1_error)

    /* "libzfs.pyx":1262
 *     def detach(self):
 *         cdef const char *command = 'zpool detach'
 *         if self.type not in ('file', 'disk'):             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOTSUP, "Cannot detach virtual vdevs")
 * 
 */
  }

  /* "libzfs.pyx":1265
 *             raise ZFSException(Error.NOTSUP, "Cannot detach virtual vdevs")
 * 
 *         if self.parent.type not in ('mirror', 'spare'):             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOTSUP, "Can detach disks from mirrors and spares only")
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->parent), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_mirror, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1265, __pyx_L1_error)
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_spare, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1265, __pyx_L1_error)
  __pyx_t_3 = __pyx_t_2;
  __pyx_L7_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":1266
 * 
 *         if self.parent.type not in ('mirror', 'spare'):
 *             raise ZFSException(Error.NOTSUP, "Can detach disks from mirrors and spares only")             # <<<<<<<<<<<<<<
 * 
 *         if libzfs.zpool_vdev_detach(self.zpool.handle, self.path) != 0:
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_NOTSUP); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && 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_7 = 1;
      }
    }
    __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_t_6);
    __Pyx_INCREF(__pyx_kp_s_Can_detach_disks_from_mirrors_an);
    __Pyx_GIVEREF(__pyx_kp_s_Can_detach_disks_from_mirrors_an);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_kp_s_Can_detach_disks_from_mirrors_an);
    __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 1266, __pyx_L1_error)

    /* "libzfs.pyx":1265
 *             raise ZFSException(Error.NOTSUP, "Cannot detach virtual vdevs")
 * 
 *         if self.parent.type not in ('mirror', 'spare'):             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOTSUP, "Can detach disks from mirrors and spares only")
 * 
 */
  }

  /* "libzfs.pyx":1268
 *             raise ZFSException(Error.NOTSUP, "Can detach disks from mirrors and spares only")
 * 
 *         if libzfs.zpool_vdev_detach(self.zpool.handle, self.path) != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(1, 1268, __pyx_L1_error)
  __pyx_t_2 = ((zpool_vdev_detach(__pyx_v_self->zpool->handle, __pyx_t_9) != 0) != 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "libzfs.pyx":1269
 * 
 *         if libzfs.zpool_vdev_detach(self.zpool.handle, self.path) != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *         self.root.write_history(command, self.zpool.name, self.path)
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->root->__pyx_vtab)->get_error(__pyx_v_self->root); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1269, __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, 1269, __pyx_L1_error)

    /* "libzfs.pyx":1268
 *             raise ZFSException(Error.NOTSUP, "Can detach disks from mirrors and spares only")
 * 
 *         if libzfs.zpool_vdev_detach(self.zpool.handle, self.path) != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":1271
 *             raise self.root.get_error()
 * 
 *         self.root.write_history(command, self.zpool.name, self.path)             # <<<<<<<<<<<<<<
 * 
 *     def remove(self):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyUnicode_FromString(__pyx_v_command); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->zpool), __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_path); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_10 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  __pyx_t_11 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__pyx_t_10) {
    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
  }
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_7, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_7, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_7, __pyx_t_8);
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_8 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":1260
 *         self.root.write_history(command, self.zpool.name, self.path, vdev.path)
 * 
 *     def detach(self):             # <<<<<<<<<<<<<<
 *         cdef const char *command = 'zpool detach'
 *         if self.type not in ('file', 'disk'):
 */

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("libzfs.ZFSVdev.detach", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1273
 *         self.root.write_history(command, self.zpool.name, self.path)
 * 
 *     def remove(self):             # <<<<<<<<<<<<<<
 *         cdef const char *command = 'zpool remove'
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_17remove(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_17remove(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("remove (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_16remove(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_16remove(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self) {
  char const *__pyx_v_command;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__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;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("remove", 0);

  /* "libzfs.pyx":1274
 * 
 *     def remove(self):
 *         cdef const char *command = 'zpool remove'             # <<<<<<<<<<<<<<
 * 
 *         if libzfs.zpool_vdev_remove(self.zpool.handle, self.path):
 */
  __pyx_v_command = ((char const *)"zpool remove");

  /* "libzfs.pyx":1276
 *         cdef const char *command = 'zpool remove'
 * 
 *         if libzfs.zpool_vdev_remove(self.zpool.handle, self.path):             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 1276, __pyx_L1_error)
  __pyx_t_3 = (zpool_vdev_remove(__pyx_v_self->zpool->handle, __pyx_t_2) != 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "libzfs.pyx":1277
 * 
 *         if libzfs.zpool_vdev_remove(self.zpool.handle, self.path):
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *         self.root.write_history(command, self.zpool.name, self.path)
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->root->__pyx_vtab)->get_error(__pyx_v_self->root); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1277, __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, 1277, __pyx_L1_error)

    /* "libzfs.pyx":1276
 *         cdef const char *command = 'zpool remove'
 * 
 *         if libzfs.zpool_vdev_remove(self.zpool.handle, self.path):             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":1279
 *             raise self.root.get_error()
 * 
 *         self.root.write_history(command, self.zpool.name, self.path)             # <<<<<<<<<<<<<<
 * 
 *     def offline(self, temporary=False):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyUnicode_FromString(__pyx_v_command); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->zpool), __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_path); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(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_9 = 1;
    }
  }
  __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (__pyx_t_8) {
    __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
  }
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_7);
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":1273
 *         self.root.write_history(command, self.zpool.name, self.path)
 * 
 *     def remove(self):             # <<<<<<<<<<<<<<
 *         cdef const char *command = 'zpool remove'
 * 
 */

  /* 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_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("libzfs.ZFSVdev.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1281
 *         self.root.write_history(command, self.zpool.name, self.path)
 * 
 *     def offline(self, temporary=False):             # <<<<<<<<<<<<<<
 *         cdef const char *command = 'zpool offline'
 *         if self.type not in ('disk', 'file'):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_19offline(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_19offline(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_temporary = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("offline (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_temporary,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);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_temporary);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "offline") < 0)) __PYX_ERR(1, 1281, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_temporary = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("offline", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1281, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSVdev.offline", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_18offline(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self), __pyx_v_temporary);

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_18offline(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, PyObject *__pyx_v_temporary) {
  char const *__pyx_v_command;
  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;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  char const *__pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_RefNannySetupContext("offline", 0);

  /* "libzfs.pyx":1282
 * 
 *     def offline(self, temporary=False):
 *         cdef const char *command = 'zpool offline'             # <<<<<<<<<<<<<<
 *         if self.type not in ('disk', 'file'):
 *             raise ZFSException(Error.NOTSUP, "Can make disks offline only")
 */
  __pyx_v_command = ((char const *)"zpool offline");

  /* "libzfs.pyx":1283
 *     def offline(self, temporary=False):
 *         cdef const char *command = 'zpool offline'
 *         if self.type not in ('disk', 'file'):             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOTSUP, "Can make disks offline only")
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_disk, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1283, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_file, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1283, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "libzfs.pyx":1284
 *         cdef const char *command = 'zpool offline'
 *         if self.type not in ('disk', 'file'):
 *             raise ZFSException(Error.NOTSUP, "Can make disks offline only")             # <<<<<<<<<<<<<<
 * 
 *         if libzfs.zpool_vdev_offline(self.zpool.handle, self.path, temporary) != 0:
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_NOTSUP); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_6);
    __Pyx_INCREF(__pyx_kp_s_Can_make_disks_offline_only);
    __Pyx_GIVEREF(__pyx_kp_s_Can_make_disks_offline_only);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_kp_s_Can_make_disks_offline_only);
    __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 1284, __pyx_L1_error)

    /* "libzfs.pyx":1283
 *     def offline(self, temporary=False):
 *         cdef const char *command = 'zpool offline'
 *         if self.type not in ('disk', 'file'):             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOTSUP, "Can make disks offline only")
 * 
 */
  }

  /* "libzfs.pyx":1286
 *             raise ZFSException(Error.NOTSUP, "Can make disks offline only")
 * 
 *         if libzfs.zpool_vdev_offline(self.zpool.handle, self.path, temporary) != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(1, 1286, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_temporary); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1286, __pyx_L1_error)
  __pyx_t_3 = ((zpool_vdev_offline(__pyx_v_self->zpool->handle, __pyx_t_9, __pyx_t_10) != 0) != 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "libzfs.pyx":1287
 * 
 *         if libzfs.zpool_vdev_offline(self.zpool.handle, self.path, temporary) != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *         self.root.write_history(command, '-t' if temporary else '',self.zpool.name, self.path)
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->root->__pyx_vtab)->get_error(__pyx_v_self->root); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1287, __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, 1287, __pyx_L1_error)

    /* "libzfs.pyx":1286
 *             raise ZFSException(Error.NOTSUP, "Can make disks offline only")
 * 
 *         if libzfs.zpool_vdev_offline(self.zpool.handle, self.path, temporary) != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":1289
 *             raise self.root.get_error()
 * 
 *         self.root.write_history(command, '-t' if temporary else '',self.zpool.name, self.path)             # <<<<<<<<<<<<<<
 * 
 *     def online(self, expand=False):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = __Pyx_PyUnicode_FromString(__pyx_v_command); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_temporary); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1289, __pyx_L1_error)
  if (__pyx_t_3) {
    __Pyx_INCREF(__pyx_kp_s_t);
    __pyx_t_6 = __pyx_kp_s_t;
  } else {
    __Pyx_INCREF(__pyx_kp_s__11);
    __pyx_t_6 = __pyx_kp_s__11;
  }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->zpool), __pyx_n_s_name_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_path); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  __pyx_t_13 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (__pyx_t_12) {
    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL;
  }
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_7, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_7, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_7, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_13, 3+__pyx_t_7, __pyx_t_11);
  __pyx_t_8 = 0;
  __pyx_t_6 = 0;
  __pyx_t_5 = 0;
  __pyx_t_11 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":1281
 *         self.root.write_history(command, self.zpool.name, self.path)
 * 
 *     def offline(self, temporary=False):             # <<<<<<<<<<<<<<
 *         cdef const char *command = 'zpool offline'
 *         if self.type not in ('disk', 'file'):
 */

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("libzfs.ZFSVdev.offline", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1291
 *         self.root.write_history(command, '-t' if temporary else '',self.zpool.name, self.path)
 * 
 *     def online(self, expand=False):             # <<<<<<<<<<<<<<
 *         cdef const char *command = 'zpool online'
 *         cdef int flags = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_21online(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_21online(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_expand = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("online (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_expand,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);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_expand);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "online") < 0)) __PYX_ERR(1, 1291, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_expand = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("online", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1291, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSVdev.online", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_20online(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self), __pyx_v_expand);

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_20online(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, PyObject *__pyx_v_expand) {
  char const *__pyx_v_command;
  int __pyx_v_flags;
  vdev_state_t __pyx_v_newstate;
  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;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  char const *__pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_RefNannySetupContext("online", 0);

  /* "libzfs.pyx":1292
 * 
 *     def online(self, expand=False):
 *         cdef const char *command = 'zpool online'             # <<<<<<<<<<<<<<
 *         cdef int flags = 0
 *         cdef zfs.vdev_state_t newstate
 */
  __pyx_v_command = ((char const *)"zpool online");

  /* "libzfs.pyx":1293
 *     def online(self, expand=False):
 *         cdef const char *command = 'zpool online'
 *         cdef int flags = 0             # <<<<<<<<<<<<<<
 *         cdef zfs.vdev_state_t newstate
 * 
 */
  __pyx_v_flags = 0;

  /* "libzfs.pyx":1296
 *         cdef zfs.vdev_state_t newstate
 * 
 *         if self.type not in ('disk', 'file'):             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOTSUP, "Can make disks online only")
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_disk, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1296, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_file, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1296, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "libzfs.pyx":1297
 * 
 *         if self.type not in ('disk', 'file'):
 *             raise ZFSException(Error.NOTSUP, "Can make disks online only")             # <<<<<<<<<<<<<<
 * 
 *         if expand:
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_NOTSUP); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_6);
    __Pyx_INCREF(__pyx_kp_s_Can_make_disks_online_only);
    __Pyx_GIVEREF(__pyx_kp_s_Can_make_disks_online_only);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_kp_s_Can_make_disks_online_only);
    __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 1297, __pyx_L1_error)

    /* "libzfs.pyx":1296
 *         cdef zfs.vdev_state_t newstate
 * 
 *         if self.type not in ('disk', 'file'):             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.NOTSUP, "Can make disks online only")
 * 
 */
  }

  /* "libzfs.pyx":1299
 *             raise ZFSException(Error.NOTSUP, "Can make disks online only")
 * 
 *         if expand:             # <<<<<<<<<<<<<<
 *             flags |= zfs.ZFS_ONLINE_EXPAND
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_expand); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1299, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "libzfs.pyx":1300
 * 
 *         if expand:
 *             flags |= zfs.ZFS_ONLINE_EXPAND             # <<<<<<<<<<<<<<
 * 
 *         if libzfs.zpool_vdev_online(self.zpool.handle, self.path, flags, &newstate) != 0:
 */
    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1300, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_zfs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1300, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ZFS_ONLINE_EXPAND); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1300, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_InPlaceOr(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1300, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1300, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_flags = __pyx_t_9;

    /* "libzfs.pyx":1299
 *             raise ZFSException(Error.NOTSUP, "Can make disks online only")
 * 
 *         if expand:             # <<<<<<<<<<<<<<
 *             flags |= zfs.ZFS_ONLINE_EXPAND
 * 
 */
  }

  /* "libzfs.pyx":1302
 *             flags |= zfs.ZFS_ONLINE_EXPAND
 * 
 *         if libzfs.zpool_vdev_online(self.zpool.handle, self.path, flags, &newstate) != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(1, 1302, __pyx_L1_error)
  __pyx_t_3 = ((zpool_vdev_online(__pyx_v_self->zpool->handle, __pyx_t_10, __pyx_v_flags, (&__pyx_v_newstate)) != 0) != 0);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "libzfs.pyx":1303
 * 
 *         if libzfs.zpool_vdev_online(self.zpool.handle, self.path, flags, &newstate) != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *         self.root.write_history(command, '-e' if expand else '',self.zpool.name, self.path)
 */
    __pyx_t_4 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->root->__pyx_vtab)->get_error(__pyx_v_self->root); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 1303, __pyx_L1_error)

    /* "libzfs.pyx":1302
 *             flags |= zfs.ZFS_ONLINE_EXPAND
 * 
 *         if libzfs.zpool_vdev_online(self.zpool.handle, self.path, flags, &newstate) != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":1305
 *             raise self.root.get_error()
 * 
 *         self.root.write_history(command, '-e' if expand else '',self.zpool.name, self.path)             # <<<<<<<<<<<<<<
 * 
 *     def degrade(self, aux):
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_command); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_expand); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1305, __pyx_L1_error)
  if (__pyx_t_3) {
    __Pyx_INCREF(__pyx_kp_s_e);
    __pyx_t_6 = __pyx_kp_s_e;
  } else {
    __Pyx_INCREF(__pyx_kp_s__11);
    __pyx_t_6 = __pyx_kp_s__11;
  }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->zpool), __pyx_n_s_name_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_path); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(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_7 = 1;
    }
  }
  __pyx_t_13 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (__pyx_t_12) {
    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL;
  }
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_7, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_7, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_7, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_13, 3+__pyx_t_7, __pyx_t_11);
  __pyx_t_1 = 0;
  __pyx_t_6 = 0;
  __pyx_t_5 = 0;
  __pyx_t_11 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "libzfs.pyx":1291
 *         self.root.write_history(command, '-t' if temporary else '',self.zpool.name, self.path)
 * 
 *     def online(self, expand=False):             # <<<<<<<<<<<<<<
 *         cdef const char *command = 'zpool online'
 *         cdef int flags = 0
 */

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("libzfs.ZFSVdev.online", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1307
 *         self.root.write_history(command, '-e' if expand else '',self.zpool.name, self.path)
 * 
 *     def degrade(self, aux):             # <<<<<<<<<<<<<<
 *         if libzfs.zpool_vdev_degrade(self.zpool.handle, self.guid, int(aux)):
 *             raise self.root.get_error()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_23degrade(PyObject *__pyx_v_self, PyObject *__pyx_v_aux); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_23degrade(PyObject *__pyx_v_self, PyObject *__pyx_v_aux) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("degrade (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_22degrade(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self), ((PyObject *)__pyx_v_aux));

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_22degrade(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, PyObject *__pyx_v_aux) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  uint64_t __pyx_t_2;
  vdev_aux_t __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("degrade", 0);

  /* "libzfs.pyx":1308
 * 
 *     def degrade(self, aux):
 *         if libzfs.zpool_vdev_degrade(self.zpool.handle, self.guid, int(aux)):             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_guid); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (uint64_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1308, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_aux); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = ((vdev_aux_t)__Pyx_PyInt_As_vdev_aux_t(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1308, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = (zpool_vdev_degrade(__pyx_v_self->zpool->handle, __pyx_t_2, __pyx_t_3) != 0);
  if (__pyx_t_4) {

    /* "libzfs.pyx":1309
 *     def degrade(self, aux):
 *         if libzfs.zpool_vdev_degrade(self.zpool.handle, self.guid, int(aux)):
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *     def fault(self, aux):
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->root->__pyx_vtab)->get_error(__pyx_v_self->root); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1309, __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, 1309, __pyx_L1_error)

    /* "libzfs.pyx":1308
 * 
 *     def degrade(self, aux):
 *         if libzfs.zpool_vdev_degrade(self.zpool.handle, self.guid, int(aux)):             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":1307
 *         self.root.write_history(command, '-e' if expand else '',self.zpool.name, self.path)
 * 
 *     def degrade(self, aux):             # <<<<<<<<<<<<<<
 *         if libzfs.zpool_vdev_degrade(self.zpool.handle, self.guid, int(aux)):
 *             raise self.root.get_error()
 */

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

/* "libzfs.pyx":1311
 *             raise self.root.get_error()
 * 
 *     def fault(self, aux):             # <<<<<<<<<<<<<<
 *         if libzfs.zpool_vdev_fault(self.zpool.handle, self.guid, int(aux)):
 *             raise self.root.get_error()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_25fault(PyObject *__pyx_v_self, PyObject *__pyx_v_aux); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_25fault(PyObject *__pyx_v_self, PyObject *__pyx_v_aux) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fault (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_24fault(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self), ((PyObject *)__pyx_v_aux));

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_24fault(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, PyObject *__pyx_v_aux) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  uint64_t __pyx_t_2;
  vdev_aux_t __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("fault", 0);

  /* "libzfs.pyx":1312
 * 
 *     def fault(self, aux):
 *         if libzfs.zpool_vdev_fault(self.zpool.handle, self.guid, int(aux)):             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_guid); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (uint64_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1312, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_aux); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = ((vdev_aux_t)__Pyx_PyInt_As_vdev_aux_t(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1312, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = (zpool_vdev_fault(__pyx_v_self->zpool->handle, __pyx_t_2, __pyx_t_3) != 0);
  if (__pyx_t_4) {

    /* "libzfs.pyx":1313
 *     def fault(self, aux):
 *         if libzfs.zpool_vdev_fault(self.zpool.handle, self.guid, int(aux)):
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *     property type:
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->root->__pyx_vtab)->get_error(__pyx_v_self->root); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1313, __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, 1313, __pyx_L1_error)

    /* "libzfs.pyx":1312
 * 
 *     def fault(self, aux):
 *         if libzfs.zpool_vdev_fault(self.zpool.handle, self.guid, int(aux)):             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":1311
 *             raise self.root.get_error()
 * 
 *     def fault(self, aux):             # <<<<<<<<<<<<<<
 *         if libzfs.zpool_vdev_fault(self.zpool.handle, self.guid, int(aux)):
 *             raise self.root.get_error()
 */

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

/* "libzfs.pyx":1316
 * 
 *     property type:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             value = self.nvlist.get('type')
 *             if value == 'raidz':
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_4type_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_4type___get__(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_4type___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self) {
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1317
 *     property type:
 *         def __get__(self):
 *             value = self.nvlist.get('type')             # <<<<<<<<<<<<<<
 *             if value == 'raidz':
 *                 return value + str(self.nvlist.get('nparity'))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_value = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "libzfs.pyx":1318
 *         def __get__(self):
 *             value = self.nvlist.get('type')
 *             if value == 'raidz':             # <<<<<<<<<<<<<<
 *                 return value + str(self.nvlist.get('nparity'))
 * 
 */
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_value, __pyx_n_s_raidz, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1318, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "libzfs.pyx":1319
 *             value = self.nvlist.get('type')
 *             if value == 'raidz':
 *                 return value + str(self.nvlist.get('nparity'))             # <<<<<<<<<<<<<<
 * 
 *             return value
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_v_value, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1319, __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;

    /* "libzfs.pyx":1318
 *         def __get__(self):
 *             value = self.nvlist.get('type')
 *             if value == 'raidz':             # <<<<<<<<<<<<<<
 *                 return value + str(self.nvlist.get('nparity'))
 * 
 */
  }

  /* "libzfs.pyx":1321
 *                 return value + str(self.nvlist.get('nparity'))
 * 
 *             return value             # <<<<<<<<<<<<<<
 * 
 *         def __set__(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_value);
  __pyx_r = __pyx_v_value;
  goto __pyx_L0;

  /* "libzfs.pyx":1316
 * 
 *     property type:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             value = self.nvlist.get('type')
 *             if value == 'raidz':
 */

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

/* "libzfs.pyx":1323
 *             return value
 * 
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             if value not in ('root', 'disk', 'file', 'raidz1', 'raidz2', 'raidz3', 'mirror'):
 *                 raise ValueError('Invalid vdev type')
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_7ZFSVdev_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6libzfs_7ZFSVdev_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_4type_2__set__(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6libzfs_7ZFSVdev_4type_2__set__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "libzfs.pyx":1324
 * 
 *         def __set__(self, value):
 *             if value not in ('root', 'disk', 'file', 'raidz1', 'raidz2', 'raidz3', 'mirror'):             # <<<<<<<<<<<<<<
 *                 raise ValueError('Invalid vdev type')
 * 
 */
  __Pyx_INCREF(__pyx_v_value);
  __pyx_t_1 = __pyx_v_value;
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_root, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1324, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_disk, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1324, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_file, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1324, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_raidz1, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1324, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_raidz2, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1324, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_raidz3, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1324, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_mirror, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1324, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "libzfs.pyx":1325
 *         def __set__(self, value):
 *             if value not in ('root', 'disk', 'file', 'raidz1', 'raidz2', 'raidz3', 'mirror'):
 *                 raise ValueError('Invalid vdev type')             # <<<<<<<<<<<<<<
 * 
 *             self.nvlist['type'] = value
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1325, __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, 1325, __pyx_L1_error)

    /* "libzfs.pyx":1324
 * 
 *         def __set__(self, value):
 *             if value not in ('root', 'disk', 'file', 'raidz1', 'raidz2', 'raidz3', 'mirror'):             # <<<<<<<<<<<<<<
 *                 raise ValueError('Invalid vdev type')
 * 
 */
  }

  /* "libzfs.pyx":1327
 *                 raise ValueError('Invalid vdev type')
 * 
 *             self.nvlist['type'] = value             # <<<<<<<<<<<<<<
 * 
 *             if value.startswith('raidz'):
 */
  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_type, __pyx_v_value) < 0)) __PYX_ERR(1, 1327, __pyx_L1_error)

  /* "libzfs.pyx":1329
 *             self.nvlist['type'] = value
 * 
 *             if value.startswith('raidz'):             # <<<<<<<<<<<<<<
 *                 self.nvlist['type'] = 'raidz'
 *                 self.nvlist['nparity'] = long(value[-1])
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1329, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "libzfs.pyx":1330
 * 
 *             if value.startswith('raidz'):
 *                 self.nvlist['type'] = 'raidz'             # <<<<<<<<<<<<<<
 *                 self.nvlist['nparity'] = long(value[-1])
 * 
 */
    if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_type, __pyx_n_s_raidz) < 0)) __PYX_ERR(1, 1330, __pyx_L1_error)

    /* "libzfs.pyx":1331
 *             if value.startswith('raidz'):
 *                 self.nvlist['type'] = 'raidz'
 *                 self.nvlist['nparity'] = long(value[-1])             # <<<<<<<<<<<<<<
 * 
 *     property guid:
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_value, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyLong_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_nparity, __pyx_t_4) < 0)) __PYX_ERR(1, 1331, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "libzfs.pyx":1329
 *             self.nvlist['type'] = value
 * 
 *             if value.startswith('raidz'):             # <<<<<<<<<<<<<<
 *                 self.nvlist['type'] = 'raidz'
 *                 self.nvlist['nparity'] = long(value[-1])
 */
  }

  /* "libzfs.pyx":1323
 *             return value
 * 
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             if value not in ('root', 'disk', 'file', 'raidz1', 'raidz2', 'raidz3', 'mirror'):
 *                 raise ValueError('Invalid vdev type')
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("libzfs.ZFSVdev.type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1334
 * 
 *     property guid:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist.get('guid')
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_4guid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_4guid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_4guid___get__(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_4guid___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1335
 *     property guid:
 *         def __get__(self):
 *             return self.nvlist.get('guid')             # <<<<<<<<<<<<<<
 * 
 *     property path:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1335, __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;

  /* "libzfs.pyx":1334
 * 
 *     property guid:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist.get('guid')
 * 
 */

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

/* "libzfs.pyx":1338
 * 
 *     property path:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist.get('path')
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_4path_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_4path_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_4path___get__(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_4path___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1339
 *     property path:
 *         def __get__(self):
 *             return self.nvlist.get('path')             # <<<<<<<<<<<<<<
 * 
 *         def __set__(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1339, __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;

  /* "libzfs.pyx":1338
 * 
 *     property path:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist.get('path')
 * 
 */

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

/* "libzfs.pyx":1341
 *             return self.nvlist.get('path')
 * 
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.nvlist['path'] = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_7ZFSVdev_4path_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6libzfs_7ZFSVdev_4path_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_4path_2__set__(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6libzfs_7ZFSVdev_4path_2__set__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "libzfs.pyx":1342
 * 
 *         def __set__(self, value):
 *             self.nvlist['path'] = value             # <<<<<<<<<<<<<<
 * 
 *     property status:
 */
  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_path, __pyx_v_value) < 0)) __PYX_ERR(1, 1342, __pyx_L1_error)

  /* "libzfs.pyx":1341
 *             return self.nvlist.get('path')
 * 
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.nvlist['path'] = value
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("libzfs.ZFSVdev.path.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1345
 * 
 *     property status:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             stats = self.nvlist['vdev_stats']
 *             return libzfs.zpool_state_to_name(stats[1], stats[2])
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_6status_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_6status_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_6status___get__(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_6status___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self) {
  PyObject *__pyx_v_stats = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  vdev_state_t __pyx_t_2;
  vdev_aux_t __pyx_t_3;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1346
 *     property status:
 *         def __get__(self):
 *             stats = self.nvlist['vdev_stats']             # <<<<<<<<<<<<<<
 *             return libzfs.zpool_state_to_name(stats[1], stats[2])
 * 
 */
  __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_vdev_stats); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_stats = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "libzfs.pyx":1347
 *         def __get__(self):
 *             stats = self.nvlist['vdev_stats']
 *             return libzfs.zpool_state_to_name(stats[1], stats[2])             # <<<<<<<<<<<<<<
 * 
 *     property size:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_stats, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((vdev_state_t)__Pyx_PyInt_As_vdev_state_t(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1347, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_stats, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = ((vdev_aux_t)__Pyx_PyInt_As_vdev_aux_t(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1347, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_FromString(zpool_state_to_name(__pyx_t_2, __pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1345
 * 
 *     property status:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             stats = self.nvlist['vdev_stats']
 *             return libzfs.zpool_state_to_name(stats[1], stats[2])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("libzfs.ZFSVdev.status.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_stats);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1350
 * 
 *     property size:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['asize'] << self.nvlist['ashift']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_4size_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_4size___get__(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_4size___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1351
 *     property size:
 *         def __get__(self):
 *             return self.nvlist['asize'] << self.nvlist['ashift']             # <<<<<<<<<<<<<<
 * 
 *     property stats:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_asize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_ashift); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1351, __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;

  /* "libzfs.pyx":1350
 * 
 *     property size:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nvlist['asize'] << self.nvlist['ashift']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("libzfs.ZFSVdev.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1354
 * 
 *     property stats:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSVdevStats ret
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_5stats_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_5stats_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_5stats___get__(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_5stats___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self) {
  struct __pyx_obj_6libzfs_ZFSVdevStats *__pyx_v_ret = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1357
 *             cdef ZFSVdevStats ret
 * 
 *             ret = ZFSVdevStats.__new__(ZFSVdevStats)             # <<<<<<<<<<<<<<
 *             ret.vdev = self
 *             ret.nvlist = self.nvlist
 */
  __pyx_t_1 = __pyx_tp_new_6libzfs_ZFSVdevStats(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSVdevStats), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6libzfs_ZFSVdevStats)))) __PYX_ERR(1, 1357, __pyx_L1_error)
  __pyx_v_ret = ((struct __pyx_obj_6libzfs_ZFSVdevStats *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":1358
 * 
 *             ret = ZFSVdevStats.__new__(ZFSVdevStats)
 *             ret.vdev = self             # <<<<<<<<<<<<<<
 *             ret.nvlist = self.nvlist
 *             return ret
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_ret->vdev);
  __Pyx_DECREF(((PyObject *)__pyx_v_ret->vdev));
  __pyx_v_ret->vdev = __pyx_v_self;

  /* "libzfs.pyx":1359
 *             ret = ZFSVdevStats.__new__(ZFSVdevStats)
 *             ret.vdev = self
 *             ret.nvlist = self.nvlist             # <<<<<<<<<<<<<<
 *             return ret
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->nvlist);
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_ret->nvlist);
  __Pyx_DECREF(((PyObject *)__pyx_v_ret->nvlist));
  __pyx_v_ret->nvlist = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":1360
 *             ret.vdev = self
 *             ret.nvlist = self.nvlist
 *             return ret             # <<<<<<<<<<<<<<
 * 
 *     property children:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_ret));
  __pyx_r = ((PyObject *)__pyx_v_ret);
  goto __pyx_L0;

  /* "libzfs.pyx":1354
 * 
 *     property stats:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSVdevStats ret
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("libzfs.ZFSVdev.stats.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ret);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6libzfs_7ZFSVdev_8children_2generator6(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "libzfs.pyx":1363
 * 
 *     property children:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSVdev vdev
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_8children_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_8children_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_8children___get__(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_8children___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_7___get__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_cur_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_7___get__ *)__pyx_tp_new_6libzfs___pyx_scope_struct_7___get__(__pyx_ptype_6libzfs___pyx_scope_struct_7___get__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6libzfs_7ZFSVdev_8children_2generator6, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_ZFSVdev___get); if (unlikely(!gen)) __PYX_ERR(1, 1363, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("libzfs.ZFSVdev.children.__get__", __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_6libzfs_7ZFSVdev_8children_2generator6(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6libzfs___pyx_scope_struct_7___get__ *__pyx_cur_scope = ((struct __pyx_obj_6libzfs___pyx_scope_struct_7___get__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  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 *);
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L7_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(1, 1363, __pyx_L1_error)

  /* "libzfs.pyx":1366
 *             cdef ZFSVdev vdev
 * 
 *             if 'children' not in self.nvlist:             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_children, ((PyObject *)__pyx_cur_scope->__pyx_v_self->nvlist), Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1366, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":1367
 * 
 *             if 'children' not in self.nvlist:
 *                 return             # <<<<<<<<<<<<<<
 * 
 *             for i in self.nvlist.get_raw('children'):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = NULL;
    goto __pyx_L0;

    /* "libzfs.pyx":1366
 *             cdef ZFSVdev vdev
 * 
 *             if 'children' not in self.nvlist:             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
  }

  /* "libzfs.pyx":1369
 *                 return
 * 
 *             for i in self.nvlist.get_raw('children'):             # <<<<<<<<<<<<<<
 *                 vdev = ZFSVdev.__new__(ZFSVdev)
 *                 vdev.nvlist = i
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_6libzfs_NVList *)__pyx_cur_scope->__pyx_v_self->nvlist->__pyx_vtab)->get_raw(__pyx_cur_scope->__pyx_v_self->nvlist, __pyx_n_s_children); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1369, __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(1, 1369, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  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_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 1369, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1369, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 1369, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1369, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 1369, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":1370
 * 
 *             for i in self.nvlist.get_raw('children'):
 *                 vdev = ZFSVdev.__new__(ZFSVdev)             # <<<<<<<<<<<<<<
 *                 vdev.nvlist = i
 *                 vdev.zpool = self.zpool
 */
    __pyx_t_3 = __pyx_tp_new_6libzfs_ZFSVdev(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSVdev), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6libzfs_ZFSVdev)))) __PYX_ERR(1, 1370, __pyx_L1_error)
    __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev));
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_vdev, ((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_t_3));
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":1371
 *             for i in self.nvlist.get_raw('children'):
 *                 vdev = ZFSVdev.__new__(ZFSVdev)
 *                 vdev.nvlist = i             # <<<<<<<<<<<<<<
 *                 vdev.zpool = self.zpool
 *                 vdev.root = self.root
 */
    if (!(likely(((__pyx_cur_scope->__pyx_v_i) == Py_None) || likely(__Pyx_TypeTest(__pyx_cur_scope->__pyx_v_i, __pyx_ptype_6libzfs_NVList))))) __PYX_ERR(1, 1371, __pyx_L1_error)
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_i;
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_vdev->nvlist);
    __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev->nvlist));
    __pyx_cur_scope->__pyx_v_vdev->nvlist = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":1372
 *                 vdev = ZFSVdev.__new__(ZFSVdev)
 *                 vdev.nvlist = i
 *                 vdev.zpool = self.zpool             # <<<<<<<<<<<<<<
 *                 vdev.root = self.root
 *                 vdev.parent = self
 */
    __pyx_t_3 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->zpool);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_vdev->zpool);
    __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev->zpool));
    __pyx_cur_scope->__pyx_v_vdev->zpool = ((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":1373
 *                 vdev.nvlist = i
 *                 vdev.zpool = self.zpool
 *                 vdev.root = self.root             # <<<<<<<<<<<<<<
 *                 vdev.parent = self
 *                 vdev.group = self.group
 */
    __pyx_t_3 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->root);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_vdev->root);
    __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev->root));
    __pyx_cur_scope->__pyx_v_vdev->root = ((struct __pyx_obj_6libzfs_ZFS *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":1374
 *                 vdev.zpool = self.zpool
 *                 vdev.root = self.root
 *                 vdev.parent = self             # <<<<<<<<<<<<<<
 *                 vdev.group = self.group
 *                 yield vdev
 */
    __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_vdev->parent);
    __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev->parent));
    __pyx_cur_scope->__pyx_v_vdev->parent = __pyx_cur_scope->__pyx_v_self;

    /* "libzfs.pyx":1375
 *                 vdev.root = self.root
 *                 vdev.parent = self
 *                 vdev.group = self.group             # <<<<<<<<<<<<<<
 *                 yield vdev
 * 
 */
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_self->group;
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_vdev->group);
    __Pyx_DECREF(__pyx_cur_scope->__pyx_v_vdev->group);
    __pyx_cur_scope->__pyx_v_vdev->group = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "libzfs.pyx":1376
 *                 vdev.parent = self
 *                 vdev.group = self.group
 *                 yield vdev             # <<<<<<<<<<<<<<
 * 
 *         def __set__(self, value):
 */
    __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev));
    __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_vdev);
    __Pyx_XGIVEREF(__pyx_t_4);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_4;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L7_resume_from_yield:;
    __pyx_t_4 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_4);
    __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1376, __pyx_L1_error)

    /* "libzfs.pyx":1369
 *                 return
 * 
 *             for i in self.nvlist.get_raw('children'):             # <<<<<<<<<<<<<<
 *                 vdev = ZFSVdev.__new__(ZFSVdev)
 *                 vdev.nvlist = i
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "libzfs.pyx":1363
 * 
 *     property children:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSVdev vdev
 * 
 */

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

/* "libzfs.pyx":1378
 *                 yield vdev
 * 
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.nvlist['children'] = [(<ZFSVdev>i).nvlist for i in value]
 * 
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_7ZFSVdev_8children_4__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6libzfs_7ZFSVdev_8children_4__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_8children_3__set__(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6libzfs_7ZFSVdev_8children_3__set__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_i = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "libzfs.pyx":1379
 * 
 *         def __set__(self, value):
 *             self.nvlist['children'] = [(<ZFSVdev>i).nvlist for i in value]             # <<<<<<<<<<<<<<
 * 
 *     property disks:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_2 = __pyx_v_value; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1379, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 1379, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1379, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 1379, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1379, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 1379, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
    __pyx_t_5 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_i)->nvlist))) __PYX_ERR(1, 1379, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self->nvlist), __pyx_n_s_children, __pyx_t_1) < 0)) __PYX_ERR(1, 1379, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":1378
 *                 yield vdev
 * 
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.nvlist['children'] = [(<ZFSVdev>i).nvlist for i in value]
 * 
 */

  /* 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_5);
  __Pyx_AddTraceback("libzfs.ZFSVdev.children.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1382
 * 
 *     property disks:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.type == 'disk':
 *                 return [self.path]
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_5disks_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_5disks_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_5disks___get__(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_5disks___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1383
 *     property disks:
 *         def __get__(self):
 *             if self.type == 'disk':             # <<<<<<<<<<<<<<
 *                 return [self.path]
 *             elif self.type == 'file':
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_disk, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1383, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "libzfs.pyx":1384
 *         def __get__(self):
 *             if self.type == 'disk':
 *                 return [self.path]             # <<<<<<<<<<<<<<
 *             elif self.type == 'file':
 *                 return []
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_1);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "libzfs.pyx":1383
 *     property disks:
 *         def __get__(self):
 *             if self.type == 'disk':             # <<<<<<<<<<<<<<
 *                 return [self.path]
 *             elif self.type == 'file':
 */
  }

  /* "libzfs.pyx":1385
 *             if self.type == 'disk':
 *                 return [self.path]
 *             elif self.type == 'file':             # <<<<<<<<<<<<<<
 *                 return []
 *             else:
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_file, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1385, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "libzfs.pyx":1386
 *                 return [self.path]
 *             elif self.type == 'file':
 *                 return []             # <<<<<<<<<<<<<<
 *             else:
 *                 result = []
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "libzfs.pyx":1385
 *             if self.type == 'disk':
 *                 return [self.path]
 *             elif self.type == 'file':             # <<<<<<<<<<<<<<
 *                 return []
 *             else:
 */
  }

  /* "libzfs.pyx":1388
 *                 return []
 *             else:
 *                 result = []             # <<<<<<<<<<<<<<
 *                 for i in self.children:
 *                     result += i.disks
 */
  /*else*/ {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_result = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "libzfs.pyx":1389
 *             else:
 *                 result = []
 *                 for i in self.children:             # <<<<<<<<<<<<<<
 *                     result += i.disks
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_children); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1389, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1389, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 1389, __pyx_L1_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1389, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 1389, __pyx_L1_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1389, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_5(__pyx_t_1);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 1389, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "libzfs.pyx":1390
 *                 result = []
 *                 for i in self.children:
 *                     result += i.disks             # <<<<<<<<<<<<<<
 * 
 *                 return result
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_i, __pyx_n_s_disks); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1390, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1390, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "libzfs.pyx":1389
 *             else:
 *                 result = []
 *                 for i in self.children:             # <<<<<<<<<<<<<<
 *                     result += i.disks
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "libzfs.pyx":1392
 *                     result += i.disks
 * 
 *                 return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L0;
  }

  /* "libzfs.pyx":1382
 * 
 *     property disks:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.type == 'disk':
 *                 return [self.path]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("libzfs.ZFSVdev.disks.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1166
 * 
 * cdef class ZFSVdev(object):
 *     cdef readonly ZFSPool zpool             # <<<<<<<<<<<<<<
 *     cdef readonly ZFS root
 *     cdef readonly ZFSVdev parent
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_5zpool_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_5zpool_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_5zpool___get__(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_5zpool___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->zpool));
  __pyx_r = ((PyObject *)__pyx_v_self->zpool);
  goto __pyx_L0;

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

/* "libzfs.pyx":1167
 * cdef class ZFSVdev(object):
 *     cdef readonly ZFSPool zpool
 *     cdef readonly ZFS root             # <<<<<<<<<<<<<<
 *     cdef readonly ZFSVdev parent
 *     cdef readonly object group
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_4root_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_4root_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_4root___get__(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_4root___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->root));
  __pyx_r = ((PyObject *)__pyx_v_self->root);
  goto __pyx_L0;

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

/* "libzfs.pyx":1168
 *     cdef readonly ZFSPool zpool
 *     cdef readonly ZFS root
 *     cdef readonly ZFSVdev parent             # <<<<<<<<<<<<<<
 *     cdef readonly object group
 *     cdef NVList nvlist
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_6parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_6parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_6parent___get__(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_6parent___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->parent));
  __pyx_r = ((PyObject *)__pyx_v_self->parent);
  goto __pyx_L0;

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

/* "libzfs.pyx":1169
 *     cdef readonly ZFS root
 *     cdef readonly ZFSVdev parent
 *     cdef readonly object group             # <<<<<<<<<<<<<<
 *     cdef NVList nvlist
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_5group_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSVdev_5group_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSVdev_5group___get__(((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSVdev_5group___get__(struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->group);
  __pyx_r = __pyx_v_self->group;
  goto __pyx_L0;

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

/* "libzfs.pyx":1400
 *     cdef readonly object stat
 * 
 *     def __init__(self, ZFS root, ZFSPool pool):             # <<<<<<<<<<<<<<
 *         self.root = root
 *         self.pool = pool
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_10ZPoolScrub_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6libzfs_10ZPoolScrub_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_6libzfs_ZFS *__pyx_v_root = 0;
  struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_pool = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_root,&__pyx_n_s_pool,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_root)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pool)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(1, 1400, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 1400, __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_root = ((struct __pyx_obj_6libzfs_ZFS *)values[0]);
    __pyx_v_pool = ((struct __pyx_obj_6libzfs_ZFSPool *)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(1, 1400, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZPoolScrub.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_6libzfs_ZFS, 1, "root", 0))) __PYX_ERR(1, 1400, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pool), __pyx_ptype_6libzfs_ZFSPool, 1, "pool", 0))) __PYX_ERR(1, 1400, __pyx_L1_error)
  __pyx_r = __pyx_pf_6libzfs_10ZPoolScrub___init__(((struct __pyx_obj_6libzfs_ZPoolScrub *)__pyx_v_self), __pyx_v_root, __pyx_v_pool);

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

static int __pyx_pf_6libzfs_10ZPoolScrub___init__(struct __pyx_obj_6libzfs_ZPoolScrub *__pyx_v_self, struct __pyx_obj_6libzfs_ZFS *__pyx_v_root, struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_pool) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "libzfs.pyx":1401
 * 
 *     def __init__(self, ZFS root, ZFSPool pool):
 *         self.root = root             # <<<<<<<<<<<<<<
 *         self.pool = pool
 *         self.stat = None
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_root));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_root));
  __Pyx_GOTREF(__pyx_v_self->root);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->root));
  __pyx_v_self->root = __pyx_v_root;

  /* "libzfs.pyx":1402
 *     def __init__(self, ZFS root, ZFSPool pool):
 *         self.root = root
 *         self.pool = pool             # <<<<<<<<<<<<<<
 *         self.stat = None
 *         if 'scan_stats' in pool.config['vdev_tree']:
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_pool));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pool));
  __Pyx_GOTREF(__pyx_v_self->pool);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->pool));
  __pyx_v_self->pool = __pyx_v_pool;

  /* "libzfs.pyx":1403
 *         self.root = root
 *         self.pool = pool
 *         self.stat = None             # <<<<<<<<<<<<<<
 *         if 'scan_stats' in pool.config['vdev_tree']:
 *             self.stat = pool.config['vdev_tree']['scan_stats']
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->stat);
  __Pyx_DECREF(__pyx_v_self->stat);
  __pyx_v_self->stat = Py_None;

  /* "libzfs.pyx":1404
 *         self.pool = pool
 *         self.stat = None
 *         if 'scan_stats' in pool.config['vdev_tree']:             # <<<<<<<<<<<<<<
 *             self.stat = pool.config['vdev_tree']['scan_stats']
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pool), __pyx_n_s_config); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_vdev_tree); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_scan_stats, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1404, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "libzfs.pyx":1405
 *         self.stat = None
 *         if 'scan_stats' in pool.config['vdev_tree']:
 *             self.stat = pool.config['vdev_tree']['scan_stats']             # <<<<<<<<<<<<<<
 * 
 *     property state:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pool), __pyx_n_s_config); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_vdev_tree); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_scan_stats); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1405, __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->stat);
    __Pyx_DECREF(__pyx_v_self->stat);
    __pyx_v_self->stat = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "libzfs.pyx":1404
 *         self.pool = pool
 *         self.stat = None
 *         if 'scan_stats' in pool.config['vdev_tree']:             # <<<<<<<<<<<<<<
 *             self.stat = pool.config['vdev_tree']['scan_stats']
 * 
 */
  }

  /* "libzfs.pyx":1400
 *     cdef readonly object stat
 * 
 *     def __init__(self, ZFS root, ZFSPool pool):             # <<<<<<<<<<<<<<
 *         self.root = root
 *         self.pool = pool
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("libzfs.ZPoolScrub.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1408
 * 
 *     property state:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if not self.stat:
 *                 return None
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_5state_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_5state_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZPoolScrub_5state___get__(((struct __pyx_obj_6libzfs_ZPoolScrub *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_5state___get__(struct __pyx_obj_6libzfs_ZPoolScrub *__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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1409
 *     property state:
 *         def __get__(self):
 *             if not self.stat:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->stat); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1409, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":1410
 *         def __get__(self):
 *             if not self.stat:
 *                 return None             # <<<<<<<<<<<<<<
 * 
 *             return ScanState(self.stat[1])
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;

    /* "libzfs.pyx":1409
 *     property state:
 *         def __get__(self):
 *             if not self.stat:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
  }

  /* "libzfs.pyx":1412
 *                 return None
 * 
 *             return ScanState(self.stat[1])             # <<<<<<<<<<<<<<
 * 
 *     property function:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ScanState); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_self->stat, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1412, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __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+1, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1408
 * 
 *     property state:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if not self.stat:
 *                 return None
 */

  /* function exit code */
  __pyx_L1_error:;
  __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_AddTraceback("libzfs.ZPoolScrub.state.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1415
 * 
 *     property function:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if not self.stat:
 *                 return None
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_8function_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_8function_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZPoolScrub_8function___get__(((struct __pyx_obj_6libzfs_ZPoolScrub *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_8function___get__(struct __pyx_obj_6libzfs_ZPoolScrub *__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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1416
 *     property function:
 *         def __get__(self):
 *             if not self.stat:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->stat); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1416, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":1417
 *         def __get__(self):
 *             if not self.stat:
 *                 return None             # <<<<<<<<<<<<<<
 * 
 *             return ScanFunction(self.stat[0])
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;

    /* "libzfs.pyx":1416
 *     property function:
 *         def __get__(self):
 *             if not self.stat:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
  }

  /* "libzfs.pyx":1419
 *                 return None
 * 
 *             return ScanFunction(self.stat[0])             # <<<<<<<<<<<<<<
 * 
 *     property start_time:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ScanFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_self->stat, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1419, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __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+1, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1415
 * 
 *     property function:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if not self.stat:
 *                 return None
 */

  /* function exit code */
  __pyx_L1_error:;
  __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_AddTraceback("libzfs.ZPoolScrub.function.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1422
 * 
 *     property start_time:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if not self.stat:
 *                 return None
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_10start_time_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_10start_time_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZPoolScrub_10start_time___get__(((struct __pyx_obj_6libzfs_ZPoolScrub *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_10start_time___get__(struct __pyx_obj_6libzfs_ZPoolScrub *__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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1423
 *     property start_time:
 *         def __get__(self):
 *             if not self.stat:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->stat); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1423, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":1424
 *         def __get__(self):
 *             if not self.stat:
 *                 return None             # <<<<<<<<<<<<<<
 * 
 *             return datetime.fromtimestamp(self.stat[2])
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;

    /* "libzfs.pyx":1423
 *     property start_time:
 *         def __get__(self):
 *             if not self.stat:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
  }

  /* "libzfs.pyx":1426
 *                 return None
 * 
 *             return datetime.fromtimestamp(self.stat[2])             # <<<<<<<<<<<<<<
 * 
 *     property end_time:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_fromtimestamp); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_self->stat, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1426, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1422
 * 
 *     property start_time:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if not self.stat:
 *                 return None
 */

  /* function exit code */
  __pyx_L1_error:;
  __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_AddTraceback("libzfs.ZPoolScrub.start_time.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1429
 * 
 *     property end_time:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if not self.stat:
 *                 return None
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_8end_time_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_8end_time_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZPoolScrub_8end_time___get__(((struct __pyx_obj_6libzfs_ZPoolScrub *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_8end_time___get__(struct __pyx_obj_6libzfs_ZPoolScrub *__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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1430
 *     property end_time:
 *         def __get__(self):
 *             if not self.stat:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->stat); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1430, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":1431
 *         def __get__(self):
 *             if not self.stat:
 *                 return None             # <<<<<<<<<<<<<<
 * 
 *             return datetime.fromtimestamp(self.stat[3])
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;

    /* "libzfs.pyx":1430
 *     property end_time:
 *         def __get__(self):
 *             if not self.stat:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
  }

  /* "libzfs.pyx":1433
 *                 return None
 * 
 *             return datetime.fromtimestamp(self.stat[3])             # <<<<<<<<<<<<<<
 * 
 *     property bytes_to_scan:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_fromtimestamp); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_self->stat, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1433, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1429
 * 
 *     property end_time:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if not self.stat:
 *                 return None
 */

  /* function exit code */
  __pyx_L1_error:;
  __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_AddTraceback("libzfs.ZPoolScrub.end_time.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1436
 * 
 *     property bytes_to_scan:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if not self.stat:
 *                 return None
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_13bytes_to_scan_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_13bytes_to_scan_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZPoolScrub_13bytes_to_scan___get__(((struct __pyx_obj_6libzfs_ZPoolScrub *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_13bytes_to_scan___get__(struct __pyx_obj_6libzfs_ZPoolScrub *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1437
 *     property bytes_to_scan:
 *         def __get__(self):
 *             if not self.stat:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->stat); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1437, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":1438
 *         def __get__(self):
 *             if not self.stat:
 *                 return None             # <<<<<<<<<<<<<<
 * 
 *             return self.stat[4]
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;

    /* "libzfs.pyx":1437
 *     property bytes_to_scan:
 *         def __get__(self):
 *             if not self.stat:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
  }

  /* "libzfs.pyx":1440
 *                 return None
 * 
 *             return self.stat[4]             # <<<<<<<<<<<<<<
 * 
 *     property bytes_scanned:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->stat, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1436
 * 
 *     property bytes_to_scan:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if not self.stat:
 *                 return None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("libzfs.ZPoolScrub.bytes_to_scan.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1443
 * 
 *     property bytes_scanned:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if not self.stat:
 *                 return None
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_13bytes_scanned_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_13bytes_scanned_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZPoolScrub_13bytes_scanned___get__(((struct __pyx_obj_6libzfs_ZPoolScrub *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_13bytes_scanned___get__(struct __pyx_obj_6libzfs_ZPoolScrub *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1444
 *     property bytes_scanned:
 *         def __get__(self):
 *             if not self.stat:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->stat); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1444, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":1445
 *         def __get__(self):
 *             if not self.stat:
 *                 return None             # <<<<<<<<<<<<<<
 * 
 *             return self.stat[5]
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;

    /* "libzfs.pyx":1444
 *     property bytes_scanned:
 *         def __get__(self):
 *             if not self.stat:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
  }

  /* "libzfs.pyx":1447
 *                 return None
 * 
 *             return self.stat[5]             # <<<<<<<<<<<<<<
 * 
 *     property errors:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->stat, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1443
 * 
 *     property bytes_scanned:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if not self.stat:
 *                 return None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("libzfs.ZPoolScrub.bytes_scanned.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1450
 * 
 *     property errors:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if not self.stat:
 *                 return None
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_6errors_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_6errors_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZPoolScrub_6errors___get__(((struct __pyx_obj_6libzfs_ZPoolScrub *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_6errors___get__(struct __pyx_obj_6libzfs_ZPoolScrub *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1451
 *     property errors:
 *         def __get__(self):
 *             if not self.stat:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->stat); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1451, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":1452
 *         def __get__(self):
 *             if not self.stat:
 *                 return None             # <<<<<<<<<<<<<<
 * 
 *             return self.stat[8]
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;

    /* "libzfs.pyx":1451
 *     property errors:
 *         def __get__(self):
 *             if not self.stat:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
  }

  /* "libzfs.pyx":1454
 *                 return None
 * 
 *             return self.stat[8]             # <<<<<<<<<<<<<<
 * 
 *     property percentage:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->stat, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1450
 * 
 *     property errors:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if not self.stat:
 *                 return None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("libzfs.ZPoolScrub.errors.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1457
 * 
 *     property percentage:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if not self.stat:
 *                 return None
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_10percentage_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_10percentage_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZPoolScrub_10percentage___get__(((struct __pyx_obj_6libzfs_ZPoolScrub *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_10percentage___get__(struct __pyx_obj_6libzfs_ZPoolScrub *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  float __pyx_t_4;
  float __pyx_t_5;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1458
 *     property percentage:
 *         def __get__(self):
 *             if not self.stat:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->stat); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1458, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":1459
 *         def __get__(self):
 *             if not self.stat:
 *                 return None             # <<<<<<<<<<<<<<
 * 
 *             if not self.bytes_to_scan:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;

    /* "libzfs.pyx":1458
 *     property percentage:
 *         def __get__(self):
 *             if not self.stat:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
  }

  /* "libzfs.pyx":1461
 *                 return None
 * 
 *             if not self.bytes_to_scan:             # <<<<<<<<<<<<<<
 *                 return 0
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bytes_to_scan); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1461, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = ((!__pyx_t_2) != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":1462
 * 
 *             if not self.bytes_to_scan:
 *                 return 0             # <<<<<<<<<<<<<<
 * 
 *             return (<float>self.bytes_scanned / <float>self.bytes_to_scan) * 100
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_0);
    __pyx_r = __pyx_int_0;
    goto __pyx_L0;

    /* "libzfs.pyx":1461
 *                 return None
 * 
 *             if not self.bytes_to_scan:             # <<<<<<<<<<<<<<
 *                 return 0
 * 
 */
  }

  /* "libzfs.pyx":1464
 *                 return 0
 * 
 *             return (<float>self.bytes_scanned / <float>self.bytes_to_scan) * 100             # <<<<<<<<<<<<<<
 * 
 *     def __getstate__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bytes_scanned); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(1, 1464, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bytes_to_scan); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) __PYX_ERR(1, 1464, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(((float)__pyx_t_5) == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(1, 1464, __pyx_L1_error)
  }
  __pyx_t_3 = PyFloat_FromDouble(((((float)__pyx_t_4) / ((float)__pyx_t_5)) * 100.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1457
 * 
 *     property percentage:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if not self.stat:
 *                 return None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("libzfs.ZPoolScrub.percentage.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1466
 *             return (<float>self.bytes_scanned / <float>self.bytes_to_scan) * 100
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return {
 *             'function': self.function.name if self.function else None,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_3__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_3__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZPoolScrub_2__getstate__(((struct __pyx_obj_6libzfs_ZPoolScrub *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_2__getstate__(struct __pyx_obj_6libzfs_ZPoolScrub *__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_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__getstate__", 0);

  /* "libzfs.pyx":1467
 * 
 *     def __getstate__(self):
 *         return {             # <<<<<<<<<<<<<<
 *             'function': self.function.name if self.function else None,
 *             'state': self.state.name if self.stat else None,
 */
  __Pyx_XDECREF(__pyx_r);

  /* "libzfs.pyx":1468
 *     def __getstate__(self):
 *         return {
 *             'function': self.function.name if self.function else None,             # <<<<<<<<<<<<<<
 *             'state': self.state.name if self.stat else None,
 *             'start_time': self.start_time,
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_function); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 1468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_function); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __pyx_t_5;
    __pyx_t_5 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_2 = Py_None;
  }
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_function, __pyx_t_2) < 0) __PYX_ERR(1, 1468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1469
 *         return {
 *             'function': self.function.name if self.function else None,
 *             'state': self.state.name if self.stat else None,             # <<<<<<<<<<<<<<
 *             'start_time': self.start_time,
 *             'end_time': self.end_time,
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->stat); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 1469, __pyx_L1_error)
  if (__pyx_t_4) {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_state); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_2 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_2 = Py_None;
  }
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_state, __pyx_t_2) < 0) __PYX_ERR(1, 1468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1470
 *             'function': self.function.name if self.function else None,
 *             'state': self.state.name if self.stat else None,
 *             'start_time': self.start_time,             # <<<<<<<<<<<<<<
 *             'end_time': self.end_time,
 *             'percentage': self.percentage,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_start_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_start_time, __pyx_t_2) < 0) __PYX_ERR(1, 1468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1471
 *             'state': self.state.name if self.stat else None,
 *             'start_time': self.start_time,
 *             'end_time': self.end_time,             # <<<<<<<<<<<<<<
 *             'percentage': self.percentage,
 *             'bytes_to_process': self.bytes_scanned,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_end_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_end_time, __pyx_t_2) < 0) __PYX_ERR(1, 1468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1472
 *             'start_time': self.start_time,
 *             'end_time': self.end_time,
 *             'percentage': self.percentage,             # <<<<<<<<<<<<<<
 *             'bytes_to_process': self.bytes_scanned,
 *             'bytes_processed': self.bytes_to_scan,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_percentage); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_percentage, __pyx_t_2) < 0) __PYX_ERR(1, 1468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1473
 *             'end_time': self.end_time,
 *             'percentage': self.percentage,
 *             'bytes_to_process': self.bytes_scanned,             # <<<<<<<<<<<<<<
 *             'bytes_processed': self.bytes_to_scan,
 *             'errors': self.errors
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bytes_scanned); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_bytes_to_process, __pyx_t_2) < 0) __PYX_ERR(1, 1468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1474
 *             'percentage': self.percentage,
 *             'bytes_to_process': self.bytes_scanned,
 *             'bytes_processed': self.bytes_to_scan,             # <<<<<<<<<<<<<<
 *             'errors': self.errors
 *         }
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bytes_to_scan); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_bytes_processed, __pyx_t_2) < 0) __PYX_ERR(1, 1468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1475
 *             'bytes_to_process': self.bytes_scanned,
 *             'bytes_processed': self.bytes_to_scan,
 *             'errors': self.errors             # <<<<<<<<<<<<<<
 *         }
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_errors); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_errors, __pyx_t_2) < 0) __PYX_ERR(1, 1468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1466
 *             return (<float>self.bytes_scanned / <float>self.bytes_to_scan) * 100
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return {
 *             'function': self.function.name if self.function else 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_5);
  __Pyx_AddTraceback("libzfs.ZPoolScrub.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1396
 * 
 * cdef class ZPoolScrub(object):
 *     cdef readonly ZFS root             # <<<<<<<<<<<<<<
 *     cdef readonly ZFSPool pool
 *     cdef readonly object stat
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_4root_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_4root_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZPoolScrub_4root___get__(((struct __pyx_obj_6libzfs_ZPoolScrub *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_4root___get__(struct __pyx_obj_6libzfs_ZPoolScrub *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->root));
  __pyx_r = ((PyObject *)__pyx_v_self->root);
  goto __pyx_L0;

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

/* "libzfs.pyx":1397
 * cdef class ZPoolScrub(object):
 *     cdef readonly ZFS root
 *     cdef readonly ZFSPool pool             # <<<<<<<<<<<<<<
 *     cdef readonly object stat
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_4pool_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_4pool_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZPoolScrub_4pool___get__(((struct __pyx_obj_6libzfs_ZPoolScrub *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_4pool___get__(struct __pyx_obj_6libzfs_ZPoolScrub *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->pool));
  __pyx_r = ((PyObject *)__pyx_v_self->pool);
  goto __pyx_L0;

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

/* "libzfs.pyx":1398
 *     cdef readonly ZFS root
 *     cdef readonly ZFSPool pool
 *     cdef readonly object stat             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, ZFS root, ZFSPool pool):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_4stat_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZPoolScrub_4stat_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZPoolScrub_4stat___get__(((struct __pyx_obj_6libzfs_ZPoolScrub *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10ZPoolScrub_4stat___get__(struct __pyx_obj_6libzfs_ZPoolScrub *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->stat);
  __pyx_r = __pyx_v_self->stat;
  goto __pyx_L0;

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

/* "libzfs.pyx":1484
 *     cdef readonly ZFS root
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.free = True
 * 
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_7ZFSPool_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6libzfs_7ZFSPool_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_6libzfs_7ZFSPool___cinit__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static int __pyx_pf_6libzfs_7ZFSPool___cinit__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "libzfs.pyx":1485
 * 
 *     def __cinit__(self):
 *         self.free = True             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */
  __pyx_v_self->free = 1;

  /* "libzfs.pyx":1484
 *     cdef readonly ZFS root
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.free = True
 * 
 */

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

/* "libzfs.pyx":1487
 *         self.free = True
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise RuntimeError('ZFSPool cannot be instantiated by the user')
 * 
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_7ZFSPool_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6libzfs_7ZFSPool_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_6libzfs_7ZFSPool_2__init__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static int __pyx_pf_6libzfs_7ZFSPool_2__init__(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "libzfs.pyx":1488
 * 
 *     def __init__(self):
 *         raise RuntimeError('ZFSPool cannot be instantiated by the user')             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1488, __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, 1488, __pyx_L1_error)

  /* "libzfs.pyx":1487
 *         self.free = True
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise RuntimeError('ZFSPool cannot be instantiated by the user')
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("libzfs.ZFSPool.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1490
 *         raise RuntimeError('ZFSPool cannot be instantiated by the user')
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.free:
 *             with nogil:
 */

/* Python wrapper */
static void __pyx_pw_6libzfs_7ZFSPool_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_6libzfs_7ZFSPool_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_6libzfs_7ZFSPool_4__dealloc__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static void __pyx_pf_6libzfs_7ZFSPool_4__dealloc__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "libzfs.pyx":1491
 * 
 *     def __dealloc__(self):
 *         if self.free:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 libzfs.zpool_close(self.handle)
 */
  __pyx_t_1 = (__pyx_v_self->free != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":1492
 *     def __dealloc__(self):
 *         if self.free:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 libzfs.zpool_close(self.handle)
 * 
 */
    {
        #ifdef WITH_THREAD
        PyThreadState *_save;
        Py_UNBLOCK_THREADS
        #endif
        /*try:*/ {

          /* "libzfs.pyx":1493
 *         if self.free:
 *             with nogil:
 *                 libzfs.zpool_close(self.handle)             # <<<<<<<<<<<<<<
 * 
 *             self.handle = NULL
 */
          zpool_close(__pyx_v_self->handle);
        }

        /* "libzfs.pyx":1492
 *     def __dealloc__(self):
 *         if self.free:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 libzfs.zpool_close(self.handle)
 * 
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            Py_BLOCK_THREADS
            #endif
            goto __pyx_L6;
          }
          __pyx_L6:;
        }
    }

    /* "libzfs.pyx":1495
 *                 libzfs.zpool_close(self.handle)
 * 
 *             self.handle = NULL             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
    __pyx_v_self->handle = NULL;

    /* "libzfs.pyx":1491
 * 
 *     def __dealloc__(self):
 *         if self.free:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 libzfs.zpool_close(self.handle)
 */
  }

  /* "libzfs.pyx":1490
 *         raise RuntimeError('ZFSPool cannot be instantiated by the user')
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.free:
 *             with nogil:
 */

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

/* "libzfs.pyx":1497
 *             self.handle = NULL
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<libzfs.ZFSPool name '{0}' guid '{1}'>".format(self.name, self.guid)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_7__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_6__str__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_6__str__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "libzfs.pyx":1498
 * 
 *     def __str__(self):
 *         return "<libzfs.ZFSPool name '{0}' guid '{1}'>".format(self.name, self.guid)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_libzfs_ZFSPool_name_0_guid_1, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_guid); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1498, __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_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1498, __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1497
 *             self.handle = NULL
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<libzfs.ZFSPool name '{0}' guid '{1}'>".format(self.name, self.guid)
 * 
 */

  /* 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_7);
  __Pyx_AddTraceback("libzfs.ZFSPool.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1500
 *         return "<libzfs.ZFSPool name '{0}' guid '{1}'>".format(self.name, self.guid)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_8__repr__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_8__repr__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "libzfs.pyx":1501
 * 
 *     def __repr__(self):
 *         return str(self)             # <<<<<<<<<<<<<<
 * 
 *     def __getstate__(self, datasets_recursive=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1501, __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_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1501, __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;

  /* "libzfs.pyx":1500
 *         return "<libzfs.ZFSPool name '{0}' guid '{1}'>".format(self.name, self.guid)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

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

/* "libzfs.pyx":1503
 *         return str(self)
 * 
 *     def __getstate__(self, datasets_recursive=True):             # <<<<<<<<<<<<<<
 *         try:
 *             root_ds = self.root_dataset.__getstate__(datasets_recursive)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_11__getstate__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_11__getstate__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_datasets_recursive = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_datasets_recursive,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);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datasets_recursive);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getstate__") < 0)) __PYX_ERR(1, 1503, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_datasets_recursive = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getstate__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1503, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSPool.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_10__getstate__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self), __pyx_v_datasets_recursive);

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_10__getstate__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self, PyObject *__pyx_v_datasets_recursive) {
  PyObject *__pyx_v_root_ds = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  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;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *(*__pyx_t_16)(PyObject *);
  __Pyx_RefNannySetupContext("__getstate__", 0);

  /* "libzfs.pyx":1504
 * 
 *     def __getstate__(self, datasets_recursive=True):
 *         try:             # <<<<<<<<<<<<<<
 *             root_ds = self.root_dataset.__getstate__(datasets_recursive)
 *         except (ZFSException, AttributeError):
 */
  {
    __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:*/ {

      /* "libzfs.pyx":1505
 *     def __getstate__(self, datasets_recursive=True):
 *         try:
 *             root_ds = self.root_dataset.__getstate__(datasets_recursive)             # <<<<<<<<<<<<<<
 *         except (ZFSException, AttributeError):
 *             root_ds = None
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_root_dataset); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1505, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getstate); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1505, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && 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);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_datasets_recursive); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1505, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
      } else {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1505, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_INCREF(__pyx_v_datasets_recursive);
        __Pyx_GIVEREF(__pyx_v_datasets_recursive);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_datasets_recursive);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1505, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_root_ds = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "libzfs.pyx":1504
 * 
 *     def __getstate__(self, datasets_recursive=True):
 *         try:             # <<<<<<<<<<<<<<
 *             root_ds = self.root_dataset.__getstate__(datasets_recursive)
 *         except (ZFSException, AttributeError):
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;
    __Pyx_PyThreadState_assign
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "libzfs.pyx":1506
 *         try:
 *             root_ds = self.root_dataset.__getstate__(datasets_recursive)
 *         except (ZFSException, AttributeError):             # <<<<<<<<<<<<<<
 *             root_ds = None
 * 
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1506, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_t_4) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_8) {
      __Pyx_AddTraceback("libzfs.ZFSPool.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1506, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "libzfs.pyx":1507
 *             root_ds = self.root_dataset.__getstate__(datasets_recursive)
 *         except (ZFSException, AttributeError):
 *             root_ds = None             # <<<<<<<<<<<<<<
 * 
 *         return {
 */
      __Pyx_INCREF(Py_None);
      __Pyx_XDECREF_SET(__pyx_v_root_ds, Py_None);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "libzfs.pyx":1504
 * 
 *     def __getstate__(self, datasets_recursive=True):
 *         try:             # <<<<<<<<<<<<<<
 *             root_ds = self.root_dataset.__getstate__(datasets_recursive)
 *         except (ZFSException, AttributeError):
 */
    __Pyx_PyThreadState_assign
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_PyThreadState_assign
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  /* "libzfs.pyx":1509
 *             root_ds = None
 * 
 *         return {             # <<<<<<<<<<<<<<
 *             'name': self.name,
 *             'id': self.name,
 */
  __Pyx_XDECREF(__pyx_r);

  /* "libzfs.pyx":1510
 * 
 *         return {
 *             'name': self.name,             # <<<<<<<<<<<<<<
 *             'id': self.name,
 *             'guid': str(self.guid),
 */
  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_name_2, __pyx_t_6) < 0) __PYX_ERR(1, 1510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "libzfs.pyx":1511
 *         return {
 *             'name': self.name,
 *             'id': self.name,             # <<<<<<<<<<<<<<
 *             'guid': str(self.guid),
 *             'hostname': self.hostname,
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_id, __pyx_t_6) < 0) __PYX_ERR(1, 1510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "libzfs.pyx":1512
 *             'name': self.name,
 *             'id': self.name,
 *             'guid': str(self.guid),             # <<<<<<<<<<<<<<
 *             'hostname': self.hostname,
 *             'status': self.status,
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_guid); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_guid, __pyx_t_6) < 0) __PYX_ERR(1, 1510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "libzfs.pyx":1513
 *             'id': self.name,
 *             'guid': str(self.guid),
 *             'hostname': self.hostname,             # <<<<<<<<<<<<<<
 *             'status': self.status,
 *             'error_count': self.error_count,
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hostname); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_hostname, __pyx_t_6) < 0) __PYX_ERR(1, 1510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "libzfs.pyx":1514
 *             'guid': str(self.guid),
 *             'hostname': self.hostname,
 *             'status': self.status,             # <<<<<<<<<<<<<<
 *             'error_count': self.error_count,
 *             'root_dataset': root_ds,
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_status, __pyx_t_6) < 0) __PYX_ERR(1, 1510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "libzfs.pyx":1515
 *             'hostname': self.hostname,
 *             'status': self.status,
 *             'error_count': self.error_count,             # <<<<<<<<<<<<<<
 *             'root_dataset': root_ds,
 *             'properties': {k: p.__getstate__() for k, p in self.properties.items()} if self.properties else None,
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_error_count); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_error_count, __pyx_t_6) < 0) __PYX_ERR(1, 1510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "libzfs.pyx":1516
 *             'status': self.status,
 *             'error_count': self.error_count,
 *             'root_dataset': root_ds,             # <<<<<<<<<<<<<<
 *             'properties': {k: p.__getstate__() for k, p in self.properties.items()} if self.properties else None,
 *             'features': [i.__getstate__() for i in self.features] if self.features else None,
 */
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_root_dataset, __pyx_v_root_ds) < 0) __PYX_ERR(1, 1510, __pyx_L1_error)

  /* "libzfs.pyx":1517
 *             'error_count': self.error_count,
 *             'root_dataset': root_ds,
 *             'properties': {k: p.__getstate__() for k, p in self.properties.items()} if self.properties else None,             # <<<<<<<<<<<<<<
 *             'features': [i.__getstate__() for i in self.features] if self.features else None,
 *             'scan': self.scrub.__getstate__(),
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_properties); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(1, 1517, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_9) {
    { /* enter inner scope */
      PyObject *__pyx_7genexpr__pyx_v_k = NULL;
      PyObject *__pyx_7genexpr__pyx_v_p = NULL;
      __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1517, __pyx_L15_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_properties); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1517, __pyx_L15_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_items); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1517, __pyx_L15_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(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);
        }
      }
      if (__pyx_t_10) {
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1517, __pyx_L15_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else {
        __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1517, __pyx_L15_error)
      }
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
        __pyx_t_11 = __pyx_t_5; __Pyx_INCREF(__pyx_t_11); __pyx_t_12 = 0;
        __pyx_t_13 = NULL;
      } else {
        __pyx_t_12 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1517, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_13 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1517, __pyx_L15_error)
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      for (;;) {
        if (likely(!__pyx_t_13)) {
          if (likely(PyList_CheckExact(__pyx_t_11))) {
            if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_11)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_5 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_12); __Pyx_INCREF(__pyx_t_5); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(1, 1517, __pyx_L15_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_11, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1517, __pyx_L15_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          } else {
            if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_12); __Pyx_INCREF(__pyx_t_5); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(1, 1517, __pyx_L15_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_11, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1517, __pyx_L15_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          }
        } else {
          __pyx_t_5 = __pyx_t_13(__pyx_t_11);
          if (unlikely(!__pyx_t_5)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(1, 1517, __pyx_L15_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_5);
        }
        if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
          PyObject* sequence = __pyx_t_5;
          #if CYTHON_COMPILING_IN_CPYTHON
          Py_ssize_t size = Py_SIZE(sequence);
          #else
          Py_ssize_t size = PySequence_Size(sequence);
          #endif
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(1, 1517, __pyx_L15_error)
          }
          #if CYTHON_COMPILING_IN_CPYTHON
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_14 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_10 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_14 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_14);
          #else
          __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1517, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_14 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 1517, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_14);
          #endif
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_15 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 1517, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_16 = Py_TYPE(__pyx_t_15)->tp_iternext;
          index = 0; __pyx_t_10 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_10)) goto __pyx_L18_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_10);
          index = 1; __pyx_t_14 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_14)) goto __pyx_L18_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_14);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 2) < 0) __PYX_ERR(1, 1517, __pyx_L15_error)
          __pyx_t_16 = NULL;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          goto __pyx_L19_unpacking_done;
          __pyx_L18_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __pyx_t_16 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(1, 1517, __pyx_L15_error)
          __pyx_L19_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_k, __pyx_t_10);
        __pyx_t_10 = 0;
        __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_p, __pyx_t_14);
        __pyx_t_14 = 0;
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_7genexpr__pyx_v_p, __pyx_n_s_getstate); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 1517, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_10 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_14))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_14);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_14, function);
          }
        }
        if (__pyx_t_10) {
          __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1517, __pyx_L15_error)
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        } else {
          __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1517, __pyx_L15_error)
        }
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        if (unlikely(PyDict_SetItem(__pyx_t_4, (PyObject*)__pyx_7genexpr__pyx_v_k, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 1517, __pyx_L15_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_k);
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_p);
      goto __pyx_L20_exit_scope;
      __pyx_L15_error:;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_k);
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_p);
      goto __pyx_L1_error;
      __pyx_L20_exit_scope:;
    } /* exit inner scope */
    __pyx_t_6 = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_6 = Py_None;
  }
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_properties, __pyx_t_6) < 0) __PYX_ERR(1, 1510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "libzfs.pyx":1518
 *             'root_dataset': root_ds,
 *             'properties': {k: p.__getstate__() for k, p in self.properties.items()} if self.properties else None,
 *             'features': [i.__getstate__() for i in self.features] if self.features else None,             # <<<<<<<<<<<<<<
 *             'scan': self.scrub.__getstate__(),
 *             'root_vdev': self.root_vdev.__getstate__(False),
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_features); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(1, 1518, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_9) {
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_features); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    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_12 = 0;
      __pyx_t_13 = NULL;
    } else {
      __pyx_t_12 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_13 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1518, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    for (;;) {
      if (likely(!__pyx_t_13)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_11 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_12); __Pyx_INCREF(__pyx_t_11); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(1, 1518, __pyx_L1_error)
          #else
          __pyx_t_11 = PySequence_ITEM(__pyx_t_5, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1518, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          #endif
        } else {
          if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_12); __Pyx_INCREF(__pyx_t_11); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(1, 1518, __pyx_L1_error)
          #else
          __pyx_t_11 = PySequence_ITEM(__pyx_t_5, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1518, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          #endif
        }
      } else {
        __pyx_t_11 = __pyx_t_13(__pyx_t_5);
        if (unlikely(!__pyx_t_11)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 1518, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_11);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_11);
      __pyx_t_11 = 0;
      __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_i, __pyx_n_s_getstate); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 1518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_10 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_14))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_14);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_14, function);
        }
      }
      if (__pyx_t_10) {
        __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1518, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else {
        __pyx_t_11 = __Pyx_PyObject_CallNoArg(__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1518, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_11))) __PYX_ERR(1, 1518, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_6 = Py_None;
  }
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_features, __pyx_t_6) < 0) __PYX_ERR(1, 1510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "libzfs.pyx":1519
 *             'properties': {k: p.__getstate__() for k, p in self.properties.items()} if self.properties else None,
 *             'features': [i.__getstate__() for i in self.features] if self.features else None,
 *             'scan': self.scrub.__getstate__(),             # <<<<<<<<<<<<<<
 *             'root_vdev': self.root_vdev.__getstate__(False),
 *             'groups': {
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scrub); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getstate); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (__pyx_t_4) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1519, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1519, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_scan, __pyx_t_6) < 0) __PYX_ERR(1, 1510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "libzfs.pyx":1520
 *             'features': [i.__getstate__() for i in self.features] if self.features else None,
 *             'scan': self.scrub.__getstate__(),
 *             'root_vdev': self.root_vdev.__getstate__(False),             # <<<<<<<<<<<<<<
 *             'groups': {
 *                 'data': [i.__getstate__() for i in self.data_vdevs],
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_root_vdev); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_getstate); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_root_vdev, __pyx_t_6) < 0) __PYX_ERR(1, 1510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "libzfs.pyx":1522
 *             'root_vdev': self.root_vdev.__getstate__(False),
 *             'groups': {
 *                 'data': [i.__getstate__() for i in self.data_vdevs],             # <<<<<<<<<<<<<<
 *                 'log': [i.__getstate__() for i in self.log_vdevs],
 *                 'cache': [i.__getstate__() for i in self.cache_vdevs],
 */
  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_data_vdevs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_11 = __pyx_t_4; __Pyx_INCREF(__pyx_t_11); __pyx_t_12 = 0;
    __pyx_t_13 = NULL;
  } else {
    __pyx_t_12 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_13 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1522, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_13)) {
      if (likely(PyList_CheckExact(__pyx_t_11))) {
        if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_11)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(1, 1522, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_11, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1522, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(1, 1522, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_11, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1522, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_13(__pyx_t_11);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 1522, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_i, __pyx_n_s_getstate); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 1522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_10 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_14))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_14);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_14, function);
      }
    }
    if (__pyx_t_10) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1522, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    } else {
      __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1522, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_4))) __PYX_ERR(1, 1522, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_data, __pyx_t_5) < 0) __PYX_ERR(1, 1522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":1523
 *             'groups': {
 *                 'data': [i.__getstate__() for i in self.data_vdevs],
 *                 'log': [i.__getstate__() for i in self.log_vdevs],             # <<<<<<<<<<<<<<
 *                 'cache': [i.__getstate__() for i in self.cache_vdevs],
 *                 'spare': [i.__getstate__() for i in self.spare_vdevs]
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_log_vdevs); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) {
    __pyx_t_4 = __pyx_t_11; __Pyx_INCREF(__pyx_t_4); __pyx_t_12 = 0;
    __pyx_t_13 = NULL;
  } else {
    __pyx_t_12 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_13 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1523, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  for (;;) {
    if (likely(!__pyx_t_13)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_11 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_12); __Pyx_INCREF(__pyx_t_11); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(1, 1523, __pyx_L1_error)
        #else
        __pyx_t_11 = PySequence_ITEM(__pyx_t_4, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1523, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        #endif
      } else {
        if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_12); __Pyx_INCREF(__pyx_t_11); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(1, 1523, __pyx_L1_error)
        #else
        __pyx_t_11 = PySequence_ITEM(__pyx_t_4, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1523, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        #endif
      }
    } else {
      __pyx_t_11 = __pyx_t_13(__pyx_t_4);
      if (unlikely(!__pyx_t_11)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 1523, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_11);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_11);
    __pyx_t_11 = 0;
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_i, __pyx_n_s_getstate); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 1523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_10 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_14))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_14);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_14, function);
      }
    }
    if (__pyx_t_10) {
      __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1523, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    } else {
      __pyx_t_11 = __Pyx_PyObject_CallNoArg(__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1523, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_11))) __PYX_ERR(1, 1523, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_log, __pyx_t_5) < 0) __PYX_ERR(1, 1522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":1524
 *                 'data': [i.__getstate__() for i in self.data_vdevs],
 *                 'log': [i.__getstate__() for i in self.log_vdevs],
 *                 'cache': [i.__getstate__() for i in self.cache_vdevs],             # <<<<<<<<<<<<<<
 *                 'spare': [i.__getstate__() for i in self.spare_vdevs]
 *             },
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cache_vdevs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_11 = __pyx_t_4; __Pyx_INCREF(__pyx_t_11); __pyx_t_12 = 0;
    __pyx_t_13 = NULL;
  } else {
    __pyx_t_12 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_13 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1524, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_13)) {
      if (likely(PyList_CheckExact(__pyx_t_11))) {
        if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_11)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(1, 1524, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_11, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1524, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(1, 1524, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_11, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1524, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_13(__pyx_t_11);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 1524, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_i, __pyx_n_s_getstate); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 1524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_10 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_14))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_14);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_14, function);
      }
    }
    if (__pyx_t_10) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1524, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    } else {
      __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1524, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_4))) __PYX_ERR(1, 1524, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_cache, __pyx_t_5) < 0) __PYX_ERR(1, 1522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":1525
 *                 'log': [i.__getstate__() for i in self.log_vdevs],
 *                 'cache': [i.__getstate__() for i in self.cache_vdevs],
 *                 'spare': [i.__getstate__() for i in self.spare_vdevs]             # <<<<<<<<<<<<<<
 *             },
 *         }
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_spare_vdevs); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) {
    __pyx_t_4 = __pyx_t_11; __Pyx_INCREF(__pyx_t_4); __pyx_t_12 = 0;
    __pyx_t_13 = NULL;
  } else {
    __pyx_t_12 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_13 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1525, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  for (;;) {
    if (likely(!__pyx_t_13)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_11 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_12); __Pyx_INCREF(__pyx_t_11); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(1, 1525, __pyx_L1_error)
        #else
        __pyx_t_11 = PySequence_ITEM(__pyx_t_4, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1525, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        #endif
      } else {
        if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_12); __Pyx_INCREF(__pyx_t_11); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(1, 1525, __pyx_L1_error)
        #else
        __pyx_t_11 = PySequence_ITEM(__pyx_t_4, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1525, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        #endif
      }
    } else {
      __pyx_t_11 = __pyx_t_13(__pyx_t_4);
      if (unlikely(!__pyx_t_11)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 1525, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_11);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_11);
    __pyx_t_11 = 0;
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_i, __pyx_n_s_getstate); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 1525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_10 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_14))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_14);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_14, function);
      }
    }
    if (__pyx_t_10) {
      __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1525, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    } else {
      __pyx_t_11 = __Pyx_PyObject_CallNoArg(__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1525, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_11))) __PYX_ERR(1, 1525, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_spare, __pyx_t_5) < 0) __PYX_ERR(1, 1522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_groups, __pyx_t_6) < 0) __PYX_ERR(1, 1510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1503
 *         return str(self)
 * 
 *     def __getstate__(self, datasets_recursive=True):             # <<<<<<<<<<<<<<
 *         try:
 *             root_ds = self.root_dataset.__getstate__(datasets_recursive)
 */

  /* 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_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("libzfs.ZFSPool.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_root_ds);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1530
 * 
 *     @staticmethod
 *     cdef int __iterate_props(int proptype, void* arg) nogil:             # <<<<<<<<<<<<<<
 *         with gil:
 *             proptypes = <object>arg
 */

static int __pyx_f_6libzfs_7ZFSPool___iterate_props(int __pyx_v_proptype, void *__pyx_v_arg) {
  PyObject *__pyx_v_proptypes = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("__iterate_props", 1);

  /* "libzfs.pyx":1531
 *     @staticmethod
 *     cdef int __iterate_props(int proptype, void* arg) nogil:
 *         with gil:             # <<<<<<<<<<<<<<
 *             proptypes = <object>arg
 *             proptypes.append(proptype)
 */
  /*try:*/ {
    {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
        #endif
        /*try:*/ {

          /* "libzfs.pyx":1532
 *     cdef int __iterate_props(int proptype, void* arg) nogil:
 *         with gil:
 *             proptypes = <object>arg             # <<<<<<<<<<<<<<
 *             proptypes.append(proptype)
 *             return zfs.ZPROP_CONT
 */
          __pyx_t_1 = ((PyObject *)__pyx_v_arg);
          __Pyx_INCREF(__pyx_t_1);
          __pyx_v_proptypes = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "libzfs.pyx":1533
 *         with gil:
 *             proptypes = <object>arg
 *             proptypes.append(proptype)             # <<<<<<<<<<<<<<
 *             return zfs.ZPROP_CONT
 * 
 */
          __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_proptype); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1533, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_proptypes, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 1533, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "libzfs.pyx":1534
 *             proptypes = <object>arg
 *             proptypes.append(proptype)
 *             return zfs.ZPROP_CONT             # <<<<<<<<<<<<<<
 * 
 *     property root_dataset:
 */
          __pyx_r = ZPROP_CONT;
          goto __pyx_L6_return;
        }

        /* "libzfs.pyx":1531
 *     @staticmethod
 *     cdef int __iterate_props(int proptype, void* arg) nogil:
 *         with gil:             # <<<<<<<<<<<<<<
 *             proptypes = <object>arg
 *             proptypes.append(proptype)
 */
        /*finally:*/ {
          __pyx_L6_return: {
            #ifdef WITH_THREAD
            PyGILState_Release(__pyx_gilstate_save);
            #endif
            goto __pyx_L3_return;
          }
          __pyx_L7_error: {
            #ifdef WITH_THREAD
            PyGILState_Release(__pyx_gilstate_save);
            #endif
            goto __pyx_L4_error;
          }
        }
    }
  }
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "libzfs.pyx":1530
 * 
 *     @staticmethod
 *     cdef int __iterate_props(int proptype, void* arg) nogil:             # <<<<<<<<<<<<<<
 *         with gil:
 *             proptypes = <object>arg
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("libzfs.ZFSPool.__iterate_props", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 1);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_proptypes);
  #ifdef WITH_THREAD
  PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "libzfs.pyx":1537
 * 
 *     property root_dataset:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef const char *c_name;
 *             cdef libzfs.zfs_handle_t* handle = NULL
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_12root_dataset_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_12root_dataset_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_12root_dataset___get__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_12root_dataset___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  char const *__pyx_v_c_name;
  zfs_handle_t *__pyx_v_handle;
  struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_dataset = 0;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1539
 *         def __get__(self):
 *             cdef const char *c_name;
 *             cdef libzfs.zfs_handle_t* handle = NULL             # <<<<<<<<<<<<<<
 *             cdef ZFSDataset dataset
 * 
 */
  __pyx_v_handle = NULL;

  /* "libzfs.pyx":1542
 *             cdef ZFSDataset dataset
 * 
 *             name = self.name             # <<<<<<<<<<<<<<
 *             c_name = name
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "libzfs.pyx":1543
 * 
 *             name = self.name
 *             c_name = name             # <<<<<<<<<<<<<<
 * 
 *             with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 1543, __pyx_L1_error)
  __pyx_v_c_name = __pyx_t_2;

  /* "libzfs.pyx":1545
 *             c_name = name
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 handle = libzfs.zfs_open(self.root.handle, c_name, zfs.ZFS_TYPE_FILESYSTEM)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":1546
 * 
 *             with nogil:
 *                 handle = libzfs.zfs_open(self.root.handle, c_name, zfs.ZFS_TYPE_FILESYSTEM)             # <<<<<<<<<<<<<<
 * 
 *             if handle == NULL:
 */
        __pyx_v_handle = zfs_open(__pyx_v_self->root->handle, __pyx_v_c_name, ZFS_TYPE_FILESYSTEM);
      }

      /* "libzfs.pyx":1545
 *             c_name = name
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 handle = libzfs.zfs_open(self.root.handle, c_name, zfs.ZFS_TYPE_FILESYSTEM)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":1548
 *                 handle = libzfs.zfs_open(self.root.handle, c_name, zfs.ZFS_TYPE_FILESYSTEM)
 * 
 *             if handle == NULL:             # <<<<<<<<<<<<<<
 *                 raise self.root.get_error()
 * 
 */
  __pyx_t_3 = ((__pyx_v_handle == NULL) != 0);
  if (__pyx_t_3) {

    /* "libzfs.pyx":1549
 * 
 *             if handle == NULL:
 *                 raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *             dataset = ZFSDataset.__new__(ZFSDataset)
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->root->__pyx_vtab)->get_error(__pyx_v_self->root); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1549, __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, 1549, __pyx_L1_error)

    /* "libzfs.pyx":1548
 *                 handle = libzfs.zfs_open(self.root.handle, c_name, zfs.ZFS_TYPE_FILESYSTEM)
 * 
 *             if handle == NULL:             # <<<<<<<<<<<<<<
 *                 raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":1551
 *                 raise self.root.get_error()
 * 
 *             dataset = ZFSDataset.__new__(ZFSDataset)             # <<<<<<<<<<<<<<
 *             dataset.root = self.root
 *             dataset.pool = self
 */
  __pyx_t_1 = __pyx_tp_new_6libzfs_ZFSDataset(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSDataset), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6libzfs_ZFSDataset)))) __PYX_ERR(1, 1551, __pyx_L1_error)
  __pyx_v_dataset = ((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":1552
 * 
 *             dataset = ZFSDataset.__new__(ZFSDataset)
 *             dataset.root = self.root             # <<<<<<<<<<<<<<
 *             dataset.pool = self
 *             dataset.handle = handle
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->root);
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_dataset->__pyx_base.root);
  __Pyx_DECREF(((PyObject *)__pyx_v_dataset->__pyx_base.root));
  __pyx_v_dataset->__pyx_base.root = ((struct __pyx_obj_6libzfs_ZFS *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":1553
 *             dataset = ZFSDataset.__new__(ZFSDataset)
 *             dataset.root = self.root
 *             dataset.pool = self             # <<<<<<<<<<<<<<
 *             dataset.handle = handle
 *             return dataset
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_dataset->__pyx_base.pool);
  __Pyx_DECREF(((PyObject *)__pyx_v_dataset->__pyx_base.pool));
  __pyx_v_dataset->__pyx_base.pool = __pyx_v_self;

  /* "libzfs.pyx":1554
 *             dataset.root = self.root
 *             dataset.pool = self
 *             dataset.handle = handle             # <<<<<<<<<<<<<<
 *             return dataset
 * 
 */
  __pyx_v_dataset->__pyx_base.handle = __pyx_v_handle;

  /* "libzfs.pyx":1555
 *             dataset.pool = self
 *             dataset.handle = handle
 *             return dataset             # <<<<<<<<<<<<<<
 * 
 *     property root_vdev:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_dataset));
  __pyx_r = ((PyObject *)__pyx_v_dataset);
  goto __pyx_L0;

  /* "libzfs.pyx":1537
 * 
 *     property root_dataset:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef const char *c_name;
 *             cdef libzfs.zfs_handle_t* handle = NULL
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("libzfs.ZFSPool.root_dataset.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dataset);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1558
 * 
 *     property root_vdev:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSVdev vdev
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_9root_vdev_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_9root_vdev_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_9root_vdev___get__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_9root_vdev___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_vdev = 0;
  struct __pyx_obj_6libzfs_NVList *__pyx_v_vdev_tree = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1560
 *         def __get__(self):
 *             cdef ZFSVdev vdev
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')             # <<<<<<<<<<<<<<
 * 
 *             vdev = ZFSVdev.__new__(ZFSVdev)
 */
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6libzfs_ZFSPool *)__pyx_v_self->__pyx_vtab)->get_raw_config(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_NVList *)((struct __pyx_obj_6libzfs_NVList *)__pyx_t_1)->__pyx_vtab)->get_raw(((struct __pyx_obj_6libzfs_NVList *)__pyx_t_1), __pyx_n_s_vdev_tree); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1560, __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_6libzfs_NVList))))) __PYX_ERR(1, 1560, __pyx_L1_error)
  __pyx_v_vdev_tree = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "libzfs.pyx":1562
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')
 * 
 *             vdev = ZFSVdev.__new__(ZFSVdev)             # <<<<<<<<<<<<<<
 *             vdev.root = self.root
 *             vdev.zpool = self
 */
  __pyx_t_2 = __pyx_tp_new_6libzfs_ZFSVdev(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSVdev), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6libzfs_ZFSVdev)))) __PYX_ERR(1, 1562, __pyx_L1_error)
  __pyx_v_vdev = ((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "libzfs.pyx":1563
 * 
 *             vdev = ZFSVdev.__new__(ZFSVdev)
 *             vdev.root = self.root             # <<<<<<<<<<<<<<
 *             vdev.zpool = self
 *             vdev.nvlist = <NVList>vdev_tree
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->root);
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_vdev->root);
  __Pyx_DECREF(((PyObject *)__pyx_v_vdev->root));
  __pyx_v_vdev->root = ((struct __pyx_obj_6libzfs_ZFS *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "libzfs.pyx":1564
 *             vdev = ZFSVdev.__new__(ZFSVdev)
 *             vdev.root = self.root
 *             vdev.zpool = self             # <<<<<<<<<<<<<<
 *             vdev.nvlist = <NVList>vdev_tree
 *             return vdev
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_vdev->zpool);
  __Pyx_DECREF(((PyObject *)__pyx_v_vdev->zpool));
  __pyx_v_vdev->zpool = __pyx_v_self;

  /* "libzfs.pyx":1565
 *             vdev.root = self.root
 *             vdev.zpool = self
 *             vdev.nvlist = <NVList>vdev_tree             # <<<<<<<<<<<<<<
 *             return vdev
 * 
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_vdev_tree);
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_vdev->nvlist);
  __Pyx_DECREF(((PyObject *)__pyx_v_vdev->nvlist));
  __pyx_v_vdev->nvlist = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "libzfs.pyx":1566
 *             vdev.zpool = self
 *             vdev.nvlist = <NVList>vdev_tree
 *             return vdev             # <<<<<<<<<<<<<<
 * 
 *     property data_vdevs:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_vdev));
  __pyx_r = ((PyObject *)__pyx_v_vdev);
  goto __pyx_L0;

  /* "libzfs.pyx":1558
 * 
 *     property root_vdev:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSVdev vdev
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("libzfs.ZFSPool.root_vdev.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_vdev);
  __Pyx_XDECREF((PyObject *)__pyx_v_vdev_tree);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6libzfs_7ZFSPool_10data_vdevs_2generator7(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "libzfs.pyx":1569
 * 
 *     property data_vdevs:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSVdev vdev
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_10data_vdevs_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_10data_vdevs_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_10data_vdevs___get__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_10data_vdevs___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_8___get__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_cur_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_8___get__ *)__pyx_tp_new_6libzfs___pyx_scope_struct_8___get__(__pyx_ptype_6libzfs___pyx_scope_struct_8___get__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6libzfs_7ZFSPool_10data_vdevs_2generator7, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_ZFSPool___get); if (unlikely(!gen)) __PYX_ERR(1, 1569, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("libzfs.ZFSPool.data_vdevs.__get__", __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_6libzfs_7ZFSPool_10data_vdevs_2generator7(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6libzfs___pyx_scope_struct_8___get__ *__pyx_cur_scope = ((struct __pyx_obj_6libzfs___pyx_scope_struct_8___get__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L8_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(1, 1569, __pyx_L1_error)

  /* "libzfs.pyx":1571
 *         def __get__(self):
 *             cdef ZFSVdev vdev
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')             # <<<<<<<<<<<<<<
 * 
 *             if 'children' not in vdev_tree:
 */
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6libzfs_ZFSPool *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->get_raw_config(__pyx_cur_scope->__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_NVList *)((struct __pyx_obj_6libzfs_NVList *)__pyx_t_1)->__pyx_vtab)->get_raw(((struct __pyx_obj_6libzfs_NVList *)__pyx_t_1), __pyx_n_s_vdev_tree); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1571, __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_6libzfs_NVList))))) __PYX_ERR(1, 1571, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_vdev_tree = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "libzfs.pyx":1573
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')
 * 
 *             if 'children' not in vdev_tree:             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_children, ((PyObject *)__pyx_cur_scope->__pyx_v_vdev_tree), Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1573, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "libzfs.pyx":1574
 * 
 *             if 'children' not in vdev_tree:
 *                 return             # <<<<<<<<<<<<<<
 * 
 *             for child in vdev_tree.get_raw('children'):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = NULL;
    goto __pyx_L0;

    /* "libzfs.pyx":1573
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')
 * 
 *             if 'children' not in vdev_tree:             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
  }

  /* "libzfs.pyx":1576
 *                 return
 * 
 *             for child in vdev_tree.get_raw('children'):             # <<<<<<<<<<<<<<
 *                 if not child['is_log']:
 *                     vdev = ZFSVdev.__new__(ZFSVdev)
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_NVList *)__pyx_cur_scope->__pyx_v_vdev_tree->__pyx_vtab)->get_raw(__pyx_cur_scope->__pyx_v_vdev_tree, __pyx_n_s_children); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1576, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 1576, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1576, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 1576, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1576, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_6(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 1576, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_child);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_child, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;

    /* "libzfs.pyx":1577
 * 
 *             for child in vdev_tree.get_raw('children'):
 *                 if not child['is_log']:             # <<<<<<<<<<<<<<
 *                     vdev = ZFSVdev.__new__(ZFSVdev)
 *                     vdev.root = self.root
 */
    __pyx_t_2 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_child, __pyx_n_s_is_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 1577, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = ((!__pyx_t_4) != 0);
    if (__pyx_t_3) {

      /* "libzfs.pyx":1578
 *             for child in vdev_tree.get_raw('children'):
 *                 if not child['is_log']:
 *                     vdev = ZFSVdev.__new__(ZFSVdev)             # <<<<<<<<<<<<<<
 *                     vdev.root = self.root
 *                     vdev.zpool = self
 */
      __pyx_t_2 = __pyx_tp_new_6libzfs_ZFSVdev(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSVdev), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1578, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6libzfs_ZFSVdev)))) __PYX_ERR(1, 1578, __pyx_L1_error)
      __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev));
      __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_vdev, ((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_t_2));
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;

      /* "libzfs.pyx":1579
 *                 if not child['is_log']:
 *                     vdev = ZFSVdev.__new__(ZFSVdev)
 *                     vdev.root = self.root             # <<<<<<<<<<<<<<
 *                     vdev.zpool = self
 *                     vdev.nvlist = <NVList>child
 */
      __pyx_t_2 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->root);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_vdev->root);
      __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev->root));
      __pyx_cur_scope->__pyx_v_vdev->root = ((struct __pyx_obj_6libzfs_ZFS *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "libzfs.pyx":1580
 *                     vdev = ZFSVdev.__new__(ZFSVdev)
 *                     vdev.root = self.root
 *                     vdev.zpool = self             # <<<<<<<<<<<<<<
 *                     vdev.nvlist = <NVList>child
 *                     vdev.group = 'data'
 */
      __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
      __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_vdev->zpool);
      __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev->zpool));
      __pyx_cur_scope->__pyx_v_vdev->zpool = __pyx_cur_scope->__pyx_v_self;

      /* "libzfs.pyx":1581
 *                     vdev.root = self.root
 *                     vdev.zpool = self
 *                     vdev.nvlist = <NVList>child             # <<<<<<<<<<<<<<
 *                     vdev.group = 'data'
 *                     yield vdev
 */
      __pyx_t_2 = __pyx_cur_scope->__pyx_v_child;
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_vdev->nvlist);
      __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev->nvlist));
      __pyx_cur_scope->__pyx_v_vdev->nvlist = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "libzfs.pyx":1582
 *                     vdev.zpool = self
 *                     vdev.nvlist = <NVList>child
 *                     vdev.group = 'data'             # <<<<<<<<<<<<<<
 *                     yield vdev
 * 
 */
      __Pyx_INCREF(__pyx_n_s_data);
      __Pyx_GIVEREF(__pyx_n_s_data);
      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_vdev->group);
      __Pyx_DECREF(__pyx_cur_scope->__pyx_v_vdev->group);
      __pyx_cur_scope->__pyx_v_vdev->group = __pyx_n_s_data;

      /* "libzfs.pyx":1583
 *                     vdev.nvlist = <NVList>child
 *                     vdev.group = 'data'
 *                     yield vdev             # <<<<<<<<<<<<<<
 * 
 *     property log_vdevs:
 */
      __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev));
      __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_vdev);
      __Pyx_XGIVEREF(__pyx_t_1);
      __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
      __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
      __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      /* return from generator, yielding value */
      __pyx_generator->resume_label = 1;
      return __pyx_r;
      __pyx_L8_resume_from_yield:;
      __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
      __pyx_cur_scope->__pyx_t_0 = 0;
      __Pyx_XGOTREF(__pyx_t_1);
      __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
      __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
      if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1583, __pyx_L1_error)

      /* "libzfs.pyx":1577
 * 
 *             for child in vdev_tree.get_raw('children'):
 *                 if not child['is_log']:             # <<<<<<<<<<<<<<
 *                     vdev = ZFSVdev.__new__(ZFSVdev)
 *                     vdev.root = self.root
 */
    }

    /* "libzfs.pyx":1576
 *                 return
 * 
 *             for child in vdev_tree.get_raw('children'):             # <<<<<<<<<<<<<<
 *                 if not child['is_log']:
 *                     vdev = ZFSVdev.__new__(ZFSVdev)
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":1569
 * 
 *     property data_vdevs:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSVdev vdev
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')
 */

  /* 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("__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6libzfs_7ZFSPool_9log_vdevs_2generator8(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "libzfs.pyx":1586
 * 
 *     property log_vdevs:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSVdev vdev
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_9log_vdevs_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_9log_vdevs_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_9log_vdevs___get__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_9log_vdevs___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_9___get__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_cur_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_9___get__ *)__pyx_tp_new_6libzfs___pyx_scope_struct_9___get__(__pyx_ptype_6libzfs___pyx_scope_struct_9___get__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6libzfs_7ZFSPool_9log_vdevs_2generator8, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_ZFSPool___get); if (unlikely(!gen)) __PYX_ERR(1, 1586, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("libzfs.ZFSPool.log_vdevs.__get__", __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_6libzfs_7ZFSPool_9log_vdevs_2generator8(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6libzfs___pyx_scope_struct_9___get__ *__pyx_cur_scope = ((struct __pyx_obj_6libzfs___pyx_scope_struct_9___get__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L8_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(1, 1586, __pyx_L1_error)

  /* "libzfs.pyx":1588
 *         def __get__(self):
 *             cdef ZFSVdev vdev
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')             # <<<<<<<<<<<<<<
 * 
 *             if 'children' not in vdev_tree:
 */
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6libzfs_ZFSPool *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->get_raw_config(__pyx_cur_scope->__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_NVList *)((struct __pyx_obj_6libzfs_NVList *)__pyx_t_1)->__pyx_vtab)->get_raw(((struct __pyx_obj_6libzfs_NVList *)__pyx_t_1), __pyx_n_s_vdev_tree); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1588, __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_6libzfs_NVList))))) __PYX_ERR(1, 1588, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_vdev_tree = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "libzfs.pyx":1590
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')
 * 
 *             if 'children' not in vdev_tree:             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_children, ((PyObject *)__pyx_cur_scope->__pyx_v_vdev_tree), Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1590, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "libzfs.pyx":1591
 * 
 *             if 'children' not in vdev_tree:
 *                 return             # <<<<<<<<<<<<<<
 * 
 *             for child in vdev_tree.get_raw('children'):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = NULL;
    goto __pyx_L0;

    /* "libzfs.pyx":1590
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')
 * 
 *             if 'children' not in vdev_tree:             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
  }

  /* "libzfs.pyx":1593
 *                 return
 * 
 *             for child in vdev_tree.get_raw('children'):             # <<<<<<<<<<<<<<
 *                 if child['is_log']:
 *                     vdev = ZFSVdev.__new__(ZFSVdev)
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_NVList *)__pyx_cur_scope->__pyx_v_vdev_tree->__pyx_vtab)->get_raw(__pyx_cur_scope->__pyx_v_vdev_tree, __pyx_n_s_children); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1593, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 1593, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1593, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 1593, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1593, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_6(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 1593, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_child);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_child, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;

    /* "libzfs.pyx":1594
 * 
 *             for child in vdev_tree.get_raw('children'):
 *                 if child['is_log']:             # <<<<<<<<<<<<<<
 *                     vdev = ZFSVdev.__new__(ZFSVdev)
 *                     vdev.root = self.root
 */
    __pyx_t_2 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_child, __pyx_n_s_is_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 1594, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_4) {

      /* "libzfs.pyx":1595
 *             for child in vdev_tree.get_raw('children'):
 *                 if child['is_log']:
 *                     vdev = ZFSVdev.__new__(ZFSVdev)             # <<<<<<<<<<<<<<
 *                     vdev.root = self.root
 *                     vdev.zpool = self
 */
      __pyx_t_2 = __pyx_tp_new_6libzfs_ZFSVdev(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSVdev), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6libzfs_ZFSVdev)))) __PYX_ERR(1, 1595, __pyx_L1_error)
      __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev));
      __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_vdev, ((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_t_2));
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;

      /* "libzfs.pyx":1596
 *                 if child['is_log']:
 *                     vdev = ZFSVdev.__new__(ZFSVdev)
 *                     vdev.root = self.root             # <<<<<<<<<<<<<<
 *                     vdev.zpool = self
 *                     vdev.nvlist = <NVList>child
 */
      __pyx_t_2 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->root);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_vdev->root);
      __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev->root));
      __pyx_cur_scope->__pyx_v_vdev->root = ((struct __pyx_obj_6libzfs_ZFS *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "libzfs.pyx":1597
 *                     vdev = ZFSVdev.__new__(ZFSVdev)
 *                     vdev.root = self.root
 *                     vdev.zpool = self             # <<<<<<<<<<<<<<
 *                     vdev.nvlist = <NVList>child
 *                     vdev.group = 'log'
 */
      __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
      __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_vdev->zpool);
      __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev->zpool));
      __pyx_cur_scope->__pyx_v_vdev->zpool = __pyx_cur_scope->__pyx_v_self;

      /* "libzfs.pyx":1598
 *                     vdev.root = self.root
 *                     vdev.zpool = self
 *                     vdev.nvlist = <NVList>child             # <<<<<<<<<<<<<<
 *                     vdev.group = 'log'
 *                     yield vdev
 */
      __pyx_t_2 = __pyx_cur_scope->__pyx_v_child;
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_vdev->nvlist);
      __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev->nvlist));
      __pyx_cur_scope->__pyx_v_vdev->nvlist = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "libzfs.pyx":1599
 *                     vdev.zpool = self
 *                     vdev.nvlist = <NVList>child
 *                     vdev.group = 'log'             # <<<<<<<<<<<<<<
 *                     yield vdev
 * 
 */
      __Pyx_INCREF(__pyx_n_s_log);
      __Pyx_GIVEREF(__pyx_n_s_log);
      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_vdev->group);
      __Pyx_DECREF(__pyx_cur_scope->__pyx_v_vdev->group);
      __pyx_cur_scope->__pyx_v_vdev->group = __pyx_n_s_log;

      /* "libzfs.pyx":1600
 *                     vdev.nvlist = <NVList>child
 *                     vdev.group = 'log'
 *                     yield vdev             # <<<<<<<<<<<<<<
 * 
 *     property cache_vdevs:
 */
      __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev));
      __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_vdev);
      __Pyx_XGIVEREF(__pyx_t_1);
      __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
      __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
      __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      /* return from generator, yielding value */
      __pyx_generator->resume_label = 1;
      return __pyx_r;
      __pyx_L8_resume_from_yield:;
      __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
      __pyx_cur_scope->__pyx_t_0 = 0;
      __Pyx_XGOTREF(__pyx_t_1);
      __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
      __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
      if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1600, __pyx_L1_error)

      /* "libzfs.pyx":1594
 * 
 *             for child in vdev_tree.get_raw('children'):
 *                 if child['is_log']:             # <<<<<<<<<<<<<<
 *                     vdev = ZFSVdev.__new__(ZFSVdev)
 *                     vdev.root = self.root
 */
    }

    /* "libzfs.pyx":1593
 *                 return
 * 
 *             for child in vdev_tree.get_raw('children'):             # <<<<<<<<<<<<<<
 *                 if child['is_log']:
 *                     vdev = ZFSVdev.__new__(ZFSVdev)
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":1586
 * 
 *     property log_vdevs:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSVdev vdev
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')
 */

  /* 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("__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6libzfs_7ZFSPool_11cache_vdevs_2generator9(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "libzfs.pyx":1603
 * 
 *     property cache_vdevs:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSVdev vdev
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_11cache_vdevs_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_11cache_vdevs_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_11cache_vdevs___get__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_11cache_vdevs___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_10___get__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_cur_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_10___get__ *)__pyx_tp_new_6libzfs___pyx_scope_struct_10___get__(__pyx_ptype_6libzfs___pyx_scope_struct_10___get__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6libzfs_7ZFSPool_11cache_vdevs_2generator9, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_ZFSPool___get); if (unlikely(!gen)) __PYX_ERR(1, 1603, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("libzfs.ZFSPool.cache_vdevs.__get__", __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_6libzfs_7ZFSPool_11cache_vdevs_2generator9(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6libzfs___pyx_scope_struct_10___get__ *__pyx_cur_scope = ((struct __pyx_obj_6libzfs___pyx_scope_struct_10___get__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L7_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(1, 1603, __pyx_L1_error)

  /* "libzfs.pyx":1605
 *         def __get__(self):
 *             cdef ZFSVdev vdev
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')             # <<<<<<<<<<<<<<
 * 
 *             if 'l2cache' not in vdev_tree:
 */
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6libzfs_ZFSPool *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->get_raw_config(__pyx_cur_scope->__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_NVList *)((struct __pyx_obj_6libzfs_NVList *)__pyx_t_1)->__pyx_vtab)->get_raw(((struct __pyx_obj_6libzfs_NVList *)__pyx_t_1), __pyx_n_s_vdev_tree); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1605, __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_6libzfs_NVList))))) __PYX_ERR(1, 1605, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_vdev_tree = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "libzfs.pyx":1607
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')
 * 
 *             if 'l2cache' not in vdev_tree:             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_l2cache, ((PyObject *)__pyx_cur_scope->__pyx_v_vdev_tree), Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1607, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "libzfs.pyx":1608
 * 
 *             if 'l2cache' not in vdev_tree:
 *                 return             # <<<<<<<<<<<<<<
 * 
 *             for child in vdev_tree.get_raw('l2cache'):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = NULL;
    goto __pyx_L0;

    /* "libzfs.pyx":1607
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')
 * 
 *             if 'l2cache' not in vdev_tree:             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
  }

  /* "libzfs.pyx":1610
 *                 return
 * 
 *             for child in vdev_tree.get_raw('l2cache'):             # <<<<<<<<<<<<<<
 *                     vdev = ZFSVdev.__new__(ZFSVdev)
 *                     vdev.root = self.root
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_NVList *)__pyx_cur_scope->__pyx_v_vdev_tree->__pyx_vtab)->get_raw(__pyx_cur_scope->__pyx_v_vdev_tree, __pyx_n_s_l2cache); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1610, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 1610, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1610, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 1610, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1610, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_6(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 1610, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_child);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_child, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;

    /* "libzfs.pyx":1611
 * 
 *             for child in vdev_tree.get_raw('l2cache'):
 *                     vdev = ZFSVdev.__new__(ZFSVdev)             # <<<<<<<<<<<<<<
 *                     vdev.root = self.root
 *                     vdev.zpool = self
 */
    __pyx_t_2 = __pyx_tp_new_6libzfs_ZFSVdev(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSVdev), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6libzfs_ZFSVdev)))) __PYX_ERR(1, 1611, __pyx_L1_error)
    __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev));
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_vdev, ((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_t_2));
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;

    /* "libzfs.pyx":1612
 *             for child in vdev_tree.get_raw('l2cache'):
 *                     vdev = ZFSVdev.__new__(ZFSVdev)
 *                     vdev.root = self.root             # <<<<<<<<<<<<<<
 *                     vdev.zpool = self
 *                     vdev.nvlist = <NVList>child
 */
    __pyx_t_2 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->root);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_vdev->root);
    __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev->root));
    __pyx_cur_scope->__pyx_v_vdev->root = ((struct __pyx_obj_6libzfs_ZFS *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "libzfs.pyx":1613
 *                     vdev = ZFSVdev.__new__(ZFSVdev)
 *                     vdev.root = self.root
 *                     vdev.zpool = self             # <<<<<<<<<<<<<<
 *                     vdev.nvlist = <NVList>child
 *                     vdev.group = 'cache'
 */
    __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_vdev->zpool);
    __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev->zpool));
    __pyx_cur_scope->__pyx_v_vdev->zpool = __pyx_cur_scope->__pyx_v_self;

    /* "libzfs.pyx":1614
 *                     vdev.root = self.root
 *                     vdev.zpool = self
 *                     vdev.nvlist = <NVList>child             # <<<<<<<<<<<<<<
 *                     vdev.group = 'cache'
 *                     yield vdev
 */
    __pyx_t_2 = __pyx_cur_scope->__pyx_v_child;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_vdev->nvlist);
    __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev->nvlist));
    __pyx_cur_scope->__pyx_v_vdev->nvlist = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "libzfs.pyx":1615
 *                     vdev.zpool = self
 *                     vdev.nvlist = <NVList>child
 *                     vdev.group = 'cache'             # <<<<<<<<<<<<<<
 *                     yield vdev
 * 
 */
    __Pyx_INCREF(__pyx_n_s_cache);
    __Pyx_GIVEREF(__pyx_n_s_cache);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_vdev->group);
    __Pyx_DECREF(__pyx_cur_scope->__pyx_v_vdev->group);
    __pyx_cur_scope->__pyx_v_vdev->group = __pyx_n_s_cache;

    /* "libzfs.pyx":1616
 *                     vdev.nvlist = <NVList>child
 *                     vdev.group = 'cache'
 *                     yield vdev             # <<<<<<<<<<<<<<
 * 
 *     property spare_vdevs:
 */
    __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev));
    __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_vdev);
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L7_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1616, __pyx_L1_error)

    /* "libzfs.pyx":1610
 *                 return
 * 
 *             for child in vdev_tree.get_raw('l2cache'):             # <<<<<<<<<<<<<<
 *                     vdev = ZFSVdev.__new__(ZFSVdev)
 *                     vdev.root = self.root
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":1603
 * 
 *     property cache_vdevs:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSVdev vdev
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')
 */

  /* 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("__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6libzfs_7ZFSPool_11spare_vdevs_2generator10(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "libzfs.pyx":1619
 * 
 *     property spare_vdevs:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSVdev vdev
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_11spare_vdevs_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_11spare_vdevs_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_11spare_vdevs___get__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_11spare_vdevs___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_11___get__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_cur_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_11___get__ *)__pyx_tp_new_6libzfs___pyx_scope_struct_11___get__(__pyx_ptype_6libzfs___pyx_scope_struct_11___get__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6libzfs_7ZFSPool_11spare_vdevs_2generator10, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_ZFSPool___get); if (unlikely(!gen)) __PYX_ERR(1, 1619, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("libzfs.ZFSPool.spare_vdevs.__get__", __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_6libzfs_7ZFSPool_11spare_vdevs_2generator10(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6libzfs___pyx_scope_struct_11___get__ *__pyx_cur_scope = ((struct __pyx_obj_6libzfs___pyx_scope_struct_11___get__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L7_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(1, 1619, __pyx_L1_error)

  /* "libzfs.pyx":1621
 *         def __get__(self):
 *             cdef ZFSVdev vdev
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')             # <<<<<<<<<<<<<<
 * 
 *             if 'spares' not in vdev_tree:
 */
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6libzfs_ZFSPool *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->get_raw_config(__pyx_cur_scope->__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_NVList *)((struct __pyx_obj_6libzfs_NVList *)__pyx_t_1)->__pyx_vtab)->get_raw(((struct __pyx_obj_6libzfs_NVList *)__pyx_t_1), __pyx_n_s_vdev_tree); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1621, __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_6libzfs_NVList))))) __PYX_ERR(1, 1621, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_vdev_tree = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "libzfs.pyx":1623
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')
 * 
 *             if 'spares' not in vdev_tree:             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_spares, ((PyObject *)__pyx_cur_scope->__pyx_v_vdev_tree), Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1623, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "libzfs.pyx":1624
 * 
 *             if 'spares' not in vdev_tree:
 *                 return             # <<<<<<<<<<<<<<
 * 
 *             for child in vdev_tree.get_raw('spares'):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = NULL;
    goto __pyx_L0;

    /* "libzfs.pyx":1623
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')
 * 
 *             if 'spares' not in vdev_tree:             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
  }

  /* "libzfs.pyx":1626
 *                 return
 * 
 *             for child in vdev_tree.get_raw('spares'):             # <<<<<<<<<<<<<<
 *                     vdev = ZFSVdev.__new__(ZFSVdev)
 *                     vdev.root = self.root
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_NVList *)__pyx_cur_scope->__pyx_v_vdev_tree->__pyx_vtab)->get_raw(__pyx_cur_scope->__pyx_v_vdev_tree, __pyx_n_s_spares); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1626, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1626, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 1626, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1626, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 1626, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1626, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_6(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 1626, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_child);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_child, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;

    /* "libzfs.pyx":1627
 * 
 *             for child in vdev_tree.get_raw('spares'):
 *                     vdev = ZFSVdev.__new__(ZFSVdev)             # <<<<<<<<<<<<<<
 *                     vdev.root = self.root
 *                     vdev.zpool = self
 */
    __pyx_t_2 = __pyx_tp_new_6libzfs_ZFSVdev(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSVdev), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1627, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6libzfs_ZFSVdev)))) __PYX_ERR(1, 1627, __pyx_L1_error)
    __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev));
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_vdev, ((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_t_2));
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;

    /* "libzfs.pyx":1628
 *             for child in vdev_tree.get_raw('spares'):
 *                     vdev = ZFSVdev.__new__(ZFSVdev)
 *                     vdev.root = self.root             # <<<<<<<<<<<<<<
 *                     vdev.zpool = self
 *                     vdev.nvlist = <NVList>child
 */
    __pyx_t_2 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->root);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_vdev->root);
    __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev->root));
    __pyx_cur_scope->__pyx_v_vdev->root = ((struct __pyx_obj_6libzfs_ZFS *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "libzfs.pyx":1629
 *                     vdev = ZFSVdev.__new__(ZFSVdev)
 *                     vdev.root = self.root
 *                     vdev.zpool = self             # <<<<<<<<<<<<<<
 *                     vdev.nvlist = <NVList>child
 *                     vdev.group = 'spare'
 */
    __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_vdev->zpool);
    __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev->zpool));
    __pyx_cur_scope->__pyx_v_vdev->zpool = __pyx_cur_scope->__pyx_v_self;

    /* "libzfs.pyx":1630
 *                     vdev.root = self.root
 *                     vdev.zpool = self
 *                     vdev.nvlist = <NVList>child             # <<<<<<<<<<<<<<
 *                     vdev.group = 'spare'
 *                     yield vdev
 */
    __pyx_t_2 = __pyx_cur_scope->__pyx_v_child;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_vdev->nvlist);
    __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev->nvlist));
    __pyx_cur_scope->__pyx_v_vdev->nvlist = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "libzfs.pyx":1631
 *                     vdev.zpool = self
 *                     vdev.nvlist = <NVList>child
 *                     vdev.group = 'spare'             # <<<<<<<<<<<<<<
 *                     yield vdev
 * 
 */
    __Pyx_INCREF(__pyx_n_s_spare);
    __Pyx_GIVEREF(__pyx_n_s_spare);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_vdev->group);
    __Pyx_DECREF(__pyx_cur_scope->__pyx_v_vdev->group);
    __pyx_cur_scope->__pyx_v_vdev->group = __pyx_n_s_spare;

    /* "libzfs.pyx":1632
 *                     vdev.nvlist = <NVList>child
 *                     vdev.group = 'spare'
 *                     yield vdev             # <<<<<<<<<<<<<<
 * 
 *     property groups:
 */
    __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_vdev));
    __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_vdev);
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L7_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1632, __pyx_L1_error)

    /* "libzfs.pyx":1626
 *                 return
 * 
 *             for child in vdev_tree.get_raw('spares'):             # <<<<<<<<<<<<<<
 *                     vdev = ZFSVdev.__new__(ZFSVdev)
 *                     vdev.root = self.root
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":1619
 * 
 *     property spare_vdevs:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSVdev vdev
 *             cdef NVList vdev_tree = self.get_raw_config().get_raw('vdev_tree')
 */

  /* 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("__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1635
 * 
 *     property groups:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return {
 *                 'data': list(self.data_vdevs),
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_6groups_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_6groups_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_6groups___get__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_6groups___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1636
 *     property groups:
 *         def __get__(self):
 *             return {             # <<<<<<<<<<<<<<
 *                 'data': list(self.data_vdevs),
 *                 'log': list(self.log_vdevs),
 */
  __Pyx_XDECREF(__pyx_r);

  /* "libzfs.pyx":1637
 *         def __get__(self):
 *             return {
 *                 'data': list(self.data_vdevs),             # <<<<<<<<<<<<<<
 *                 'log': list(self.log_vdevs),
 *                 'cache': list(self.cache_vdevs),
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_data_vdevs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_data, __pyx_t_3) < 0) __PYX_ERR(1, 1637, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "libzfs.pyx":1638
 *             return {
 *                 'data': list(self.data_vdevs),
 *                 'log': list(self.log_vdevs),             # <<<<<<<<<<<<<<
 *                 'cache': list(self.cache_vdevs),
 *                 'spare': list(self.spare_vdevs)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_log_vdevs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_log, __pyx_t_2) < 0) __PYX_ERR(1, 1637, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1639
 *                 'data': list(self.data_vdevs),
 *                 'log': list(self.log_vdevs),
 *                 'cache': list(self.cache_vdevs),             # <<<<<<<<<<<<<<
 *                 'spare': list(self.spare_vdevs)
 *             }
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cache_vdevs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_cache, __pyx_t_3) < 0) __PYX_ERR(1, 1637, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "libzfs.pyx":1640
 *                 'log': list(self.log_vdevs),
 *                 'cache': list(self.cache_vdevs),
 *                 'spare': list(self.spare_vdevs)             # <<<<<<<<<<<<<<
 *             }
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_spare_vdevs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_spare, __pyx_t_2) < 0) __PYX_ERR(1, 1637, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1635
 * 
 *     property groups:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return {
 *                 'data': list(self.data_vdevs),
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("libzfs.ZFSPool.groups.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1644
 * 
 *     property name:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return libzfs.zpool_get_name(self.handle)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_4name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_4name___get__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_4name___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1645
 *     property name:
 *         def __get__(self):
 *             return libzfs.zpool_get_name(self.handle)             # <<<<<<<<<<<<<<
 * 
 *     property guid:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyUnicode_FromString(zpool_get_name(__pyx_v_self->handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1644
 * 
 *     property name:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return libzfs.zpool_get_name(self.handle)
 * 
 */

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

/* "libzfs.pyx":1648
 * 
 *     property guid:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.config['pool_guid']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_4guid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_4guid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_4guid___get__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_4guid___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1649
 *     property guid:
 *         def __get__(self):
 *             return self.config['pool_guid']             # <<<<<<<<<<<<<<
 * 
 *     property hostname:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_config); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_pool_guid); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1649, __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;

  /* "libzfs.pyx":1648
 * 
 *     property guid:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.config['pool_guid']
 * 
 */

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

/* "libzfs.pyx":1652
 * 
 *     property hostname:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.config.get('hostname')
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_8hostname_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_8hostname_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_8hostname___get__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_8hostname___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1653
 *     property hostname:
 *         def __get__(self):
 *             return self.config.get('hostname')             # <<<<<<<<<<<<<<
 * 
 *     property state:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_config); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1653, __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;

  /* "libzfs.pyx":1652
 * 
 *     property hostname:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.config.get('hostname')
 * 
 */

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

/* "libzfs.pyx":1656
 * 
 *     property state:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return PoolState(self.config['state'])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_5state_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_5state_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_5state___get__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_5state___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  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;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1657
 *     property state:
 *         def __get__(self):
 *             return PoolState(self.config['state'])             # <<<<<<<<<<<<<<
 * 
 *     property status:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PoolState); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_config); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_state); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1657, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1657, __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1656
 * 
 *     property state:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return PoolState(self.config['state'])
 * 
 */

  /* 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("libzfs.ZFSPool.state.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1660
 * 
 *     property status:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             stats = self.config['vdev_tree']['vdev_stats']
 *             return libzfs.zpool_state_to_name(stats[1], stats[2])
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_6status_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_6status_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_6status___get__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_6status___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  PyObject *__pyx_v_stats = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  vdev_state_t __pyx_t_3;
  vdev_aux_t __pyx_t_4;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1661
 *     property status:
 *         def __get__(self):
 *             stats = self.config['vdev_tree']['vdev_stats']             # <<<<<<<<<<<<<<
 *             return libzfs.zpool_state_to_name(stats[1], stats[2])
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_config); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_vdev_tree); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_vdev_stats); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_stats = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "libzfs.pyx":1662
 *         def __get__(self):
 *             stats = self.config['vdev_tree']['vdev_stats']
 *             return libzfs.zpool_state_to_name(stats[1], stats[2])             # <<<<<<<<<<<<<<
 * 
 *     property error_count:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_stats, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = ((vdev_state_t)__Pyx_PyInt_As_vdev_state_t(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1662, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_stats, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = ((vdev_aux_t)__Pyx_PyInt_As_vdev_aux_t(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1662, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_FromString(zpool_state_to_name(__pyx_t_3, __pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1660
 * 
 *     property status:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             stats = self.config['vdev_tree']['vdev_stats']
 *             return libzfs.zpool_state_to_name(stats[1], stats[2])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("libzfs.ZFSPool.status.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_stats);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1665
 * 
 *     property error_count:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.config.get('error_count')
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_11error_count_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_11error_count_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_11error_count___get__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_11error_count___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1666
 *     property error_count:
 *         def __get__(self):
 *             return self.config.get('error_count')             # <<<<<<<<<<<<<<
 * 
 *     property config:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_config); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1666, __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;

  /* "libzfs.pyx":1665
 * 
 *     property error_count:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.config.get('error_count')
 * 
 */

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

/* "libzfs.pyx":1669
 * 
 *     property config:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return dict(self.get_raw_config())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_6config_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_6config_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_6config___get__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_6config___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1670
 *     property config:
 *         def __get__(self):
 *             return dict(self.get_raw_config())             # <<<<<<<<<<<<<<
 * 
 *     property properties:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6libzfs_ZFSPool *)__pyx_v_self->__pyx_vtab)->get_raw_config(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyDict_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1670, __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;

  /* "libzfs.pyx":1669
 * 
 *     property config:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return dict(self.get_raw_config())
 * 
 */

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

/* "libzfs.pyx":1673
 * 
 *     property properties:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZPoolProperty prop
 *             proptypes = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_10properties_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_10properties_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_10properties___get__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_10properties___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  struct __pyx_obj_6libzfs_ZPoolProperty *__pyx_v_prop = 0;
  PyObject *__pyx_v_proptypes = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1675
 *         def __get__(self):
 *             cdef ZPoolProperty prop
 *             proptypes = []             # <<<<<<<<<<<<<<
 *             result = {}
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_proptypes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":1676
 *             cdef ZPoolProperty prop
 *             proptypes = []
 *             result = {}             # <<<<<<<<<<<<<<
 * 
 *             with nogil:
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":1678
 *             result = {}
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 libzfs.zprop_iter(self.__iterate_props, <void*>proptypes, True, True, zfs.ZFS_TYPE_POOL)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":1679
 * 
 *             with nogil:
 *                 libzfs.zprop_iter(self.__iterate_props, <void*>proptypes, True, True, zfs.ZFS_TYPE_POOL)             # <<<<<<<<<<<<<<
 * 
 *             for x in proptypes:
 */
        zprop_iter(((struct __pyx_vtabstruct_6libzfs_ZFSPool *)__pyx_v_self->__pyx_vtab)->__pyx___iterate_props, ((void *)__pyx_v_proptypes), 1, 1, ZFS_TYPE_POOL);
      }

      /* "libzfs.pyx":1678
 *             result = {}
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 libzfs.zprop_iter(self.__iterate_props, <void*>proptypes, True, True, zfs.ZFS_TYPE_POOL)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":1681
 *                 libzfs.zprop_iter(self.__iterate_props, <void*>proptypes, True, True, zfs.ZFS_TYPE_POOL)
 * 
 *             for x in proptypes:             # <<<<<<<<<<<<<<
 *                 prop = ZPoolProperty.__new__(ZPoolProperty)
 *                 prop.pool = self
 */
  __pyx_t_1 = __pyx_v_proptypes; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 1681, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":1682
 * 
 *             for x in proptypes:
 *                 prop = ZPoolProperty.__new__(ZPoolProperty)             # <<<<<<<<<<<<<<
 *                 prop.pool = self
 *                 prop.propid = x
 */
    __pyx_t_3 = __pyx_tp_new_6libzfs_ZPoolProperty(((PyTypeObject *)__pyx_ptype_6libzfs_ZPoolProperty), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6libzfs_ZPoolProperty)))) __PYX_ERR(1, 1682, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_prop, ((struct __pyx_obj_6libzfs_ZPoolProperty *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "libzfs.pyx":1683
 *             for x in proptypes:
 *                 prop = ZPoolProperty.__new__(ZPoolProperty)
 *                 prop.pool = self             # <<<<<<<<<<<<<<
 *                 prop.propid = x
 *                 result[prop.name] = prop
 */
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    __Pyx_GOTREF(__pyx_v_prop->pool);
    __Pyx_DECREF(((PyObject *)__pyx_v_prop->pool));
    __pyx_v_prop->pool = __pyx_v_self;

    /* "libzfs.pyx":1684
 *                 prop = ZPoolProperty.__new__(ZPoolProperty)
 *                 prop.pool = self
 *                 prop.propid = x             # <<<<<<<<<<<<<<
 *                 result[prop.name] = prop
 * 
 */
    __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_x); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1684, __pyx_L1_error)
    __pyx_v_prop->propid = __pyx_t_4;

    /* "libzfs.pyx":1685
 *                 prop.pool = self
 *                 prop.propid = x
 *                 result[prop.name] = prop             # <<<<<<<<<<<<<<
 * 
 *             return result
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_prop), __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1685, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_t_3, ((PyObject *)__pyx_v_prop)) < 0)) __PYX_ERR(1, 1685, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "libzfs.pyx":1681
 *                 libzfs.zprop_iter(self.__iterate_props, <void*>proptypes, True, True, zfs.ZFS_TYPE_POOL)
 * 
 *             for x in proptypes:             # <<<<<<<<<<<<<<
 *                 prop = ZPoolProperty.__new__(ZPoolProperty)
 *                 prop.pool = self
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":1687
 *                 result[prop.name] = prop
 * 
 *             return result             # <<<<<<<<<<<<<<
 * 
 *     property features:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "libzfs.pyx":1673
 * 
 *     property properties:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZPoolProperty prop
 *             proptypes = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("libzfs.ZFSPool.properties.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_prop);
  __Pyx_XDECREF(__pyx_v_proptypes);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6libzfs_7ZFSPool_8features_2generator11(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "libzfs.pyx":1690
 * 
 *     property features:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZPoolFeature f
 *             cdef NVList features_nv
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_8features_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_8features_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_8features___get__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_8features___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_12___get__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_cur_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_12___get__ *)__pyx_tp_new_6libzfs___pyx_scope_struct_12___get__(__pyx_ptype_6libzfs___pyx_scope_struct_12___get__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6libzfs_7ZFSPool_8features_2generator11, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_ZFSPool___get); if (unlikely(!gen)) __PYX_ERR(1, 1690, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("libzfs.ZFSPool.features.__get__", __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_6libzfs_7ZFSPool_8features_2generator11(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6libzfs___pyx_scope_struct_12___get__ *__pyx_cur_scope = ((struct __pyx_obj_6libzfs___pyx_scope_struct_12___get__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  spa_feature_t __pyx_t_4;
  long __pyx_t_5;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L10_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(1, 1690, __pyx_L1_error)

  /* "libzfs.pyx":1696
 *             cdef uintptr_t nvl
 * 
 *             if self.status == 'UNAVAIL':             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_UNAVAIL, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1696, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "libzfs.pyx":1697
 * 
 *             if self.status == 'UNAVAIL':
 *                 return             # <<<<<<<<<<<<<<
 * 
 *             with nogil:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = NULL;
    goto __pyx_L0;

    /* "libzfs.pyx":1696
 *             cdef uintptr_t nvl
 * 
 *             if self.status == 'UNAVAIL':             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
  }

  /* "libzfs.pyx":1699
 *                 return
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 nvl = <uintptr_t>libzfs.zpool_get_features(self.handle)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":1700
 * 
 *             with nogil:
 *                 nvl = <uintptr_t>libzfs.zpool_get_features(self.handle)             # <<<<<<<<<<<<<<
 * 
 *             features_nv = NVList(nvl)
 */
        __pyx_cur_scope->__pyx_v_nvl = ((uintptr_t)zpool_get_features(__pyx_cur_scope->__pyx_v_self->handle));
      }

      /* "libzfs.pyx":1699
 *                 return
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 nvl = <uintptr_t>libzfs.zpool_get_features(self.handle)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L7;
        }
        __pyx_L7:;
      }
  }

  /* "libzfs.pyx":1702
 *                 nvl = <uintptr_t>libzfs.zpool_get_features(self.handle)
 * 
 *             features_nv = NVList(nvl)             # <<<<<<<<<<<<<<
 * 
 *             for i in range(0, zfs.SPA_FEATURES):
 */
  __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_cur_scope->__pyx_v_nvl); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_NVList), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_features_nv = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":1704
 *             features_nv = NVList(nvl)
 * 
 *             for i in range(0, zfs.SPA_FEATURES):             # <<<<<<<<<<<<<<
 *                 feat = &zfs.spa_feature_table[i]
 *                 f = ZPoolFeature.__new__(ZPoolFeature)
 */
  __pyx_t_4 = SPA_FEATURES;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_cur_scope->__pyx_v_i = __pyx_t_5;

    /* "libzfs.pyx":1705
 * 
 *             for i in range(0, zfs.SPA_FEATURES):
 *                 feat = &zfs.spa_feature_table[i]             # <<<<<<<<<<<<<<
 *                 f = ZPoolFeature.__new__(ZPoolFeature)
 *                 f.feature = feat
 */
    __pyx_cur_scope->__pyx_v_feat = (&(spa_feature_table[__pyx_cur_scope->__pyx_v_i]));

    /* "libzfs.pyx":1706
 *             for i in range(0, zfs.SPA_FEATURES):
 *                 feat = &zfs.spa_feature_table[i]
 *                 f = ZPoolFeature.__new__(ZPoolFeature)             # <<<<<<<<<<<<<<
 *                 f.feature = feat
 *                 f.pool = self
 */
    __pyx_t_1 = __pyx_tp_new_6libzfs_ZPoolFeature(((PyTypeObject *)__pyx_ptype_6libzfs_ZPoolFeature), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6libzfs_ZPoolFeature)))) __PYX_ERR(1, 1706, __pyx_L1_error)
    __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_f));
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_f, ((struct __pyx_obj_6libzfs_ZPoolFeature *)__pyx_t_1));
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;

    /* "libzfs.pyx":1707
 *                 feat = &zfs.spa_feature_table[i]
 *                 f = ZPoolFeature.__new__(ZPoolFeature)
 *                 f.feature = feat             # <<<<<<<<<<<<<<
 *                 f.pool = self
 *                 f.nvlist = features_nv
 */
    __pyx_cur_scope->__pyx_v_f->feature = __pyx_cur_scope->__pyx_v_feat;

    /* "libzfs.pyx":1708
 *                 f = ZPoolFeature.__new__(ZPoolFeature)
 *                 f.feature = feat
 *                 f.pool = self             # <<<<<<<<<<<<<<
 *                 f.nvlist = features_nv
 *                 yield f
 */
    __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_f->pool);
    __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_f->pool));
    __pyx_cur_scope->__pyx_v_f->pool = __pyx_cur_scope->__pyx_v_self;

    /* "libzfs.pyx":1709
 *                 f.feature = feat
 *                 f.pool = self
 *                 f.nvlist = features_nv             # <<<<<<<<<<<<<<
 *                 yield f
 * 
 */
    __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_features_nv));
    __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_features_nv));
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_f->nvlist);
    __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_f->nvlist));
    __pyx_cur_scope->__pyx_v_f->nvlist = __pyx_cur_scope->__pyx_v_features_nv;

    /* "libzfs.pyx":1710
 *                 f.pool = self
 *                 f.nvlist = features_nv
 *                 yield f             # <<<<<<<<<<<<<<
 * 
 *     property disks:
 */
    __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_f));
    __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_f);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_4;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L10_resume_from_yield:;
    __pyx_t_4 = __pyx_cur_scope->__pyx_t_0;
    __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1710, __pyx_L1_error)
  }

  /* "libzfs.pyx":1690
 * 
 *     property features:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZPoolFeature f
 *             cdef NVList features_nv
 */

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

/* "libzfs.pyx":1713
 * 
 *     property disks:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             result = []
 *             for g in self.groups.values():
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_5disks_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_5disks_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_5disks___get__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_5disks___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_g = NULL;
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1714
 *     property disks:
 *         def __get__(self):
 *             result = []             # <<<<<<<<<<<<<<
 *             for g in self.groups.values():
 *                 for v in g:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "libzfs.pyx":1715
 *         def __get__(self):
 *             result = []
 *             for g in self.groups.values():             # <<<<<<<<<<<<<<
 *                 for v in g:
 *                     result += v.disks
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_groups); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1715, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1715, __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(1, 1715, __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(1, 1715, __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_COMPILING_IN_CPYTHON
        __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(1, 1715, __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(1, 1715, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __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(1, 1715, __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(1, 1715, __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(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 1715, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_g, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "libzfs.pyx":1716
 *             result = []
 *             for g in self.groups.values():
 *                 for v in g:             # <<<<<<<<<<<<<<
 *                     result += v.disks
 * 
 */
    if (likely(PyList_CheckExact(__pyx_v_g)) || PyTuple_CheckExact(__pyx_v_g)) {
      __pyx_t_1 = __pyx_v_g; __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_g); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1716, __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(1, 1716, __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_COMPILING_IN_CPYTHON
          __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(1, 1716, __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(1, 1716, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __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(1, 1716, __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(1, 1716, __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(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 1716, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "libzfs.pyx":1717
 *             for g in self.groups.values():
 *                 for v in g:
 *                     result += v.disks             # <<<<<<<<<<<<<<
 * 
 *             return result
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_disks); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1717, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1717, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "libzfs.pyx":1716
 *             result = []
 *             for g in self.groups.values():
 *                 for v in g:             # <<<<<<<<<<<<<<
 *                     result += v.disks
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "libzfs.pyx":1715
 *         def __get__(self):
 *             result = []
 *             for g in self.groups.values():             # <<<<<<<<<<<<<<
 *                 for v in g:
 *                     result += v.disks
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "libzfs.pyx":1719
 *                     result += v.disks
 * 
 *             return result             # <<<<<<<<<<<<<<
 * 
 *     property scrub:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "libzfs.pyx":1713
 * 
 *     property disks:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             result = []
 *             for g in self.groups.values():
 */

  /* 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("libzfs.ZFSPool.disks.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_g);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1722
 * 
 *     property scrub:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return ZPoolScrub(self.root, self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_5scrub_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_5scrub_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_5scrub___get__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_5scrub___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1723
 *     property scrub:
 *         def __get__(self):
 *             return ZPoolScrub(self.root, self)             # <<<<<<<<<<<<<<
 * 
 *     cdef NVList get_raw_config(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->root));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->root));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->root));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_ZPoolScrub), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1723, __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;

  /* "libzfs.pyx":1722
 * 
 *     property scrub:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return ZPoolScrub(self.root, self)
 * 
 */

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

/* "libzfs.pyx":1725
 *             return ZPoolScrub(self.root, self)
 * 
 *     cdef NVList get_raw_config(self):             # <<<<<<<<<<<<<<
 *         cdef uintptr_t nvl = <uintptr_t>libzfs.zpool_get_config(self.handle, NULL)
 *         return NVList(nvl)
 */

static struct __pyx_obj_6libzfs_NVList *__pyx_f_6libzfs_7ZFSPool_get_raw_config(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  uintptr_t __pyx_v_nvl;
  struct __pyx_obj_6libzfs_NVList *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("get_raw_config", 0);

  /* "libzfs.pyx":1726
 * 
 *     cdef NVList get_raw_config(self):
 *         cdef uintptr_t nvl = <uintptr_t>libzfs.zpool_get_config(self.handle, NULL)             # <<<<<<<<<<<<<<
 *         return NVList(nvl)
 * 
 */
  __pyx_v_nvl = ((uintptr_t)zpool_get_config(__pyx_v_self->handle, NULL));

  /* "libzfs.pyx":1727
 *     cdef NVList get_raw_config(self):
 *         cdef uintptr_t nvl = <uintptr_t>libzfs.zpool_get_config(self.handle, NULL)
 *         return NVList(nvl)             # <<<<<<<<<<<<<<
 * 
 *     def create(self, name, fsopts, fstype=DatasetType.FILESYSTEM, sparse_vol=False):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_nvl); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_NVList), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1725
 *             return ZPoolScrub(self.root, self)
 * 
 *     cdef NVList get_raw_config(self):             # <<<<<<<<<<<<<<
 *         cdef uintptr_t nvl = <uintptr_t>libzfs.zpool_get_config(self.handle, NULL)
 *         return NVList(nvl)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("libzfs.ZFSPool.get_raw_config", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1729
 *         return NVList(nvl)
 * 
 *     def create(self, name, fsopts, fstype=DatasetType.FILESYSTEM, sparse_vol=False):             # <<<<<<<<<<<<<<
 *         cdef NVList cfsopts = NVList(otherdict=fsopts)
 *         cdef uint64_t vol_reservation
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_13create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_13create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_fsopts = 0;
  PyObject *__pyx_v_fstype = 0;
  PyObject *__pyx_v_sparse_vol = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_2,&__pyx_n_s_fsopts,&__pyx_n_s_fstype,&__pyx_n_s_sparse_vol,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = __pyx_k__46;
    values[3] = ((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  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fsopts)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create", 0, 2, 4, 1); __PYX_ERR(1, 1729, __pyx_L3_error)
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fstype);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sparse_vol);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(1, 1729, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_name = values[0];
    __pyx_v_fsopts = values[1];
    __pyx_v_fstype = values[2];
    __pyx_v_sparse_vol = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1729, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSPool.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_12create(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self), __pyx_v_name, __pyx_v_fsopts, __pyx_v_fstype, __pyx_v_sparse_vol);

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_12create(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_fsopts, PyObject *__pyx_v_fstype, PyObject *__pyx_v_sparse_vol) {
  struct __pyx_obj_6libzfs_NVList *__pyx_v_cfsopts = 0;
  uint64_t __pyx_v_vol_reservation;
  char const *__pyx_v_c_name;
  zfs_type_t __pyx_v_c_fstype;
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char const *__pyx_t_3;
  zfs_type_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  uint64_t __pyx_t_12;
  __Pyx_RefNannySetupContext("create", 0);

  /* "libzfs.pyx":1730
 * 
 *     def create(self, name, fsopts, fstype=DatasetType.FILESYSTEM, sparse_vol=False):
 *         cdef NVList cfsopts = NVList(otherdict=fsopts)             # <<<<<<<<<<<<<<
 *         cdef uint64_t vol_reservation
 *         cdef const char *c_name = name
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_otherdict, __pyx_v_fsopts) < 0) __PYX_ERR(1, 1730, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_NVList), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cfsopts = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "libzfs.pyx":1732
 *         cdef NVList cfsopts = NVList(otherdict=fsopts)
 *         cdef uint64_t vol_reservation
 *         cdef const char *c_name = name             # <<<<<<<<<<<<<<
 *         cdef zfs.zfs_type_t c_fstype = <zfs.zfs_type_t>fstype
 *         cdef int ret
 */
  __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 1732, __pyx_L1_error)
  __pyx_v_c_name = __pyx_t_3;

  /* "libzfs.pyx":1733
 *         cdef uint64_t vol_reservation
 *         cdef const char *c_name = name
 *         cdef zfs.zfs_type_t c_fstype = <zfs.zfs_type_t>fstype             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */
  __pyx_t_4 = ((zfs_type_t)__Pyx_PyInt_As_zfs_type_t(__pyx_v_fstype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1733, __pyx_L1_error)
  __pyx_v_c_fstype = ((zfs_type_t)__pyx_t_4);

  /* "libzfs.pyx":1736
 *         cdef int ret
 * 
 *         if fstype == DatasetType.VOLUME and not sparse_vol:             # <<<<<<<<<<<<<<
 *             vol_reservation = libzfs.zvol_volsize_to_reservation(
 *                 nicestrtonum(self.root, cfsopts['volsize']),
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DatasetType); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_VOLUME); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_fstype, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1736, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 1736, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_sparse_vol); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 1736, __pyx_L1_error)
  __pyx_t_7 = ((!__pyx_t_6) != 0);
  __pyx_t_5 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "libzfs.pyx":1738
 *         if fstype == DatasetType.VOLUME and not sparse_vol:
 *             vol_reservation = libzfs.zvol_volsize_to_reservation(
 *                 nicestrtonum(self.root, cfsopts['volsize']),             # <<<<<<<<<<<<<<
 *                 cfsopts.handle)
 * 
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nicestrtonum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_v_cfsopts), __pyx_n_s_volsize); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_10 = 1;
      }
    }
    __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1738, __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_INCREF(((PyObject *)__pyx_v_self->root));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self->root));
    PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, ((PyObject *)__pyx_v_self->root));
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_8);
    __pyx_t_8 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_12 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_12 == (uint64_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1738, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "libzfs.pyx":1737
 * 
 *         if fstype == DatasetType.VOLUME and not sparse_vol:
 *             vol_reservation = libzfs.zvol_volsize_to_reservation(             # <<<<<<<<<<<<<<
 *                 nicestrtonum(self.root, cfsopts['volsize']),
 *                 cfsopts.handle)
 */
    __pyx_v_vol_reservation = zvol_volsize_to_reservation(__pyx_t_12, __pyx_v_cfsopts->handle);

    /* "libzfs.pyx":1741
 *                 cfsopts.handle)
 * 
 *             cfsopts['refreservation'] = vol_reservation             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */
    __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_vol_reservation); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_cfsopts), __pyx_n_s_refreservation, __pyx_t_2) < 0)) __PYX_ERR(1, 1741, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "libzfs.pyx":1736
 *         cdef int ret
 * 
 *         if fstype == DatasetType.VOLUME and not sparse_vol:             # <<<<<<<<<<<<<<
 *             vol_reservation = libzfs.zvol_volsize_to_reservation(
 *                 nicestrtonum(self.root, cfsopts['volsize']),
 */
  }

  /* "libzfs.pyx":1743
 *             cfsopts['refreservation'] = vol_reservation
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_create(
 *                 self.root.handle,
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":1744
 * 
 *         with nogil:
 *             ret = libzfs.zfs_create(             # <<<<<<<<<<<<<<
 *                 self.root.handle,
 *                 c_name,
 */
        __pyx_v_ret = zfs_create(__pyx_v_self->root->handle, __pyx_v_c_name, __pyx_v_c_fstype, __pyx_v_cfsopts->handle);
      }

      /* "libzfs.pyx":1743
 *             cfsopts['refreservation'] = vol_reservation
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_create(
 *                 self.root.handle,
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L8;
        }
        __pyx_L8:;
      }
  }

  /* "libzfs.pyx":1751
 *             )
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_5 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_5) {

    /* "libzfs.pyx":1752
 * 
 *         if ret != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *     def attach_vdevs(self, vdevs_tree):
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->root->__pyx_vtab)->get_error(__pyx_v_self->root); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1752, __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(1, 1752, __pyx_L1_error)

    /* "libzfs.pyx":1751
 *             )
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":1729
 *         return NVList(nvl)
 * 
 *     def create(self, name, fsopts, fstype=DatasetType.FILESYSTEM, sparse_vol=False):             # <<<<<<<<<<<<<<
 *         cdef NVList cfsopts = NVList(otherdict=fsopts)
 *         cdef uint64_t vol_reservation
 */

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("libzfs.ZFSPool.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_cfsopts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1754
 *             raise self.root.get_error()
 * 
 *     def attach_vdevs(self, vdevs_tree):             # <<<<<<<<<<<<<<
 *         cdef const char *command = 'zpool add'
 *         cdef ZFSVdev vd = self.root.make_vdev_tree(vdevs_tree)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_15attach_vdevs(PyObject *__pyx_v_self, PyObject *__pyx_v_vdevs_tree); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_15attach_vdevs(PyObject *__pyx_v_self, PyObject *__pyx_v_vdevs_tree) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("attach_vdevs (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_14attach_vdevs(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self), ((PyObject *)__pyx_v_vdevs_tree));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_14attach_vdevs(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self, PyObject *__pyx_v_vdevs_tree) {
  char const *__pyx_v_command;
  struct __pyx_obj_6libzfs_ZFSVdev *__pyx_v_vd = 0;
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  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;
  Py_ssize_t __pyx_t_10;
  __Pyx_RefNannySetupContext("attach_vdevs", 0);

  /* "libzfs.pyx":1755
 * 
 *     def attach_vdevs(self, vdevs_tree):
 *         cdef const char *command = 'zpool add'             # <<<<<<<<<<<<<<
 *         cdef ZFSVdev vd = self.root.make_vdev_tree(vdevs_tree)
 *         cdef int ret
 */
  __pyx_v_command = ((char const *)"zpool add");

  /* "libzfs.pyx":1756
 *     def attach_vdevs(self, vdevs_tree):
 *         cdef const char *command = 'zpool add'
 *         cdef ZFSVdev vd = self.root.make_vdev_tree(vdevs_tree)             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->root->__pyx_vtab)->make_vdev_tree(__pyx_v_self->root, __pyx_v_vdevs_tree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_vd = ((struct __pyx_obj_6libzfs_ZFSVdev *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":1759
 *         cdef int ret
 * 
 *         ret = libzfs.zpool_add(self.handle, vd.nvlist.handle)             # <<<<<<<<<<<<<<
 * 
 *         if ret != 0:
 */
  __pyx_v_ret = zpool_add(__pyx_v_self->handle, __pyx_v_vd->nvlist->handle);

  /* "libzfs.pyx":1761
 *         ret = libzfs.zpool_add(self.handle, vd.nvlist.handle)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_2 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":1762
 * 
 *         if ret != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *         self.root.write_history(command, self.name, self.root.history_vdevs_list(vdevs_tree))
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->root->__pyx_vtab)->get_error(__pyx_v_self->root); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1762, __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, 1762, __pyx_L1_error)

    /* "libzfs.pyx":1761
 *         ret = libzfs.zpool_add(self.handle, vd.nvlist.handle)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":1764
 *             raise self.root.get_error()
 * 
 *         self.root.write_history(command, self.name, self.root.history_vdevs_list(vdevs_tree))             # <<<<<<<<<<<<<<
 * 
 *     def vdev_by_guid(self, guid):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyUnicode_FromString(__pyx_v_command); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->root), __pyx_n_s_history_vdevs_list); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_vdevs_tree); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  } else {
    __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
    __Pyx_INCREF(__pyx_v_vdevs_tree);
    __Pyx_GIVEREF(__pyx_v_vdevs_tree);
    PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_vdevs_tree);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  __pyx_t_10 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_10 = 1;
    }
  }
  __pyx_t_9 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__pyx_t_7) {
    __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
  }
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_10, __pyx_t_6);
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":1754
 *             raise self.root.get_error()
 * 
 *     def attach_vdevs(self, vdevs_tree):             # <<<<<<<<<<<<<<
 *         cdef const char *command = 'zpool add'
 *         cdef ZFSVdev vd = self.root.make_vdev_tree(vdevs_tree)
 */

  /* 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_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);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("libzfs.ZFSPool.attach_vdevs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_vd);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1766
 *         self.root.write_history(command, self.name, self.root.history_vdevs_list(vdevs_tree))
 * 
 *     def vdev_by_guid(self, guid):             # <<<<<<<<<<<<<<
 *         def search_vdev(vdev, g):
 *             if vdev.guid == g:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_17vdev_by_guid(PyObject *__pyx_v_self, PyObject *__pyx_v_guid); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_17vdev_by_guid(PyObject *__pyx_v_self, PyObject *__pyx_v_guid) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("vdev_by_guid (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_16vdev_by_guid(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self), ((PyObject *)__pyx_v_guid));

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

/* "libzfs.pyx":1767
 * 
 *     def vdev_by_guid(self, guid):
 *         def search_vdev(vdev, g):             # <<<<<<<<<<<<<<
 *             if vdev.guid == g:
 *                 return vdev
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_12vdev_by_guid_1search_vdev(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_7ZFSPool_12vdev_by_guid_1search_vdev = {"search_vdev", (PyCFunction)__pyx_pw_6libzfs_7ZFSPool_12vdev_by_guid_1search_vdev, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6libzfs_7ZFSPool_12vdev_by_guid_1search_vdev(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_vdev = 0;
  PyObject *__pyx_v_g = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("search_vdev (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vdev,&__pyx_n_s_g,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_vdev)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_g)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("search_vdev", 1, 2, 2, 1); __PYX_ERR(1, 1767, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "search_vdev") < 0)) __PYX_ERR(1, 1767, __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_vdev = values[0];
    __pyx_v_g = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("search_vdev", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1767, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSPool.vdev_by_guid.search_vdev", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_12vdev_by_guid_search_vdev(__pyx_self, __pyx_v_vdev, __pyx_v_g);

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_12vdev_by_guid_search_vdev(PyObject *__pyx_self, PyObject *__pyx_v_vdev, PyObject *__pyx_v_g) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_13_vdev_by_guid *__pyx_cur_scope;
  struct __pyx_obj_6libzfs___pyx_scope_struct_13_vdev_by_guid *__pyx_outer_scope;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_ret = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  __Pyx_RefNannySetupContext("search_vdev", 0);
  __pyx_outer_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_13_vdev_by_guid *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "libzfs.pyx":1768
 *     def vdev_by_guid(self, guid):
 *         def search_vdev(vdev, g):
 *             if vdev.guid == g:             # <<<<<<<<<<<<<<
 *                 return vdev
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_vdev, __pyx_n_s_guid); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_g, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1768, __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(1, 1768, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "libzfs.pyx":1769
 *         def search_vdev(vdev, g):
 *             if vdev.guid == g:
 *                 return vdev             # <<<<<<<<<<<<<<
 * 
 *             for i in vdev.children:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_vdev);
    __pyx_r = __pyx_v_vdev;
    goto __pyx_L0;

    /* "libzfs.pyx":1768
 *     def vdev_by_guid(self, guid):
 *         def search_vdev(vdev, g):
 *             if vdev.guid == g:             # <<<<<<<<<<<<<<
 *                 return vdev
 * 
 */
  }

  /* "libzfs.pyx":1771
 *                 return vdev
 * 
 *             for i in vdev.children:             # <<<<<<<<<<<<<<
 *                 ret = search_vdev(i, g)
 *                 if ret:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_vdev, __pyx_n_s_children); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1771, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 1771, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1771, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 1771, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1771, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 1771, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "libzfs.pyx":1772
 * 
 *             for i in vdev.children:
 *                 ret = search_vdev(i, g)             # <<<<<<<<<<<<<<
 *                 if ret:
 *                     return ret
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_search_vdev)) { __Pyx_RaiseClosureNameError("search_vdev"); __PYX_ERR(1, 1772, __pyx_L1_error) }
    __pyx_t_2 = __pyx_pf_6libzfs_7ZFSPool_12vdev_by_guid_search_vdev(__pyx_cur_scope->__pyx_v_search_vdev, __pyx_v_i, __pyx_v_g); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_ret, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "libzfs.pyx":1773
 *             for i in vdev.children:
 *                 ret = search_vdev(i, g)
 *                 if ret:             # <<<<<<<<<<<<<<
 *                     return ret
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_ret); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1773, __pyx_L1_error)
    if (__pyx_t_3) {

      /* "libzfs.pyx":1774
 *                 ret = search_vdev(i, g)
 *                 if ret:
 *                     return ret             # <<<<<<<<<<<<<<
 * 
 *             return None
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_ret);
      __pyx_r = __pyx_v_ret;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "libzfs.pyx":1773
 *             for i in vdev.children:
 *                 ret = search_vdev(i, g)
 *                 if ret:             # <<<<<<<<<<<<<<
 *                     return ret
 * 
 */
    }

    /* "libzfs.pyx":1771
 *                 return vdev
 * 
 *             for i in vdev.children:             # <<<<<<<<<<<<<<
 *                 ret = search_vdev(i, g)
 *                 if ret:
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":1776
 *                     return ret
 * 
 *             return None             # <<<<<<<<<<<<<<
 * 
 *         if guid == self.root_vdev.guid:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_None);
  __pyx_r = Py_None;
  goto __pyx_L0;

  /* "libzfs.pyx":1767
 * 
 *     def vdev_by_guid(self, guid):
 *         def search_vdev(vdev, g):             # <<<<<<<<<<<<<<
 *             if vdev.guid == g:
 *                 return vdev
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("libzfs.ZFSPool.vdev_by_guid.search_vdev", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1766
 *         self.root.write_history(command, self.name, self.root.history_vdevs_list(vdevs_tree))
 * 
 *     def vdev_by_guid(self, guid):             # <<<<<<<<<<<<<<
 *         def search_vdev(vdev, g):
 *             if vdev.guid == g:
 */

static PyObject *__pyx_pf_6libzfs_7ZFSPool_16vdev_by_guid(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self, PyObject *__pyx_v_guid) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_13_vdev_by_guid *__pyx_cur_scope;
  PyObject *__pyx_v_g = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_ret = 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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_RefNannySetupContext("vdev_by_guid", 0);
  __pyx_cur_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_13_vdev_by_guid *)__pyx_tp_new_6libzfs___pyx_scope_struct_13_vdev_by_guid(__pyx_ptype_6libzfs___pyx_scope_struct_13_vdev_by_guid, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);

  /* "libzfs.pyx":1767
 * 
 *     def vdev_by_guid(self, guid):
 *         def search_vdev(vdev, g):             # <<<<<<<<<<<<<<
 *             if vdev.guid == g:
 *                 return vdev
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6libzfs_7ZFSPool_12vdev_by_guid_1search_vdev, 0, __pyx_n_s_vdev_by_guid_locals_search_vdev, ((PyObject*)__pyx_cur_scope), __pyx_n_s_libzfs, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_search_vdev = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "libzfs.pyx":1778
 *             return None
 * 
 *         if guid == self.root_vdev.guid:             # <<<<<<<<<<<<<<
 *             return self.root_vdev
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_root_vdev); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_guid); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_guid, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1778, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1778, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "libzfs.pyx":1779
 * 
 *         if guid == self.root_vdev.guid:
 *             return self.root_vdev             # <<<<<<<<<<<<<<
 * 
 *         for g in (self.data_vdevs, self.cache_vdevs, self.log_vdevs, self.spare_vdevs):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_root_vdev); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "libzfs.pyx":1778
 *             return None
 * 
 *         if guid == self.root_vdev.guid:             # <<<<<<<<<<<<<<
 *             return self.root_vdev
 * 
 */
  }

  /* "libzfs.pyx":1781
 *             return self.root_vdev
 * 
 *         for g in (self.data_vdevs, self.cache_vdevs, self.log_vdevs, self.spare_vdevs):             # <<<<<<<<<<<<<<
 *             for i in g:
 *                 ret = search_vdev(i, guid)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_data_vdevs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cache_vdevs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_log_vdevs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_spare_vdevs); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  for (;;) {
    if (__pyx_t_7 >= 4) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 1781, __pyx_L1_error)
    #else
    __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_g, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "libzfs.pyx":1782
 * 
 *         for g in (self.data_vdevs, self.cache_vdevs, self.log_vdevs, self.spare_vdevs):
 *             for i in g:             # <<<<<<<<<<<<<<
 *                 ret = search_vdev(i, guid)
 *                 if ret:
 */
    if (likely(PyList_CheckExact(__pyx_v_g)) || PyTuple_CheckExact(__pyx_v_g)) {
      __pyx_t_6 = __pyx_v_g; __Pyx_INCREF(__pyx_t_6); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_g); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1782, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1782, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_6))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_6)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 1782, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1782, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 1782, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1782, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_9(__pyx_t_6);
        if (unlikely(!__pyx_t_4)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 1782, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "libzfs.pyx":1783
 *         for g in (self.data_vdevs, self.cache_vdevs, self.log_vdevs, self.spare_vdevs):
 *             for i in g:
 *                 ret = search_vdev(i, guid)             # <<<<<<<<<<<<<<
 *                 if ret:
 *                     return ret
 */
      __pyx_t_4 = __pyx_pf_6libzfs_7ZFSPool_12vdev_by_guid_search_vdev(__pyx_cur_scope->__pyx_v_search_vdev, __pyx_v_i, __pyx_v_guid); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1783, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_ret, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "libzfs.pyx":1784
 *             for i in g:
 *                 ret = search_vdev(i, guid)
 *                 if ret:             # <<<<<<<<<<<<<<
 *                     return ret
 * 
 */
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_ret); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1784, __pyx_L1_error)
      if (__pyx_t_3) {

        /* "libzfs.pyx":1785
 *                 ret = search_vdev(i, guid)
 *                 if ret:
 *                     return ret             # <<<<<<<<<<<<<<
 * 
 *     def delete(self):
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_ret);
        __pyx_r = __pyx_v_ret;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L0;

        /* "libzfs.pyx":1784
 *             for i in g:
 *                 ret = search_vdev(i, guid)
 *                 if ret:             # <<<<<<<<<<<<<<
 *                     return ret
 * 
 */
      }

      /* "libzfs.pyx":1782
 * 
 *         for g in (self.data_vdevs, self.cache_vdevs, self.log_vdevs, self.spare_vdevs):
 *             for i in g:             # <<<<<<<<<<<<<<
 *                 ret = search_vdev(i, guid)
 *                 if ret:
 */
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "libzfs.pyx":1781
 *             return self.root_vdev
 * 
 *         for g in (self.data_vdevs, self.cache_vdevs, self.log_vdevs, self.spare_vdevs):             # <<<<<<<<<<<<<<
 *             for i in g:
 *                 ret = search_vdev(i, guid)
 */
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":1766
 *         self.root.write_history(command, self.name, self.root.history_vdevs_list(vdevs_tree))
 * 
 *     def vdev_by_guid(self, guid):             # <<<<<<<<<<<<<<
 *         def search_vdev(vdev, g):
 *             if vdev.guid == g:
 */

  /* 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_6);
  __Pyx_AddTraceback("libzfs.ZFSPool.vdev_by_guid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_g);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1787
 *                     return ret
 * 
 *     def delete(self):             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_19delete(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_19delete(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("delete (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_18delete(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_18delete(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("delete", 0);

  /* "libzfs.pyx":1790
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zpool_destroy(self.handle, "destroy")
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":1791
 * 
 *         with nogil:
 *             ret = libzfs.zpool_destroy(self.handle, "destroy")             # <<<<<<<<<<<<<<
 * 
 *         if ret != 0:
 */
        __pyx_v_ret = zpool_destroy(__pyx_v_self->handle, ((char const *)"destroy"));
      }

      /* "libzfs.pyx":1790
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zpool_destroy(self.handle, "destroy")
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":1793
 *             ret = libzfs.zpool_destroy(self.handle, "destroy")
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":1794
 * 
 *         if ret != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *     def start_scrub(self):
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->root->__pyx_vtab)->get_error(__pyx_v_self->root); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1794, __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(1, 1794, __pyx_L1_error)

    /* "libzfs.pyx":1793
 *             ret = libzfs.zpool_destroy(self.handle, "destroy")
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":1787
 *                     return ret
 * 
 *     def delete(self):             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("libzfs.ZFSPool.delete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1796
 *             raise self.root.get_error()
 * 
 *     def start_scrub(self):             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_21start_scrub(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_21start_scrub(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("start_scrub (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_20start_scrub(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_20start_scrub(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  int __pyx_v_ret;
  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;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("start_scrub", 0);

  /* "libzfs.pyx":1799
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zpool_scan(self.handle, zfs.POOL_SCAN_SCRUB)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":1800
 * 
 *         with nogil:
 *             ret = libzfs.zpool_scan(self.handle, zfs.POOL_SCAN_SCRUB)             # <<<<<<<<<<<<<<
 * 
 *         if ret != 0:
 */
        __pyx_v_ret = zpool_scan(__pyx_v_self->handle, POOL_SCAN_SCRUB);
      }

      /* "libzfs.pyx":1799
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zpool_scan(self.handle, zfs.POOL_SCAN_SCRUB)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":1802
 *             ret = libzfs.zpool_scan(self.handle, zfs.POOL_SCAN_SCRUB)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":1803
 * 
 *         if ret != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *         self.root.write_history('zpool scrub', self.name)
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->root->__pyx_vtab)->get_error(__pyx_v_self->root); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1803, __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(1, 1803, __pyx_L1_error)

    /* "libzfs.pyx":1802
 *             ret = libzfs.zpool_scan(self.handle, zfs.POOL_SCAN_SCRUB)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":1805
 *             raise self.root.get_error()
 * 
 *         self.root.write_history('zpool scrub', self.name)             # <<<<<<<<<<<<<<
 * 
 *     def stop_scrub(self):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1805, __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_kp_s_zpool_scrub);
  __Pyx_GIVEREF(__pyx_kp_s_zpool_scrub);
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_zpool_scrub);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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;

  /* "libzfs.pyx":1796
 *             raise self.root.get_error()
 * 
 *     def start_scrub(self):             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("libzfs.ZFSPool.start_scrub", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1807
 *         self.root.write_history('zpool scrub', self.name)
 * 
 *     def stop_scrub(self):             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_23stop_scrub(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_23stop_scrub(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("stop_scrub (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_22stop_scrub(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_22stop_scrub(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  int __pyx_v_ret;
  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;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("stop_scrub", 0);

  /* "libzfs.pyx":1810
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zpool_scan(self.handle, zfs.POOL_SCAN_NONE)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":1811
 * 
 *         with nogil:
 *             ret = libzfs.zpool_scan(self.handle, zfs.POOL_SCAN_NONE)             # <<<<<<<<<<<<<<
 * 
 *         if ret != 0:
 */
        __pyx_v_ret = zpool_scan(__pyx_v_self->handle, POOL_SCAN_NONE);
      }

      /* "libzfs.pyx":1810
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zpool_scan(self.handle, zfs.POOL_SCAN_NONE)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":1813
 *             ret = libzfs.zpool_scan(self.handle, zfs.POOL_SCAN_NONE)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":1814
 * 
 *         if ret != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *         self.root.write_history('zpool scrub -s', self.name)
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->root->__pyx_vtab)->get_error(__pyx_v_self->root); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1814, __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(1, 1814, __pyx_L1_error)

    /* "libzfs.pyx":1813
 *             ret = libzfs.zpool_scan(self.handle, zfs.POOL_SCAN_NONE)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":1816
 *             raise self.root.get_error()
 * 
 *         self.root.write_history('zpool scrub -s', self.name)             # <<<<<<<<<<<<<<
 * 
 *     def clear(self):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1816, __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_kp_s_zpool_scrub_s);
  __Pyx_GIVEREF(__pyx_kp_s_zpool_scrub_s);
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_zpool_scrub_s);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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;

  /* "libzfs.pyx":1807
 *         self.root.write_history('zpool scrub', self.name)
 * 
 *     def stop_scrub(self):             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("libzfs.ZFSPool.stop_scrub", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1818
 *         self.root.write_history('zpool scrub -s', self.name)
 * 
 *     def clear(self):             # <<<<<<<<<<<<<<
 *         cdef NVList policy = NVList()
 *         cdef int ret
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_25clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_25clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clear (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_24clear(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_24clear(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  struct __pyx_obj_6libzfs_NVList *__pyx_v_policy = 0;
  int __pyx_v_ret;
  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;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("clear", 0);

  /* "libzfs.pyx":1819
 * 
 *     def clear(self):
 *         cdef NVList policy = NVList()             # <<<<<<<<<<<<<<
 *         cdef int ret
 *         policy["rewind-request"] = zfs.ZPOOL_NO_REWIND
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_NVList), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_policy = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":1821
 *         cdef NVList policy = NVList()
 *         cdef int ret
 *         policy["rewind-request"] = zfs.ZPOOL_NO_REWIND             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(ZPOOL_NO_REWIND); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_policy), __pyx_kp_s_rewind_request, __pyx_t_1) < 0)) __PYX_ERR(1, 1821, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":1823
 *         policy["rewind-request"] = zfs.ZPOOL_NO_REWIND
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zpool_clear(self.handle, NULL, policy.handle)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":1824
 * 
 *         with nogil:
 *             ret = libzfs.zpool_clear(self.handle, NULL, policy.handle)             # <<<<<<<<<<<<<<
 * 
 *         self.root.write_history('zpool clear', self.name)
 */
        __pyx_v_ret = zpool_clear(__pyx_v_self->handle, NULL, __pyx_v_policy->handle);
      }

      /* "libzfs.pyx":1823
 *         policy["rewind-request"] = zfs.ZPOOL_NO_REWIND
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zpool_clear(self.handle, NULL, policy.handle)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":1826
 *             ret = libzfs.zpool_clear(self.handle, NULL, policy.handle)
 * 
 *         self.root.write_history('zpool clear', self.name)             # <<<<<<<<<<<<<<
 *         return ret == 0
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1826, __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_kp_s_zpool_clear);
  __Pyx_GIVEREF(__pyx_kp_s_zpool_clear);
  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_kp_s_zpool_clear);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":1827
 * 
 *         self.root.write_history('zpool clear', self.name)
 *         return ret == 0             # <<<<<<<<<<<<<<
 * 
 *     def upgrade(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_ret == 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1818
 *         self.root.write_history('zpool scrub -s', self.name)
 * 
 *     def clear(self):             # <<<<<<<<<<<<<<
 *         cdef NVList policy = NVList()
 *         cdef int ret
 */

  /* 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("libzfs.ZFSPool.clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_policy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1829
 *         return ret == 0
 * 
 *     def upgrade(self):             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_27upgrade(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_27upgrade(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("upgrade (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_26upgrade(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_26upgrade(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  int __pyx_v_ret;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("upgrade", 0);

  /* "libzfs.pyx":1832
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zpool_upgrade(self.handle, zfs.SPA_VERSION)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":1833
 * 
 *         with nogil:
 *             ret = libzfs.zpool_upgrade(self.handle, zfs.SPA_VERSION)             # <<<<<<<<<<<<<<
 * 
 *         if ret != 0:
 */
        __pyx_v_ret = zpool_upgrade(__pyx_v_self->handle, SPA_VERSION);
      }

      /* "libzfs.pyx":1832
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zpool_upgrade(self.handle, zfs.SPA_VERSION)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":1835
 *             ret = libzfs.zpool_upgrade(self.handle, zfs.SPA_VERSION)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":1836
 * 
 *         if ret != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *         for i in self.features:
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->root->__pyx_vtab)->get_error(__pyx_v_self->root); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1836, __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(1, 1836, __pyx_L1_error)

    /* "libzfs.pyx":1835
 *             ret = libzfs.zpool_upgrade(self.handle, zfs.SPA_VERSION)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":1838
 *             raise self.root.get_error()
 * 
 *         for i in self.features:             # <<<<<<<<<<<<<<
 *             if i.state == FeatureState.DISABLED:
 *                 i.enable()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_features); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  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(1, 1838, __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(1, 1838, __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_COMPILING_IN_CPYTHON
        __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(1, 1838, __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(1, 1838, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __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(1, 1838, __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(1, 1838, __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(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 1838, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "libzfs.pyx":1839
 * 
 *         for i in self.features:
 *             if i.state == FeatureState.DISABLED:             # <<<<<<<<<<<<<<
 *                 i.enable()
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_i, __pyx_n_s_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_FeatureState); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_DISABLED); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1839, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1839, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_1) {

      /* "libzfs.pyx":1840
 *         for i in self.features:
 *             if i.state == FeatureState.DISABLED:
 *                 i.enable()             # <<<<<<<<<<<<<<
 * 
 *         self.root.write_history('zpool upgrade', self.name)
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_i, __pyx_n_s_enable); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1840, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_2 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      if (__pyx_t_2) {
        __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1840, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1840, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "libzfs.pyx":1839
 * 
 *         for i in self.features:
 *             if i.state == FeatureState.DISABLED:             # <<<<<<<<<<<<<<
 *                 i.enable()
 * 
 */
    }

    /* "libzfs.pyx":1838
 *             raise self.root.get_error()
 * 
 *         for i in self.features:             # <<<<<<<<<<<<<<
 *             if i.state == FeatureState.DISABLED:
 *                 i.enable()
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "libzfs.pyx":1842
 *                 i.enable()
 * 
 *         self.root.write_history('zpool upgrade', self.name)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_4 = 1;
    }
  }
  __pyx_t_8 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1842, __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_INCREF(__pyx_kp_s_zpool_upgrade);
  __Pyx_GIVEREF(__pyx_kp_s_zpool_upgrade);
  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_4, __pyx_kp_s_zpool_upgrade);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_4, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "libzfs.pyx":1829
 *         return ret == 0
 * 
 *     def upgrade(self):             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("libzfs.ZFSPool.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1482
 *     cdef libzfs.zpool_handle_t* handle
 *     cdef bint free
 *     cdef readonly ZFS root             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_7ZFSPool_4root_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_7ZFSPool_4root_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_7ZFSPool_4root___get__(((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_7ZFSPool_4root___get__(struct __pyx_obj_6libzfs_ZFSPool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->root));
  __pyx_r = ((PyObject *)__pyx_v_self->root);
  goto __pyx_L0;

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

/* "libzfs.pyx":1849
 *     cdef public object name
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<libzfs.ZFSImportablePool name '{0}' guid '{1}'>".format(self.name, self.guid)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_17ZFSImportablePool_1__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_17ZFSImportablePool_1__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_17ZFSImportablePool___str__(((struct __pyx_obj_6libzfs_ZFSImportablePool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_17ZFSImportablePool___str__(struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_self) {
  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;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "libzfs.pyx":1850
 * 
 *     def __str__(self):
 *         return "<libzfs.ZFSImportablePool name '{0}' guid '{1}'>".format(self.name, self.guid)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_libzfs_ZFSImportablePool_name_0, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_guid); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1850, __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_self->name);
  __Pyx_GIVEREF(__pyx_v_self->name);
  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self->name);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1849
 *     cdef public object name
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<libzfs.ZFSImportablePool name '{0}' guid '{1}'>".format(self.name, self.guid)
 * 
 */

  /* 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("libzfs.ZFSImportablePool.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1852
 *         return "<libzfs.ZFSImportablePool name '{0}' guid '{1}'>".format(self.name, self.guid)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_17ZFSImportablePool_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_17ZFSImportablePool_3__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_17ZFSImportablePool_2__repr__(((struct __pyx_obj_6libzfs_ZFSImportablePool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_17ZFSImportablePool_2__repr__(struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "libzfs.pyx":1853
 * 
 *     def __repr__(self):
 *         return str(self)             # <<<<<<<<<<<<<<
 * 
 *     property config:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1853, __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_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1853, __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;

  /* "libzfs.pyx":1852
 *         return "<libzfs.ZFSImportablePool name '{0}' guid '{1}'>".format(self.name, self.guid)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

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

/* "libzfs.pyx":1856
 * 
 *     property config:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return dict(self.nvlist)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_17ZFSImportablePool_6config_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_17ZFSImportablePool_6config_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_17ZFSImportablePool_6config___get__(((struct __pyx_obj_6libzfs_ZFSImportablePool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_17ZFSImportablePool_6config___get__(struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":1857
 *     property config:
 *         def __get__(self):
 *             return dict(self.nvlist)             # <<<<<<<<<<<<<<
 * 
 *     property properties:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->nvlist));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->nvlist));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->nvlist));
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyDict_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1857, __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;

  /* "libzfs.pyx":1856
 * 
 *     property config:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return dict(self.nvlist)
 * 
 */

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

/* "libzfs.pyx":1860
 * 
 *     property properties:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return None
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_17ZFSImportablePool_10properties_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_17ZFSImportablePool_10properties_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_17ZFSImportablePool_10properties___get__(((struct __pyx_obj_6libzfs_ZFSImportablePool *)__pyx_v_self));

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

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

  /* "libzfs.pyx":1861
 *     property properties:
 *         def __get__(self):
 *             return None             # <<<<<<<<<<<<<<
 * 
 *     property root_dataset:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_None);
  __pyx_r = Py_None;
  goto __pyx_L0;

  /* "libzfs.pyx":1860
 * 
 *     property properties:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return None
 * 
 */

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

/* "libzfs.pyx":1864
 * 
 *     property root_dataset:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return None
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_17ZFSImportablePool_12root_dataset_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_17ZFSImportablePool_12root_dataset_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_17ZFSImportablePool_12root_dataset___get__(((struct __pyx_obj_6libzfs_ZFSImportablePool *)__pyx_v_self));

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

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

  /* "libzfs.pyx":1865
 *     property root_dataset:
 *         def __get__(self):
 *             return None             # <<<<<<<<<<<<<<
 * 
 *     property error_count:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_None);
  __pyx_r = Py_None;
  goto __pyx_L0;

  /* "libzfs.pyx":1864
 * 
 *     property root_dataset:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return None
 * 
 */

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

/* "libzfs.pyx":1868
 * 
 *     property error_count:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return 0
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_17ZFSImportablePool_11error_count_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_17ZFSImportablePool_11error_count_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_17ZFSImportablePool_11error_count___get__(((struct __pyx_obj_6libzfs_ZFSImportablePool *)__pyx_v_self));

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

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

  /* "libzfs.pyx":1869
 *     property error_count:
 *         def __get__(self):
 *             return 0             # <<<<<<<<<<<<<<
 * 
 *     property features:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_0);
  __pyx_r = __pyx_int_0;
  goto __pyx_L0;

  /* "libzfs.pyx":1868
 * 
 *     property error_count:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return 0
 * 
 */

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

/* "libzfs.pyx":1872
 * 
 *     property features:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return None
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_17ZFSImportablePool_8features_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_17ZFSImportablePool_8features_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_17ZFSImportablePool_8features___get__(((struct __pyx_obj_6libzfs_ZFSImportablePool *)__pyx_v_self));

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

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

  /* "libzfs.pyx":1873
 *     property features:
 *         def __get__(self):
 *             return None             # <<<<<<<<<<<<<<
 * 
 *     cdef NVList get_raw_config(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_None);
  __pyx_r = Py_None;
  goto __pyx_L0;

  /* "libzfs.pyx":1872
 * 
 *     property features:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return None
 * 
 */

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

/* "libzfs.pyx":1875
 *             return None
 * 
 *     cdef NVList get_raw_config(self):             # <<<<<<<<<<<<<<
 *         return self.nvlist
 * 
 */

static struct __pyx_obj_6libzfs_NVList *__pyx_f_6libzfs_17ZFSImportablePool_get_raw_config(struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_self) {
  struct __pyx_obj_6libzfs_NVList *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_raw_config", 0);

  /* "libzfs.pyx":1876
 * 
 *     cdef NVList get_raw_config(self):
 *         return self.nvlist             # <<<<<<<<<<<<<<
 * 
 *     def create(self, *args, **kwargs):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->nvlist));
  __pyx_r = __pyx_v_self->nvlist;
  goto __pyx_L0;

  /* "libzfs.pyx":1875
 *             return None
 * 
 *     cdef NVList get_raw_config(self):             # <<<<<<<<<<<<<<
 *         return self.nvlist
 * 
 */

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

/* "libzfs.pyx":1878
 *         return self.nvlist
 * 
 *     def create(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_17ZFSImportablePool_5create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_17ZFSImportablePool_5create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "create", 1))) return NULL;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_6libzfs_17ZFSImportablePool_4create(((struct __pyx_obj_6libzfs_ZFSImportablePool *)__pyx_v_self), __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_6libzfs_17ZFSImportablePool_4create(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("create", 0);

  /* "libzfs.pyx":1879
 * 
 *     def create(self, *args, **kwargs):
 *         raise NotImplementedError()             # <<<<<<<<<<<<<<
 * 
 *     def destroy(self, name):
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_NotImplementedError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1879, __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, 1879, __pyx_L1_error)

  /* "libzfs.pyx":1878
 *         return self.nvlist
 * 
 *     def create(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("libzfs.ZFSImportablePool.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1881
 *         raise NotImplementedError()
 * 
 *     def destroy(self, name):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_17ZFSImportablePool_7destroy(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_pw_6libzfs_17ZFSImportablePool_7destroy(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_17ZFSImportablePool_6destroy(((struct __pyx_obj_6libzfs_ZFSImportablePool *)__pyx_v_self), ((PyObject *)__pyx_v_name));

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

static PyObject *__pyx_pf_6libzfs_17ZFSImportablePool_6destroy(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("destroy", 0);

  /* "libzfs.pyx":1882
 * 
 *     def destroy(self, name):
 *         raise NotImplementedError()             # <<<<<<<<<<<<<<
 * 
 *     def attach_vdev(self, vdev):
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_NotImplementedError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1882, __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, 1882, __pyx_L1_error)

  /* "libzfs.pyx":1881
 *         raise NotImplementedError()
 * 
 *     def destroy(self, name):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("libzfs.ZFSImportablePool.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1884
 *         raise NotImplementedError()
 * 
 *     def attach_vdev(self, vdev):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_17ZFSImportablePool_9attach_vdev(PyObject *__pyx_v_self, PyObject *__pyx_v_vdev); /*proto*/
static PyObject *__pyx_pw_6libzfs_17ZFSImportablePool_9attach_vdev(PyObject *__pyx_v_self, PyObject *__pyx_v_vdev) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("attach_vdev (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_17ZFSImportablePool_8attach_vdev(((struct __pyx_obj_6libzfs_ZFSImportablePool *)__pyx_v_self), ((PyObject *)__pyx_v_vdev));

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

static PyObject *__pyx_pf_6libzfs_17ZFSImportablePool_8attach_vdev(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_vdev) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("attach_vdev", 0);

  /* "libzfs.pyx":1885
 * 
 *     def attach_vdev(self, vdev):
 *         raise NotImplementedError()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_NotImplementedError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1885, __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, 1885, __pyx_L1_error)

  /* "libzfs.pyx":1884
 *         raise NotImplementedError()
 * 
 *     def attach_vdev(self, vdev):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("libzfs.ZFSImportablePool.attach_vdev", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1847
 * cdef class ZFSImportablePool(ZFSPool):
 *     cdef NVList nvlist
 *     cdef public object name             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_17ZFSImportablePool_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_17ZFSImportablePool_4name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_17ZFSImportablePool_4name___get__(((struct __pyx_obj_6libzfs_ZFSImportablePool *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_17ZFSImportablePool_4name___get__(struct __pyx_obj_6libzfs_ZFSImportablePool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->name);
  __pyx_r = __pyx_v_self->name;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6libzfs_17ZFSImportablePool_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6libzfs_17ZFSImportablePool_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_17ZFSImportablePool_4name_2__set__(((struct __pyx_obj_6libzfs_ZFSImportablePool *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6libzfs_17ZFSImportablePool_4name_2__set__(struct __pyx_obj_6libzfs_ZFSImportablePool *__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->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6libzfs_17ZFSImportablePool_4name_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6libzfs_17ZFSImportablePool_4name_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_17ZFSImportablePool_4name_4__del__(((struct __pyx_obj_6libzfs_ZFSImportablePool *)__pyx_v_self));

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

static int __pyx_pf_6libzfs_17ZFSImportablePool_4name_4__del__(struct __pyx_obj_6libzfs_ZFSImportablePool *__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->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = Py_None;

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

/* "libzfs.pyx":1893
 * 
 *     @staticmethod
 *     cdef int __iterate_props(int proptype, void* arg) nogil:             # <<<<<<<<<<<<<<
 *         with gil:
 *             proptypes = <object>arg
 */

static int __pyx_f_6libzfs_15ZFSPropertyDict___iterate_props(int __pyx_v_proptype, void *__pyx_v_arg) {
  PyObject *__pyx_v_proptypes = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("__iterate_props", 1);

  /* "libzfs.pyx":1894
 *     @staticmethod
 *     cdef int __iterate_props(int proptype, void* arg) nogil:
 *         with gil:             # <<<<<<<<<<<<<<
 *             proptypes = <object>arg
 *             proptypes.append(proptype)
 */
  /*try:*/ {
    {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
        #endif
        /*try:*/ {

          /* "libzfs.pyx":1895
 *     cdef int __iterate_props(int proptype, void* arg) nogil:
 *         with gil:
 *             proptypes = <object>arg             # <<<<<<<<<<<<<<
 *             proptypes.append(proptype)
 *             return zfs.ZPROP_CONT
 */
          __pyx_t_1 = ((PyObject *)__pyx_v_arg);
          __Pyx_INCREF(__pyx_t_1);
          __pyx_v_proptypes = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "libzfs.pyx":1896
 *         with gil:
 *             proptypes = <object>arg
 *             proptypes.append(proptype)             # <<<<<<<<<<<<<<
 *             return zfs.ZPROP_CONT
 * 
 */
          __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_proptype); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1896, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_proptypes, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 1896, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "libzfs.pyx":1897
 *             proptypes = <object>arg
 *             proptypes.append(proptype)
 *             return zfs.ZPROP_CONT             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
          __pyx_r = ZPROP_CONT;
          goto __pyx_L6_return;
        }

        /* "libzfs.pyx":1894
 *     @staticmethod
 *     cdef int __iterate_props(int proptype, void* arg) nogil:
 *         with gil:             # <<<<<<<<<<<<<<
 *             proptypes = <object>arg
 *             proptypes.append(proptype)
 */
        /*finally:*/ {
          __pyx_L6_return: {
            #ifdef WITH_THREAD
            PyGILState_Release(__pyx_gilstate_save);
            #endif
            goto __pyx_L3_return;
          }
          __pyx_L7_error: {
            #ifdef WITH_THREAD
            PyGILState_Release(__pyx_gilstate_save);
            #endif
            goto __pyx_L4_error;
          }
        }
    }
  }
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "libzfs.pyx":1893
 * 
 *     @staticmethod
 *     cdef int __iterate_props(int proptype, void* arg) nogil:             # <<<<<<<<<<<<<<
 *         with gil:
 *             proptypes = <object>arg
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("libzfs.ZFSPropertyDict.__iterate_props", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 1);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_proptypes);
  #ifdef WITH_THREAD
  PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "libzfs.pyx":1899
 *             return zfs.ZPROP_CONT
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '{' + ', '.join(["'{0}': {1}".format(k, repr(v)) for k, v in self.items()]) + '}'
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_1__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_1__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_15ZFSPropertyDict___repr__(((struct __pyx_obj_6libzfs_ZFSPropertyDict *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict___repr__(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self) {
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  Py_ssize_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "libzfs.pyx":1900
 * 
 *     def __repr__(self):
 *         return '{' + ', '.join(["'{0}': {1}".format(k, repr(v)) for k, v in self.items()]) + '}'             # <<<<<<<<<<<<<<
 * 
 *     def refresh(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (__pyx_t_4) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1900, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1900, __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_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1900, __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(1, 1900, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 1900, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1900, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 1900, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1900, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 1900, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(1, 1900, __pyx_L1_error)
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1900, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1900, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1900, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
      index = 0; __pyx_t_4 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(1, 1900, __pyx_L1_error)
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(1, 1900, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_4 = PyObject_Repr(__pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && 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_10 = 1;
      }
    }
    __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_INCREF(__pyx_v_k);
    __Pyx_GIVEREF(__pyx_v_k);
    PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_v_k);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(1, 1900, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__50, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_kp_s__49, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_kp_s__51); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1900, __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;

  /* "libzfs.pyx":1899
 *             return zfs.ZPROP_CONT
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '{' + ', '.join(["'{0}': {1}".format(k, repr(v)) for k, v in self.items()]) + '}'
 * 
 */

  /* 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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("libzfs.ZFSPropertyDict.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1902
 *         return '{' + ', '.join(["'{0}': {1}".format(k, repr(v)) for k, v in self.items()]) + '}'
 * 
 *     def refresh(self):             # <<<<<<<<<<<<<<
 *         cdef ZFSProperty prop
 *         cdef ZFSUserProperty userprop
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_3refresh(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_3refresh(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("refresh (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_15ZFSPropertyDict_2refresh(((struct __pyx_obj_6libzfs_ZFSPropertyDict *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_2refresh(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self) {
  struct __pyx_obj_6libzfs_ZFSProperty *__pyx_v_prop = 0;
  struct __pyx_obj_6libzfs_ZFSUserProperty *__pyx_v_userprop = 0;
  nvlist_t *__pyx_v_nvlist;
  zfs_type_t __pyx_v_c_type;
  PyObject *__pyx_v_proptypes = NULL;
  struct __pyx_obj_6libzfs_NVList *__pyx_v_nvl = NULL;
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  zfs_type_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __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)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  __Pyx_RefNannySetupContext("refresh", 0);

  /* "libzfs.pyx":1906
 *         cdef ZFSUserProperty userprop
 *         cdef nvpair.nvlist_t *nvlist
 *         cdef zfs.zfs_type_t c_type = <zfs.zfs_type_t>self.parent.type             # <<<<<<<<<<<<<<
 *         proptypes = []
 *         self.props = {}
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->parent), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((zfs_type_t)__Pyx_PyInt_As_zfs_type_t(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1906, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_c_type = ((zfs_type_t)__pyx_t_2);

  /* "libzfs.pyx":1907
 *         cdef nvpair.nvlist_t *nvlist
 *         cdef zfs.zfs_type_t c_type = <zfs.zfs_type_t>self.parent.type
 *         proptypes = []             # <<<<<<<<<<<<<<
 *         self.props = {}
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_proptypes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":1908
 *         cdef zfs.zfs_type_t c_type = <zfs.zfs_type_t>self.parent.type
 *         proptypes = []
 *         self.props = {}             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->props);
  __Pyx_DECREF(__pyx_v_self->props);
  __pyx_v_self->props = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "libzfs.pyx":1910
 *         self.props = {}
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             libzfs.zprop_iter(self.__iterate_props, <void*>proptypes, True, True, c_type)
 *             nvlist = libzfs.zfs_get_user_props(self.parent.handle)
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":1911
 * 
 *         with nogil:
 *             libzfs.zprop_iter(self.__iterate_props, <void*>proptypes, True, True, c_type)             # <<<<<<<<<<<<<<
 *             nvlist = libzfs.zfs_get_user_props(self.parent.handle)
 * 
 */
        zprop_iter(((struct __pyx_vtabstruct_6libzfs_ZFSPropertyDict *)__pyx_v_self->__pyx_vtab)->__pyx___iterate_props, ((void *)__pyx_v_proptypes), 1, 1, __pyx_v_c_type);

        /* "libzfs.pyx":1912
 *         with nogil:
 *             libzfs.zprop_iter(self.__iterate_props, <void*>proptypes, True, True, c_type)
 *             nvlist = libzfs.zfs_get_user_props(self.parent.handle)             # <<<<<<<<<<<<<<
 * 
 *         nvl = NVList(<uintptr_t>nvlist)
 */
        __pyx_v_nvlist = zfs_get_user_props(__pyx_v_self->parent->handle);
      }

      /* "libzfs.pyx":1910
 *         self.props = {}
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             libzfs.zprop_iter(self.__iterate_props, <void*>proptypes, True, True, c_type)
 *             nvlist = libzfs.zfs_get_user_props(self.parent.handle)
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":1914
 *             nvlist = libzfs.zfs_get_user_props(self.parent.handle)
 * 
 *         nvl = NVList(<uintptr_t>nvlist)             # <<<<<<<<<<<<<<
 * 
 *         for x in proptypes:
 */
  __pyx_t_1 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_nvlist)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_NVList), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_nvl = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":1916
 *         nvl = NVList(<uintptr_t>nvlist)
 * 
 *         for x in proptypes:             # <<<<<<<<<<<<<<
 *             if not zfs.zfs_prop_valid_for_type(x, self.parent.type):
 *                 continue
 */
  __pyx_t_1 = __pyx_v_proptypes; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
  for (;;) {
    if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 1916, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1916, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":1917
 * 
 *         for x in proptypes:
 *             if not zfs.zfs_prop_valid_for_type(x, self.parent.type):             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
    __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_x); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1917, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->parent), __pyx_n_s_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = ((zfs_type_t)__Pyx_PyInt_As_zfs_type_t(__pyx_t_3)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1917, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = ((!(zfs_prop_valid_for_type(__pyx_t_5, __pyx_t_2) != 0)) != 0);
    if (__pyx_t_6) {

      /* "libzfs.pyx":1918
 *         for x in proptypes:
 *             if not zfs.zfs_prop_valid_for_type(x, self.parent.type):
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             prop = ZFSProperty.__new__(ZFSProperty)
 */
      goto __pyx_L6_continue;

      /* "libzfs.pyx":1917
 * 
 *         for x in proptypes:
 *             if not zfs.zfs_prop_valid_for_type(x, self.parent.type):             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
    }

    /* "libzfs.pyx":1920
 *                 continue
 * 
 *             prop = ZFSProperty.__new__(ZFSProperty)             # <<<<<<<<<<<<<<
 *             prop.dataset = self.parent
 *             prop.propid = x
 */
    __pyx_t_3 = __pyx_tp_new_6libzfs_ZFSProperty(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSProperty), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1920, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6libzfs_ZFSProperty)))) __PYX_ERR(1, 1920, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_prop, ((struct __pyx_obj_6libzfs_ZFSProperty *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "libzfs.pyx":1921
 * 
 *             prop = ZFSProperty.__new__(ZFSProperty)
 *             prop.dataset = self.parent             # <<<<<<<<<<<<<<
 *             prop.propid = x
 *             prop.refresh()
 */
    __pyx_t_3 = ((PyObject *)__pyx_v_self->parent);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_prop->dataset);
    __Pyx_DECREF(((PyObject *)__pyx_v_prop->dataset));
    __pyx_v_prop->dataset = ((struct __pyx_obj_6libzfs_ZFSObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":1922
 *             prop = ZFSProperty.__new__(ZFSProperty)
 *             prop.dataset = self.parent
 *             prop.propid = x             # <<<<<<<<<<<<<<
 *             prop.refresh()
 *             self.props[prop.name] = prop
 */
    __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_x); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1922, __pyx_L1_error)
    __pyx_v_prop->propid = __pyx_t_5;

    /* "libzfs.pyx":1923
 *             prop.dataset = self.parent
 *             prop.propid = x
 *             prop.refresh()             # <<<<<<<<<<<<<<
 *             self.props[prop.name] = prop
 * 
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_prop), __pyx_n_s_refresh); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1923, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && 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);
      }
    }
    if (__pyx_t_8) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1923, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1923, __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;

    /* "libzfs.pyx":1924
 *             prop.propid = x
 *             prop.refresh()
 *             self.props[prop.name] = prop             # <<<<<<<<<<<<<<
 * 
 *         for k, v in nvl.items():
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_prop), __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1924, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyObject_SetItem(__pyx_v_self->props, __pyx_t_3, ((PyObject *)__pyx_v_prop)) < 0)) __PYX_ERR(1, 1924, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "libzfs.pyx":1916
 *         nvl = NVList(<uintptr_t>nvlist)
 * 
 *         for x in proptypes:             # <<<<<<<<<<<<<<
 *             if not zfs.zfs_prop_valid_for_type(x, self.parent.type):
 *                 continue
 */
    __pyx_L6_continue:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":1926
 *             self.props[prop.name] = prop
 * 
 *         for k, v in nvl.items():             # <<<<<<<<<<<<<<
 *             userprop = ZFSUserProperty.__new__(ZFSUserProperty)
 *             userprop.dataset = self.parent
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_nvl), __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (__pyx_t_7) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1926, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1926, __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_9 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1926, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_9)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __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(1, 1926, __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(1, 1926, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __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(1, 1926, __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(1, 1926, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_9(__pyx_t_3);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 1926, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(1, 1926, __pyx_L1_error)
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      #else
      __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1926, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1926, __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_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1926, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
      index = 0; __pyx_t_7 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_7)) goto __pyx_L11_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      index = 1; __pyx_t_8 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L11_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(1, 1926, __pyx_L1_error)
      __pyx_t_11 = NULL;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L12_unpacking_done;
      __pyx_L11_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_11 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(1, 1926, __pyx_L1_error)
      __pyx_L12_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "libzfs.pyx":1927
 * 
 *         for k, v in nvl.items():
 *             userprop = ZFSUserProperty.__new__(ZFSUserProperty)             # <<<<<<<<<<<<<<
 *             userprop.dataset = self.parent
 *             userprop.name = k
 */
    __pyx_t_1 = __pyx_tp_new_6libzfs_ZFSUserProperty(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSUserProperty), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6libzfs_ZFSUserProperty)))) __PYX_ERR(1, 1927, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_userprop, ((struct __pyx_obj_6libzfs_ZFSUserProperty *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "libzfs.pyx":1928
 *         for k, v in nvl.items():
 *             userprop = ZFSUserProperty.__new__(ZFSUserProperty)
 *             userprop.dataset = self.parent             # <<<<<<<<<<<<<<
 *             userprop.name = k
 *             userprop.values = v
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_self->parent);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_userprop->__pyx_base.dataset);
    __Pyx_DECREF(((PyObject *)__pyx_v_userprop->__pyx_base.dataset));
    __pyx_v_userprop->__pyx_base.dataset = ((struct __pyx_obj_6libzfs_ZFSObject *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "libzfs.pyx":1929
 *             userprop = ZFSUserProperty.__new__(ZFSUserProperty)
 *             userprop.dataset = self.parent
 *             userprop.name = k             # <<<<<<<<<<<<<<
 *             userprop.values = v
 *             self.props[userprop.name] = userprop
 */
    __Pyx_INCREF(__pyx_v_k);
    __Pyx_GIVEREF(__pyx_v_k);
    __Pyx_GOTREF(__pyx_v_userprop->name);
    __Pyx_DECREF(__pyx_v_userprop->name);
    __pyx_v_userprop->name = __pyx_v_k;

    /* "libzfs.pyx":1930
 *             userprop.dataset = self.parent
 *             userprop.name = k
 *             userprop.values = v             # <<<<<<<<<<<<<<
 *             self.props[userprop.name] = userprop
 * 
 */
    if (!(likely(PyDict_CheckExact(__pyx_v_v))||((__pyx_v_v) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_v)->tp_name), 0))) __PYX_ERR(1, 1930, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_v;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_userprop->values);
    __Pyx_DECREF(__pyx_v_userprop->values);
    __pyx_v_userprop->values = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "libzfs.pyx":1931
 *             userprop.name = k
 *             userprop.values = v
 *             self.props[userprop.name] = userprop             # <<<<<<<<<<<<<<
 * 
 *     def __delitem__(self, key):
 */
    if (unlikely(PyObject_SetItem(__pyx_v_self->props, __pyx_v_userprop->name, ((PyObject *)__pyx_v_userprop)) < 0)) __PYX_ERR(1, 1931, __pyx_L1_error)

    /* "libzfs.pyx":1926
 *             self.props[prop.name] = prop
 * 
 *         for k, v in nvl.items():             # <<<<<<<<<<<<<<
 *             userprop = ZFSUserProperty.__new__(ZFSUserProperty)
 *             userprop.dataset = self.parent
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "libzfs.pyx":1902
 *         return '{' + ', '.join(["'{0}': {1}".format(k, repr(v)) for k, v in self.items()]) + '}'
 * 
 *     def refresh(self):             # <<<<<<<<<<<<<<
 *         cdef ZFSProperty prop
 *         cdef ZFSUserProperty userprop
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("libzfs.ZFSPropertyDict.refresh", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_prop);
  __Pyx_XDECREF((PyObject *)__pyx_v_userprop);
  __Pyx_XDECREF(__pyx_v_proptypes);
  __Pyx_XDECREF((PyObject *)__pyx_v_nvl);
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1933
 *             self.props[userprop.name] = userprop
 * 
 *     def __delitem__(self, key):             # <<<<<<<<<<<<<<
 *         if key not in self.props:
 *             raise KeyError(key)
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_15ZFSPropertyDict_5__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static int __pyx_pw_6libzfs_15ZFSPropertyDict_5__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_15ZFSPropertyDict_4__delitem__(((struct __pyx_obj_6libzfs_ZFSPropertyDict *)__pyx_v_self), ((PyObject *)__pyx_v_key));

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

static int __pyx_pf_6libzfs_15ZFSPropertyDict_4__delitem__(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self, PyObject *__pyx_v_key) {
  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;
  __Pyx_RefNannySetupContext("__delitem__", 0);

  /* "libzfs.pyx":1934
 * 
 *     def __delitem__(self, key):
 *         if key not in self.props:             # <<<<<<<<<<<<<<
 *             raise KeyError(key)
 * 
 */
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_v_self->props, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1934, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":1935
 *     def __delitem__(self, key):
 *         if key not in self.props:
 *             raise KeyError(key)             # <<<<<<<<<<<<<<
 * 
 *         self.props[key].inherit(recursive=True)
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 1935, __pyx_L1_error)

    /* "libzfs.pyx":1934
 * 
 *     def __delitem__(self, key):
 *         if key not in self.props:             # <<<<<<<<<<<<<<
 *             raise KeyError(key)
 * 
 */
  }

  /* "libzfs.pyx":1937
 *             raise KeyError(key)
 * 
 *         self.props[key].inherit(recursive=True)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, item):
 */
  __pyx_t_4 = PyObject_GetItem(__pyx_v_self->props, __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_inherit); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_recursive, Py_True) < 0) __PYX_ERR(1, 1937, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":1933
 *             self.props[userprop.name] = userprop
 * 
 *     def __delitem__(self, key):             # <<<<<<<<<<<<<<
 *         if key not in self.props:
 *             raise KeyError(key)
 */

  /* 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("libzfs.ZFSPropertyDict.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1939
 *         self.props[key].inherit(recursive=True)
 * 
 *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
 *         return self.props[item]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_15ZFSPropertyDict_6__getitem__(((struct __pyx_obj_6libzfs_ZFSPropertyDict *)__pyx_v_self), ((PyObject *)__pyx_v_item));

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

static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_6__getitem__(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self, PyObject *__pyx_v_item) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "libzfs.pyx":1940
 * 
 *     def __getitem__(self, item):
 *         return self.props[item]             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, key, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetItem(__pyx_v_self->props, __pyx_v_item); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1939
 *         self.props[key].inherit(recursive=True)
 * 
 *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
 *         return self.props[item]
 * 
 */

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

/* "libzfs.pyx":1942
 *         return self.props[item]
 * 
 *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
 *         cdef ZFSUserProperty userprop
 *         cdef int ret
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_15ZFSPropertyDict_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6libzfs_15ZFSPropertyDict_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_15ZFSPropertyDict_8__setitem__(((struct __pyx_obj_6libzfs_ZFSPropertyDict *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6libzfs_15ZFSPropertyDict_8__setitem__(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  struct __pyx_obj_6libzfs_ZFSUserProperty *__pyx_v_userprop = 0;
  int __pyx_v_ret;
  char const *__pyx_v_c_key;
  char const *__pyx_v_c_value;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  char const *__pyx_t_5;
  char const *__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 = NULL;
  __Pyx_RefNannySetupContext("__setitem__", 0);
  __Pyx_INCREF(__pyx_v_value);

  /* "libzfs.pyx":1948
 *         cdef const char *c_value
 * 
 *         if key in self.props:             # <<<<<<<<<<<<<<
 *             raise KeyError('Cannot overwrite existing property')
 * 
 */
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_v_self->props, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1948, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":1949
 * 
 *         if key in self.props:
 *             raise KeyError('Cannot overwrite existing property')             # <<<<<<<<<<<<<<
 * 
 *         if type(value) is not ZFSUserProperty:
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1949, __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(1, 1949, __pyx_L1_error)

    /* "libzfs.pyx":1948
 *         cdef const char *c_value
 * 
 *         if key in self.props:             # <<<<<<<<<<<<<<
 *             raise KeyError('Cannot overwrite existing property')
 * 
 */
  }

  /* "libzfs.pyx":1951
 *             raise KeyError('Cannot overwrite existing property')
 * 
 *         if type(value) is not ZFSUserProperty:             # <<<<<<<<<<<<<<
 *             raise ValueError('Value should be of type ZFSUserProperty')
 * 
 */
  __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_value)) != ((PyObject *)__pyx_ptype_6libzfs_ZFSUserProperty));
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":1952
 * 
 *         if type(value) is not ZFSUserProperty:
 *             raise ValueError('Value should be of type ZFSUserProperty')             # <<<<<<<<<<<<<<
 * 
 *         userprop = <ZFSUserProperty>value
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1952, __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(1, 1952, __pyx_L1_error)

    /* "libzfs.pyx":1951
 *             raise KeyError('Cannot overwrite existing property')
 * 
 *         if type(value) is not ZFSUserProperty:             # <<<<<<<<<<<<<<
 *             raise ValueError('Value should be of type ZFSUserProperty')
 * 
 */
  }

  /* "libzfs.pyx":1954
 *             raise ValueError('Value should be of type ZFSUserProperty')
 * 
 *         userprop = <ZFSUserProperty>value             # <<<<<<<<<<<<<<
 *         if userprop.dataset is None:
 *             # detached user property
 */
  __pyx_t_3 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_userprop = ((struct __pyx_obj_6libzfs_ZFSUserProperty *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "libzfs.pyx":1955
 * 
 *         userprop = <ZFSUserProperty>value
 *         if userprop.dataset is None:             # <<<<<<<<<<<<<<
 *             # detached user property
 *             userprop.dataset = self.parent
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_userprop->__pyx_base.dataset) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":1957
 *         if userprop.dataset is None:
 *             # detached user property
 *             userprop.dataset = self.parent             # <<<<<<<<<<<<<<
 *             value = str(userprop.value)
 *             c_key = key
 */
    __pyx_t_3 = ((PyObject *)__pyx_v_self->parent);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_userprop->__pyx_base.dataset);
    __Pyx_DECREF(((PyObject *)__pyx_v_userprop->__pyx_base.dataset));
    __pyx_v_userprop->__pyx_base.dataset = ((struct __pyx_obj_6libzfs_ZFSObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":1958
 *             # detached user property
 *             userprop.dataset = self.parent
 *             value = str(userprop.value)             # <<<<<<<<<<<<<<
 *             c_key = key
 *             c_value = value
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_userprop), __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1958, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1958, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1958, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":1959
 *             userprop.dataset = self.parent
 *             value = str(userprop.value)
 *             c_key = key             # <<<<<<<<<<<<<<
 *             c_value = value
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 1959, __pyx_L1_error)
    __pyx_v_c_key = __pyx_t_5;

    /* "libzfs.pyx":1960
 *             value = str(userprop.value)
 *             c_key = key
 *             c_value = value             # <<<<<<<<<<<<<<
 * 
 *             with nogil:
 */
    __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(1, 1960, __pyx_L1_error)
    __pyx_v_c_value = __pyx_t_6;

    /* "libzfs.pyx":1962
 *             c_value = value
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 ret = libzfs.zfs_prop_set(self.parent.handle, c_key, c_value)
 * 
 */
    {
        #ifdef WITH_THREAD
        PyThreadState *_save;
        Py_UNBLOCK_THREADS
        #endif
        /*try:*/ {

          /* "libzfs.pyx":1963
 * 
 *             with nogil:
 *                 ret = libzfs.zfs_prop_set(self.parent.handle, c_key, c_value)             # <<<<<<<<<<<<<<
 * 
 *             if ret != 0:
 */
          __pyx_v_ret = zfs_prop_set(__pyx_v_self->parent->handle, __pyx_v_c_key, __pyx_v_c_value);
        }

        /* "libzfs.pyx":1962
 *             c_value = value
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 ret = libzfs.zfs_prop_set(self.parent.handle, c_key, c_value)
 * 
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            Py_BLOCK_THREADS
            #endif
            goto __pyx_L8;
          }
          __pyx_L8:;
        }
    }

    /* "libzfs.pyx":1965
 *                 ret = libzfs.zfs_prop_set(self.parent.handle, c_key, c_value)
 * 
 *             if ret != 0:             # <<<<<<<<<<<<<<
 *                 raise self.parent.root.get_error()
 * 
 */
    __pyx_t_2 = ((__pyx_v_ret != 0) != 0);
    if (__pyx_t_2) {

      /* "libzfs.pyx":1966
 * 
 *             if ret != 0:
 *                 raise self.parent.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *         self.props[key] = userprop
 */
      __pyx_t_3 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->parent->root->__pyx_vtab)->get_error(__pyx_v_self->parent->root); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1966, __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(1, 1966, __pyx_L1_error)

      /* "libzfs.pyx":1965
 *                 ret = libzfs.zfs_prop_set(self.parent.handle, c_key, c_value)
 * 
 *             if ret != 0:             # <<<<<<<<<<<<<<
 *                 raise self.parent.root.get_error()
 * 
 */
    }

    /* "libzfs.pyx":1955
 * 
 *         userprop = <ZFSUserProperty>value
 *         if userprop.dataset is None:             # <<<<<<<<<<<<<<
 *             # detached user property
 *             userprop.dataset = self.parent
 */
  }

  /* "libzfs.pyx":1968
 *                 raise self.parent.root.get_error()
 * 
 *         self.props[key] = userprop             # <<<<<<<<<<<<<<
 *         self.parent.root.write_history('zfs set', (str(key), str(userprop.value)), self.parent.name)
 * 
 */
  if (unlikely(PyObject_SetItem(__pyx_v_self->props, __pyx_v_key, ((PyObject *)__pyx_v_userprop)) < 0)) __PYX_ERR(1, 1968, __pyx_L1_error)

  /* "libzfs.pyx":1969
 * 
 *         self.props[key] = userprop
 *         self.parent.root.write_history('zfs set', (str(key), str(userprop.value)), self.parent.name)             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->parent->root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_v_key);
  __Pyx_GIVEREF(__pyx_v_key);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_key);
  __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_userprop), __pyx_n_s_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_7);
  __pyx_t_8 = 0;
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->parent), __pyx_n_s_name_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_10 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(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_10 = 1;
    }
  }
  __pyx_t_11 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__pyx_t_8) {
    __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8); __pyx_t_8 = NULL;
  }
  __Pyx_INCREF(__pyx_kp_s_zfs_set);
  __Pyx_GIVEREF(__pyx_kp_s_zfs_set);
  PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_kp_s_zfs_set);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_t_7);
  __pyx_t_9 = 0;
  __pyx_t_7 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "libzfs.pyx":1942
 *         return self.props[item]
 * 
 *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
 *         cdef ZFSUserProperty userprop
 *         cdef int ret
 */

  /* 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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("libzfs.ZFSPropertyDict.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_userprop);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6libzfs_15ZFSPropertyDict_12generator12(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "libzfs.pyx":1971
 *         self.parent.root.write_history('zfs set', (str(key), str(userprop.value)), self.parent.name)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         for i in self.props:
 *             yield  i
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_11__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_11__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_15ZFSPropertyDict_10__iter__(((struct __pyx_obj_6libzfs_ZFSPropertyDict *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_10__iter__(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_14___iter__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);
  __pyx_cur_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_14___iter__ *)__pyx_tp_new_6libzfs___pyx_scope_struct_14___iter__(__pyx_ptype_6libzfs___pyx_scope_struct_14___iter__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6libzfs_15ZFSPropertyDict_12generator12, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_ZFSPropertyDict___iter); if (unlikely(!gen)) __PYX_ERR(1, 1971, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

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

static PyObject *__pyx_gb_6libzfs_15ZFSPropertyDict_12generator12(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6libzfs___pyx_scope_struct_14___iter__ *__pyx_cur_scope = ((struct __pyx_obj_6libzfs___pyx_scope_struct_14___iter__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1971, __pyx_L1_error)

  /* "libzfs.pyx":1972
 * 
 *     def __iter__(self):
 *         for i in self.props:             # <<<<<<<<<<<<<<
 *             yield  i
 * 
 */
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_self->props)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_self->props)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->props; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_self->props); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1972, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 1972, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1972, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 1972, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1972, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 1972, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;

    /* "libzfs.pyx":1973
 *     def __iter__(self):
 *         for i in self.props:
 *             yield  i             # <<<<<<<<<<<<<<
 * 
 *     def get(self, k, d=None):
 */
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_i);
    __pyx_r = __pyx_cur_scope->__pyx_v_i;
    __Pyx_XGIVEREF(__pyx_t_1);
    __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();
    /* 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_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __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(1, 1973, __pyx_L1_error)

    /* "libzfs.pyx":1972
 * 
 *     def __iter__(self):
 *         for i in self.props:             # <<<<<<<<<<<<<<
 *             yield  i
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":1971
 *         self.parent.root.write_history('zfs set', (str(key), str(userprop.value)), self.parent.name)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         for i in self.props:
 *             yield  i
 */

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

/* "libzfs.pyx":1975
 *             yield  i
 * 
 *     def get(self, k, d=None):             # <<<<<<<<<<<<<<
 *         return self.props.get(k, d)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_14get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_14get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_k = 0;
  PyObject *__pyx_v_d = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_k,&__pyx_n_s_d,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_k)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_d);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) __PYX_ERR(1, 1975, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_k = values[0];
    __pyx_v_d = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1975, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSPropertyDict.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_15ZFSPropertyDict_13get(((struct __pyx_obj_6libzfs_ZFSPropertyDict *)__pyx_v_self), __pyx_v_k, __pyx_v_d);

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

static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_13get(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self, PyObject *__pyx_v_k, PyObject *__pyx_v_d) {
  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 = NULL;
  __Pyx_RefNannySetupContext("get", 0);

  /* "libzfs.pyx":1976
 * 
 *     def get(self, k, d=None):
 *         return self.props.get(k, d)             # <<<<<<<<<<<<<<
 * 
 *     def setdefault(self, k, d=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->props, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_3) {
    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
  }
  __Pyx_INCREF(__pyx_v_k);
  __Pyx_GIVEREF(__pyx_v_k);
  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_k);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_d);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1976, __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1975
 *             yield  i
 * 
 *     def get(self, k, d=None):             # <<<<<<<<<<<<<<
 *         return self.props.get(k, d)
 * 
 */

  /* 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_5);
  __Pyx_AddTraceback("libzfs.ZFSPropertyDict.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1978
 *         return self.props.get(k, d)
 * 
 *     def setdefault(self, k, d=None):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_16setdefault(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_16setdefault(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_k = 0;
  CYTHON_UNUSED PyObject *__pyx_v_d = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setdefault (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_k,&__pyx_n_s_d,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_k)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_d);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setdefault") < 0)) __PYX_ERR(1, 1978, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_k = values[0];
    __pyx_v_d = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setdefault", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1978, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSPropertyDict.setdefault", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_15ZFSPropertyDict_15setdefault(((struct __pyx_obj_6libzfs_ZFSPropertyDict *)__pyx_v_self), __pyx_v_k, __pyx_v_d);

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

static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_15setdefault(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_k, CYTHON_UNUSED PyObject *__pyx_v_d) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setdefault", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1981
 *         pass
 * 
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         return self.props.keys()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_18keys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_18keys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("keys (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_15ZFSPropertyDict_17keys(((struct __pyx_obj_6libzfs_ZFSPropertyDict *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_17keys(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("keys", 0);

  /* "libzfs.pyx":1982
 * 
 *     def keys(self):
 *         return self.props.keys()             # <<<<<<<<<<<<<<
 * 
 *     def values(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->props, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1982, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1982, __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;

  /* "libzfs.pyx":1981
 *         pass
 * 
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         return self.props.keys()
 * 
 */

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

/* "libzfs.pyx":1984
 *         return self.props.keys()
 * 
 *     def values(self):             # <<<<<<<<<<<<<<
 *         return self.props.values()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_20values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_20values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("values (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_15ZFSPropertyDict_19values(((struct __pyx_obj_6libzfs_ZFSPropertyDict *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_19values(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("values", 0);

  /* "libzfs.pyx":1985
 * 
 *     def values(self):
 *         return self.props.values()             # <<<<<<<<<<<<<<
 * 
 *     def iterkeys(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->props, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1985, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1985, __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;

  /* "libzfs.pyx":1984
 *         return self.props.keys()
 * 
 *     def values(self):             # <<<<<<<<<<<<<<
 *         return self.props.values()
 * 
 */

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

/* "libzfs.pyx":1987
 *         return self.props.values()
 * 
 *     def iterkeys(self):             # <<<<<<<<<<<<<<
 *         return self.props.iterkeys()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_22iterkeys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_22iterkeys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("iterkeys (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_15ZFSPropertyDict_21iterkeys(((struct __pyx_obj_6libzfs_ZFSPropertyDict *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_21iterkeys(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("iterkeys", 0);

  /* "libzfs.pyx":1988
 * 
 *     def iterkeys(self):
 *         return self.props.iterkeys()             # <<<<<<<<<<<<<<
 * 
 *     def itervalues(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->props, __pyx_n_s_iterkeys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1988, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1988, __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;

  /* "libzfs.pyx":1987
 *         return self.props.values()
 * 
 *     def iterkeys(self):             # <<<<<<<<<<<<<<
 *         return self.props.iterkeys()
 * 
 */

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

/* "libzfs.pyx":1990
 *         return self.props.iterkeys()
 * 
 *     def itervalues(self):             # <<<<<<<<<<<<<<
 *         return self.props.itervalues()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_24itervalues(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_24itervalues(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("itervalues (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_15ZFSPropertyDict_23itervalues(((struct __pyx_obj_6libzfs_ZFSPropertyDict *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_23itervalues(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("itervalues", 0);

  /* "libzfs.pyx":1991
 * 
 *     def itervalues(self):
 *         return self.props.itervalues()             # <<<<<<<<<<<<<<
 * 
 *     def has_key(self, key):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->props, __pyx_n_s_itervalues); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1991, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1991, __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;

  /* "libzfs.pyx":1990
 *         return self.props.iterkeys()
 * 
 *     def itervalues(self):             # <<<<<<<<<<<<<<
 *         return self.props.itervalues()
 * 
 */

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

/* "libzfs.pyx":1993
 *         return self.props.itervalues()
 * 
 *     def has_key(self, key):             # <<<<<<<<<<<<<<
 *         return key in self.props
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_26has_key(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_26has_key(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("has_key (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_15ZFSPropertyDict_25has_key(((struct __pyx_obj_6libzfs_ZFSPropertyDict *)__pyx_v_self), ((PyObject *)__pyx_v_key));

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

static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_25has_key(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("has_key", 0);

  /* "libzfs.pyx":1994
 * 
 *     def has_key(self, key):
 *         return key in self.props             # <<<<<<<<<<<<<<
 * 
 *     def items(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_v_self->props, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1994, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":1993
 *         return self.props.itervalues()
 * 
 *     def has_key(self, key):             # <<<<<<<<<<<<<<
 *         return key in self.props
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("libzfs.ZFSPropertyDict.has_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":1996
 *         return key in self.props
 * 
 *     def items(self):             # <<<<<<<<<<<<<<
 *         return self.props.items()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_28items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_28items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("items (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_15ZFSPropertyDict_27items(((struct __pyx_obj_6libzfs_ZFSPropertyDict *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_27items(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("items", 0);

  /* "libzfs.pyx":1997
 * 
 *     def items(self):
 *         return self.props.items()             # <<<<<<<<<<<<<<
 * 
 *     def update(self, E=None, **F):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->props, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1997, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1997, __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;

  /* "libzfs.pyx":1996
 *         return key in self.props
 * 
 *     def items(self):             # <<<<<<<<<<<<<<
 *         return self.props.items()
 * 
 */

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

/* "libzfs.pyx":1999
 *         return self.props.items()
 * 
 *     def update(self, E=None, **F):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_30update(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_15ZFSPropertyDict_30update(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_E = 0;
  CYTHON_UNUSED PyObject *__pyx_v_F = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update (wrapper)", 0);
  __pyx_v_F = PyDict_New(); if (unlikely(!__pyx_v_F)) return NULL;
  __Pyx_GOTREF(__pyx_v_F);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_E,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_E);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_F, values, pos_args, "update") < 0)) __PYX_ERR(1, 1999, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_E = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("update", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1999, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_F); __pyx_v_F = 0;
  __Pyx_AddTraceback("libzfs.ZFSPropertyDict.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_15ZFSPropertyDict_29update(((struct __pyx_obj_6libzfs_ZFSPropertyDict *)__pyx_v_self), __pyx_v_E, __pyx_v_F);

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

static PyObject *__pyx_pf_6libzfs_15ZFSPropertyDict_29update(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_E, CYTHON_UNUSED PyObject *__pyx_v_F) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("update", 0);

  /* "libzfs.pyx":2000
 * 
 *     def update(self, E=None, **F):
 *         raise NotImplementedError()             # <<<<<<<<<<<<<<
 * 
 *     def __contains__(self, key):
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_NotImplementedError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2000, __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, 2000, __pyx_L1_error)

  /* "libzfs.pyx":1999
 *         return self.props.items()
 * 
 *     def update(self, E=None, **F):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("libzfs.ZFSPropertyDict.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2002
 *         raise NotImplementedError()
 * 
 *     def __contains__(self, key):             # <<<<<<<<<<<<<<
 *         return key in self.props
 * 
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_15ZFSPropertyDict_32__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static int __pyx_pw_6libzfs_15ZFSPropertyDict_32__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_15ZFSPropertyDict_31__contains__(((struct __pyx_obj_6libzfs_ZFSPropertyDict *)__pyx_v_self), ((PyObject *)__pyx_v_key));

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

static int __pyx_pf_6libzfs_15ZFSPropertyDict_31__contains__(struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_self, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__contains__", 0);

  /* "libzfs.pyx":2003
 * 
 *     def __contains__(self, key):
 *         return key in self.props             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_v_self->props, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2003, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "libzfs.pyx":2002
 *         raise NotImplementedError()
 * 
 *     def __contains__(self, key):             # <<<<<<<<<<<<<<
 *         return key in self.props
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("libzfs.ZFSPropertyDict.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2011
 *     cdef readonly ZFSPool pool
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise RuntimeError('ZFSObject cannot be instantiated by the user')
 * 
 */

/* Python wrapper */
static int __pyx_pw_6libzfs_9ZFSObject_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6libzfs_9ZFSObject_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_6libzfs_9ZFSObject___init__(((struct __pyx_obj_6libzfs_ZFSObject *)__pyx_v_self));

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

static int __pyx_pf_6libzfs_9ZFSObject___init__(CYTHON_UNUSED struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "libzfs.pyx":2012
 * 
 *     def __init__(self):
 *         raise RuntimeError('ZFSObject cannot be instantiated by the user')             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2012, __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, 2012, __pyx_L1_error)

  /* "libzfs.pyx":2011
 *     cdef readonly ZFSPool pool
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise RuntimeError('ZFSObject cannot be instantiated by the user')
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("libzfs.ZFSObject.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2014
 *         raise RuntimeError('ZFSObject cannot be instantiated by the user')
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         with nogil:
 *             libzfs.zfs_close(self.handle)
 */

/* Python wrapper */
static void __pyx_pw_6libzfs_9ZFSObject_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_6libzfs_9ZFSObject_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_6libzfs_9ZFSObject_2__dealloc__(((struct __pyx_obj_6libzfs_ZFSObject *)__pyx_v_self));

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

static void __pyx_pf_6libzfs_9ZFSObject_2__dealloc__(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "libzfs.pyx":2015
 * 
 *     def __dealloc__(self):
 *         with nogil:             # <<<<<<<<<<<<<<
 *             libzfs.zfs_close(self.handle)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":2016
 *     def __dealloc__(self):
 *         with nogil:
 *             libzfs.zfs_close(self.handle)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
        zfs_close(__pyx_v_self->handle);
      }

      /* "libzfs.pyx":2015
 * 
 *     def __dealloc__(self):
 *         with nogil:             # <<<<<<<<<<<<<<
 *             libzfs.zfs_close(self.handle)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":2014
 *         raise RuntimeError('ZFSObject cannot be instantiated by the user')
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         with nogil:
 *             libzfs.zfs_close(self.handle)
 */

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

/* "libzfs.pyx":2018
 *             libzfs.zfs_close(self.handle)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<libzfs.{0} name '{1}' type '{2}'>".format(self.__class__.__name__, self.name, self.type.name)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_9ZFSObject_5__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_9ZFSObject_5__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_9ZFSObject_4__str__(((struct __pyx_obj_6libzfs_ZFSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_9ZFSObject_4__str__(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "libzfs.pyx":2019
 * 
 *     def __str__(self):
 *         return "<libzfs.{0} name '{1}' type '{2}'>".format(self.__class__.__name__, self.name, self.type.name)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_libzfs_0_name_1_type_2, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__pyx_t_5) {
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
  }
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_6);
  __pyx_t_4 = 0;
  __pyx_t_3 = 0;
  __pyx_t_6 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":2018
 *             libzfs.zfs_close(self.handle)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<libzfs.{0} name '{1}' type '{2}'>".format(self.__class__.__name__, self.name, self.type.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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("libzfs.ZFSObject.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2021
 *         return "<libzfs.{0} name '{1}' type '{2}'>".format(self.__class__.__name__, self.name, self.type.name)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_9ZFSObject_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_9ZFSObject_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_9ZFSObject_6__repr__(((struct __pyx_obj_6libzfs_ZFSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_9ZFSObject_6__repr__(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "libzfs.pyx":2022
 * 
 *     def __repr__(self):
 *         return str(self)             # <<<<<<<<<<<<<<
 * 
 *     def __getstate__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2022, __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_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2022, __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;

  /* "libzfs.pyx":2021
 *         return "<libzfs.{0} name '{1}' type '{2}'>".format(self.__class__.__name__, self.name, self.type.name)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

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

/* "libzfs.pyx":2024
 *         return str(self)
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return {
 *             'id': self.name,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_9ZFSObject_9__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_9ZFSObject_9__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_9ZFSObject_8__getstate__(((struct __pyx_obj_6libzfs_ZFSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_9ZFSObject_8__getstate__(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  __Pyx_RefNannySetupContext("__getstate__", 0);

  /* "libzfs.pyx":2025
 * 
 *     def __getstate__(self):
 *         return {             # <<<<<<<<<<<<<<
 *             'id': self.name,
 *             'name': self.name,
 */
  __Pyx_XDECREF(__pyx_r);

  /* "libzfs.pyx":2026
 *     def __getstate__(self):
 *         return {
 *             'id': self.name,             # <<<<<<<<<<<<<<
 *             'name': self.name,
 *             'pool': self.pool.name,
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_id, __pyx_t_2) < 0) __PYX_ERR(1, 2026, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":2027
 *         return {
 *             'id': self.name,
 *             'name': self.name,             # <<<<<<<<<<<<<<
 *             'pool': self.pool.name,
 *             'type': self.type.name,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_name_2, __pyx_t_2) < 0) __PYX_ERR(1, 2026, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":2028
 *             'id': self.name,
 *             'name': self.name,
 *             'pool': self.pool.name,             # <<<<<<<<<<<<<<
 *             'type': self.type.name,
 *             'properties': {k: p.__getstate__() for k, p in self.properties.items()},
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->pool), __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pool, __pyx_t_2) < 0) __PYX_ERR(1, 2026, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":2029
 *             'name': self.name,
 *             'pool': self.pool.name,
 *             'type': self.type.name,             # <<<<<<<<<<<<<<
 *             'properties': {k: p.__getstate__() for k, p in self.properties.items()},
 *         }
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_type, __pyx_t_3) < 0) __PYX_ERR(1, 2026, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  { /* enter inner scope */
    PyObject *__pyx_8genexpr1__pyx_v_k = NULL;
    PyObject *__pyx_8genexpr1__pyx_v_p = NULL;

    /* "libzfs.pyx":2030
 *             'pool': self.pool.name,
 *             'type': self.type.name,
 *             'properties': {k: p.__getstate__() for k, p in self.properties.items()},             # <<<<<<<<<<<<<<
 *         }
 * 
 */
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2030, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_properties); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2030, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_items); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2030, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && 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);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2030, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2030, __pyx_L5_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2030, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2030, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 2030, __pyx_L5_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2030, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 2030, __pyx_L5_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2030, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_7(__pyx_t_5);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 2030, __pyx_L5_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        #if CYTHON_COMPILING_IN_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(1, 2030, __pyx_L5_error)
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_8);
        #else
        __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2030, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2030, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_8);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2030, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
        index = 0; __pyx_t_4 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_4);
        index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_8);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(1, 2030, __pyx_L5_error)
        __pyx_t_10 = NULL;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L9_unpacking_done;
        __pyx_L8_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(1, 2030, __pyx_L5_error)
        __pyx_L9_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_k, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_p, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr1__pyx_v_p, __pyx_n_s_getstate); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2030, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2030, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2030, __pyx_L5_error)
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(PyDict_SetItem(__pyx_t_3, (PyObject*)__pyx_8genexpr1__pyx_v_k, (PyObject*)__pyx_t_2))) __PYX_ERR(1, 2030, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_k);
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_p);
    goto __pyx_L10_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_k);
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_p);
    goto __pyx_L1_error;
    __pyx_L10_exit_scope:;
  } /* exit inner scope */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_properties, __pyx_t_3) < 0) __PYX_ERR(1, 2026, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":2024
 *         return str(self)
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return {
 *             'id': self.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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("libzfs.ZFSObject.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2034
 * 
 *     property name:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return libzfs.zfs_get_name(self.handle)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_9ZFSObject_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_9ZFSObject_4name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_9ZFSObject_4name___get__(((struct __pyx_obj_6libzfs_ZFSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_9ZFSObject_4name___get__(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":2035
 *     property name:
 *         def __get__(self):
 *             return libzfs.zfs_get_name(self.handle)             # <<<<<<<<<<<<<<
 * 
 *     property type:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyUnicode_FromString(zfs_get_name(__pyx_v_self->handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":2034
 * 
 *     property name:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return libzfs.zfs_get_name(self.handle)
 * 
 */

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

/* "libzfs.pyx":2038
 * 
 *     property type:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef zfs.zfs_type_t typ
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_9ZFSObject_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_9ZFSObject_4type_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_9ZFSObject_4type___get__(((struct __pyx_obj_6libzfs_ZFSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_9ZFSObject_4type___get__(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self) {
  zfs_type_t __pyx_v_typ;
  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;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":2041
 *             cdef zfs.zfs_type_t typ
 * 
 *             typ = libzfs.zfs_get_type(self.handle)             # <<<<<<<<<<<<<<
 *             return DatasetType(typ)
 * 
 */
  __pyx_v_typ = zfs_get_type(__pyx_v_self->handle);

  /* "libzfs.pyx":2042
 * 
 *             typ = libzfs.zfs_get_type(self.handle)
 *             return DatasetType(typ)             # <<<<<<<<<<<<<<
 * 
 *     property properties:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DatasetType); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_zfs_type_t(__pyx_v_typ); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2042, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2042, __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":2038
 * 
 *     property type:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef zfs.zfs_type_t typ
 * 
 */

  /* 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("libzfs.ZFSObject.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2045
 * 
 *     property properties:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSPropertyDict d
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_9ZFSObject_10properties_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_9ZFSObject_10properties_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_9ZFSObject_10properties___get__(((struct __pyx_obj_6libzfs_ZFSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_9ZFSObject_10properties___get__(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self) {
  struct __pyx_obj_6libzfs_ZFSPropertyDict *__pyx_v_d = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":2048
 *             cdef ZFSPropertyDict d
 * 
 *             d = ZFSPropertyDict.__new__(ZFSPropertyDict)             # <<<<<<<<<<<<<<
 *             d.parent = self
 *             d.refresh()
 */
  __pyx_t_1 = __pyx_tp_new_6libzfs_ZFSPropertyDict(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSPropertyDict), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6libzfs_ZFSPropertyDict)))) __PYX_ERR(1, 2048, __pyx_L1_error)
  __pyx_v_d = ((struct __pyx_obj_6libzfs_ZFSPropertyDict *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":2049
 * 
 *             d = ZFSPropertyDict.__new__(ZFSPropertyDict)
 *             d.parent = self             # <<<<<<<<<<<<<<
 *             d.refresh()
 *             return d
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_d->parent);
  __Pyx_DECREF(((PyObject *)__pyx_v_d->parent));
  __pyx_v_d->parent = __pyx_v_self;

  /* "libzfs.pyx":2050
 *             d = ZFSPropertyDict.__new__(ZFSPropertyDict)
 *             d.parent = self
 *             d.refresh()             # <<<<<<<<<<<<<<
 *             return d
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_d), __pyx_n_s_refresh); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2050, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2050, __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;

  /* "libzfs.pyx":2051
 *             d.parent = self
 *             d.refresh()
 *             return d             # <<<<<<<<<<<<<<
 * 
 *     def rename(self, new_name, nounmount=False, forceunmount=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_d));
  __pyx_r = ((PyObject *)__pyx_v_d);
  goto __pyx_L0;

  /* "libzfs.pyx":2045
 * 
 *     property properties:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSPropertyDict d
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("libzfs.ZFSObject.properties.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2053
 *             return d
 * 
 *     def rename(self, new_name, nounmount=False, forceunmount=False):             # <<<<<<<<<<<<<<
 *         cdef libzfs.renameflags_t flags
 *         cdef const char *c_new_name = new_name
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_9ZFSObject_11rename(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_9ZFSObject_11rename(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_new_name = 0;
  PyObject *__pyx_v_nounmount = 0;
  PyObject *__pyx_v_forceunmount = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rename (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_name,&__pyx_n_s_nounmount,&__pyx_n_s_forceunmount,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_False);
    values[2] = ((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  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_new_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nounmount);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_forceunmount);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rename") < 0)) __PYX_ERR(1, 2053, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_new_name = values[0];
    __pyx_v_nounmount = values[1];
    __pyx_v_forceunmount = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rename", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2053, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSObject.rename", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_9ZFSObject_10rename(((struct __pyx_obj_6libzfs_ZFSObject *)__pyx_v_self), __pyx_v_new_name, __pyx_v_nounmount, __pyx_v_forceunmount);

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

static PyObject *__pyx_pf_6libzfs_9ZFSObject_10rename(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self, PyObject *__pyx_v_new_name, PyObject *__pyx_v_nounmount, PyObject *__pyx_v_forceunmount) {
  renameflags_t __pyx_v_flags;
  char const *__pyx_v_c_new_name;
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char const *__pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  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 = NULL;
  __Pyx_RefNannySetupContext("rename", 0);

  /* "libzfs.pyx":2055
 *     def rename(self, new_name, nounmount=False, forceunmount=False):
 *         cdef libzfs.renameflags_t flags
 *         cdef const char *c_new_name = new_name             # <<<<<<<<<<<<<<
 * 
 *         flags.recurse = False
 */
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_new_name); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(1, 2055, __pyx_L1_error)
  __pyx_v_c_new_name = __pyx_t_1;

  /* "libzfs.pyx":2057
 *         cdef const char *c_new_name = new_name
 * 
 *         flags.recurse = False             # <<<<<<<<<<<<<<
 *         flags.nounmount = nounmount
 *         flags.forceunmount = forceunmount
 */
  __pyx_v_flags.recurse = 0;

  /* "libzfs.pyx":2058
 * 
 *         flags.recurse = False
 *         flags.nounmount = nounmount             # <<<<<<<<<<<<<<
 *         flags.forceunmount = forceunmount
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_nounmount); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2058, __pyx_L1_error)
  __pyx_v_flags.nounmount = __pyx_t_2;

  /* "libzfs.pyx":2059
 *         flags.recurse = False
 *         flags.nounmount = nounmount
 *         flags.forceunmount = forceunmount             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_forceunmount); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2059, __pyx_L1_error)
  __pyx_v_flags.forceunmount = __pyx_t_2;

  /* "libzfs.pyx":2061
 *         flags.forceunmount = forceunmount
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_rename(self.handle, NULL, c_new_name, flags)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":2062
 * 
 *         with nogil:
 *             ret = libzfs.zfs_rename(self.handle, NULL, c_new_name, flags)             # <<<<<<<<<<<<<<
 * 
 *         if ret != 0:
 */
        __pyx_v_ret = zfs_rename(__pyx_v_self->handle, NULL, __pyx_v_c_new_name, __pyx_v_flags);
      }

      /* "libzfs.pyx":2061
 *         flags.forceunmount = forceunmount
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_rename(self.handle, NULL, c_new_name, flags)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":2064
 *             ret = libzfs.zfs_rename(self.handle, NULL, c_new_name, flags)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_3 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_3) {

    /* "libzfs.pyx":2065
 * 
 *         if ret != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *         self.root.write_history('zfs rename', '-f' if forceunmount else '', '-u' if nounmount else '', self.name)
 */
    __pyx_t_4 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->root->__pyx_vtab)->get_error(__pyx_v_self->root); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 2065, __pyx_L1_error)

    /* "libzfs.pyx":2064
 *             ret = libzfs.zfs_rename(self.handle, NULL, c_new_name, flags)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":2067
 *             raise self.root.get_error()
 * 
 *         self.root.write_history('zfs rename', '-f' if forceunmount else '', '-u' if nounmount else '', self.name)             # <<<<<<<<<<<<<<
 * 
 *     def delete(self):
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_forceunmount); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 2067, __pyx_L1_error)
  if (__pyx_t_3) {
    __Pyx_INCREF(__pyx_kp_s_f);
    __pyx_t_6 = __pyx_kp_s_f;
  } else {
    __Pyx_INCREF(__pyx_kp_s__11);
    __pyx_t_6 = __pyx_kp_s__11;
  }
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_nounmount); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 2067, __pyx_L1_error)
  if (__pyx_t_3) {
    __Pyx_INCREF(__pyx_kp_s_u);
    __pyx_t_7 = __pyx_kp_s_u;
  } else {
    __Pyx_INCREF(__pyx_kp_s__11);
    __pyx_t_7 = __pyx_kp_s__11;
  }
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_10 = 1;
    }
  }
  __pyx_t_11 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 2067, __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_INCREF(__pyx_kp_s_zfs_rename);
  __Pyx_GIVEREF(__pyx_kp_s_zfs_rename);
  PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_kp_s_zfs_rename);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_10, __pyx_t_8);
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2067, __pyx_L1_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_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "libzfs.pyx":2053
 *             return d
 * 
 *     def rename(self, new_name, nounmount=False, forceunmount=False):             # <<<<<<<<<<<<<<
 *         cdef libzfs.renameflags_t flags
 *         cdef const char *c_new_name = new_name
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("libzfs.ZFSObject.rename", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2069
 *         self.root.write_history('zfs rename', '-f' if forceunmount else '', '-u' if nounmount else '', self.name)
 * 
 *     def delete(self):             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_9ZFSObject_13delete(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_9ZFSObject_13delete(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("delete (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_9ZFSObject_12delete(((struct __pyx_obj_6libzfs_ZFSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_9ZFSObject_12delete(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self) {
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("delete", 0);

  /* "libzfs.pyx":2072
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_destroy(self.handle, True)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":2073
 * 
 *         with nogil:
 *             ret = libzfs.zfs_destroy(self.handle, True)             # <<<<<<<<<<<<<<
 * 
 *         if ret != 0:
 */
        __pyx_v_ret = zfs_destroy(__pyx_v_self->handle, 1);
      }

      /* "libzfs.pyx":2072
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_destroy(self.handle, True)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":2075
 *             ret = libzfs.zfs_destroy(self.handle, True)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":2076
 * 
 *         if ret != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *     def get_send_space(self, fromname=None):
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->root->__pyx_vtab)->get_error(__pyx_v_self->root); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2076, __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(1, 2076, __pyx_L1_error)

    /* "libzfs.pyx":2075
 *             ret = libzfs.zfs_destroy(self.handle, True)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":2069
 *         self.root.write_history('zfs rename', '-f' if forceunmount else '', '-u' if nounmount else '', self.name)
 * 
 *     def delete(self):             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("libzfs.ZFSObject.delete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2078
 *             raise self.root.get_error()
 * 
 *     def get_send_space(self, fromname=None):             # <<<<<<<<<<<<<<
 *         cdef const char *cfromname = NULL
 *         cdef const char *c_name
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_9ZFSObject_15get_send_space(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_9ZFSObject_15get_send_space(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fromname = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_send_space (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fromname,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fromname);
          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_send_space") < 0)) __PYX_ERR(1, 2078, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_fromname = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_send_space", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2078, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSObject.get_send_space", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_9ZFSObject_14get_send_space(((struct __pyx_obj_6libzfs_ZFSObject *)__pyx_v_self), __pyx_v_fromname);

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

static PyObject *__pyx_pf_6libzfs_9ZFSObject_14get_send_space(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self, PyObject *__pyx_v_fromname) {
  char const *__pyx_v_cfromname;
  char const *__pyx_v_c_name;
  uint64_t __pyx_v_space;
  int __pyx_v_ret;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  char const *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("get_send_space", 0);

  /* "libzfs.pyx":2079
 * 
 *     def get_send_space(self, fromname=None):
 *         cdef const char *cfromname = NULL             # <<<<<<<<<<<<<<
 *         cdef const char *c_name
 *         cdef uint64_t space
 */
  __pyx_v_cfromname = NULL;

  /* "libzfs.pyx":2084
 *         cdef int ret
 * 
 *         name = self.name             # <<<<<<<<<<<<<<
 *         c_name = name
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "libzfs.pyx":2085
 * 
 *         name = self.name
 *         c_name = name             # <<<<<<<<<<<<<<
 * 
 *         if fromname:
 */
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 2085, __pyx_L1_error)
  __pyx_v_c_name = __pyx_t_2;

  /* "libzfs.pyx":2087
 *         c_name = name
 * 
 *         if fromname:             # <<<<<<<<<<<<<<
 *             cfromname = fromname
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_fromname); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 2087, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "libzfs.pyx":2088
 * 
 *         if fromname:
 *             cfromname = fromname             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */
    __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_fromname); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 2088, __pyx_L1_error)
    __pyx_v_cfromname = __pyx_t_4;

    /* "libzfs.pyx":2087
 *         c_name = name
 * 
 *         if fromname:             # <<<<<<<<<<<<<<
 *             cfromname = fromname
 * 
 */
  }

  /* "libzfs.pyx":2090
 *             cfromname = fromname
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.lzc_send_space(c_name, cfromname, &space)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":2091
 * 
 *         with nogil:
 *             ret = libzfs.lzc_send_space(c_name, cfromname, &space)             # <<<<<<<<<<<<<<
 * 
 *         if ret != 0:
 */
        __pyx_v_ret = lzc_send_space(__pyx_v_c_name, __pyx_v_cfromname, (&__pyx_v_space));
      }

      /* "libzfs.pyx":2090
 *             cfromname = fromname
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.lzc_send_space(c_name, cfromname, &space)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L6;
        }
        __pyx_L6:;
      }
  }

  /* "libzfs.pyx":2093
 *             ret = libzfs.lzc_send_space(c_name, cfromname, &space)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.FAULT, "Cannot obtain space estimate: ")
 * 
 */
  __pyx_t_3 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_3) {

    /* "libzfs.pyx":2094
 * 
 *         if ret != 0:
 *             raise ZFSException(Error.FAULT, "Cannot obtain space estimate: ")             # <<<<<<<<<<<<<<
 * 
 *         return space
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_FAULT); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2094, __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_7);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_7);
    __Pyx_INCREF(__pyx_kp_s_Cannot_obtain_space_estimate);
    __Pyx_GIVEREF(__pyx_kp_s_Cannot_obtain_space_estimate);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_kp_s_Cannot_obtain_space_estimate);
    __pyx_t_7 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 2094, __pyx_L1_error)

    /* "libzfs.pyx":2093
 *             ret = libzfs.lzc_send_space(c_name, cfromname, &space)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.FAULT, "Cannot obtain space estimate: ")
 * 
 */
  }

  /* "libzfs.pyx":2096
 *             raise ZFSException(Error.FAULT, "Cannot obtain space estimate: ")
 * 
 *         return space             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_space); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":2078
 *             raise self.root.get_error()
 * 
 *     def get_send_space(self, fromname=None):             # <<<<<<<<<<<<<<
 *         cdef const char *cfromname = NULL
 *         cdef const char *c_name
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("libzfs.ZFSObject.get_send_space", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2008
 * cdef class ZFSObject(object):
 *     cdef libzfs.zfs_handle_t* handle
 *     cdef readonly ZFS root             # <<<<<<<<<<<<<<
 *     cdef readonly ZFSPool pool
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_9ZFSObject_4root_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_9ZFSObject_4root_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_9ZFSObject_4root___get__(((struct __pyx_obj_6libzfs_ZFSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_9ZFSObject_4root___get__(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->root));
  __pyx_r = ((PyObject *)__pyx_v_self->root);
  goto __pyx_L0;

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

/* "libzfs.pyx":2009
 *     cdef libzfs.zfs_handle_t* handle
 *     cdef readonly ZFS root
 *     cdef readonly ZFSPool pool             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_9ZFSObject_4pool_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_9ZFSObject_4pool_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_9ZFSObject_4pool___get__(((struct __pyx_obj_6libzfs_ZFSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_9ZFSObject_4pool___get__(struct __pyx_obj_6libzfs_ZFSObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->pool));
  __pyx_r = ((PyObject *)__pyx_v_self->pool);
  goto __pyx_L0;

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

/* "libzfs.pyx":2100
 * 
 * cdef class ZFSDataset(ZFSObject):
 *     def __getstate__(self, recursive=True):             # <<<<<<<<<<<<<<
 *         ret = super(ZFSDataset, self).__getstate__()
 *         ret['mountpoint'] = self.mountpoint
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_1__getstate__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_1__getstate__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_recursive = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_recursive,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);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_recursive);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getstate__") < 0)) __PYX_ERR(1, 2100, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_recursive = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getstate__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2100, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSDataset.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_10ZFSDataset___getstate__(((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_v_self), __pyx_v_recursive);

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

static PyObject *__pyx_pf_6libzfs_10ZFSDataset___getstate__(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self, PyObject *__pyx_v_recursive) {
  PyObject *__pyx_v_ret = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("__getstate__", 0);

  /* "libzfs.pyx":2101
 * cdef class ZFSDataset(ZFSObject):
 *     def __getstate__(self, recursive=True):
 *         ret = super(ZFSDataset, self).__getstate__()             # <<<<<<<<<<<<<<
 *         ret['mountpoint'] = self.mountpoint
 * 
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_6libzfs_ZFSDataset));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6libzfs_ZFSDataset));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_6libzfs_ZFSDataset));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2101, __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_getstate); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2101, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2101, __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;

  /* "libzfs.pyx":2102
 *     def __getstate__(self, recursive=True):
 *         ret = super(ZFSDataset, self).__getstate__()
 *         ret['mountpoint'] = self.mountpoint             # <<<<<<<<<<<<<<
 * 
 *         if recursive:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mountpoint); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyObject_SetItem(__pyx_v_ret, __pyx_n_s_mountpoint, __pyx_t_1) < 0)) __PYX_ERR(1, 2102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":2104
 *         ret['mountpoint'] = self.mountpoint
 * 
 *         if recursive:             # <<<<<<<<<<<<<<
 *             ret['children'] = [i.__getstate__() for i in self.children]
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_recursive); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 2104, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "libzfs.pyx":2105
 * 
 *         if recursive:
 *             ret['children'] = [i.__getstate__() for i in self.children]             # <<<<<<<<<<<<<<
 * 
 *         return ret
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_children); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    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_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2105, __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(1, 2105, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_COMPILING_IN_CPYTHON
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 2105, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2105, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 2105, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2105, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_6(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 2105, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_i, __pyx_n_s_getstate); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2105, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && 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);
        }
      }
      if (__pyx_t_8) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2105, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2105, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(1, 2105, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_ret, __pyx_n_s_children, __pyx_t_1) < 0)) __PYX_ERR(1, 2105, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "libzfs.pyx":2104
 *         ret['mountpoint'] = self.mountpoint
 * 
 *         if recursive:             # <<<<<<<<<<<<<<
 *             ret['children'] = [i.__getstate__() for i in self.children]
 * 
 */
  }

  /* "libzfs.pyx":2107
 *             ret['children'] = [i.__getstate__() for i in self.children]
 * 
 *         return ret             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "libzfs.pyx":2100
 * 
 * cdef class ZFSDataset(ZFSObject):
 *     def __getstate__(self, recursive=True):             # <<<<<<<<<<<<<<
 *         ret = super(ZFSDataset, self).__getstate__()
 *         ret['mountpoint'] = self.mountpoint
 */

  /* 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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("libzfs.ZFSDataset.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2110
 * 
 *     @staticmethod
 *     cdef int __iterate_children(libzfs.zfs_handle_t* handle, void *arg) nogil:             # <<<<<<<<<<<<<<
 *         with gil:
 *             datasets = <object>arg
 */

static int __pyx_f_6libzfs_10ZFSDataset___iterate_children(zfs_handle_t *__pyx_v_handle, void *__pyx_v_arg) {
  PyObject *__pyx_v_datasets = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("__iterate_children", 1);

  /* "libzfs.pyx":2111
 *     @staticmethod
 *     cdef int __iterate_children(libzfs.zfs_handle_t* handle, void *arg) nogil:
 *         with gil:             # <<<<<<<<<<<<<<
 *             datasets = <object>arg
 *             datasets.append(<uintptr_t>handle)
 */
  /*try:*/ {
    {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
        #endif
        /*try:*/ {

          /* "libzfs.pyx":2112
 *     cdef int __iterate_children(libzfs.zfs_handle_t* handle, void *arg) nogil:
 *         with gil:
 *             datasets = <object>arg             # <<<<<<<<<<<<<<
 *             datasets.append(<uintptr_t>handle)
 * 
 */
          __pyx_t_1 = ((PyObject *)__pyx_v_arg);
          __Pyx_INCREF(__pyx_t_1);
          __pyx_v_datasets = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "libzfs.pyx":2113
 *         with gil:
 *             datasets = <object>arg
 *             datasets.append(<uintptr_t>handle)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
          __pyx_t_1 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2113, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_datasets, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 2113, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }

        /* "libzfs.pyx":2111
 *     @staticmethod
 *     cdef int __iterate_children(libzfs.zfs_handle_t* handle, void *arg) nogil:
 *         with gil:             # <<<<<<<<<<<<<<
 *             datasets = <object>arg
 *             datasets.append(<uintptr_t>handle)
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            PyGILState_Release(__pyx_gilstate_save);
            #endif
            goto __pyx_L8;
          }
          __pyx_L7_error: {
            #ifdef WITH_THREAD
            PyGILState_Release(__pyx_gilstate_save);
            #endif
            goto __pyx_L4_error;
          }
          __pyx_L8:;
        }
    }
  }
  /*finally:*/ {
    /*normal exit:*/{
      #ifdef WITH_THREAD
      __pyx_gilstate_save = PyGILState_Ensure();
      #endif
      goto __pyx_L5;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
    __pyx_L5:;
  }

  /* "libzfs.pyx":2110
 * 
 *     @staticmethod
 *     cdef int __iterate_children(libzfs.zfs_handle_t* handle, void *arg) nogil:             # <<<<<<<<<<<<<<
 *         with gil:
 *             datasets = <object>arg
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("libzfs.ZFSDataset.__iterate_children", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 1);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datasets);
  #ifdef WITH_THREAD
  PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "libzfs.pyx":2116
 * 
 *     @staticmethod
 *     cdef int __iterate_snapshots(libzfs.zfs_handle_t* handle, void *arg) nogil:             # <<<<<<<<<<<<<<
 *         with gil:
 *             snapshots = <object>arg
 */

static int __pyx_f_6libzfs_10ZFSDataset___iterate_snapshots(zfs_handle_t *__pyx_v_handle, void *__pyx_v_arg) {
  PyObject *__pyx_v_snapshots = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("__iterate_snapshots", 1);

  /* "libzfs.pyx":2117
 *     @staticmethod
 *     cdef int __iterate_snapshots(libzfs.zfs_handle_t* handle, void *arg) nogil:
 *         with gil:             # <<<<<<<<<<<<<<
 *             snapshots = <object>arg
 *             snapshots.append(<uintptr_t>handle)
 */
  /*try:*/ {
    {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
        #endif
        /*try:*/ {

          /* "libzfs.pyx":2118
 *     cdef int __iterate_snapshots(libzfs.zfs_handle_t* handle, void *arg) nogil:
 *         with gil:
 *             snapshots = <object>arg             # <<<<<<<<<<<<<<
 *             snapshots.append(<uintptr_t>handle)
 * 
 */
          __pyx_t_1 = ((PyObject *)__pyx_v_arg);
          __Pyx_INCREF(__pyx_t_1);
          __pyx_v_snapshots = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "libzfs.pyx":2119
 *         with gil:
 *             snapshots = <object>arg
 *             snapshots.append(<uintptr_t>handle)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
          __pyx_t_1 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2119, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_snapshots, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 2119, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }

        /* "libzfs.pyx":2117
 *     @staticmethod
 *     cdef int __iterate_snapshots(libzfs.zfs_handle_t* handle, void *arg) nogil:
 *         with gil:             # <<<<<<<<<<<<<<
 *             snapshots = <object>arg
 *             snapshots.append(<uintptr_t>handle)
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            PyGILState_Release(__pyx_gilstate_save);
            #endif
            goto __pyx_L8;
          }
          __pyx_L7_error: {
            #ifdef WITH_THREAD
            PyGILState_Release(__pyx_gilstate_save);
            #endif
            goto __pyx_L4_error;
          }
          __pyx_L8:;
        }
    }
  }
  /*finally:*/ {
    /*normal exit:*/{
      #ifdef WITH_THREAD
      __pyx_gilstate_save = PyGILState_Ensure();
      #endif
      goto __pyx_L5;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
    __pyx_L5:;
  }

  /* "libzfs.pyx":2116
 * 
 *     @staticmethod
 *     cdef int __iterate_snapshots(libzfs.zfs_handle_t* handle, void *arg) nogil:             # <<<<<<<<<<<<<<
 *         with gil:
 *             snapshots = <object>arg
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("libzfs.ZFSDataset.__iterate_snapshots", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 1);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_snapshots);
  #ifdef WITH_THREAD
  PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "libzfs.pyx":2122
 * 
 *     @staticmethod
 *     cdef int __iterate_bookmarks(libzfs.zfs_handle_t* handle, void *arg) nogil:             # <<<<<<<<<<<<<<
 *         with gil:
 *             bookmarks = <object>arg
 */

static int __pyx_f_6libzfs_10ZFSDataset___iterate_bookmarks(zfs_handle_t *__pyx_v_handle, void *__pyx_v_arg) {
  PyObject *__pyx_v_bookmarks = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("__iterate_bookmarks", 1);

  /* "libzfs.pyx":2123
 *     @staticmethod
 *     cdef int __iterate_bookmarks(libzfs.zfs_handle_t* handle, void *arg) nogil:
 *         with gil:             # <<<<<<<<<<<<<<
 *             bookmarks = <object>arg
 *             bookmarks.append(<uintptr_t>handle)
 */
  /*try:*/ {
    {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
        #endif
        /*try:*/ {

          /* "libzfs.pyx":2124
 *     cdef int __iterate_bookmarks(libzfs.zfs_handle_t* handle, void *arg) nogil:
 *         with gil:
 *             bookmarks = <object>arg             # <<<<<<<<<<<<<<
 *             bookmarks.append(<uintptr_t>handle)
 * 
 */
          __pyx_t_1 = ((PyObject *)__pyx_v_arg);
          __Pyx_INCREF(__pyx_t_1);
          __pyx_v_bookmarks = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "libzfs.pyx":2125
 *         with gil:
 *             bookmarks = <object>arg
 *             bookmarks.append(<uintptr_t>handle)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
          __pyx_t_1 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2125, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_bookmarks, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 2125, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }

        /* "libzfs.pyx":2123
 *     @staticmethod
 *     cdef int __iterate_bookmarks(libzfs.zfs_handle_t* handle, void *arg) nogil:
 *         with gil:             # <<<<<<<<<<<<<<
 *             bookmarks = <object>arg
 *             bookmarks.append(<uintptr_t>handle)
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            PyGILState_Release(__pyx_gilstate_save);
            #endif
            goto __pyx_L8;
          }
          __pyx_L7_error: {
            #ifdef WITH_THREAD
            PyGILState_Release(__pyx_gilstate_save);
            #endif
            goto __pyx_L4_error;
          }
          __pyx_L8:;
        }
    }
  }
  /*finally:*/ {
    /*normal exit:*/{
      #ifdef WITH_THREAD
      __pyx_gilstate_save = PyGILState_Ensure();
      #endif
      goto __pyx_L5;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
    __pyx_L5:;
  }

  /* "libzfs.pyx":2122
 * 
 *     @staticmethod
 *     cdef int __iterate_bookmarks(libzfs.zfs_handle_t* handle, void *arg) nogil:             # <<<<<<<<<<<<<<
 *         with gil:
 *             bookmarks = <object>arg
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("libzfs.ZFSDataset.__iterate_bookmarks", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 1);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_bookmarks);
  #ifdef WITH_THREAD
  PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "libzfs.pyx":2128
 * 
 *     @staticmethod
 *     cdef int __iterate_dependents(libzfs.zfs_handle_t* handle, void *arg) nogil:             # <<<<<<<<<<<<<<
 *         with gil:
 *             dependents = <object>arg
 */

static int __pyx_f_6libzfs_10ZFSDataset___iterate_dependents(zfs_handle_t *__pyx_v_handle, void *__pyx_v_arg) {
  PyObject *__pyx_v_dependents = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("__iterate_dependents", 1);

  /* "libzfs.pyx":2129
 *     @staticmethod
 *     cdef int __iterate_dependents(libzfs.zfs_handle_t* handle, void *arg) nogil:
 *         with gil:             # <<<<<<<<<<<<<<
 *             dependents = <object>arg
 *             dependents.append(<uintptr_t>handle)
 */
  /*try:*/ {
    {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
        #endif
        /*try:*/ {

          /* "libzfs.pyx":2130
 *     cdef int __iterate_dependents(libzfs.zfs_handle_t* handle, void *arg) nogil:
 *         with gil:
 *             dependents = <object>arg             # <<<<<<<<<<<<<<
 *             dependents.append(<uintptr_t>handle)
 * 
 */
          __pyx_t_1 = ((PyObject *)__pyx_v_arg);
          __Pyx_INCREF(__pyx_t_1);
          __pyx_v_dependents = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "libzfs.pyx":2131
 *         with gil:
 *             dependents = <object>arg
 *             dependents.append(<uintptr_t>handle)             # <<<<<<<<<<<<<<
 * 
 *     property children:
 */
          __pyx_t_1 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2131, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_dependents, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 2131, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }

        /* "libzfs.pyx":2129
 *     @staticmethod
 *     cdef int __iterate_dependents(libzfs.zfs_handle_t* handle, void *arg) nogil:
 *         with gil:             # <<<<<<<<<<<<<<
 *             dependents = <object>arg
 *             dependents.append(<uintptr_t>handle)
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            PyGILState_Release(__pyx_gilstate_save);
            #endif
            goto __pyx_L8;
          }
          __pyx_L7_error: {
            #ifdef WITH_THREAD
            PyGILState_Release(__pyx_gilstate_save);
            #endif
            goto __pyx_L4_error;
          }
          __pyx_L8:;
        }
    }
  }
  /*finally:*/ {
    /*normal exit:*/{
      #ifdef WITH_THREAD
      __pyx_gilstate_save = PyGILState_Ensure();
      #endif
      goto __pyx_L5;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
    __pyx_L5:;
  }

  /* "libzfs.pyx":2128
 * 
 *     @staticmethod
 *     cdef int __iterate_dependents(libzfs.zfs_handle_t* handle, void *arg) nogil:             # <<<<<<<<<<<<<<
 *         with gil:
 *             dependents = <object>arg
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("libzfs.ZFSDataset.__iterate_dependents", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 1);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dependents);
  #ifdef WITH_THREAD
  PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}
static PyObject *__pyx_gb_6libzfs_10ZFSDataset_8children_2generator13(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "libzfs.pyx":2134
 * 
 *     property children:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSDataset dataset
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_8children_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_8children_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZFSDataset_8children___get__(((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10ZFSDataset_8children___get__(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_15___get__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_cur_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_15___get__ *)__pyx_tp_new_6libzfs___pyx_scope_struct_15___get__(__pyx_ptype_6libzfs___pyx_scope_struct_15___get__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6libzfs_10ZFSDataset_8children_2generator13, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_ZFSDataset___get); if (unlikely(!gen)) __PYX_ERR(1, 2134, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("libzfs.ZFSDataset.children.__get__", __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_6libzfs_10ZFSDataset_8children_2generator13(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6libzfs___pyx_scope_struct_15___get__ *__pyx_cur_scope = ((struct __pyx_obj_6libzfs___pyx_scope_struct_15___get__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  uintptr_t __pyx_t_4;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L9_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(1, 2134, __pyx_L1_error)

  /* "libzfs.pyx":2137
 *             cdef ZFSDataset dataset
 * 
 *             datasets = []             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 libzfs.zfs_iter_filesystems(self.handle, self.__iterate_children, <void*>datasets)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_datasets = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":2138
 * 
 *             datasets = []
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 libzfs.zfs_iter_filesystems(self.handle, self.__iterate_children, <void*>datasets)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":2139
 *             datasets = []
 *             with nogil:
 *                 libzfs.zfs_iter_filesystems(self.handle, self.__iterate_children, <void*>datasets)             # <<<<<<<<<<<<<<
 * 
 *             for h in datasets:
 */
        zfs_iter_filesystems(__pyx_cur_scope->__pyx_v_self->__pyx_base.handle, ((struct __pyx_vtabstruct_6libzfs_ZFSDataset *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->__pyx___iterate_children, ((void *)__pyx_cur_scope->__pyx_v_datasets));
      }

      /* "libzfs.pyx":2138
 * 
 *             datasets = []
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 libzfs.zfs_iter_filesystems(self.handle, self.__iterate_children, <void*>datasets)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L6;
        }
        __pyx_L6:;
      }
  }

  /* "libzfs.pyx":2141
 *                 libzfs.zfs_iter_filesystems(self.handle, self.__iterate_children, <void*>datasets)
 * 
 *             for h in datasets:             # <<<<<<<<<<<<<<
 *                 dataset = ZFSDataset.__new__(ZFSDataset)
 *                 dataset.root = self.root
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_datasets; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 2141, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_h);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_h, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":2142
 * 
 *             for h in datasets:
 *                 dataset = ZFSDataset.__new__(ZFSDataset)             # <<<<<<<<<<<<<<
 *                 dataset.root = self.root
 *                 dataset.pool = self.pool
 */
    __pyx_t_3 = __pyx_tp_new_6libzfs_ZFSDataset(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSDataset), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6libzfs_ZFSDataset)))) __PYX_ERR(1, 2142, __pyx_L1_error)
    __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_dataset));
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_dataset, ((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_t_3));
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":2143
 *             for h in datasets:
 *                 dataset = ZFSDataset.__new__(ZFSDataset)
 *                 dataset.root = self.root             # <<<<<<<<<<<<<<
 *                 dataset.pool = self.pool
 *                 dataset.handle = <libzfs.zfs_handle_t*><uintptr_t>h
 */
    __pyx_t_3 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->__pyx_base.root);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dataset->__pyx_base.root);
    __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_dataset->__pyx_base.root));
    __pyx_cur_scope->__pyx_v_dataset->__pyx_base.root = ((struct __pyx_obj_6libzfs_ZFS *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":2144
 *                 dataset = ZFSDataset.__new__(ZFSDataset)
 *                 dataset.root = self.root
 *                 dataset.pool = self.pool             # <<<<<<<<<<<<<<
 *                 dataset.handle = <libzfs.zfs_handle_t*><uintptr_t>h
 *                 yield dataset
 */
    __pyx_t_3 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->__pyx_base.pool);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dataset->__pyx_base.pool);
    __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_dataset->__pyx_base.pool));
    __pyx_cur_scope->__pyx_v_dataset->__pyx_base.pool = ((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":2145
 *                 dataset.root = self.root
 *                 dataset.pool = self.pool
 *                 dataset.handle = <libzfs.zfs_handle_t*><uintptr_t>h             # <<<<<<<<<<<<<<
 *                 yield dataset
 * 
 */
    __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_cur_scope->__pyx_v_h); if (unlikely((__pyx_t_4 == (uintptr_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 2145, __pyx_L1_error)
    __pyx_cur_scope->__pyx_v_dataset->__pyx_base.handle = ((zfs_handle_t *)((uintptr_t)__pyx_t_4));

    /* "libzfs.pyx":2146
 *                 dataset.pool = self.pool
 *                 dataset.handle = <libzfs.zfs_handle_t*><uintptr_t>h
 *                 yield dataset             # <<<<<<<<<<<<<<
 * 
 *     property children_recursive:
 */
    __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_dataset));
    __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_dataset);
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L9_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2146, __pyx_L1_error)

    /* "libzfs.pyx":2141
 *                 libzfs.zfs_iter_filesystems(self.handle, self.__iterate_children, <void*>datasets)
 * 
 *             for h in datasets:             # <<<<<<<<<<<<<<
 *                 dataset = ZFSDataset.__new__(ZFSDataset)
 *                 dataset.root = self.root
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":2134
 * 
 *     property children:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSDataset dataset
 * 
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6libzfs_10ZFSDataset_18children_recursive_2generator14(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "libzfs.pyx":2149
 * 
 *     property children_recursive:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             for c in self.children:
 *                 yield c
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_18children_recursive_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_18children_recursive_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZFSDataset_18children_recursive___get__(((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10ZFSDataset_18children_recursive___get__(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_16___get__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_cur_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_16___get__ *)__pyx_tp_new_6libzfs___pyx_scope_struct_16___get__(__pyx_ptype_6libzfs___pyx_scope_struct_16___get__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6libzfs_10ZFSDataset_18children_recursive_2generator14, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_ZFSDataset___get); if (unlikely(!gen)) __PYX_ERR(1, 2149, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("libzfs.ZFSDataset.children_recursive.__get__", __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_6libzfs_10ZFSDataset_18children_recursive_2generator14(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6libzfs___pyx_scope_struct_16___get__ *__pyx_cur_scope = ((struct __pyx_obj_6libzfs___pyx_scope_struct_16___get__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    case 2: goto __pyx_L9_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(1, 2149, __pyx_L1_error)

  /* "libzfs.pyx":2150
 *     property children_recursive:
 *         def __get__(self):
 *             for c in self.children:             # <<<<<<<<<<<<<<
 *                 yield c
 *                 for i in c.children_recursive:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2150, __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_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2150, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 2150, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2150, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 2150, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2150, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 2150, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_c);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_c, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;

    /* "libzfs.pyx":2151
 *         def __get__(self):
 *             for c in self.children:
 *                 yield c             # <<<<<<<<<<<<<<
 *                 for i in c.children_recursive:
 *                     yield i
 */
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_c);
    __pyx_r = __pyx_cur_scope->__pyx_v_c;
    __Pyx_XGIVEREF(__pyx_t_2);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2151, __pyx_L1_error)

    /* "libzfs.pyx":2152
 *             for c in self.children:
 *                 yield c
 *                 for i in c.children_recursive:             # <<<<<<<<<<<<<<
 *                     yield i
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_c, __pyx_n_s_children_recursive); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2152, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 2152, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2152, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 2152, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2152, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_7(__pyx_t_5);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 2152, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
      __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __pyx_t_1 = 0;

      /* "libzfs.pyx":2153
 *                 yield c
 *                 for i in c.children_recursive:
 *                     yield i             # <<<<<<<<<<<<<<
 * 
 *     property snapshots:
 */
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_i);
      __pyx_r = __pyx_cur_scope->__pyx_v_i;
      __Pyx_XGIVEREF(__pyx_t_2);
      __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
      __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
      __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
      __Pyx_XGIVEREF(__pyx_t_5);
      __pyx_cur_scope->__pyx_t_3 = __pyx_t_5;
      __pyx_cur_scope->__pyx_t_4 = __pyx_t_6;
      __pyx_cur_scope->__pyx_t_5 = __pyx_t_7;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      /* return from generator, yielding value */
      __pyx_generator->resume_label = 2;
      return __pyx_r;
      __pyx_L9_resume_from_yield:;
      __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
      __pyx_cur_scope->__pyx_t_0 = 0;
      __Pyx_XGOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
      __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
      __pyx_t_5 = __pyx_cur_scope->__pyx_t_3;
      __pyx_cur_scope->__pyx_t_3 = 0;
      __Pyx_XGOTREF(__pyx_t_5);
      __pyx_t_6 = __pyx_cur_scope->__pyx_t_4;
      __pyx_t_7 = __pyx_cur_scope->__pyx_t_5;
      if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2153, __pyx_L1_error)

      /* "libzfs.pyx":2152
 *             for c in self.children:
 *                 yield c
 *                 for i in c.children_recursive:             # <<<<<<<<<<<<<<
 *                     yield i
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "libzfs.pyx":2150
 *     property children_recursive:
 *         def __get__(self):
 *             for c in self.children:             # <<<<<<<<<<<<<<
 *                 yield c
 *                 for i in c.children_recursive:
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":2149
 * 
 *     property children_recursive:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             for c in self.children:
 *                 yield c
 */

  /* 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_5);
  __Pyx_AddTraceback("__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6libzfs_10ZFSDataset_9snapshots_2generator15(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "libzfs.pyx":2156
 * 
 *     property snapshots:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSSnapshot snapshot
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_9snapshots_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_9snapshots_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZFSDataset_9snapshots___get__(((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10ZFSDataset_9snapshots___get__(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_17___get__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_cur_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_17___get__ *)__pyx_tp_new_6libzfs___pyx_scope_struct_17___get__(__pyx_ptype_6libzfs___pyx_scope_struct_17___get__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6libzfs_10ZFSDataset_9snapshots_2generator15, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_ZFSDataset___get); if (unlikely(!gen)) __PYX_ERR(1, 2156, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("libzfs.ZFSDataset.snapshots.__get__", __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_6libzfs_10ZFSDataset_9snapshots_2generator15(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6libzfs___pyx_scope_struct_17___get__ *__pyx_cur_scope = ((struct __pyx_obj_6libzfs___pyx_scope_struct_17___get__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  uintptr_t __pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L10_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(1, 2156, __pyx_L1_error)

  /* "libzfs.pyx":2159
 *             cdef ZFSSnapshot snapshot
 * 
 *             snapshots = []             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 libzfs.zfs_iter_snapshots(self.handle, False, self.__iterate_snapshots, <void*>snapshots)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_snapshots = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":2160
 * 
 *             snapshots = []
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 libzfs.zfs_iter_snapshots(self.handle, False, self.__iterate_snapshots, <void*>snapshots)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":2161
 *             snapshots = []
 *             with nogil:
 *                 libzfs.zfs_iter_snapshots(self.handle, False, self.__iterate_snapshots, <void*>snapshots)             # <<<<<<<<<<<<<<
 * 
 *             for h in snapshots:
 */
        zfs_iter_snapshots(__pyx_cur_scope->__pyx_v_self->__pyx_base.handle, 0, ((struct __pyx_vtabstruct_6libzfs_ZFSDataset *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->__pyx___iterate_snapshots, ((void *)__pyx_cur_scope->__pyx_v_snapshots));
      }

      /* "libzfs.pyx":2160
 * 
 *             snapshots = []
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 libzfs.zfs_iter_snapshots(self.handle, False, self.__iterate_snapshots, <void*>snapshots)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L6;
        }
        __pyx_L6:;
      }
  }

  /* "libzfs.pyx":2163
 *                 libzfs.zfs_iter_snapshots(self.handle, False, self.__iterate_snapshots, <void*>snapshots)
 * 
 *             for h in snapshots:             # <<<<<<<<<<<<<<
 *                 snapshot = ZFSSnapshot.__new__(ZFSSnapshot)
 *                 snapshot.root = self.root
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_snapshots; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 2163, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_h);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_h, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":2164
 * 
 *             for h in snapshots:
 *                 snapshot = ZFSSnapshot.__new__(ZFSSnapshot)             # <<<<<<<<<<<<<<
 *                 snapshot.root = self.root
 *                 snapshot.pool = self.pool
 */
    __pyx_t_3 = __pyx_tp_new_6libzfs_ZFSSnapshot(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSSnapshot), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6libzfs_ZFSSnapshot)))) __PYX_ERR(1, 2164, __pyx_L1_error)
    __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_snapshot));
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_snapshot, ((struct __pyx_obj_6libzfs_ZFSSnapshot *)__pyx_t_3));
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":2165
 *             for h in snapshots:
 *                 snapshot = ZFSSnapshot.__new__(ZFSSnapshot)
 *                 snapshot.root = self.root             # <<<<<<<<<<<<<<
 *                 snapshot.pool = self.pool
 *                 snapshot.handle = <libzfs.zfs_handle_t*><uintptr_t>h
 */
    __pyx_t_3 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->__pyx_base.root);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_snapshot->__pyx_base.root);
    __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_snapshot->__pyx_base.root));
    __pyx_cur_scope->__pyx_v_snapshot->__pyx_base.root = ((struct __pyx_obj_6libzfs_ZFS *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":2166
 *                 snapshot = ZFSSnapshot.__new__(ZFSSnapshot)
 *                 snapshot.root = self.root
 *                 snapshot.pool = self.pool             # <<<<<<<<<<<<<<
 *                 snapshot.handle = <libzfs.zfs_handle_t*><uintptr_t>h
 *                 if snapshot.snapshot_name == '$ORIGIN':
 */
    __pyx_t_3 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->__pyx_base.pool);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_snapshot->__pyx_base.pool);
    __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_snapshot->__pyx_base.pool));
    __pyx_cur_scope->__pyx_v_snapshot->__pyx_base.pool = ((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":2167
 *                 snapshot.root = self.root
 *                 snapshot.pool = self.pool
 *                 snapshot.handle = <libzfs.zfs_handle_t*><uintptr_t>h             # <<<<<<<<<<<<<<
 *                 if snapshot.snapshot_name == '$ORIGIN':
 *                     continue
 */
    __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_cur_scope->__pyx_v_h); if (unlikely((__pyx_t_4 == (uintptr_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 2167, __pyx_L1_error)
    __pyx_cur_scope->__pyx_v_snapshot->__pyx_base.handle = ((zfs_handle_t *)((uintptr_t)__pyx_t_4));

    /* "libzfs.pyx":2168
 *                 snapshot.pool = self.pool
 *                 snapshot.handle = <libzfs.zfs_handle_t*><uintptr_t>h
 *                 if snapshot.snapshot_name == '$ORIGIN':             # <<<<<<<<<<<<<<
 *                     continue
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_snapshot), __pyx_n_s_snapshot_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s_ORIGIN, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 2168, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_5) {

      /* "libzfs.pyx":2169
 *                 snapshot.handle = <libzfs.zfs_handle_t*><uintptr_t>h
 *                 if snapshot.snapshot_name == '$ORIGIN':
 *                     continue             # <<<<<<<<<<<<<<
 * 
 *                 yield snapshot
 */
      goto __pyx_L7_continue;

      /* "libzfs.pyx":2168
 *                 snapshot.pool = self.pool
 *                 snapshot.handle = <libzfs.zfs_handle_t*><uintptr_t>h
 *                 if snapshot.snapshot_name == '$ORIGIN':             # <<<<<<<<<<<<<<
 *                     continue
 * 
 */
    }

    /* "libzfs.pyx":2171
 *                     continue
 * 
 *                 yield snapshot             # <<<<<<<<<<<<<<
 * 
 *     property bookmarks:
 */
    __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_snapshot));
    __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_snapshot);
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L10_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2171, __pyx_L1_error)

    /* "libzfs.pyx":2163
 *                 libzfs.zfs_iter_snapshots(self.handle, False, self.__iterate_snapshots, <void*>snapshots)
 * 
 *             for h in snapshots:             # <<<<<<<<<<<<<<
 *                 snapshot = ZFSSnapshot.__new__(ZFSSnapshot)
 *                 snapshot.root = self.root
 */
    __pyx_L7_continue:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":2156
 * 
 *     property snapshots:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSSnapshot snapshot
 * 
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6libzfs_10ZFSDataset_9bookmarks_2generator16(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "libzfs.pyx":2174
 * 
 *     property bookmarks:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSBookmark bookmark
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_9bookmarks_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_9bookmarks_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZFSDataset_9bookmarks___get__(((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10ZFSDataset_9bookmarks___get__(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_18___get__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_cur_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_18___get__ *)__pyx_tp_new_6libzfs___pyx_scope_struct_18___get__(__pyx_ptype_6libzfs___pyx_scope_struct_18___get__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6libzfs_10ZFSDataset_9bookmarks_2generator16, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_ZFSDataset___get); if (unlikely(!gen)) __PYX_ERR(1, 2174, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("libzfs.ZFSDataset.bookmarks.__get__", __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_6libzfs_10ZFSDataset_9bookmarks_2generator16(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6libzfs___pyx_scope_struct_18___get__ *__pyx_cur_scope = ((struct __pyx_obj_6libzfs___pyx_scope_struct_18___get__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  uintptr_t __pyx_t_4;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L9_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(1, 2174, __pyx_L1_error)

  /* "libzfs.pyx":2177
 *             cdef ZFSBookmark bookmark
 * 
 *             bookmarks = []             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 libzfs.zfs_iter_bookmarks(self.handle, self.__iterate_bookmarks, <void *>bookmarks)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_bookmarks = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":2178
 * 
 *             bookmarks = []
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 libzfs.zfs_iter_bookmarks(self.handle, self.__iterate_bookmarks, <void *>bookmarks)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":2179
 *             bookmarks = []
 *             with nogil:
 *                 libzfs.zfs_iter_bookmarks(self.handle, self.__iterate_bookmarks, <void *>bookmarks)             # <<<<<<<<<<<<<<
 * 
 *             for b in bookmarks:
 */
        zfs_iter_bookmarks(__pyx_cur_scope->__pyx_v_self->__pyx_base.handle, ((struct __pyx_vtabstruct_6libzfs_ZFSDataset *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->__pyx___iterate_bookmarks, ((void *)__pyx_cur_scope->__pyx_v_bookmarks));
      }

      /* "libzfs.pyx":2178
 * 
 *             bookmarks = []
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 libzfs.zfs_iter_bookmarks(self.handle, self.__iterate_bookmarks, <void *>bookmarks)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L6;
        }
        __pyx_L6:;
      }
  }

  /* "libzfs.pyx":2181
 *                 libzfs.zfs_iter_bookmarks(self.handle, self.__iterate_bookmarks, <void *>bookmarks)
 * 
 *             for b in bookmarks:             # <<<<<<<<<<<<<<
 *                 bookmark = ZFSBookmark.__new__(ZFSBookmark)
 *                 bookmark.root = self.root
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_bookmarks; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 2181, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_b);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_b, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":2182
 * 
 *             for b in bookmarks:
 *                 bookmark = ZFSBookmark.__new__(ZFSBookmark)             # <<<<<<<<<<<<<<
 *                 bookmark.root = self.root
 *                 bookmark.pool = self.pool
 */
    __pyx_t_3 = __pyx_tp_new_6libzfs_ZFSBookmark(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSBookmark), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6libzfs_ZFSBookmark)))) __PYX_ERR(1, 2182, __pyx_L1_error)
    __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_bookmark));
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_bookmark, ((struct __pyx_obj_6libzfs_ZFSBookmark *)__pyx_t_3));
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":2183
 *             for b in bookmarks:
 *                 bookmark = ZFSBookmark.__new__(ZFSBookmark)
 *                 bookmark.root = self.root             # <<<<<<<<<<<<<<
 *                 bookmark.pool = self.pool
 *                 bookmark.handle = <libzfs.zfs_handle_t*><uintptr_t>b
 */
    __pyx_t_3 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->__pyx_base.root);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_bookmark->__pyx_base.root);
    __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_bookmark->__pyx_base.root));
    __pyx_cur_scope->__pyx_v_bookmark->__pyx_base.root = ((struct __pyx_obj_6libzfs_ZFS *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":2184
 *                 bookmark = ZFSBookmark.__new__(ZFSBookmark)
 *                 bookmark.root = self.root
 *                 bookmark.pool = self.pool             # <<<<<<<<<<<<<<
 *                 bookmark.handle = <libzfs.zfs_handle_t*><uintptr_t>b
 *                 yield bookmark
 */
    __pyx_t_3 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->__pyx_base.pool);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_bookmark->__pyx_base.pool);
    __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_bookmark->__pyx_base.pool));
    __pyx_cur_scope->__pyx_v_bookmark->__pyx_base.pool = ((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":2185
 *                 bookmark.root = self.root
 *                 bookmark.pool = self.pool
 *                 bookmark.handle = <libzfs.zfs_handle_t*><uintptr_t>b             # <<<<<<<<<<<<<<
 *                 yield bookmark
 * 
 */
    __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_cur_scope->__pyx_v_b); if (unlikely((__pyx_t_4 == (uintptr_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 2185, __pyx_L1_error)
    __pyx_cur_scope->__pyx_v_bookmark->__pyx_base.handle = ((zfs_handle_t *)((uintptr_t)__pyx_t_4));

    /* "libzfs.pyx":2186
 *                 bookmark.pool = self.pool
 *                 bookmark.handle = <libzfs.zfs_handle_t*><uintptr_t>b
 *                 yield bookmark             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_bookmark));
    __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_bookmark);
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L9_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2186, __pyx_L1_error)

    /* "libzfs.pyx":2181
 *                 libzfs.zfs_iter_bookmarks(self.handle, self.__iterate_bookmarks, <void *>bookmarks)
 * 
 *             for b in bookmarks:             # <<<<<<<<<<<<<<
 *                 bookmark = ZFSBookmark.__new__(ZFSBookmark)
 *                 bookmark.root = self.root
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":2174
 * 
 *     property bookmarks:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSBookmark bookmark
 * 
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6libzfs_10ZFSDataset_19snapshots_recursive_2generator17(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "libzfs.pyx":2190
 * 
 *     property snapshots_recursive:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             for s in self.snapshots:
 *                 yield s
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_19snapshots_recursive_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_19snapshots_recursive_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZFSDataset_19snapshots_recursive___get__(((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10ZFSDataset_19snapshots_recursive___get__(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_19___get__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_cur_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_19___get__ *)__pyx_tp_new_6libzfs___pyx_scope_struct_19___get__(__pyx_ptype_6libzfs___pyx_scope_struct_19___get__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6libzfs_10ZFSDataset_19snapshots_recursive_2generator17, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_ZFSDataset___get); if (unlikely(!gen)) __PYX_ERR(1, 2190, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("libzfs.ZFSDataset.snapshots_recursive.__get__", __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_6libzfs_10ZFSDataset_19snapshots_recursive_2generator17(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6libzfs___pyx_scope_struct_19___get__ *__pyx_cur_scope = ((struct __pyx_obj_6libzfs___pyx_scope_struct_19___get__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    case 2: goto __pyx_L11_resume_from_yield;
    case 3: goto __pyx_L16_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(1, 2190, __pyx_L1_error)

  /* "libzfs.pyx":2191
 *     property snapshots_recursive:
 *         def __get__(self):
 *             for s in self.snapshots:             # <<<<<<<<<<<<<<
 *                 yield s
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_snapshots); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2191, __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_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2191, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 2191, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2191, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 2191, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2191, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 2191, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_s);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_s, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;

    /* "libzfs.pyx":2192
 *         def __get__(self):
 *             for s in self.snapshots:
 *                 yield s             # <<<<<<<<<<<<<<
 * 
 *             for c in self.children:
 */
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_s);
    __pyx_r = __pyx_cur_scope->__pyx_v_s;
    __Pyx_XGIVEREF(__pyx_t_2);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2192, __pyx_L1_error)

    /* "libzfs.pyx":2191
 *     property snapshots_recursive:
 *         def __get__(self):
 *             for s in self.snapshots:             # <<<<<<<<<<<<<<
 *                 yield s
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":2194
 *                 yield s
 * 
 *             for c in self.children:             # <<<<<<<<<<<<<<
 *                 for s in c.snapshots:
 *                     yield s
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_children); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2194, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __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(1, 2194, __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(1, 2194, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 2194, __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(1, 2194, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 2194, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_c);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_c, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;

    /* "libzfs.pyx":2195
 * 
 *             for c in self.children:
 *                 for s in c.snapshots:             # <<<<<<<<<<<<<<
 *                     yield s
 *                 for i in c.children_recursive:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_c, __pyx_n_s_snapshots); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2195, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2195, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 2195, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2195, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 2195, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2195, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_7(__pyx_t_5);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 2195, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_s);
      __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_s, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;

      /* "libzfs.pyx":2196
 *             for c in self.children:
 *                 for s in c.snapshots:
 *                     yield s             # <<<<<<<<<<<<<<
 *                 for i in c.children_recursive:
 *                     for s in i.snapshots:
 */
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_s);
      __pyx_r = __pyx_cur_scope->__pyx_v_s;
      __Pyx_XGIVEREF(__pyx_t_1);
      __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
      __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
      __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
      __Pyx_XGIVEREF(__pyx_t_5);
      __pyx_cur_scope->__pyx_t_3 = __pyx_t_5;
      __pyx_cur_scope->__pyx_t_4 = __pyx_t_6;
      __pyx_cur_scope->__pyx_t_5 = __pyx_t_7;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      /* return from generator, yielding value */
      __pyx_generator->resume_label = 2;
      return __pyx_r;
      __pyx_L11_resume_from_yield:;
      __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
      __pyx_cur_scope->__pyx_t_0 = 0;
      __Pyx_XGOTREF(__pyx_t_1);
      __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
      __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
      __pyx_t_5 = __pyx_cur_scope->__pyx_t_3;
      __pyx_cur_scope->__pyx_t_3 = 0;
      __Pyx_XGOTREF(__pyx_t_5);
      __pyx_t_6 = __pyx_cur_scope->__pyx_t_4;
      __pyx_t_7 = __pyx_cur_scope->__pyx_t_5;
      if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2196, __pyx_L1_error)

      /* "libzfs.pyx":2195
 * 
 *             for c in self.children:
 *                 for s in c.snapshots:             # <<<<<<<<<<<<<<
 *                     yield s
 *                 for i in c.children_recursive:
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "libzfs.pyx":2197
 *                 for s in c.snapshots:
 *                     yield s
 *                 for i in c.children_recursive:             # <<<<<<<<<<<<<<
 *                     for s in i.snapshots:
 *                         yield s
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_c, __pyx_n_s_children_recursive); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
      __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2197, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 2197, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2197, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 2197, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2197, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_7(__pyx_t_2);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 2197, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
      __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      __pyx_t_5 = 0;

      /* "libzfs.pyx":2198
 *                     yield s
 *                 for i in c.children_recursive:
 *                     for s in i.snapshots:             # <<<<<<<<<<<<<<
 *                         yield s
 * 
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_i, __pyx_n_s_snapshots); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2198, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
        __pyx_t_8 = __pyx_t_5; __Pyx_INCREF(__pyx_t_8); __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2198, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2198, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      for (;;) {
        if (likely(!__pyx_t_10)) {
          if (likely(PyList_CheckExact(__pyx_t_8))) {
            if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_8)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_5 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 2198, __pyx_L1_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2198, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          } else {
            if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 2198, __pyx_L1_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2198, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          }
        } else {
          __pyx_t_5 = __pyx_t_10(__pyx_t_8);
          if (unlikely(!__pyx_t_5)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(1, 2198, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_s);
        __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_s, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        __pyx_t_5 = 0;

        /* "libzfs.pyx":2199
 *                 for i in c.children_recursive:
 *                     for s in i.snapshots:
 *                         yield s             # <<<<<<<<<<<<<<
 * 
 *     property dependents:
 */
        __Pyx_INCREF(__pyx_cur_scope->__pyx_v_s);
        __pyx_r = __pyx_cur_scope->__pyx_v_s;
        __Pyx_XGIVEREF(__pyx_t_1);
        __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
        __Pyx_XGIVEREF(__pyx_t_2);
        __pyx_cur_scope->__pyx_t_3 = __pyx_t_2;
        __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
        __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
        __pyx_cur_scope->__pyx_t_4 = __pyx_t_6;
        __pyx_cur_scope->__pyx_t_5 = __pyx_t_7;
        __Pyx_XGIVEREF(__pyx_t_8);
        __pyx_cur_scope->__pyx_t_6 = __pyx_t_8;
        __pyx_cur_scope->__pyx_t_7 = __pyx_t_9;
        __pyx_cur_scope->__pyx_t_8 = __pyx_t_10;
        __Pyx_XGIVEREF(__pyx_r);
        __Pyx_RefNannyFinishContext();
        /* return from generator, yielding value */
        __pyx_generator->resume_label = 3;
        return __pyx_r;
        __pyx_L16_resume_from_yield:;
        __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
        __pyx_cur_scope->__pyx_t_0 = 0;
        __Pyx_XGOTREF(__pyx_t_1);
        __pyx_t_2 = __pyx_cur_scope->__pyx_t_3;
        __pyx_cur_scope->__pyx_t_3 = 0;
        __Pyx_XGOTREF(__pyx_t_2);
        __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
        __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
        __pyx_t_6 = __pyx_cur_scope->__pyx_t_4;
        __pyx_t_7 = __pyx_cur_scope->__pyx_t_5;
        __pyx_t_8 = __pyx_cur_scope->__pyx_t_6;
        __pyx_cur_scope->__pyx_t_6 = 0;
        __Pyx_XGOTREF(__pyx_t_8);
        __pyx_t_9 = __pyx_cur_scope->__pyx_t_7;
        __pyx_t_10 = __pyx_cur_scope->__pyx_t_8;
        if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2199, __pyx_L1_error)

        /* "libzfs.pyx":2198
 *                     yield s
 *                 for i in c.children_recursive:
 *                     for s in i.snapshots:             # <<<<<<<<<<<<<<
 *                         yield s
 * 
 */
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "libzfs.pyx":2197
 *                 for s in c.snapshots:
 *                     yield s
 *                 for i in c.children_recursive:             # <<<<<<<<<<<<<<
 *                     for s in i.snapshots:
 *                         yield s
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "libzfs.pyx":2194
 *                 yield s
 * 
 *             for c in self.children:             # <<<<<<<<<<<<<<
 *                 for s in c.snapshots:
 *                     yield s
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":2190
 * 
 *     property snapshots_recursive:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             for s in self.snapshots:
 *                 yield s
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6libzfs_10ZFSDataset_10dependents_2generator18(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "libzfs.pyx":2202
 * 
 *     property dependents:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSDataset dataset
 *             cdef ZFSSnapshot snapshot
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_10dependents_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_10dependents_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZFSDataset_10dependents___get__(((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10ZFSDataset_10dependents___get__(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_20___get__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_cur_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_20___get__ *)__pyx_tp_new_6libzfs___pyx_scope_struct_20___get__(__pyx_ptype_6libzfs___pyx_scope_struct_20___get__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6libzfs_10ZFSDataset_10dependents_2generator18, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_ZFSDataset___get); if (unlikely(!gen)) __PYX_ERR(1, 2202, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("libzfs.ZFSDataset.dependents.__get__", __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_6libzfs_10ZFSDataset_10dependents_2generator18(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6libzfs___pyx_scope_struct_20___get__ *__pyx_cur_scope = ((struct __pyx_obj_6libzfs___pyx_scope_struct_20___get__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  uintptr_t __pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L9_resume_from_yield;
    case 2: goto __pyx_L11_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(1, 2202, __pyx_L1_error)

  /* "libzfs.pyx":2207
 *             cdef zfs.zfs_type_t type
 * 
 *             dependents = []             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 libzfs.zfs_iter_dependents(self.handle, False, self.__iterate_dependents, <void*>dependents)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_dependents = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":2208
 * 
 *             dependents = []
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 libzfs.zfs_iter_dependents(self.handle, False, self.__iterate_dependents, <void*>dependents)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":2209
 *             dependents = []
 *             with nogil:
 *                 libzfs.zfs_iter_dependents(self.handle, False, self.__iterate_dependents, <void*>dependents)             # <<<<<<<<<<<<<<
 * 
 *             for h in dependents:
 */
        zfs_iter_dependents(__pyx_cur_scope->__pyx_v_self->__pyx_base.handle, 0, ((struct __pyx_vtabstruct_6libzfs_ZFSDataset *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->__pyx___iterate_dependents, ((void *)__pyx_cur_scope->__pyx_v_dependents));
      }

      /* "libzfs.pyx":2208
 * 
 *             dependents = []
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 libzfs.zfs_iter_dependents(self.handle, False, self.__iterate_dependents, <void*>dependents)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L6;
        }
        __pyx_L6:;
      }
  }

  /* "libzfs.pyx":2211
 *                 libzfs.zfs_iter_dependents(self.handle, False, self.__iterate_dependents, <void*>dependents)
 * 
 *             for h in dependents:             # <<<<<<<<<<<<<<
 *                 type = libzfs.zfs_get_type(<libzfs.zfs_handle_t*><uintptr_t>h)
 * 
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependents; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 2211, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_h);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_h, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;

    /* "libzfs.pyx":2212
 * 
 *             for h in dependents:
 *                 type = libzfs.zfs_get_type(<libzfs.zfs_handle_t*><uintptr_t>h)             # <<<<<<<<<<<<<<
 * 
 *                 if type == zfs.ZFS_TYPE_FILESYSTEM or type == zfs.ZFS_TYPE_VOLUME:
 */
    __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_cur_scope->__pyx_v_h); if (unlikely((__pyx_t_4 == (uintptr_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 2212, __pyx_L1_error)
    __pyx_cur_scope->__pyx_v_type = zfs_get_type(((zfs_handle_t *)((uintptr_t)__pyx_t_4)));

    /* "libzfs.pyx":2214
 *                 type = libzfs.zfs_get_type(<libzfs.zfs_handle_t*><uintptr_t>h)
 * 
 *                 if type == zfs.ZFS_TYPE_FILESYSTEM or type == zfs.ZFS_TYPE_VOLUME:             # <<<<<<<<<<<<<<
 *                     dataset = ZFSDataset.__new__(ZFSDataset)
 *                     dataset.root = self.root
 */
    switch (__pyx_cur_scope->__pyx_v_type) {
      case ZFS_TYPE_FILESYSTEM:
      case ZFS_TYPE_VOLUME:

      /* "libzfs.pyx":2215
 * 
 *                 if type == zfs.ZFS_TYPE_FILESYSTEM or type == zfs.ZFS_TYPE_VOLUME:
 *                     dataset = ZFSDataset.__new__(ZFSDataset)             # <<<<<<<<<<<<<<
 *                     dataset.root = self.root
 *                     dataset.pool = self.pool
 */
      __pyx_t_3 = __pyx_tp_new_6libzfs_ZFSDataset(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSDataset), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2215, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6libzfs_ZFSDataset)))) __PYX_ERR(1, 2215, __pyx_L1_error)
      __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_dataset));
      __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_dataset, ((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_t_3));
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_3 = 0;

      /* "libzfs.pyx":2216
 *                 if type == zfs.ZFS_TYPE_FILESYSTEM or type == zfs.ZFS_TYPE_VOLUME:
 *                     dataset = ZFSDataset.__new__(ZFSDataset)
 *                     dataset.root = self.root             # <<<<<<<<<<<<<<
 *                     dataset.pool = self.pool
 *                     dataset.handle = <libzfs.zfs_handle_t*><uintptr_t>h
 */
      __pyx_t_3 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->__pyx_base.root);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dataset->__pyx_base.root);
      __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_dataset->__pyx_base.root));
      __pyx_cur_scope->__pyx_v_dataset->__pyx_base.root = ((struct __pyx_obj_6libzfs_ZFS *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "libzfs.pyx":2217
 *                     dataset = ZFSDataset.__new__(ZFSDataset)
 *                     dataset.root = self.root
 *                     dataset.pool = self.pool             # <<<<<<<<<<<<<<
 *                     dataset.handle = <libzfs.zfs_handle_t*><uintptr_t>h
 *                     yield dataset
 */
      __pyx_t_3 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->__pyx_base.pool);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dataset->__pyx_base.pool);
      __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_dataset->__pyx_base.pool));
      __pyx_cur_scope->__pyx_v_dataset->__pyx_base.pool = ((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "libzfs.pyx":2218
 *                     dataset.root = self.root
 *                     dataset.pool = self.pool
 *                     dataset.handle = <libzfs.zfs_handle_t*><uintptr_t>h             # <<<<<<<<<<<<<<
 *                     yield dataset
 * 
 */
      __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_cur_scope->__pyx_v_h); if (unlikely((__pyx_t_4 == (uintptr_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 2218, __pyx_L1_error)
      __pyx_cur_scope->__pyx_v_dataset->__pyx_base.handle = ((zfs_handle_t *)((uintptr_t)__pyx_t_4));

      /* "libzfs.pyx":2219
 *                     dataset.pool = self.pool
 *                     dataset.handle = <libzfs.zfs_handle_t*><uintptr_t>h
 *                     yield dataset             # <<<<<<<<<<<<<<
 * 
 *                 if type == zfs.ZFS_TYPE_SNAPSHOT:
 */
      __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_dataset));
      __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_dataset);
      __Pyx_XGIVEREF(__pyx_t_1);
      __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
      __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      /* return from generator, yielding value */
      __pyx_generator->resume_label = 1;
      return __pyx_r;
      __pyx_L9_resume_from_yield:;
      __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
      __pyx_cur_scope->__pyx_t_0 = 0;
      __Pyx_XGOTREF(__pyx_t_1);
      __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
      if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2219, __pyx_L1_error)

      /* "libzfs.pyx":2214
 *                 type = libzfs.zfs_get_type(<libzfs.zfs_handle_t*><uintptr_t>h)
 * 
 *                 if type == zfs.ZFS_TYPE_FILESYSTEM or type == zfs.ZFS_TYPE_VOLUME:             # <<<<<<<<<<<<<<
 *                     dataset = ZFSDataset.__new__(ZFSDataset)
 *                     dataset.root = self.root
 */
      break;
      default: break;
    }

    /* "libzfs.pyx":2221
 *                     yield dataset
 * 
 *                 if type == zfs.ZFS_TYPE_SNAPSHOT:             # <<<<<<<<<<<<<<
 *                     snapshot = ZFSSnapshot.__new__(ZFSSnapshot)
 *                     snapshot.root = self.root
 */
    __pyx_t_5 = ((__pyx_cur_scope->__pyx_v_type == ZFS_TYPE_SNAPSHOT) != 0);
    if (__pyx_t_5) {

      /* "libzfs.pyx":2222
 * 
 *                 if type == zfs.ZFS_TYPE_SNAPSHOT:
 *                     snapshot = ZFSSnapshot.__new__(ZFSSnapshot)             # <<<<<<<<<<<<<<
 *                     snapshot.root = self.root
 *                     snapshot.pool = self.pool
 */
      __pyx_t_3 = __pyx_tp_new_6libzfs_ZFSSnapshot(((PyTypeObject *)__pyx_ptype_6libzfs_ZFSSnapshot), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2222, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6libzfs_ZFSSnapshot)))) __PYX_ERR(1, 2222, __pyx_L1_error)
      __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_snapshot));
      __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_snapshot, ((struct __pyx_obj_6libzfs_ZFSSnapshot *)__pyx_t_3));
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_3 = 0;

      /* "libzfs.pyx":2223
 *                 if type == zfs.ZFS_TYPE_SNAPSHOT:
 *                     snapshot = ZFSSnapshot.__new__(ZFSSnapshot)
 *                     snapshot.root = self.root             # <<<<<<<<<<<<<<
 *                     snapshot.pool = self.pool
 *                     snapshot.handle = <libzfs.zfs_handle_t*><uintptr_t>h
 */
      __pyx_t_3 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->__pyx_base.root);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_snapshot->__pyx_base.root);
      __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_snapshot->__pyx_base.root));
      __pyx_cur_scope->__pyx_v_snapshot->__pyx_base.root = ((struct __pyx_obj_6libzfs_ZFS *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "libzfs.pyx":2224
 *                     snapshot = ZFSSnapshot.__new__(ZFSSnapshot)
 *                     snapshot.root = self.root
 *                     snapshot.pool = self.pool             # <<<<<<<<<<<<<<
 *                     snapshot.handle = <libzfs.zfs_handle_t*><uintptr_t>h
 *                     yield snapshot
 */
      __pyx_t_3 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->__pyx_base.pool);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_snapshot->__pyx_base.pool);
      __Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_snapshot->__pyx_base.pool));
      __pyx_cur_scope->__pyx_v_snapshot->__pyx_base.pool = ((struct __pyx_obj_6libzfs_ZFSPool *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "libzfs.pyx":2225
 *                     snapshot.root = self.root
 *                     snapshot.pool = self.pool
 *                     snapshot.handle = <libzfs.zfs_handle_t*><uintptr_t>h             # <<<<<<<<<<<<<<
 *                     yield snapshot
 * 
 */
      __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_cur_scope->__pyx_v_h); if (unlikely((__pyx_t_4 == (uintptr_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 2225, __pyx_L1_error)
      __pyx_cur_scope->__pyx_v_snapshot->__pyx_base.handle = ((zfs_handle_t *)((uintptr_t)__pyx_t_4));

      /* "libzfs.pyx":2226
 *                     snapshot.pool = self.pool
 *                     snapshot.handle = <libzfs.zfs_handle_t*><uintptr_t>h
 *                     yield snapshot             # <<<<<<<<<<<<<<
 * 
 *     property mountpoint:
 */
      __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_snapshot));
      __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_snapshot);
      __Pyx_XGIVEREF(__pyx_t_1);
      __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
      __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      /* return from generator, yielding value */
      __pyx_generator->resume_label = 2;
      return __pyx_r;
      __pyx_L11_resume_from_yield:;
      __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
      __pyx_cur_scope->__pyx_t_0 = 0;
      __Pyx_XGOTREF(__pyx_t_1);
      __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
      if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2226, __pyx_L1_error)

      /* "libzfs.pyx":2221
 *                     yield dataset
 * 
 *                 if type == zfs.ZFS_TYPE_SNAPSHOT:             # <<<<<<<<<<<<<<
 *                     snapshot = ZFSSnapshot.__new__(ZFSSnapshot)
 *                     snapshot.root = self.root
 */
    }

    /* "libzfs.pyx":2211
 *                 libzfs.zfs_iter_dependents(self.handle, False, self.__iterate_dependents, <void*>dependents)
 * 
 *             for h in dependents:             # <<<<<<<<<<<<<<
 *                 type = libzfs.zfs_get_type(<libzfs.zfs_handle_t*><uintptr_t>h)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":2202
 * 
 *     property dependents:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef ZFSDataset dataset
 *             cdef ZFSSnapshot snapshot
 */

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

/* "libzfs.pyx":2229
 * 
 *     property mountpoint:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef char *mntpt
 *             if libzfs.zfs_is_mounted(self.handle, &mntpt) == 0:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_10mountpoint_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_10mountpoint_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZFSDataset_10mountpoint___get__(((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10ZFSDataset_10mountpoint___get__(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self) {
  char *__pyx_v_mntpt;
  char *__pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":2231
 *         def __get__(self):
 *             cdef char *mntpt
 *             if libzfs.zfs_is_mounted(self.handle, &mntpt) == 0:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
  __pyx_t_1 = ((zfs_is_mounted(__pyx_v_self->__pyx_base.handle, (&__pyx_v_mntpt)) == 0) != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":2232
 *             cdef char *mntpt
 *             if libzfs.zfs_is_mounted(self.handle, &mntpt) == 0:
 *                 return None             # <<<<<<<<<<<<<<
 * 
 *             result = mntpt
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;

    /* "libzfs.pyx":2231
 *         def __get__(self):
 *             cdef char *mntpt
 *             if libzfs.zfs_is_mounted(self.handle, &mntpt) == 0:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
  }

  /* "libzfs.pyx":2234
 *                 return None
 * 
 *             result = mntpt             # <<<<<<<<<<<<<<
 *             free(mntpt)
 *             return result
 */
  __pyx_v_result = __pyx_v_mntpt;

  /* "libzfs.pyx":2235
 * 
 *             result = mntpt
 *             free(mntpt)             # <<<<<<<<<<<<<<
 *             return result
 * 
 */
  free(__pyx_v_mntpt);

  /* "libzfs.pyx":2236
 *             result = mntpt
 *             free(mntpt)
 *             return result             # <<<<<<<<<<<<<<
 * 
 *     def destroy_snapshot(self, name):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyUnicode_FromString(__pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":2229
 * 
 *     property mountpoint:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef char *mntpt
 *             if libzfs.zfs_is_mounted(self.handle, &mntpt) == 0:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("libzfs.ZFSDataset.mountpoint.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2238
 *             return result
 * 
 *     def destroy_snapshot(self, name):             # <<<<<<<<<<<<<<
 *         cdef const char *c_name = name
 *         cdef int ret
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_3destroy_snapshot(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_3destroy_snapshot(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy_snapshot (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZFSDataset_2destroy_snapshot(((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_v_self), ((PyObject *)__pyx_v_name));

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

static PyObject *__pyx_pf_6libzfs_10ZFSDataset_2destroy_snapshot(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self, PyObject *__pyx_v_name) {
  char const *__pyx_v_c_name;
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char const *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("destroy_snapshot", 0);

  /* "libzfs.pyx":2239
 * 
 *     def destroy_snapshot(self, name):
 *         cdef const char *c_name = name             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(1, 2239, __pyx_L1_error)
  __pyx_v_c_name = __pyx_t_1;

  /* "libzfs.pyx":2242
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_destroy_snaps(self.handle, c_name, True)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":2243
 * 
 *         with nogil:
 *             ret = libzfs.zfs_destroy_snaps(self.handle, c_name, True)             # <<<<<<<<<<<<<<
 * 
 *         if ret != 0:
 */
        __pyx_v_ret = zfs_destroy_snaps(__pyx_v_self->__pyx_base.handle, __pyx_v_c_name, 1);
      }

      /* "libzfs.pyx":2242
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_destroy_snaps(self.handle, c_name, True)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":2245
 *             ret = libzfs.zfs_destroy_snaps(self.handle, c_name, True)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_2 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":2246
 * 
 *         if ret != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *         self.root.write_history('zfs destroy', name)
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->__pyx_base.root->__pyx_vtab)->get_error(__pyx_v_self->__pyx_base.root); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2246, __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(1, 2246, __pyx_L1_error)

    /* "libzfs.pyx":2245
 *             ret = libzfs.zfs_destroy_snaps(self.handle, c_name, True)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":2248
 *             raise self.root.get_error()
 * 
 *         self.root.write_history('zfs destroy', name)             # <<<<<<<<<<<<<<
 * 
 *     def mount(self):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2248, __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_kp_s_zfs_destroy);
  __Pyx_GIVEREF(__pyx_kp_s_zfs_destroy);
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_zfs_destroy);
  __Pyx_INCREF(__pyx_v_name);
  __Pyx_GIVEREF(__pyx_v_name);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_name);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "libzfs.pyx":2238
 *             return result
 * 
 *     def destroy_snapshot(self, name):             # <<<<<<<<<<<<<<
 *         cdef const char *c_name = name
 *         cdef int ret
 */

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

/* "libzfs.pyx":2250
 *         self.root.write_history('zfs destroy', name)
 * 
 *     def mount(self):             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_5mount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_5mount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mount (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZFSDataset_4mount(((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10ZFSDataset_4mount(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self) {
  int __pyx_v_ret;
  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;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("mount", 0);

  /* "libzfs.pyx":2253
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_mount(self.handle, NULL, 0)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":2254
 * 
 *         with nogil:
 *             ret = libzfs.zfs_mount(self.handle, NULL, 0)             # <<<<<<<<<<<<<<
 * 
 *         if ret != 0:
 */
        __pyx_v_ret = zfs_mount(__pyx_v_self->__pyx_base.handle, NULL, 0);
      }

      /* "libzfs.pyx":2253
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_mount(self.handle, NULL, 0)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":2256
 *             ret = libzfs.zfs_mount(self.handle, NULL, 0)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":2257
 * 
 *         if ret != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *         self.root.write_history('zfs mount', self.name)
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->__pyx_base.root->__pyx_vtab)->get_error(__pyx_v_self->__pyx_base.root); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2257, __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(1, 2257, __pyx_L1_error)

    /* "libzfs.pyx":2256
 *             ret = libzfs.zfs_mount(self.handle, NULL, 0)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":2259
 *             raise self.root.get_error()
 * 
 *         self.root.write_history('zfs mount', self.name)             # <<<<<<<<<<<<<<
 * 
 *     def mount_recursive(self):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2259, __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_kp_s_zfs_mount);
  __Pyx_GIVEREF(__pyx_kp_s_zfs_mount);
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_zfs_mount);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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;

  /* "libzfs.pyx":2250
 *         self.root.write_history('zfs destroy', name)
 * 
 *     def mount(self):             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("libzfs.ZFSDataset.mount", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2261
 *         self.root.write_history('zfs mount', self.name)
 * 
 *     def mount_recursive(self):             # <<<<<<<<<<<<<<
 *         if self.type != DatasetType.FILESYSTEM:
 *             return
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_7mount_recursive(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_7mount_recursive(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mount_recursive (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZFSDataset_6mount_recursive(((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10ZFSDataset_6mount_recursive(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self) {
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("mount_recursive", 0);

  /* "libzfs.pyx":2262
 * 
 *     def mount_recursive(self):
 *         if self.type != DatasetType.FILESYSTEM:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DatasetType); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_FILESYSTEM); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2262, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 2262, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {

    /* "libzfs.pyx":2263
 *     def mount_recursive(self):
 *         if self.type != DatasetType.FILESYSTEM:
 *             return             # <<<<<<<<<<<<<<
 * 
 *         if self.properties['canmount'].value == 'on':
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "libzfs.pyx":2262
 * 
 *     def mount_recursive(self):
 *         if self.type != DatasetType.FILESYSTEM:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "libzfs.pyx":2265
 *             return
 * 
 *         if self.properties['canmount'].value == 'on':             # <<<<<<<<<<<<<<
 *             self.mount()
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_properties); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_canmount); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2265, __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_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_on, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 2265, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {

    /* "libzfs.pyx":2266
 * 
 *         if self.properties['canmount'].value == 'on':
 *             self.mount()             # <<<<<<<<<<<<<<
 * 
 *         for i in self.children:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mount); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(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);
      }
    }
    if (__pyx_t_1) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2266, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2266, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "libzfs.pyx":2265
 *             return
 * 
 *         if self.properties['canmount'].value == 'on':             # <<<<<<<<<<<<<<
 *             self.mount()
 * 
 */
  }

  /* "libzfs.pyx":2268
 *             self.mount()
 * 
 *         for i in self.children:             # <<<<<<<<<<<<<<
 *             i.mount_recursive()
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_children); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  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_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2268, __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(1, 2268, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 2268, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2268, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 2268, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2268, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 2268, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "libzfs.pyx":2269
 * 
 *         for i in self.children:
 *             i.mount_recursive()             # <<<<<<<<<<<<<<
 * 
 *     def umount(self, force=False):
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_i, __pyx_n_s_mount_recursive); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(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);
      }
    }
    if (__pyx_t_7) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2269, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2269, __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;

    /* "libzfs.pyx":2268
 *             self.mount()
 * 
 *         for i in self.children:             # <<<<<<<<<<<<<<
 *             i.mount_recursive()
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "libzfs.pyx":2261
 *         self.root.write_history('zfs mount', self.name)
 * 
 *     def mount_recursive(self):             # <<<<<<<<<<<<<<
 *         if self.type != DatasetType.FILESYSTEM:
 *             return
 */

  /* 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_7);
  __Pyx_AddTraceback("libzfs.ZFSDataset.mount_recursive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2271
 *             i.mount_recursive()
 * 
 *     def umount(self, force=False):             # <<<<<<<<<<<<<<
 *         cdef int flags = 0
 *         cdef int ret
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_9umount(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_9umount(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_force = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("umount (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_force,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);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_force);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "umount") < 0)) __PYX_ERR(1, 2271, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_force = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("umount", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2271, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSDataset.umount", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_10ZFSDataset_8umount(((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_v_self), __pyx_v_force);

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

static PyObject *__pyx_pf_6libzfs_10ZFSDataset_8umount(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self, PyObject *__pyx_v_force) {
  int __pyx_v_flags;
  int __pyx_v_ret;
  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;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("umount", 0);

  /* "libzfs.pyx":2272
 * 
 *     def umount(self, force=False):
 *         cdef int flags = 0             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */
  __pyx_v_flags = 0;

  /* "libzfs.pyx":2275
 *         cdef int ret
 * 
 *         if force:             # <<<<<<<<<<<<<<
 *             flags = zfs.MS_FORCE
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_force); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2275, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "libzfs.pyx":2276
 * 
 *         if force:
 *             flags = zfs.MS_FORCE             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */
    __pyx_v_flags = MS_FORCE;

    /* "libzfs.pyx":2275
 *         cdef int ret
 * 
 *         if force:             # <<<<<<<<<<<<<<
 *             flags = zfs.MS_FORCE
 * 
 */
  }

  /* "libzfs.pyx":2278
 *             flags = zfs.MS_FORCE
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_unmountall(self.handle, flags)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":2279
 * 
 *         with nogil:
 *             ret = libzfs.zfs_unmountall(self.handle, flags)             # <<<<<<<<<<<<<<
 * 
 *         if ret != 0:
 */
        __pyx_v_ret = zfs_unmountall(__pyx_v_self->__pyx_base.handle, __pyx_v_flags);
      }

      /* "libzfs.pyx":2278
 *             flags = zfs.MS_FORCE
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_unmountall(self.handle, flags)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L6;
        }
        __pyx_L6:;
      }
  }

  /* "libzfs.pyx":2281
 *             ret = libzfs.zfs_unmountall(self.handle, flags)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":2282
 * 
 *         if ret != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *         self.root.write_history('zfs umount', '-f' if force else '', self.name)
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->__pyx_base.root->__pyx_vtab)->get_error(__pyx_v_self->__pyx_base.root); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2282, __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(1, 2282, __pyx_L1_error)

    /* "libzfs.pyx":2281
 *             ret = libzfs.zfs_unmountall(self.handle, flags)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":2284
 *             raise self.root.get_error()
 * 
 *         self.root.write_history('zfs umount', '-f' if force else '', self.name)             # <<<<<<<<<<<<<<
 * 
 *     def umount_recursive(self, force=False):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_force); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2284, __pyx_L1_error)
  if (__pyx_t_1) {
    __Pyx_INCREF(__pyx_kp_s_f);
    __pyx_t_4 = __pyx_kp_s_f;
  } else {
    __Pyx_INCREF(__pyx_kp_s__11);
    __pyx_t_4 = __pyx_kp_s__11;
  }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_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_7 = 1;
    }
  }
  __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__pyx_t_6) {
    __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
  }
  __Pyx_INCREF(__pyx_kp_s_zfs_umount);
  __Pyx_GIVEREF(__pyx_kp_s_zfs_umount);
  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_kp_s_zfs_umount);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5);
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":2271
 *             i.mount_recursive()
 * 
 *     def umount(self, force=False):             # <<<<<<<<<<<<<<
 *         cdef int flags = 0
 *         cdef int ret
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("libzfs.ZFSDataset.umount", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2286
 *         self.root.write_history('zfs umount', '-f' if force else '', self.name)
 * 
 *     def umount_recursive(self, force=False):             # <<<<<<<<<<<<<<
 *         if self.type != DatasetType.FILESYSTEM:
 *             return
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_11umount_recursive(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_11umount_recursive(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_force = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("umount_recursive (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_force,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);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_force);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "umount_recursive") < 0)) __PYX_ERR(1, 2286, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_force = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("umount_recursive", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2286, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSDataset.umount_recursive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_10ZFSDataset_10umount_recursive(((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_v_self), __pyx_v_force);

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

static PyObject *__pyx_pf_6libzfs_10ZFSDataset_10umount_recursive(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self, PyObject *__pyx_v_force) {
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  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;
  __Pyx_RefNannySetupContext("umount_recursive", 0);

  /* "libzfs.pyx":2287
 * 
 *     def umount_recursive(self, force=False):
 *         if self.type != DatasetType.FILESYSTEM:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DatasetType); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_FILESYSTEM); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2287, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 2287, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {

    /* "libzfs.pyx":2288
 *     def umount_recursive(self, force=False):
 *         if self.type != DatasetType.FILESYSTEM:
 *             return             # <<<<<<<<<<<<<<
 * 
 *         self.umount(force)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "libzfs.pyx":2287
 * 
 *     def umount_recursive(self, force=False):
 *         if self.type != DatasetType.FILESYSTEM:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "libzfs.pyx":2290
 *             return
 * 
 *         self.umount(force)             # <<<<<<<<<<<<<<
 * 
 *         for i in self.children:
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_umount); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(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);
    }
  }
  if (!__pyx_t_1) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_force); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL;
    __Pyx_INCREF(__pyx_v_force);
    __Pyx_GIVEREF(__pyx_v_force);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_force);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":2292
 *         self.umount(force)
 * 
 *         for i in self.children:             # <<<<<<<<<<<<<<
 *             i.umount_recursive(force)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_children); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  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_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2292, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 2292, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2292, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 2292, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2292, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_7(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 2292, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "libzfs.pyx":2293
 * 
 *         for i in self.children:
 *             i.umount_recursive(force)             # <<<<<<<<<<<<<<
 * 
 *     def send(self, fd, **kwargs):
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_i, __pyx_n_s_umount_recursive); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(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);
      }
    }
    if (!__pyx_t_1) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_force); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2293, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2293, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL;
      __Pyx_INCREF(__pyx_v_force);
      __Pyx_GIVEREF(__pyx_v_force);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_force);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2293, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "libzfs.pyx":2292
 *         self.umount(force)
 * 
 *         for i in self.children:             # <<<<<<<<<<<<<<
 *             i.umount_recursive(force)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "libzfs.pyx":2286
 *         self.root.write_history('zfs umount', '-f' if force else '', self.name)
 * 
 *     def umount_recursive(self, force=False):             # <<<<<<<<<<<<<<
 *         if self.type != DatasetType.FILESYSTEM:
 *             return
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("libzfs.ZFSDataset.umount_recursive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2295
 *             i.umount_recursive(force)
 * 
 *     def send(self, fd, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef int cfd = fd
 *         cdef int err
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_13send(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_13send(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fd = 0;
  PyObject *__pyx_v_kwargs = 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);
  {
    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);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fd)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "send") < 0)) __PYX_ERR(1, 2295, __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 = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("send", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2295, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("libzfs.ZFSDataset.send", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_10ZFSDataset_12send(((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_v_self), __pyx_v_fd, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_6libzfs_10ZFSDataset_12send(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self, PyObject *__pyx_v_fd, PyObject *__pyx_v_kwargs) {
  int __pyx_v_cfd;
  int __pyx_v_err;
  char *__pyx_v_ctoname;
  char *__pyx_v_cfromname;
  sendflags_t __pyx_v_cflags;
  PyObject *__pyx_v_toname = NULL;
  PyObject *__pyx_v_fromname = NULL;
  PyObject *__pyx_v_flags = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  char *__pyx_t_5;
  __Pyx_RefNannySetupContext("send", 0);

  /* "libzfs.pyx":2296
 * 
 *     def send(self, fd, **kwargs):
 *         cdef int cfd = fd             # <<<<<<<<<<<<<<
 *         cdef int err
 *         cdef char *ctoname
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_fd); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2296, __pyx_L1_error)
  __pyx_v_cfd = __pyx_t_1;

  /* "libzfs.pyx":2299
 *         cdef int err
 *         cdef char *ctoname
 *         cdef char *cfromname = NULL             # <<<<<<<<<<<<<<
 *         cdef libzfs.sendflags_t cflags
 * 
 */
  __pyx_v_cfromname = NULL;

  /* "libzfs.pyx":2302
 *         cdef libzfs.sendflags_t cflags
 * 
 *         toname = kwargs.get('toname')             # <<<<<<<<<<<<<<
 *         fromname = kwargs.get('fromname')
 *         flags = kwargs.get('flags')
 */
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwargs, __pyx_n_s_toname, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_toname = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "libzfs.pyx":2303
 * 
 *         toname = kwargs.get('toname')
 *         fromname = kwargs.get('fromname')             # <<<<<<<<<<<<<<
 *         flags = kwargs.get('flags')
 *         memset(&cflags, 0, cython.sizeof(libzfs.sendflags_t))
 */
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwargs, __pyx_n_s_fromname, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_fromname = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "libzfs.pyx":2304
 *         toname = kwargs.get('toname')
 *         fromname = kwargs.get('fromname')
 *         flags = kwargs.get('flags')             # <<<<<<<<<<<<<<
 *         memset(&cflags, 0, cython.sizeof(libzfs.sendflags_t))
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwargs, __pyx_n_s_flags, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_flags = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "libzfs.pyx":2305
 *         fromname = kwargs.get('fromname')
 *         flags = kwargs.get('flags')
 *         memset(&cflags, 0, cython.sizeof(libzfs.sendflags_t))             # <<<<<<<<<<<<<<
 * 
 *         if not toname:
 */
  memset((&__pyx_v_cflags), 0, (sizeof(sendflags_t)));

  /* "libzfs.pyx":2307
 *         memset(&cflags, 0, cython.sizeof(libzfs.sendflags_t))
 * 
 *         if not toname:             # <<<<<<<<<<<<<<
 *             raise ValueError('toname argument is required')
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_toname); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 2307, __pyx_L1_error)
  __pyx_t_4 = ((!__pyx_t_3) != 0);
  if (__pyx_t_4) {

    /* "libzfs.pyx":2308
 * 
 *         if not toname:
 *             raise ValueError('toname argument is required')             # <<<<<<<<<<<<<<
 * 
 *         ctoname = toname
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2308, __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(1, 2308, __pyx_L1_error)

    /* "libzfs.pyx":2307
 *         memset(&cflags, 0, cython.sizeof(libzfs.sendflags_t))
 * 
 *         if not toname:             # <<<<<<<<<<<<<<
 *             raise ValueError('toname argument is required')
 * 
 */
  }

  /* "libzfs.pyx":2310
 *             raise ValueError('toname argument is required')
 * 
 *         ctoname = toname             # <<<<<<<<<<<<<<
 * 
 *         if fromname:
 */
  __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_toname); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 2310, __pyx_L1_error)
  __pyx_v_ctoname = __pyx_t_5;

  /* "libzfs.pyx":2312
 *         ctoname = toname
 * 
 *         if fromname:             # <<<<<<<<<<<<<<
 *             cfromname = fromname
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_fromname); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 2312, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "libzfs.pyx":2313
 * 
 *         if fromname:
 *             cfromname = fromname             # <<<<<<<<<<<<<<
 * 
 *         if flags:
 */
    __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_fromname); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 2313, __pyx_L1_error)
    __pyx_v_cfromname = __pyx_t_5;

    /* "libzfs.pyx":2312
 *         ctoname = toname
 * 
 *         if fromname:             # <<<<<<<<<<<<<<
 *             cfromname = fromname
 * 
 */
  }

  /* "libzfs.pyx":2315
 *             cfromname = fromname
 * 
 *         if flags:             # <<<<<<<<<<<<<<
 *             convert_sendflags(flags, &cflags)
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_flags); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 2315, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "libzfs.pyx":2316
 * 
 *         if flags:
 *             convert_sendflags(flags, &cflags)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */
    __pyx_t_2 = __pyx_f_6libzfs_convert_sendflags(__pyx_v_flags, (&__pyx_v_cflags)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "libzfs.pyx":2315
 *             cfromname = fromname
 * 
 *         if flags:             # <<<<<<<<<<<<<<
 *             convert_sendflags(flags, &cflags)
 * 
 */
  }

  /* "libzfs.pyx":2318
 *             convert_sendflags(flags, &cflags)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             err = libzfs.zfs_send(self.handle, cfromname, ctoname, &cflags, cfd, NULL, NULL, NULL)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":2319
 * 
 *         with nogil:
 *             err = libzfs.zfs_send(self.handle, cfromname, ctoname, &cflags, cfd, NULL, NULL, NULL)             # <<<<<<<<<<<<<<
 * 
 *         if err != 0:
 */
        __pyx_v_err = zfs_send(__pyx_v_self->__pyx_base.handle, __pyx_v_cfromname, __pyx_v_ctoname, (&__pyx_v_cflags), __pyx_v_cfd, NULL, NULL, NULL);
      }

      /* "libzfs.pyx":2318
 *             convert_sendflags(flags, &cflags)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             err = libzfs.zfs_send(self.handle, cfromname, ctoname, &cflags, cfd, NULL, NULL, NULL)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L8;
        }
        __pyx_L8:;
      }
  }

  /* "libzfs.pyx":2321
 *             err = libzfs.zfs_send(self.handle, cfromname, ctoname, &cflags, cfd, NULL, NULL, NULL)
 * 
 *         if err != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_4 = ((__pyx_v_err != 0) != 0);
  if (__pyx_t_4) {

    /* "libzfs.pyx":2322
 * 
 *         if err != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *     def get_send_progress(self, fd):
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->__pyx_base.root->__pyx_vtab)->get_error(__pyx_v_self->__pyx_base.root); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2322, __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(1, 2322, __pyx_L1_error)

    /* "libzfs.pyx":2321
 *             err = libzfs.zfs_send(self.handle, cfromname, ctoname, &cflags, cfd, NULL, NULL, NULL)
 * 
 *         if err != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":2295
 *             i.umount_recursive(force)
 * 
 *     def send(self, fd, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef int cfd = fd
 *         cdef int err
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("libzfs.ZFSDataset.send", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_toname);
  __Pyx_XDECREF(__pyx_v_fromname);
  __Pyx_XDECREF(__pyx_v_flags);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2324
 *             raise self.root.get_error()
 * 
 *     def get_send_progress(self, fd):             # <<<<<<<<<<<<<<
 *         cdef zfs.zfs_cmd_t cmd
 *         cdef int ret
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_15get_send_progress(PyObject *__pyx_v_self, PyObject *__pyx_v_fd); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_15get_send_progress(PyObject *__pyx_v_self, PyObject *__pyx_v_fd) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_send_progress (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZFSDataset_14get_send_progress(((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_v_self), ((PyObject *)__pyx_v_fd));

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

static PyObject *__pyx_pf_6libzfs_10ZFSDataset_14get_send_progress(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self, PyObject *__pyx_v_fd) {
  zfs_cmd_t __pyx_v_cmd;
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  uint64_t __pyx_t_3;
  char const *__pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("get_send_progress", 0);

  /* "libzfs.pyx":2328
 *         cdef int ret
 * 
 *         memset(&cmd, 0, cython.sizeof(libzfs.zfs_cmd))             # <<<<<<<<<<<<<<
 * 
 *         cmd.zc_cookie = fd
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_libzfs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zfs_cmd); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  memset((&__pyx_v_cmd), 0, (sizeof(__pyx_t_2)));
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":2330
 *         memset(&cmd, 0, cython.sizeof(libzfs.zfs_cmd))
 * 
 *         cmd.zc_cookie = fd             # <<<<<<<<<<<<<<
 *         strncpy(cmd.zc_name, self.name, zfs.MAXPATHLEN)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_v_fd); if (unlikely((__pyx_t_3 == (uint64_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 2330, __pyx_L1_error)
  __pyx_v_cmd.zc_cookie = __pyx_t_3;

  /* "libzfs.pyx":2331
 * 
 *         cmd.zc_cookie = fd
 *         strncpy(cmd.zc_name, self.name, zfs.MAXPATHLEN)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_t_2); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 2331, __pyx_L1_error)
  strncpy(__pyx_v_cmd.zc_name, __pyx_t_4, MAXPATHLEN);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":2333
 *         strncpy(cmd.zc_name, self.name, zfs.MAXPATHLEN)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_ioctl(self.root.handle, zfs.ZFS_IOC_SEND_PROGRESS, &cmd)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":2334
 * 
 *         with nogil:
 *             ret = libzfs.zfs_ioctl(self.root.handle, zfs.ZFS_IOC_SEND_PROGRESS, &cmd)             # <<<<<<<<<<<<<<
 * 
 *         if ret != 0:
 */
        __pyx_v_ret = zfs_ioctl(__pyx_v_self->__pyx_base.root->handle, ZFS_IOC_SEND_PROGRESS, (&__pyx_v_cmd));
      }

      /* "libzfs.pyx":2333
 *         strncpy(cmd.zc_name, self.name, zfs.MAXPATHLEN)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_ioctl(self.root.handle, zfs.ZFS_IOC_SEND_PROGRESS, &cmd)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":2336
 *             ret = libzfs.zfs_ioctl(self.root.handle, zfs.ZFS_IOC_SEND_PROGRESS, &cmd)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.FAULT, "Cannot obtain send progress")
 * 
 */
  __pyx_t_5 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_5) {

    /* "libzfs.pyx":2337
 * 
 *         if ret != 0:
 *             raise ZFSException(Error.FAULT, "Cannot obtain send progress")             # <<<<<<<<<<<<<<
 * 
 *         return cmd.zc_cookie
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZFSException); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2337, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2337, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_FAULT); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2337, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_8 = 1;
      }
    }
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2337, __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_7);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_7);
    __Pyx_INCREF(__pyx_kp_s_Cannot_obtain_send_progress);
    __Pyx_GIVEREF(__pyx_kp_s_Cannot_obtain_send_progress);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_kp_s_Cannot_obtain_send_progress);
    __pyx_t_7 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2337, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __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(1, 2337, __pyx_L1_error)

    /* "libzfs.pyx":2336
 *             ret = libzfs.zfs_ioctl(self.root.handle, zfs.ZFS_IOC_SEND_PROGRESS, &cmd)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise ZFSException(Error.FAULT, "Cannot obtain send progress")
 * 
 */
  }

  /* "libzfs.pyx":2339
 *             raise ZFSException(Error.FAULT, "Cannot obtain send progress")
 * 
 *         return cmd.zc_cookie             # <<<<<<<<<<<<<<
 * 
 *     def promote(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_cmd.zc_cookie); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":2324
 *             raise self.root.get_error()
 * 
 *     def get_send_progress(self, fd):             # <<<<<<<<<<<<<<
 *         cdef zfs.zfs_cmd_t cmd
 *         cdef int ret
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("libzfs.ZFSDataset.get_send_progress", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2341
 *         return cmd.zc_cookie
 * 
 *     def promote(self):             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_17promote(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_17promote(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("promote (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZFSDataset_16promote(((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_10ZFSDataset_16promote(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self) {
  int __pyx_v_ret;
  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;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("promote", 0);

  /* "libzfs.pyx":2344
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_promote(self.handle)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":2345
 * 
 *         with nogil:
 *             ret = libzfs.zfs_promote(self.handle)             # <<<<<<<<<<<<<<
 * 
 *         if ret != 0:
 */
        __pyx_v_ret = zfs_promote(__pyx_v_self->__pyx_base.handle);
      }

      /* "libzfs.pyx":2344
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_promote(self.handle)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":2347
 *             ret = libzfs.zfs_promote(self.handle)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":2348
 * 
 *         if ret != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *         self.root.write_history('zfs promote', self.name)
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->__pyx_base.root->__pyx_vtab)->get_error(__pyx_v_self->__pyx_base.root); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2348, __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(1, 2348, __pyx_L1_error)

    /* "libzfs.pyx":2347
 *             ret = libzfs.zfs_promote(self.handle)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":2350
 *             raise self.root.get_error()
 * 
 *         self.root.write_history('zfs promote', self.name)             # <<<<<<<<<<<<<<
 * 
 *     def snapshot(self, name, fsopts=None, recursive=False):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2350, __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_kp_s_zfs_promote);
  __Pyx_GIVEREF(__pyx_kp_s_zfs_promote);
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_zfs_promote);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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;

  /* "libzfs.pyx":2341
 *         return cmd.zc_cookie
 * 
 *     def promote(self):             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("libzfs.ZFSDataset.promote", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2352
 *         self.root.write_history('zfs promote', self.name)
 * 
 *     def snapshot(self, name, fsopts=None, recursive=False):             # <<<<<<<<<<<<<<
 *         cdef NVList cfsopts = NVList(otherdict=fsopts or {})
 *         cdef const char *c_name = name
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_19snapshot(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_19snapshot(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_fsopts = 0;
  PyObject *__pyx_v_recursive = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("snapshot (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_2,&__pyx_n_s_fsopts,&__pyx_n_s_recursive,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((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  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fsopts);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_recursive);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "snapshot") < 0)) __PYX_ERR(1, 2352, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_name = values[0];
    __pyx_v_fsopts = values[1];
    __pyx_v_recursive = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("snapshot", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2352, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSDataset.snapshot", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_10ZFSDataset_18snapshot(((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_v_self), __pyx_v_name, __pyx_v_fsopts, __pyx_v_recursive);

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

static PyObject *__pyx_pf_6libzfs_10ZFSDataset_18snapshot(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_fsopts, PyObject *__pyx_v_recursive) {
  struct __pyx_obj_6libzfs_NVList *__pyx_v_cfsopts = 0;
  char const *__pyx_v_c_name;
  int __pyx_v_c_recursive;
  int __pyx_v_ret;
  PyObject *__pyx_v_hfsopts = 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;
  char const *__pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("snapshot", 0);

  /* "libzfs.pyx":2353
 * 
 *     def snapshot(self, name, fsopts=None, recursive=False):
 *         cdef NVList cfsopts = NVList(otherdict=fsopts or {})             # <<<<<<<<<<<<<<
 *         cdef const char *c_name = name
 *         cdef int c_recursive = recursive
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_fsopts); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 2353, __pyx_L1_error)
  if (!__pyx_t_3) {
  } else {
    __Pyx_INCREF(__pyx_v_fsopts);
    __pyx_t_2 = __pyx_v_fsopts;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_2 = __pyx_t_4;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_L3_bool_binop_done:;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_otherdict, __pyx_t_2) < 0) __PYX_ERR(1, 2353, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_NVList), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cfsopts = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "libzfs.pyx":2354
 *     def snapshot(self, name, fsopts=None, recursive=False):
 *         cdef NVList cfsopts = NVList(otherdict=fsopts or {})
 *         cdef const char *c_name = name             # <<<<<<<<<<<<<<
 *         cdef int c_recursive = recursive
 *         cdef int ret
 */
  __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 2354, __pyx_L1_error)
  __pyx_v_c_name = __pyx_t_5;

  /* "libzfs.pyx":2355
 *         cdef NVList cfsopts = NVList(otherdict=fsopts or {})
 *         cdef const char *c_name = name
 *         cdef int c_recursive = recursive             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_recursive); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2355, __pyx_L1_error)
  __pyx_v_c_recursive = __pyx_t_6;

  /* "libzfs.pyx":2358
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_snapshot(
 *                 self.root.handle,
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":2359
 * 
 *         with nogil:
 *             ret = libzfs.zfs_snapshot(             # <<<<<<<<<<<<<<
 *                 self.root.handle,
 *                 c_name,
 */
        __pyx_v_ret = zfs_snapshot(__pyx_v_self->__pyx_base.root->handle, __pyx_v_c_name, __pyx_v_c_recursive, __pyx_v_cfsopts->handle);
      }

      /* "libzfs.pyx":2358
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_snapshot(
 *                 self.root.handle,
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L7;
        }
        __pyx_L7:;
      }
  }

  /* "libzfs.pyx":2366
 *             )
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_3 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_3) {

    /* "libzfs.pyx":2367
 * 
 *         if ret != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *         if self.root.history:
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->__pyx_base.root->__pyx_vtab)->get_error(__pyx_v_self->__pyx_base.root); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2367, __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(1, 2367, __pyx_L1_error)

    /* "libzfs.pyx":2366
 *             )
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":2369
 *             raise self.root.get_error()
 * 
 *         if self.root.history:             # <<<<<<<<<<<<<<
 *             hfsopts = self.root.generate_history_opts(fsopts, '-o')
 *             self.root.write_history('zfs snapshot', '-r' if recursive else '', hfsopts, name)
 */
  __pyx_t_3 = (__pyx_v_self->__pyx_base.root->history != 0);
  if (__pyx_t_3) {

    /* "libzfs.pyx":2370
 * 
 *         if self.root.history:
 *             hfsopts = self.root.generate_history_opts(fsopts, '-o')             # <<<<<<<<<<<<<<
 *             self.root.write_history('zfs snapshot', '-r' if recursive else '', hfsopts, name)
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.root), __pyx_n_s_generate_history_opts); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_7 = 1;
      }
    }
    __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_v_fsopts);
    __Pyx_GIVEREF(__pyx_v_fsopts);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_fsopts);
    __Pyx_INCREF(__pyx_kp_s_o);
    __Pyx_GIVEREF(__pyx_kp_s_o);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_kp_s_o);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_hfsopts = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "libzfs.pyx":2371
 *         if self.root.history:
 *             hfsopts = self.root.generate_history_opts(fsopts, '-o')
 *             self.root.write_history('zfs snapshot', '-r' if recursive else '', hfsopts, name)             # <<<<<<<<<<<<<<
 * 
 *     def receive(self, fd, force=False, nomount=False, resumable=False, props=None, limitds=None):
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_recursive); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 2371, __pyx_L1_error)
    if (__pyx_t_3) {
      __Pyx_INCREF(__pyx_kp_s_r);
      __pyx_t_8 = __pyx_kp_s_r;
    } else {
      __Pyx_INCREF(__pyx_kp_s__11);
      __pyx_t_8 = __pyx_kp_s__11;
    }
    __pyx_t_4 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_7 = 1;
      }
    }
    __pyx_t_9 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_kp_s_zfs_snapshot);
    __Pyx_GIVEREF(__pyx_kp_s_zfs_snapshot);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_7, __pyx_kp_s_zfs_snapshot);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, __pyx_t_8);
    __Pyx_INCREF(__pyx_v_hfsopts);
    __Pyx_GIVEREF(__pyx_v_hfsopts);
    PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_7, __pyx_v_hfsopts);
    __Pyx_INCREF(__pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_7, __pyx_v_name);
    __pyx_t_8 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "libzfs.pyx":2369
 *             raise self.root.get_error()
 * 
 *         if self.root.history:             # <<<<<<<<<<<<<<
 *             hfsopts = self.root.generate_history_opts(fsopts, '-o')
 *             self.root.write_history('zfs snapshot', '-r' if recursive else '', hfsopts, name)
 */
  }

  /* "libzfs.pyx":2352
 *         self.root.write_history('zfs promote', self.name)
 * 
 *     def snapshot(self, name, fsopts=None, recursive=False):             # <<<<<<<<<<<<<<
 *         cdef NVList cfsopts = NVList(otherdict=fsopts or {})
 *         cdef const char *c_name = name
 */

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("libzfs.ZFSDataset.snapshot", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_cfsopts);
  __Pyx_XDECREF(__pyx_v_hfsopts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2373
 *             self.root.write_history('zfs snapshot', '-r' if recursive else '', hfsopts, name)
 * 
 *     def receive(self, fd, force=False, nomount=False, resumable=False, props=None, limitds=None):             # <<<<<<<<<<<<<<
 *         self.root.receive(
 *             self.name,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_21receive(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_21receive(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fd = 0;
  PyObject *__pyx_v_force = 0;
  PyObject *__pyx_v_nomount = 0;
  PyObject *__pyx_v_resumable = 0;
  PyObject *__pyx_v_props = 0;
  PyObject *__pyx_v_limitds = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("receive (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fd,&__pyx_n_s_force,&__pyx_n_s_nomount,&__pyx_n_s_resumable,&__pyx_n_s_props,&__pyx_n_s_limitds,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    values[1] = ((PyObject *)Py_False);
    values[2] = ((PyObject *)Py_False);
    values[3] = ((PyObject *)Py_False);
    values[4] = ((PyObject *)Py_None);
    values[5] = ((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);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fd)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_force);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nomount);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_resumable);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_props);
          if (value) { values[4] = value; kw_args--; }
        }
        case  5:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limitds);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "receive") < 0)) __PYX_ERR(1, 2373, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_fd = values[0];
    __pyx_v_force = values[1];
    __pyx_v_nomount = values[2];
    __pyx_v_resumable = values[3];
    __pyx_v_props = values[4];
    __pyx_v_limitds = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("receive", 0, 1, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2373, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSDataset.receive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_10ZFSDataset_20receive(((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_v_self), __pyx_v_fd, __pyx_v_force, __pyx_v_nomount, __pyx_v_resumable, __pyx_v_props, __pyx_v_limitds);

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

static PyObject *__pyx_pf_6libzfs_10ZFSDataset_20receive(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self, PyObject *__pyx_v_fd, PyObject *__pyx_v_force, PyObject *__pyx_v_nomount, PyObject *__pyx_v_resumable, PyObject *__pyx_v_props, PyObject *__pyx_v_limitds) {
  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_RefNannySetupContext("receive", 0);

  /* "libzfs.pyx":2374
 * 
 *     def receive(self, fd, force=False, nomount=False, resumable=False, props=None, limitds=None):
 *         self.root.receive(             # <<<<<<<<<<<<<<
 *             self.name,
 *             fd,
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.root), __pyx_n_s_receive); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "libzfs.pyx":2375
 *     def receive(self, fd, force=False, nomount=False, resumable=False, props=None, limitds=None):
 *         self.root.receive(
 *             self.name,             # <<<<<<<<<<<<<<
 *             fd,
 *             force=force,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "libzfs.pyx":2374
 * 
 *     def receive(self, fd, force=False, nomount=False, resumable=False, props=None, limitds=None):
 *         self.root.receive(             # <<<<<<<<<<<<<<
 *             self.name,
 *             fd,
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_fd);
  __Pyx_GIVEREF(__pyx_v_fd);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_fd);
  __pyx_t_2 = 0;

  /* "libzfs.pyx":2377
 *             self.name,
 *             fd,
 *             force=force,             # <<<<<<<<<<<<<<
 *             nomount=nomount,
 *             resumable=resumable,
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_force, __pyx_v_force) < 0) __PYX_ERR(1, 2377, __pyx_L1_error)

  /* "libzfs.pyx":2378
 *             fd,
 *             force=force,
 *             nomount=nomount,             # <<<<<<<<<<<<<<
 *             resumable=resumable,
 *             props=props,
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_nomount, __pyx_v_nomount) < 0) __PYX_ERR(1, 2377, __pyx_L1_error)

  /* "libzfs.pyx":2379
 *             force=force,
 *             nomount=nomount,
 *             resumable=resumable,             # <<<<<<<<<<<<<<
 *             props=props,
 *             limitds=limitds
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_resumable, __pyx_v_resumable) < 0) __PYX_ERR(1, 2377, __pyx_L1_error)

  /* "libzfs.pyx":2380
 *             nomount=nomount,
 *             resumable=resumable,
 *             props=props,             # <<<<<<<<<<<<<<
 *             limitds=limitds
 *         )
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_props, __pyx_v_props) < 0) __PYX_ERR(1, 2377, __pyx_L1_error)

  /* "libzfs.pyx":2382
 *             props=props,
 *             limitds=limitds
 *         )             # <<<<<<<<<<<<<<
 * 
 *     def diff(self, fromsnap, tosnap):
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_limitds, __pyx_v_limitds) < 0) __PYX_ERR(1, 2377, __pyx_L1_error)

  /* "libzfs.pyx":2374
 * 
 *     def receive(self, fd, force=False, nomount=False, resumable=False, props=None, limitds=None):
 *         self.root.receive(             # <<<<<<<<<<<<<<
 *             self.name,
 *             fd,
 */
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "libzfs.pyx":2373
 *             self.root.write_history('zfs snapshot', '-r' if recursive else '', hfsopts, name)
 * 
 *     def receive(self, fd, force=False, nomount=False, resumable=False, props=None, limitds=None):             # <<<<<<<<<<<<<<
 *         self.root.receive(
 *             self.name,
 */

  /* 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("libzfs.ZFSDataset.receive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6libzfs_10ZFSDataset_24generator19(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "libzfs.pyx":2384
 *         )
 * 
 *     def diff(self, fromsnap, tosnap):             # <<<<<<<<<<<<<<
 *         cdef char *c_fromsnap = fromsnap
 *         cdef char *c_tosnap = tosnap
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_23diff(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_23diff(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fromsnap = 0;
  PyObject *__pyx_v_tosnap = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("diff (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fromsnap,&__pyx_n_s_tosnap,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fromsnap)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tosnap)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("diff", 1, 2, 2, 1); __PYX_ERR(1, 2384, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "diff") < 0)) __PYX_ERR(1, 2384, __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_fromsnap = values[0];
    __pyx_v_tosnap = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("diff", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2384, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSDataset.diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_10ZFSDataset_22diff(((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_v_self), __pyx_v_fromsnap, __pyx_v_tosnap);

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

static PyObject *__pyx_pf_6libzfs_10ZFSDataset_22diff(struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_self, PyObject *__pyx_v_fromsnap, PyObject *__pyx_v_tosnap) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_21_diff *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("diff", 0);
  __pyx_cur_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_21_diff *)__pyx_tp_new_6libzfs___pyx_scope_struct_21_diff(__pyx_ptype_6libzfs___pyx_scope_struct_21_diff, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __pyx_cur_scope->__pyx_v_fromsnap = __pyx_v_fromsnap;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fromsnap);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fromsnap);
  __pyx_cur_scope->__pyx_v_tosnap = __pyx_v_tosnap;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_tosnap);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_tosnap);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6libzfs_10ZFSDataset_24generator19, (PyObject *) __pyx_cur_scope, __pyx_n_s_diff, __pyx_n_s_ZFSDataset_diff); if (unlikely(!gen)) __PYX_ERR(1, 2384, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

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

/* "libzfs.pyx":2390
 *         ret = None
 * 
 *         def worker(fd):             # <<<<<<<<<<<<<<
 *             cdef int c_fd = fd
 *             cdef int c_ret
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_4diff_1worker(PyObject *__pyx_self, PyObject *__pyx_v_fd); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_10ZFSDataset_4diff_1worker = {"worker", (PyCFunction)__pyx_pw_6libzfs_10ZFSDataset_4diff_1worker, METH_O, 0};
static PyObject *__pyx_pw_6libzfs_10ZFSDataset_4diff_1worker(PyObject *__pyx_self, PyObject *__pyx_v_fd) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("worker (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_10ZFSDataset_4diff_worker(__pyx_self, ((PyObject *)__pyx_v_fd));

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

static PyObject *__pyx_pf_6libzfs_10ZFSDataset_4diff_worker(PyObject *__pyx_self, PyObject *__pyx_v_fd) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_21_diff *__pyx_cur_scope;
  struct __pyx_obj_6libzfs___pyx_scope_struct_21_diff *__pyx_outer_scope;
  int __pyx_v_c_fd;
  int __pyx_v_c_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("worker", 0);
  __pyx_outer_scope = (struct __pyx_obj_6libzfs___pyx_scope_struct_21_diff *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "libzfs.pyx":2391
 * 
 *         def worker(fd):
 *             cdef int c_fd = fd             # <<<<<<<<<<<<<<
 *             cdef int c_ret
 *             nonlocal ret
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_fd); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2391, __pyx_L1_error)
  __pyx_v_c_fd = __pyx_t_1;

  /* "libzfs.pyx":2395
 *             nonlocal ret
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_ret = libzfs.zfs_show_diffs(self.handle, c_fd, c_fromsnap, c_tosnap, c_flags)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":2396
 * 
 *             with nogil:
 *                 c_ret = libzfs.zfs_show_diffs(self.handle, c_fd, c_fromsnap, c_tosnap, c_flags)             # <<<<<<<<<<<<<<
 * 
 *             ret = c_ret
 */
        if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(1, 2396, __pyx_L4_error) }
        __pyx_v_c_ret = zfs_show_diffs(__pyx_cur_scope->__pyx_v_self->__pyx_base.handle, __pyx_v_c_fd, __pyx_cur_scope->__pyx_v_c_fromsnap, __pyx_cur_scope->__pyx_v_c_tosnap, __pyx_cur_scope->__pyx_v_c_flags);
      }

      /* "libzfs.pyx":2395
 *             nonlocal ret
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_ret = libzfs.zfs_show_diffs(self.handle, c_fd, c_fromsnap, c_tosnap, c_flags)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L4_error: {
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L1_error;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":2398
 *                 c_ret = libzfs.zfs_show_diffs(self.handle, c_fd, c_fromsnap, c_tosnap, c_flags)
 * 
 *             ret = c_ret             # <<<<<<<<<<<<<<
 * 
 *         rfd, wfd = os.pipe()
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_c_ret); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_ret);
  __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_ret, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "libzfs.pyx":2390
 *         ret = None
 * 
 *         def worker(fd):             # <<<<<<<<<<<<<<
 *             cdef int c_fd = fd
 *             cdef int c_ret
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("libzfs.ZFSDataset.diff.worker", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2384
 *         )
 * 
 *     def diff(self, fromsnap, tosnap):             # <<<<<<<<<<<<<<
 *         cdef char *c_fromsnap = fromsnap
 *         cdef char *c_tosnap = tosnap
 */

static PyObject *__pyx_gb_6libzfs_10ZFSDataset_24generator19(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6libzfs___pyx_scope_struct_21_diff *__pyx_cur_scope = ((struct __pyx_obj_6libzfs___pyx_scope_struct_21_diff *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  char *__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)(PyObject *);
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *(*__pyx_t_12)(PyObject *);
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_t_15;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L20_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(1, 2384, __pyx_L1_error)

  /* "libzfs.pyx":2385
 * 
 *     def diff(self, fromsnap, tosnap):
 *         cdef char *c_fromsnap = fromsnap             # <<<<<<<<<<<<<<
 *         cdef char *c_tosnap = tosnap
 *         cdef int c_flags = libzfs.ZFS_DIFF_PARSEABLE | libzfs.ZFS_DIFF_TIMESTAMP | libzfs.ZFS_DIFF_CLASSIFY
 */
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_cur_scope->__pyx_v_fromsnap); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(1, 2385, __pyx_L1_error)
  __pyx_cur_scope->__pyx_v_c_fromsnap = __pyx_t_1;

  /* "libzfs.pyx":2386
 *     def diff(self, fromsnap, tosnap):
 *         cdef char *c_fromsnap = fromsnap
 *         cdef char *c_tosnap = tosnap             # <<<<<<<<<<<<<<
 *         cdef int c_flags = libzfs.ZFS_DIFF_PARSEABLE | libzfs.ZFS_DIFF_TIMESTAMP | libzfs.ZFS_DIFF_CLASSIFY
 *         ret = None
 */
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_cur_scope->__pyx_v_tosnap); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(1, 2386, __pyx_L1_error)
  __pyx_cur_scope->__pyx_v_c_tosnap = __pyx_t_1;

  /* "libzfs.pyx":2387
 *         cdef char *c_fromsnap = fromsnap
 *         cdef char *c_tosnap = tosnap
 *         cdef int c_flags = libzfs.ZFS_DIFF_PARSEABLE | libzfs.ZFS_DIFF_TIMESTAMP | libzfs.ZFS_DIFF_CLASSIFY             # <<<<<<<<<<<<<<
 *         ret = None
 * 
 */
  __pyx_cur_scope->__pyx_v_c_flags = ((ZFS_DIFF_PARSEABLE | ZFS_DIFF_TIMESTAMP) | ZFS_DIFF_CLASSIFY);

  /* "libzfs.pyx":2388
 *         cdef char *c_tosnap = tosnap
 *         cdef int c_flags = libzfs.ZFS_DIFF_PARSEABLE | libzfs.ZFS_DIFF_TIMESTAMP | libzfs.ZFS_DIFF_CLASSIFY
 *         ret = None             # <<<<<<<<<<<<<<
 * 
 *         def worker(fd):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __pyx_cur_scope->__pyx_v_ret = Py_None;

  /* "libzfs.pyx":2390
 *         ret = None
 * 
 *         def worker(fd):             # <<<<<<<<<<<<<<
 *             cdef int c_fd = fd
 *             cdef int c_ret
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6libzfs_10ZFSDataset_4diff_1worker, 0, __pyx_n_s_diff_locals_worker, ((PyObject*)__pyx_cur_scope), __pyx_n_s_libzfs, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_worker = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "libzfs.pyx":2400
 *             ret = c_ret
 * 
 *         rfd, wfd = os.pipe()             # <<<<<<<<<<<<<<
 *         thr = threading.Thread(target=worker, args=(wfd,), daemon=True)
 *         thr.start()
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_pipe); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2400, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2400, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    #if CYTHON_COMPILING_IN_CPYTHON
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(1, 2400, __pyx_L1_error)
    }
    #if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #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(1, 2400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
    index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(1, 2400, __pyx_L1_error)
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(1, 2400, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_cur_scope->__pyx_v_rfd = __pyx_t_4;
  __pyx_t_4 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_cur_scope->__pyx_v_wfd = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "libzfs.pyx":2401
 * 
 *         rfd, wfd = os.pipe()
 *         thr = threading.Thread(target=worker, args=(wfd,), daemon=True)             # <<<<<<<<<<<<<<
 *         thr.start()
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_threading); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Thread); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_target, __pyx_cur_scope->__pyx_v_worker) < 0) __PYX_ERR(1, 2401, __pyx_L1_error)
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_wfd);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_wfd);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_cur_scope->__pyx_v_wfd);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_args, __pyx_t_4) < 0) __PYX_ERR(1, 2401, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_daemon, Py_True) < 0) __PYX_ERR(1, 2401, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2401, __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;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_cur_scope->__pyx_v_thr = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "libzfs.pyx":2402
 *         rfd, wfd = os.pipe()
 *         thr = threading.Thread(target=worker, args=(wfd,), daemon=True)
 *         thr.start()             # <<<<<<<<<<<<<<
 * 
 *         with os.fdopen(rfd, 'r') as f:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_thr, __pyx_n_s_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2402, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2402, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "libzfs.pyx":2404
 *         thr.start()
 * 
 *         with os.fdopen(rfd, 'r') as f:             # <<<<<<<<<<<<<<
 *             for line in f:
 *                 yield DiffRecord(raw=line)
 */
  /*with:*/ {
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2404, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_fdopen); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2404, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && 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;
      }
    }
    __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2404, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_rfd);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_rfd);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_cur_scope->__pyx_v_rfd);
    __Pyx_INCREF(__pyx_n_s_r_2);
    __Pyx_GIVEREF(__pyx_n_s_r_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_n_s_r_2);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2404, __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;
    __pyx_t_8 = __Pyx_PyObject_LookupSpecial(__pyx_t_4, __pyx_n_s_exit); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2404, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_4, __pyx_n_s_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2404, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(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);
      }
    }
    if (__pyx_t_2) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2404, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2404, __pyx_L6_error)
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __pyx_t_3;
    __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    /*try:*/ {
      {
        __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:*/ {
          __Pyx_GIVEREF(__pyx_t_5);
          __pyx_cur_scope->__pyx_v_f = __pyx_t_5;
          __pyx_t_5 = 0;

          /* "libzfs.pyx":2405
 * 
 *         with os.fdopen(rfd, 'r') as f:
 *             for line in f:             # <<<<<<<<<<<<<<
 *                 yield DiffRecord(raw=line)
 * 
 */
          if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_f)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_f)) {
            __pyx_t_5 = __pyx_cur_scope->__pyx_v_f; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0;
            __pyx_t_12 = NULL;
          } else {
            __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_f); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2405, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 2405, __pyx_L10_error)
          }
          for (;;) {
            if (likely(!__pyx_t_12)) {
              if (likely(PyList_CheckExact(__pyx_t_5))) {
                if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break;
                #if CYTHON_COMPILING_IN_CPYTHON
                __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 2405, __pyx_L10_error)
                #else
                __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2405, __pyx_L10_error)
                __Pyx_GOTREF(__pyx_t_4);
                #endif
              } else {
                if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
                #if CYTHON_COMPILING_IN_CPYTHON
                __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 2405, __pyx_L10_error)
                #else
                __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2405, __pyx_L10_error)
                __Pyx_GOTREF(__pyx_t_4);
                #endif
              }
            } else {
              __pyx_t_4 = __pyx_t_12(__pyx_t_5);
              if (unlikely(!__pyx_t_4)) {
                PyObject* exc_type = PyErr_Occurred();
                if (exc_type) {
                  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                  else __PYX_ERR(1, 2405, __pyx_L10_error)
                }
                break;
              }
              __Pyx_GOTREF(__pyx_t_4);
            }
            __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_line);
            __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_line, __pyx_t_4);
            __Pyx_GIVEREF(__pyx_t_4);
            __pyx_t_4 = 0;

            /* "libzfs.pyx":2406
 *         with os.fdopen(rfd, 'r') as f:
 *             for line in f:
 *                 yield DiffRecord(raw=line)             # <<<<<<<<<<<<<<
 * 
 *         thr.join()
 */
            __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_DiffRecord); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2406, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2406, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_raw, __pyx_cur_scope->__pyx_v_line) < 0) __PYX_ERR(1, 2406, __pyx_L10_error)
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2406, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_r = __pyx_t_2;
            __pyx_t_2 = 0;
            __Pyx_XGIVEREF(__pyx_t_5);
            __pyx_cur_scope->__pyx_t_0 = __pyx_t_5;
            __pyx_cur_scope->__pyx_t_1 = __pyx_t_7;
            __Pyx_XGIVEREF(__pyx_t_8);
            __pyx_cur_scope->__pyx_t_2 = __pyx_t_8;
            __Pyx_XGIVEREF(__pyx_t_9);
            __pyx_cur_scope->__pyx_t_3 = __pyx_t_9;
            __Pyx_XGIVEREF(__pyx_t_10);
            __pyx_cur_scope->__pyx_t_4 = __pyx_t_10;
            __Pyx_XGIVEREF(__pyx_t_11);
            __pyx_cur_scope->__pyx_t_5 = __pyx_t_11;
            __pyx_cur_scope->__pyx_t_6 = __pyx_t_12;
            __Pyx_XGIVEREF(__pyx_r);
            __Pyx_RefNannyFinishContext();
            /* return from generator, yielding value */
            __pyx_generator->resume_label = 1;
            return __pyx_r;
            __pyx_L20_resume_from_yield:;
            __pyx_t_5 = __pyx_cur_scope->__pyx_t_0;
            __pyx_cur_scope->__pyx_t_0 = 0;
            __Pyx_XGOTREF(__pyx_t_5);
            __pyx_t_7 = __pyx_cur_scope->__pyx_t_1;
            __pyx_t_8 = __pyx_cur_scope->__pyx_t_2;
            __pyx_cur_scope->__pyx_t_2 = 0;
            __Pyx_XGOTREF(__pyx_t_8);
            __pyx_t_9 = __pyx_cur_scope->__pyx_t_3;
            __pyx_cur_scope->__pyx_t_3 = 0;
            __Pyx_XGOTREF(__pyx_t_9);
            __pyx_t_10 = __pyx_cur_scope->__pyx_t_4;
            __pyx_cur_scope->__pyx_t_4 = 0;
            __Pyx_XGOTREF(__pyx_t_10);
            __pyx_t_11 = __pyx_cur_scope->__pyx_t_5;
            __pyx_cur_scope->__pyx_t_5 = 0;
            __Pyx_XGOTREF(__pyx_t_11);
            __pyx_t_12 = __pyx_cur_scope->__pyx_t_6;
            if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2406, __pyx_L10_error)

            /* "libzfs.pyx":2405
 * 
 *         with os.fdopen(rfd, 'r') as f:
 *             for line in f:             # <<<<<<<<<<<<<<
 *                 yield DiffRecord(raw=line)
 * 
 */
          }
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "libzfs.pyx":2404
 *         thr.start()
 * 
 *         with os.fdopen(rfd, 'r') as f:             # <<<<<<<<<<<<<<
 *             for line in f:
 *                 yield DiffRecord(raw=line)
 */
        }
        __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_L17_try_end;
        __pyx_L10_error:;
        __Pyx_PyThreadState_assign
        __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;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("libzfs.ZFSDataset.diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(1, 2404, __pyx_L12_except_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = PyTuple_Pack(3, __pyx_t_5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2404, __pyx_L12_except_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, NULL);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 2404, __pyx_L12_except_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (__pyx_t_14 < 0) __PYX_ERR(1, 2404, __pyx_L12_except_error)
          __pyx_t_15 = ((!(__pyx_t_14 != 0)) != 0);
          if (__pyx_t_15) {
            __Pyx_GIVEREF(__pyx_t_5);
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_XGIVEREF(__pyx_t_3);
            __Pyx_ErrRestoreWithState(__pyx_t_5, __pyx_t_2, __pyx_t_3);
            __pyx_t_5 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; 
            __PYX_ERR(1, 2404, __pyx_L12_except_error)
          }
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          goto __pyx_L11_exception_handled;
        }
        __pyx_L12_except_error:;
        __Pyx_PyThreadState_assign
        __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_L11_exception_handled:;
        __Pyx_PyThreadState_assign
        __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_L17_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_8) {
          __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__58, NULL);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 2404, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        goto __pyx_L9;
      }
      __pyx_L9:;
    }
    goto __pyx_L24;
    __pyx_L6_error:;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    goto __pyx_L1_error;
    __pyx_L24:;
  }

  /* "libzfs.pyx":2408
 *                 yield DiffRecord(raw=line)
 * 
 *         thr.join()             # <<<<<<<<<<<<<<
 * 
 *         if ret != 0:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_thr, __pyx_n_s_join); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_5) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2408, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2408, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "libzfs.pyx":2410
 *         thr.join()
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_ret, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2410, __pyx_L1_error)
  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(1, 2410, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_15) {

    /* "libzfs.pyx":2411
 * 
 *         if ret != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_cur_scope->__pyx_v_self->__pyx_base.root->__pyx_vtab)->get_error(__pyx_cur_scope->__pyx_v_self->__pyx_base.root); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2411, __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(1, 2411, __pyx_L1_error)

    /* "libzfs.pyx":2410
 *         thr.join()
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":2384
 *         )
 * 
 *     def diff(self, fromsnap, tosnap):             # <<<<<<<<<<<<<<
 *         cdef char *c_fromsnap = fromsnap
 *         cdef char *c_tosnap = tosnap
 */

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

/* "libzfs.pyx":2415
 * 
 * cdef class ZFSSnapshot(ZFSObject):
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         ret = super(ZFSSnapshot, self).__getstate__()
 *         ret.update({
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSSnapshot_1__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSSnapshot_1__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_11ZFSSnapshot___getstate__(((struct __pyx_obj_6libzfs_ZFSSnapshot *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_11ZFSSnapshot___getstate__(struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_self) {
  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 = NULL;
  __Pyx_RefNannySetupContext("__getstate__", 0);

  /* "libzfs.pyx":2416
 * cdef class ZFSSnapshot(ZFSObject):
 *     def __getstate__(self):
 *         ret = super(ZFSSnapshot, self).__getstate__()             # <<<<<<<<<<<<<<
 *         ret.update({
 *             'holds': self.holds,
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_6libzfs_ZFSSnapshot));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6libzfs_ZFSSnapshot));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_6libzfs_ZFSSnapshot));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2416, __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_getstate); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2416, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2416, __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;

  /* "libzfs.pyx":2417
 *     def __getstate__(self):
 *         ret = super(ZFSSnapshot, self).__getstate__()
 *         ret.update({             # <<<<<<<<<<<<<<
 *             'holds': self.holds,
 *             'dataset': self.parent.name,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ret, __pyx_n_s_update); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "libzfs.pyx":2418
 *         ret = super(ZFSSnapshot, self).__getstate__()
 *         ret.update({
 *             'holds': self.holds,             # <<<<<<<<<<<<<<
 *             'dataset': self.parent.name,
 *             'snapshot_name': self.snapshot_name
 */
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_holds); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_holds, __pyx_t_4) < 0) __PYX_ERR(1, 2418, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "libzfs.pyx":2419
 *         ret.update({
 *             'holds': self.holds,
 *             'dataset': self.parent.name,             # <<<<<<<<<<<<<<
 *             'snapshot_name': self.snapshot_name
 *         })
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parent); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dataset, __pyx_t_5) < 0) __PYX_ERR(1, 2418, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":2420
 *             'holds': self.holds,
 *             'dataset': self.parent.name,
 *             'snapshot_name': self.snapshot_name             # <<<<<<<<<<<<<<
 *         })
 *         return ret
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_snapshot_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_snapshot_name, __pyx_t_5) < 0) __PYX_ERR(1, 2418, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2417, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2417, __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_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":2422
 *             'snapshot_name': self.snapshot_name
 *         })
 *         return ret             # <<<<<<<<<<<<<<
 * 
 *     def rollback(self, force=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "libzfs.pyx":2415
 * 
 * cdef class ZFSSnapshot(ZFSObject):
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         ret = super(ZFSSnapshot, self).__getstate__()
 *         ret.update({
 */

  /* 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("libzfs.ZFSSnapshot.__getstate__", __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;
}

/* "libzfs.pyx":2424
 *         return ret
 * 
 *     def rollback(self, force=False):             # <<<<<<<<<<<<<<
 *         cdef ZFSDataset parent
 *         cdef int c_force = force
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSSnapshot_3rollback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSSnapshot_3rollback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_force = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rollback (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_force,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);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_force);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rollback") < 0)) __PYX_ERR(1, 2424, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_force = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rollback", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2424, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSSnapshot.rollback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_11ZFSSnapshot_2rollback(((struct __pyx_obj_6libzfs_ZFSSnapshot *)__pyx_v_self), __pyx_v_force);

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

static PyObject *__pyx_pf_6libzfs_11ZFSSnapshot_2rollback(struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_self, PyObject *__pyx_v_force) {
  struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_parent = 0;
  int __pyx_v_c_force;
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("rollback", 0);

  /* "libzfs.pyx":2426
 *     def rollback(self, force=False):
 *         cdef ZFSDataset parent
 *         cdef int c_force = force             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_force); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2426, __pyx_L1_error)
  __pyx_v_c_force = __pyx_t_1;

  /* "libzfs.pyx":2429
 *         cdef int ret
 * 
 *         parent = <ZFSDataset>self.parent             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parent); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_t_2;
  __Pyx_INCREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_parent = ((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "libzfs.pyx":2431
 *         parent = <ZFSDataset>self.parent
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_rollback(parent.handle, self.handle, c_force)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":2432
 * 
 *         with nogil:
 *             ret = libzfs.zfs_rollback(parent.handle, self.handle, c_force)             # <<<<<<<<<<<<<<
 * 
 *         if ret != 0:
 */
        __pyx_v_ret = zfs_rollback(__pyx_v_parent->__pyx_base.handle, __pyx_v_self->__pyx_base.handle, __pyx_v_c_force);
      }

      /* "libzfs.pyx":2431
 *         parent = <ZFSDataset>self.parent
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_rollback(parent.handle, self.handle, c_force)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":2434
 *             ret = libzfs.zfs_rollback(parent.handle, self.handle, c_force)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_4 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_4) {

    /* "libzfs.pyx":2435
 * 
 *         if ret != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *         self.root.write_history('zfs rollback', '-f' if force else '', self.name)
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->__pyx_base.root->__pyx_vtab)->get_error(__pyx_v_self->__pyx_base.root); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2435, __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(1, 2435, __pyx_L1_error)

    /* "libzfs.pyx":2434
 *             ret = libzfs.zfs_rollback(parent.handle, self.handle, c_force)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":2437
 *             raise self.root.get_error()
 * 
 *         self.root.write_history('zfs rollback', '-f' if force else '', self.name)             # <<<<<<<<<<<<<<
 * 
 *     def bookmark(self, name):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_force); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 2437, __pyx_L1_error)
  if (__pyx_t_4) {
    __Pyx_INCREF(__pyx_kp_s_f);
    __pyx_t_5 = __pyx_kp_s_f;
  } else {
    __Pyx_INCREF(__pyx_kp_s__11);
    __pyx_t_5 = __pyx_kp_s__11;
  }
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_8 = 1;
    }
  }
  __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__pyx_t_7) {
    __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
  }
  __Pyx_INCREF(__pyx_kp_s_zfs_rollback);
  __Pyx_GIVEREF(__pyx_kp_s_zfs_rollback);
  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_kp_s_zfs_rollback);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_6);
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "libzfs.pyx":2424
 *         return ret
 * 
 *     def rollback(self, force=False):             # <<<<<<<<<<<<<<
 *         cdef ZFSDataset parent
 *         cdef int c_force = force
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("libzfs.ZFSSnapshot.rollback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_parent);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2439
 *         self.root.write_history('zfs rollback', '-f' if force else '', self.name)
 * 
 *     def bookmark(self, name):             # <<<<<<<<<<<<<<
 *         cdef NVList bookmarks
 *         cdef nvpair.nvlist_t *c_bookmarks
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSSnapshot_5bookmark(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSSnapshot_5bookmark(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bookmark (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_11ZFSSnapshot_4bookmark(((struct __pyx_obj_6libzfs_ZFSSnapshot *)__pyx_v_self), ((PyObject *)__pyx_v_name));

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

static PyObject *__pyx_pf_6libzfs_11ZFSSnapshot_4bookmark(struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_self, PyObject *__pyx_v_name) {
  struct __pyx_obj_6libzfs_NVList *__pyx_v_bookmarks = 0;
  nvlist_t *__pyx_v_c_bookmarks;
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  nvlist_t *__pyx_t_8;
  int __pyx_t_9;
  __Pyx_RefNannySetupContext("bookmark", 0);

  /* "libzfs.pyx":2444
 *         cdef int ret
 * 
 *         bookmarks = NVList()             # <<<<<<<<<<<<<<
 *         bookmarks['{0}#{1}'.format(self.parent.name, name)] = self.name
 *         c_bookmarks = bookmarks.handle
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_NVList), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bookmarks = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":2445
 * 
 *         bookmarks = NVList()
 *         bookmarks['{0}#{1}'.format(self.parent.name, name)] = self.name             # <<<<<<<<<<<<<<
 *         c_bookmarks = bookmarks.handle
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1_2, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parent); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2445, __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_COMPILING_IN_CPYTHON && 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_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2445, __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_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_5);
  __Pyx_INCREF(__pyx_v_name);
  __Pyx_GIVEREF(__pyx_v_name);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_name);
  __pyx_t_5 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_bookmarks), __pyx_t_2, __pyx_t_1) < 0)) __PYX_ERR(1, 2445, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":2446
 *         bookmarks = NVList()
 *         bookmarks['{0}#{1}'.format(self.parent.name, name)] = self.name
 *         c_bookmarks = bookmarks.handle             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */
  __pyx_t_8 = __pyx_v_bookmarks->handle;
  __pyx_v_c_bookmarks = __pyx_t_8;

  /* "libzfs.pyx":2448
 *         c_bookmarks = bookmarks.handle
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.lzc_bookmark(c_bookmarks, NULL)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":2449
 * 
 *         with nogil:
 *             ret = libzfs.lzc_bookmark(c_bookmarks, NULL)             # <<<<<<<<<<<<<<
 * 
 *         if ret != 0:
 */
        __pyx_v_ret = lzc_bookmark(__pyx_v_c_bookmarks, NULL);
      }

      /* "libzfs.pyx":2448
 *         c_bookmarks = bookmarks.handle
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.lzc_bookmark(c_bookmarks, NULL)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":2451
 *             ret = libzfs.lzc_bookmark(c_bookmarks, NULL)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise OSError(ret, os.strerror(ret))
 * 
 */
  __pyx_t_9 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_9) {

    /* "libzfs.pyx":2452
 * 
 *         if ret != 0:
 *             raise OSError(ret, os.strerror(ret))             # <<<<<<<<<<<<<<
 * 
 *     def clone(self, name, opts=None):
 */
    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strerror); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2452, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2452, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2452, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(1, 2452, __pyx_L1_error)

    /* "libzfs.pyx":2451
 *             ret = libzfs.lzc_bookmark(c_bookmarks, NULL)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise OSError(ret, os.strerror(ret))
 * 
 */
  }

  /* "libzfs.pyx":2439
 *         self.root.write_history('zfs rollback', '-f' if force else '', self.name)
 * 
 *     def bookmark(self, name):             # <<<<<<<<<<<<<<
 *         cdef NVList bookmarks
 *         cdef nvpair.nvlist_t *c_bookmarks
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("libzfs.ZFSSnapshot.bookmark", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_bookmarks);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2454
 *             raise OSError(ret, os.strerror(ret))
 * 
 *     def clone(self, name, opts=None):             # <<<<<<<<<<<<<<
 *         cdef NVList copts = None
 *         cdef nvpair.nvlist_t *copts_handle = NULL
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSSnapshot_7clone(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSSnapshot_7clone(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_opts = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clone (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_2,&__pyx_n_s_opts,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_opts);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "clone") < 0)) __PYX_ERR(1, 2454, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_name = values[0];
    __pyx_v_opts = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("clone", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2454, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSSnapshot.clone", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_11ZFSSnapshot_6clone(((struct __pyx_obj_6libzfs_ZFSSnapshot *)__pyx_v_self), __pyx_v_name, __pyx_v_opts);

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

static PyObject *__pyx_pf_6libzfs_11ZFSSnapshot_6clone(struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_opts) {
  struct __pyx_obj_6libzfs_NVList *__pyx_v_copts = 0;
  nvlist_t *__pyx_v_copts_handle;
  char const *__pyx_v_c_name;
  int __pyx_v_ret;
  PyObject *__pyx_v_hopts = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char const *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  nvlist_t *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("clone", 0);

  /* "libzfs.pyx":2455
 * 
 *     def clone(self, name, opts=None):
 *         cdef NVList copts = None             # <<<<<<<<<<<<<<
 *         cdef nvpair.nvlist_t *copts_handle = NULL
 *         cdef const char *c_name = name
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_copts = ((struct __pyx_obj_6libzfs_NVList *)Py_None);

  /* "libzfs.pyx":2456
 *     def clone(self, name, opts=None):
 *         cdef NVList copts = None
 *         cdef nvpair.nvlist_t *copts_handle = NULL             # <<<<<<<<<<<<<<
 *         cdef const char *c_name = name
 *         cdef int ret
 */
  __pyx_v_copts_handle = NULL;

  /* "libzfs.pyx":2457
 *         cdef NVList copts = None
 *         cdef nvpair.nvlist_t *copts_handle = NULL
 *         cdef const char *c_name = name             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(1, 2457, __pyx_L1_error)
  __pyx_v_c_name = __pyx_t_1;

  /* "libzfs.pyx":2460
 *         cdef int ret
 * 
 *         if opts:             # <<<<<<<<<<<<<<
 *             copts = NVList(otherdict=opts)
 *             copts_handle = copts.handle
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opts); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2460, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "libzfs.pyx":2461
 * 
 *         if opts:
 *             copts = NVList(otherdict=opts)             # <<<<<<<<<<<<<<
 *             copts_handle = copts.handle
 * 
 */
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_otherdict, __pyx_v_opts) < 0) __PYX_ERR(1, 2461, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_NVList), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_copts, ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "libzfs.pyx":2462
 *         if opts:
 *             copts = NVList(otherdict=opts)
 *             copts_handle = copts.handle             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */
    __pyx_t_5 = __pyx_v_copts->handle;
    __pyx_v_copts_handle = __pyx_t_5;

    /* "libzfs.pyx":2460
 *         cdef int ret
 * 
 *         if opts:             # <<<<<<<<<<<<<<
 *             copts = NVList(otherdict=opts)
 *             copts_handle = copts.handle
 */
  }

  /* "libzfs.pyx":2464
 *             copts_handle = copts.handle
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_clone(
 *                 self.handle,
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":2465
 * 
 *         with nogil:
 *             ret = libzfs.zfs_clone(             # <<<<<<<<<<<<<<
 *                 self.handle,
 *                 c_name,
 */
        __pyx_v_ret = zfs_clone(__pyx_v_self->__pyx_base.handle, __pyx_v_c_name, __pyx_v_copts_handle);
      }

      /* "libzfs.pyx":2464
 *             copts_handle = copts.handle
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_clone(
 *                 self.handle,
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L6;
        }
        __pyx_L6:;
      }
  }

  /* "libzfs.pyx":2471
 *             )
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_2 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":2472
 * 
 *         if ret != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *         if self.root.history:
 */
    __pyx_t_4 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->__pyx_base.root->__pyx_vtab)->get_error(__pyx_v_self->__pyx_base.root); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 2472, __pyx_L1_error)

    /* "libzfs.pyx":2471
 *             )
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":2474
 *             raise self.root.get_error()
 * 
 *         if self.root.history:             # <<<<<<<<<<<<<<
 *             hopts = self.root.generate_history_opts(opts, '-o')
 *             self.root.write_history('zfs clone', hopts, self.name)
 */
  __pyx_t_2 = (__pyx_v_self->__pyx_base.root->history != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":2475
 * 
 *         if self.root.history:
 *             hopts = self.root.generate_history_opts(opts, '-o')             # <<<<<<<<<<<<<<
 *             self.root.write_history('zfs clone', hopts, self.name)
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.root), __pyx_n_s_generate_history_opts); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_7 = 1;
      }
    }
    __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_v_opts);
    __Pyx_GIVEREF(__pyx_v_opts);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_opts);
    __Pyx_INCREF(__pyx_kp_s_o);
    __Pyx_GIVEREF(__pyx_kp_s_o);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_kp_s_o);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_hopts = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "libzfs.pyx":2476
 *         if self.root.history:
 *             hopts = self.root.generate_history_opts(opts, '-o')
 *             self.root.write_history('zfs clone', hopts, self.name)             # <<<<<<<<<<<<<<
 * 
 *     def hold(self, tag, recursive=False):
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_7 = 1;
      }
    }
    __pyx_t_9 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_kp_s_zfs_clone);
    __Pyx_GIVEREF(__pyx_kp_s_zfs_clone);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_7, __pyx_kp_s_zfs_clone);
    __Pyx_INCREF(__pyx_v_hopts);
    __Pyx_GIVEREF(__pyx_v_hopts);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, __pyx_v_hopts);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_7, __pyx_t_8);
    __pyx_t_8 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "libzfs.pyx":2474
 *             raise self.root.get_error()
 * 
 *         if self.root.history:             # <<<<<<<<<<<<<<
 *             hopts = self.root.generate_history_opts(opts, '-o')
 *             self.root.write_history('zfs clone', hopts, self.name)
 */
  }

  /* "libzfs.pyx":2454
 *             raise OSError(ret, os.strerror(ret))
 * 
 *     def clone(self, name, opts=None):             # <<<<<<<<<<<<<<
 *         cdef NVList copts = None
 *         cdef nvpair.nvlist_t *copts_handle = NULL
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("libzfs.ZFSSnapshot.clone", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_copts);
  __Pyx_XDECREF(__pyx_v_hopts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2478
 *             self.root.write_history('zfs clone', hopts, self.name)
 * 
 *     def hold(self, tag, recursive=False):             # <<<<<<<<<<<<<<
 *         cdef ZFSDataset parent
 *         cdef const char *c_snapshot_name
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSSnapshot_9hold(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSSnapshot_9hold(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_tag = 0;
  PyObject *__pyx_v_recursive = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hold (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tag,&__pyx_n_s_recursive,0};
    PyObject* values[2] = {0,0};
    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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tag)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_recursive);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hold") < 0)) __PYX_ERR(1, 2478, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_tag = values[0];
    __pyx_v_recursive = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("hold", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2478, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSSnapshot.hold", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_11ZFSSnapshot_8hold(((struct __pyx_obj_6libzfs_ZFSSnapshot *)__pyx_v_self), __pyx_v_tag, __pyx_v_recursive);

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

static PyObject *__pyx_pf_6libzfs_11ZFSSnapshot_8hold(struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_recursive) {
  struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_parent = 0;
  char const *__pyx_v_c_snapshot_name;
  char const *__pyx_v_c_tag;
  int __pyx_v_c_recursive;
  int __pyx_v_ret;
  PyObject *__pyx_v_snapshot_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char const *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("hold", 0);

  /* "libzfs.pyx":2481
 *         cdef ZFSDataset parent
 *         cdef const char *c_snapshot_name
 *         cdef const char *c_tag = tag             # <<<<<<<<<<<<<<
 *         cdef int c_recursive = recursive
 *         cdef int ret
 */
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_tag); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(1, 2481, __pyx_L1_error)
  __pyx_v_c_tag = __pyx_t_1;

  /* "libzfs.pyx":2482
 *         cdef const char *c_snapshot_name
 *         cdef const char *c_tag = tag
 *         cdef int c_recursive = recursive             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_recursive); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2482, __pyx_L1_error)
  __pyx_v_c_recursive = __pyx_t_2;

  /* "libzfs.pyx":2485
 *         cdef int ret
 * 
 *         snapshot_name = self.snapshot_name             # <<<<<<<<<<<<<<
 *         c_snapshot_name = snapshot_name
 *         parent = <ZFSDataset>self.parent
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_snapshot_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_snapshot_name = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "libzfs.pyx":2486
 * 
 *         snapshot_name = self.snapshot_name
 *         c_snapshot_name = snapshot_name             # <<<<<<<<<<<<<<
 *         parent = <ZFSDataset>self.parent
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_snapshot_name); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 2486, __pyx_L1_error)
  __pyx_v_c_snapshot_name = __pyx_t_4;

  /* "libzfs.pyx":2487
 *         snapshot_name = self.snapshot_name
 *         c_snapshot_name = snapshot_name
 *         parent = <ZFSDataset>self.parent             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __pyx_t_3;
  __Pyx_INCREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_parent = ((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "libzfs.pyx":2489
 *         parent = <ZFSDataset>self.parent
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_hold(parent.handle, c_snapshot_name, c_tag, c_recursive, -1)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":2490
 * 
 *         with nogil:
 *             ret = libzfs.zfs_hold(parent.handle, c_snapshot_name, c_tag, c_recursive, -1)             # <<<<<<<<<<<<<<
 * 
 *         if ret != 0:
 */
        __pyx_v_ret = zfs_hold(__pyx_v_parent->__pyx_base.handle, __pyx_v_c_snapshot_name, __pyx_v_c_tag, __pyx_v_c_recursive, -1);
      }

      /* "libzfs.pyx":2489
 *         parent = <ZFSDataset>self.parent
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_hold(parent.handle, c_snapshot_name, c_tag, c_recursive, -1)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":2492
 *             ret = libzfs.zfs_hold(parent.handle, c_snapshot_name, c_tag, c_recursive, -1)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_6 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_6) {

    /* "libzfs.pyx":2493
 * 
 *         if ret != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *         self.root.write_history('zfs hold', '-r' if recursive else '', tag, self.name)
 */
    __pyx_t_5 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->__pyx_base.root->__pyx_vtab)->get_error(__pyx_v_self->__pyx_base.root); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2493, __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(1, 2493, __pyx_L1_error)

    /* "libzfs.pyx":2492
 *             ret = libzfs.zfs_hold(parent.handle, c_snapshot_name, c_tag, c_recursive, -1)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":2495
 *             raise self.root.get_error()
 * 
 *         self.root.write_history('zfs hold', '-r' if recursive else '', tag, self.name)             # <<<<<<<<<<<<<<
 * 
 *     def release(self, tag, recursive=False):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_recursive); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 2495, __pyx_L1_error)
  if (__pyx_t_6) {
    __Pyx_INCREF(__pyx_kp_s_r);
    __pyx_t_7 = __pyx_kp_s_r;
  } else {
    __Pyx_INCREF(__pyx_kp_s__11);
    __pyx_t_7 = __pyx_kp_s__11;
  }
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_10 = 1;
    }
  }
  __pyx_t_11 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 2495, __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_INCREF(__pyx_kp_s_zfs_hold);
  __Pyx_GIVEREF(__pyx_kp_s_zfs_hold);
  PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_kp_s_zfs_hold);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_7);
  __Pyx_INCREF(__pyx_v_tag);
  __Pyx_GIVEREF(__pyx_v_tag);
  PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_v_tag);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_10, __pyx_t_8);
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":2478
 *             self.root.write_history('zfs clone', hopts, self.name)
 * 
 *     def hold(self, tag, recursive=False):             # <<<<<<<<<<<<<<
 *         cdef ZFSDataset parent
 *         cdef const char *c_snapshot_name
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("libzfs.ZFSSnapshot.hold", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_parent);
  __Pyx_XDECREF(__pyx_v_snapshot_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2497
 *         self.root.write_history('zfs hold', '-r' if recursive else '', tag, self.name)
 * 
 *     def release(self, tag, recursive=False):             # <<<<<<<<<<<<<<
 *         cdef ZFSDataset parent
 *         cdef const char *c_snapshot_name
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSSnapshot_11release(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSSnapshot_11release(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_tag = 0;
  PyObject *__pyx_v_recursive = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("release (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tag,&__pyx_n_s_recursive,0};
    PyObject* values[2] = {0,0};
    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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tag)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_recursive);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "release") < 0)) __PYX_ERR(1, 2497, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_tag = values[0];
    __pyx_v_recursive = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("release", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2497, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSSnapshot.release", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_11ZFSSnapshot_10release(((struct __pyx_obj_6libzfs_ZFSSnapshot *)__pyx_v_self), __pyx_v_tag, __pyx_v_recursive);

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

static PyObject *__pyx_pf_6libzfs_11ZFSSnapshot_10release(struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_recursive) {
  struct __pyx_obj_6libzfs_ZFSDataset *__pyx_v_parent = 0;
  char const *__pyx_v_c_snapshot_name;
  char const *__pyx_v_c_tag;
  int __pyx_v_c_recursive;
  int __pyx_v_ret;
  PyObject *__pyx_v_snapshot_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char const *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("release", 0);

  /* "libzfs.pyx":2500
 *         cdef ZFSDataset parent
 *         cdef const char *c_snapshot_name
 *         cdef const char *c_tag = tag             # <<<<<<<<<<<<<<
 *         cdef int c_recursive = recursive
 *         cdef int ret
 */
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_tag); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(1, 2500, __pyx_L1_error)
  __pyx_v_c_tag = __pyx_t_1;

  /* "libzfs.pyx":2501
 *         cdef const char *c_snapshot_name
 *         cdef const char *c_tag = tag
 *         cdef int c_recursive = recursive             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_recursive); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2501, __pyx_L1_error)
  __pyx_v_c_recursive = __pyx_t_2;

  /* "libzfs.pyx":2504
 *         cdef int ret
 * 
 *         snapshot_name = self.snapshot_name             # <<<<<<<<<<<<<<
 *         c_snapshot_name = snapshot_name
 *         parent = <ZFSDataset>self.parent
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_snapshot_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_snapshot_name = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "libzfs.pyx":2505
 * 
 *         snapshot_name = self.snapshot_name
 *         c_snapshot_name = snapshot_name             # <<<<<<<<<<<<<<
 *         parent = <ZFSDataset>self.parent
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_snapshot_name); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 2505, __pyx_L1_error)
  __pyx_v_c_snapshot_name = __pyx_t_4;

  /* "libzfs.pyx":2506
 *         snapshot_name = self.snapshot_name
 *         c_snapshot_name = snapshot_name
 *         parent = <ZFSDataset>self.parent             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __pyx_t_3;
  __Pyx_INCREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_parent = ((struct __pyx_obj_6libzfs_ZFSDataset *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "libzfs.pyx":2508
 *         parent = <ZFSDataset>self.parent
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_release(parent.handle, c_snapshot_name, c_tag, c_recursive)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":2509
 * 
 *         with nogil:
 *             ret = libzfs.zfs_release(parent.handle, c_snapshot_name, c_tag, c_recursive)             # <<<<<<<<<<<<<<
 * 
 *         if ret != 0:
 */
        __pyx_v_ret = zfs_release(__pyx_v_parent->__pyx_base.handle, __pyx_v_c_snapshot_name, __pyx_v_c_tag, __pyx_v_c_recursive);
      }

      /* "libzfs.pyx":2508
 *         parent = <ZFSDataset>self.parent
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = libzfs.zfs_release(parent.handle, c_snapshot_name, c_tag, c_recursive)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "libzfs.pyx":2511
 *             ret = libzfs.zfs_release(parent.handle, c_snapshot_name, c_tag, c_recursive)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  __pyx_t_6 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_6) {

    /* "libzfs.pyx":2512
 * 
 *         if ret != 0:
 *             raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *         self.root.write_history('zfs release', '-r' if recursive else '', tag, self.name)
 */
    __pyx_t_5 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->__pyx_base.root->__pyx_vtab)->get_error(__pyx_v_self->__pyx_base.root); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2512, __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(1, 2512, __pyx_L1_error)

    /* "libzfs.pyx":2511
 *             ret = libzfs.zfs_release(parent.handle, c_snapshot_name, c_tag, c_recursive)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":2514
 *             raise self.root.get_error()
 * 
 *         self.root.write_history('zfs release', '-r' if recursive else '', tag, self.name)             # <<<<<<<<<<<<<<
 * 
 *     def delete(self, recursive=False):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_recursive); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 2514, __pyx_L1_error)
  if (__pyx_t_6) {
    __Pyx_INCREF(__pyx_kp_s_r);
    __pyx_t_7 = __pyx_kp_s_r;
  } else {
    __Pyx_INCREF(__pyx_kp_s__11);
    __pyx_t_7 = __pyx_kp_s__11;
  }
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_10 = 1;
    }
  }
  __pyx_t_11 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 2514, __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_INCREF(__pyx_kp_s_zfs_release);
  __Pyx_GIVEREF(__pyx_kp_s_zfs_release);
  PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_kp_s_zfs_release);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_7);
  __Pyx_INCREF(__pyx_v_tag);
  __Pyx_GIVEREF(__pyx_v_tag);
  PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_v_tag);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_10, __pyx_t_8);
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":2497
 *         self.root.write_history('zfs hold', '-r' if recursive else '', tag, self.name)
 * 
 *     def release(self, tag, recursive=False):             # <<<<<<<<<<<<<<
 *         cdef ZFSDataset parent
 *         cdef const char *c_snapshot_name
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("libzfs.ZFSSnapshot.release", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_parent);
  __Pyx_XDECREF(__pyx_v_snapshot_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2516
 *         self.root.write_history('zfs release', '-r' if recursive else '', tag, self.name)
 * 
 *     def delete(self, recursive=False):             # <<<<<<<<<<<<<<
 *         if not recursive:
 *             super(ZFSSnapshot, self).delete()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSSnapshot_13delete(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSSnapshot_13delete(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_recursive = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("delete (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_recursive,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);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_recursive);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "delete") < 0)) __PYX_ERR(1, 2516, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_recursive = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("delete", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2516, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.ZFSSnapshot.delete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_11ZFSSnapshot_12delete(((struct __pyx_obj_6libzfs_ZFSSnapshot *)__pyx_v_self), __pyx_v_recursive);

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

static PyObject *__pyx_pf_6libzfs_11ZFSSnapshot_12delete(struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_self, PyObject *__pyx_v_recursive) {
  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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("delete", 0);

  /* "libzfs.pyx":2517
 * 
 *     def delete(self, recursive=False):
 *         if not recursive:             # <<<<<<<<<<<<<<
 *             super(ZFSSnapshot, self).delete()
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_recursive); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2517, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":2518
 *     def delete(self, recursive=False):
 *         if not recursive:
 *             super(ZFSSnapshot, self).delete()             # <<<<<<<<<<<<<<
 *         else:
 *             self.parent.destroy_snapshot(self.snapshot_name)
 */
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)__pyx_ptype_6libzfs_ZFSSnapshot));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6libzfs_ZFSSnapshot));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_6libzfs_ZFSSnapshot));
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self));
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2518, __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_delete); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2518, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2518, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "libzfs.pyx":2517
 * 
 *     def delete(self, recursive=False):
 *         if not recursive:             # <<<<<<<<<<<<<<
 *             super(ZFSSnapshot, self).delete()
 *         else:
 */
    goto __pyx_L3;
  }

  /* "libzfs.pyx":2520
 *             super(ZFSSnapshot, self).delete()
 *         else:
 *             self.parent.destroy_snapshot(self.snapshot_name)             # <<<<<<<<<<<<<<
 * 
 *         self.root.write_history('zfs destroy', '-r' if recursive else '', self.name)
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parent); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_destroy_snapshot); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_snapshot_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2520, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2520, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2520, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "libzfs.pyx":2522
 *             self.parent.destroy_snapshot(self.snapshot_name)
 * 
 *         self.root.write_history('zfs destroy', '-r' if recursive else '', self.name)             # <<<<<<<<<<<<<<
 * 
 *     def send(self, fd, **kwargs):
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.root), __pyx_n_s_write_history); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_recursive); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2522, __pyx_L1_error)
  if (__pyx_t_2) {
    __Pyx_INCREF(__pyx_kp_s_r);
    __pyx_t_7 = __pyx_kp_s_r;
  } else {
    __Pyx_INCREF(__pyx_kp_s__11);
    __pyx_t_7 = __pyx_kp_s__11;
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_8 = 1;
    }
  }
  __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__pyx_t_6) {
    __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
  }
  __Pyx_INCREF(__pyx_kp_s_zfs_destroy);
  __Pyx_GIVEREF(__pyx_kp_s_zfs_destroy);
  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_kp_s_zfs_destroy);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_4);
  __pyx_t_7 = 0;
  __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "libzfs.pyx":2516
 *         self.root.write_history('zfs release', '-r' if recursive else '', tag, self.name)
 * 
 *     def delete(self, recursive=False):             # <<<<<<<<<<<<<<
 *         if not recursive:
 *             super(ZFSSnapshot, self).delete()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("libzfs.ZFSSnapshot.delete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2524
 *         self.root.write_history('zfs destroy', '-r' if recursive else '', self.name)
 * 
 *     def send(self, fd, **kwargs):             # <<<<<<<<<<<<<<
 *         fromname = kwargs.get('fromname')
 *         flags = kwargs.get('flags')
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSSnapshot_15send(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSSnapshot_15send(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fd = 0;
  PyObject *__pyx_v_kwargs = 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);
  {
    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);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fd)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "send") < 0)) __PYX_ERR(1, 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 = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("send", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2524, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("libzfs.ZFSSnapshot.send", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_11ZFSSnapshot_14send(((struct __pyx_obj_6libzfs_ZFSSnapshot *)__pyx_v_self), __pyx_v_fd, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_6libzfs_11ZFSSnapshot_14send(struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_self, PyObject *__pyx_v_fd, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_fromname = NULL;
  PyObject *__pyx_v_flags = 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;
  __Pyx_RefNannySetupContext("send", 0);

  /* "libzfs.pyx":2525
 * 
 *     def send(self, fd, **kwargs):
 *         fromname = kwargs.get('fromname')             # <<<<<<<<<<<<<<
 *         flags = kwargs.get('flags')
 *         return self.parent.send(fd, toname=self.snapshot_name, fromname=fromname, flags=flags)
 */
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwargs, __pyx_n_s_fromname, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_fromname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "libzfs.pyx":2526
 *     def send(self, fd, **kwargs):
 *         fromname = kwargs.get('fromname')
 *         flags = kwargs.get('flags')             # <<<<<<<<<<<<<<
 *         return self.parent.send(fd, toname=self.snapshot_name, fromname=fromname, flags=flags)
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwargs, __pyx_n_s_flags, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_flags = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "libzfs.pyx":2527
 *         fromname = kwargs.get('fromname')
 *         flags = kwargs.get('flags')
 *         return self.parent.send(fd, toname=self.snapshot_name, fromname=fromname, flags=flags)             # <<<<<<<<<<<<<<
 * 
 *     property snapshot_name:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_send); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_fd);
  __Pyx_GIVEREF(__pyx_v_fd);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_fd);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_snapshot_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_toname, __pyx_t_4) < 0) __PYX_ERR(1, 2527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_fromname, __pyx_v_fromname) < 0) __PYX_ERR(1, 2527, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_flags, __pyx_v_flags) < 0) __PYX_ERR(1, 2527, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __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;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":2524
 *         self.root.write_history('zfs destroy', '-r' if recursive else '', self.name)
 * 
 *     def send(self, fd, **kwargs):             # <<<<<<<<<<<<<<
 *         fromname = kwargs.get('fromname')
 *         flags = kwargs.get('flags')
 */

  /* 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("libzfs.ZFSSnapshot.send", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fromname);
  __Pyx_XDECREF(__pyx_v_flags);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2530
 * 
 *     property snapshot_name:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.name.partition('@')[-1]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSSnapshot_13snapshot_name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSSnapshot_13snapshot_name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_11ZFSSnapshot_13snapshot_name___get__(((struct __pyx_obj_6libzfs_ZFSSnapshot *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_11ZFSSnapshot_13snapshot_name___get__(struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":2531
 *     property snapshot_name:
 *         def __get__(self):
 *             return self.name.partition('@')[-1]             # <<<<<<<<<<<<<<
 * 
 *     property parent:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_partition); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2531, __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;

  /* "libzfs.pyx":2530
 * 
 *     property snapshot_name:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.name.partition('@')[-1]
 * 
 */

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

/* "libzfs.pyx":2534
 * 
 *     property parent:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.root.get_dataset(self.name.partition('@')[0])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSSnapshot_6parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSSnapshot_6parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_11ZFSSnapshot_6parent___get__(((struct __pyx_obj_6libzfs_ZFSSnapshot *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_11ZFSSnapshot_6parent___get__(struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_self) {
  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;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":2535
 *     property parent:
 *         def __get__(self):
 *             return self.root.get_dataset(self.name.partition('@')[0])             # <<<<<<<<<<<<<<
 * 
 *     property holds:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.root), __pyx_n_s_get_dataset); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_partition); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2535, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2535, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2535, __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":2534
 * 
 *     property parent:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.root.get_dataset(self.name.partition('@')[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_5);
  __Pyx_AddTraceback("libzfs.ZFSSnapshot.parent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2538
 * 
 *     property holds:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef nvpair.nvlist_t* ptr
 *             cdef NVList nvl
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSSnapshot_5holds_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSSnapshot_5holds_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_11ZFSSnapshot_5holds___get__(((struct __pyx_obj_6libzfs_ZFSSnapshot *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_11ZFSSnapshot_5holds___get__(struct __pyx_obj_6libzfs_ZFSSnapshot *__pyx_v_self) {
  nvlist_t *__pyx_v_ptr;
  struct __pyx_obj_6libzfs_NVList *__pyx_v_nvl = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":2542
 *             cdef NVList nvl
 * 
 *             if libzfs.zfs_get_holds(self.handle, &ptr) != 0:             # <<<<<<<<<<<<<<
 *                 raise self.root.get_error()
 * 
 */
  __pyx_t_1 = ((zfs_get_holds(__pyx_v_self->__pyx_base.handle, (&__pyx_v_ptr)) != 0) != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":2543
 * 
 *             if libzfs.zfs_get_holds(self.handle, &ptr) != 0:
 *                 raise self.root.get_error()             # <<<<<<<<<<<<<<
 * 
 *             nvl = NVList(<uintptr_t>ptr)
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6libzfs_ZFS *)__pyx_v_self->__pyx_base.root->__pyx_vtab)->get_error(__pyx_v_self->__pyx_base.root); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2543, __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(1, 2543, __pyx_L1_error)

    /* "libzfs.pyx":2542
 *             cdef NVList nvl
 * 
 *             if libzfs.zfs_get_holds(self.handle, &ptr) != 0:             # <<<<<<<<<<<<<<
 *                 raise self.root.get_error()
 * 
 */
  }

  /* "libzfs.pyx":2545
 *                 raise self.root.get_error()
 * 
 *             nvl = NVList(<uintptr_t>ptr)             # <<<<<<<<<<<<<<
 *             return dict(nvl)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2545, __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_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_NVList), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_nvl = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "libzfs.pyx":2546
 * 
 *             nvl = NVList(<uintptr_t>ptr)
 *             return dict(nvl)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_nvl));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_nvl));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_nvl));
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyDict_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2546, __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;

  /* "libzfs.pyx":2538
 * 
 *     property holds:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef nvpair.nvlist_t* ptr
 *             cdef NVList nvl
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("libzfs.ZFSSnapshot.holds.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_nvl);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2550
 * 
 * cdef class ZFSBookmark(ZFSObject):
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         ret = super(ZFSBookmark, self).__getstate__()
 *         ret.update({
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSBookmark_1__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSBookmark_1__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_11ZFSBookmark___getstate__(((struct __pyx_obj_6libzfs_ZFSBookmark *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_11ZFSBookmark___getstate__(struct __pyx_obj_6libzfs_ZFSBookmark *__pyx_v_self) {
  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 = NULL;
  __Pyx_RefNannySetupContext("__getstate__", 0);

  /* "libzfs.pyx":2551
 * cdef class ZFSBookmark(ZFSObject):
 *     def __getstate__(self):
 *         ret = super(ZFSBookmark, self).__getstate__()             # <<<<<<<<<<<<<<
 *         ret.update({
 *             'dataset': self.parent.name,
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_6libzfs_ZFSBookmark));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6libzfs_ZFSBookmark));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_6libzfs_ZFSBookmark));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2551, __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_getstate); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2551, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2551, __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;

  /* "libzfs.pyx":2552
 *     def __getstate__(self):
 *         ret = super(ZFSBookmark, self).__getstate__()
 *         ret.update({             # <<<<<<<<<<<<<<
 *             'dataset': self.parent.name,
 *             'bookmark_name': self.bookmark_name
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ret, __pyx_n_s_update); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "libzfs.pyx":2553
 *         ret = super(ZFSBookmark, self).__getstate__()
 *         ret.update({
 *             'dataset': self.parent.name,             # <<<<<<<<<<<<<<
 *             'bookmark_name': self.bookmark_name
 *         })
 */
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parent); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dataset, __pyx_t_5) < 0) __PYX_ERR(1, 2553, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":2554
 *         ret.update({
 *             'dataset': self.parent.name,
 *             'bookmark_name': self.bookmark_name             # <<<<<<<<<<<<<<
 *         })
 *         return ret
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bookmark_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_bookmark_name, __pyx_t_5) < 0) __PYX_ERR(1, 2553, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2552, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2552, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2552, __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_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":2556
 *             'bookmark_name': self.bookmark_name
 *         })
 *         return ret             # <<<<<<<<<<<<<<
 * 
 *     property parent:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "libzfs.pyx":2550
 * 
 * cdef class ZFSBookmark(ZFSObject):
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         ret = super(ZFSBookmark, self).__getstate__()
 *         ret.update({
 */

  /* 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("libzfs.ZFSBookmark.__getstate__", __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;
}

/* "libzfs.pyx":2559
 * 
 *     property parent:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.root.get_dataset(self.name.partition('#')[0])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSBookmark_6parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSBookmark_6parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_11ZFSBookmark_6parent___get__(((struct __pyx_obj_6libzfs_ZFSBookmark *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_11ZFSBookmark_6parent___get__(struct __pyx_obj_6libzfs_ZFSBookmark *__pyx_v_self) {
  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;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":2560
 *     property parent:
 *         def __get__(self):
 *             return self.root.get_dataset(self.name.partition('#')[0])             # <<<<<<<<<<<<<<
 * 
 *     property bookmark_name:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.root), __pyx_n_s_get_dataset); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_partition); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2560, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2560, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2560, __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":2559
 * 
 *     property parent:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.root.get_dataset(self.name.partition('#')[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_5);
  __Pyx_AddTraceback("libzfs.ZFSBookmark.parent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2563
 * 
 *     property bookmark_name:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.name.partition('#')[-1]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11ZFSBookmark_13bookmark_name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6libzfs_11ZFSBookmark_13bookmark_name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_11ZFSBookmark_13bookmark_name___get__(((struct __pyx_obj_6libzfs_ZFSBookmark *)__pyx_v_self));

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

static PyObject *__pyx_pf_6libzfs_11ZFSBookmark_13bookmark_name___get__(struct __pyx_obj_6libzfs_ZFSBookmark *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "libzfs.pyx":2564
 *     property bookmark_name:
 *         def __get__(self):
 *             return self.name.partition('#')[-1]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_partition); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2564, __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;

  /* "libzfs.pyx":2563
 * 
 *     property bookmark_name:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.name.partition('#')[-1]
 * 
 */

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

/* "libzfs.pyx":2567
 * 
 * 
 * cdef convert_sendflags(flags, libzfs.sendflags_t *cflags):             # <<<<<<<<<<<<<<
 *     if not isinstance(flags, set):
 *         raise ValueError('flags must be passed as a set')
 */

static PyObject *__pyx_f_6libzfs_convert_sendflags(PyObject *__pyx_v_flags, sendflags_t *__pyx_v_cflags) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("convert_sendflags", 0);

  /* "libzfs.pyx":2568
 * 
 * cdef convert_sendflags(flags, libzfs.sendflags_t *cflags):
 *     if not isinstance(flags, set):             # <<<<<<<<<<<<<<
 *         raise ValueError('flags must be passed as a set')
 * 
 */
  __pyx_t_1 = PySet_Check(__pyx_v_flags); 
  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":2569
 * cdef convert_sendflags(flags, libzfs.sendflags_t *cflags):
 *     if not isinstance(flags, set):
 *         raise ValueError('flags must be passed as a set')             # <<<<<<<<<<<<<<
 * 
 *     if SendFlag.VERBOSE in flags:
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2569, __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(1, 2569, __pyx_L1_error)

    /* "libzfs.pyx":2568
 * 
 * cdef convert_sendflags(flags, libzfs.sendflags_t *cflags):
 *     if not isinstance(flags, set):             # <<<<<<<<<<<<<<
 *         raise ValueError('flags must be passed as a set')
 * 
 */
  }

  /* "libzfs.pyx":2571
 *         raise ValueError('flags must be passed as a set')
 * 
 *     if SendFlag.VERBOSE in flags:             # <<<<<<<<<<<<<<
 *         cflags.verbose = 1
 * 
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_SendFlag); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_VERBOSE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_v_flags, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2571, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":2572
 * 
 *     if SendFlag.VERBOSE in flags:
 *         cflags.verbose = 1             # <<<<<<<<<<<<<<
 * 
 *     if SendFlag.REPLICATE in flags:
 */
    __pyx_v_cflags->verbose = 1;

    /* "libzfs.pyx":2571
 *         raise ValueError('flags must be passed as a set')
 * 
 *     if SendFlag.VERBOSE in flags:             # <<<<<<<<<<<<<<
 *         cflags.verbose = 1
 * 
 */
  }

  /* "libzfs.pyx":2574
 *         cflags.verbose = 1
 * 
 *     if SendFlag.REPLICATE in flags:             # <<<<<<<<<<<<<<
 *         cflags.replicate = 1
 * 
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_SendFlag); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_REPLICATE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_v_flags, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2574, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":2575
 * 
 *     if SendFlag.REPLICATE in flags:
 *         cflags.replicate = 1             # <<<<<<<<<<<<<<
 * 
 *     if SendFlag.DOALL in flags:
 */
    __pyx_v_cflags->replicate = 1;

    /* "libzfs.pyx":2574
 *         cflags.verbose = 1
 * 
 *     if SendFlag.REPLICATE in flags:             # <<<<<<<<<<<<<<
 *         cflags.replicate = 1
 * 
 */
  }

  /* "libzfs.pyx":2577
 *         cflags.replicate = 1
 * 
 *     if SendFlag.DOALL in flags:             # <<<<<<<<<<<<<<
 *         cflags.doall = 1
 * 
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_SendFlag); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DOALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_v_flags, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2577, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":2578
 * 
 *     if SendFlag.DOALL in flags:
 *         cflags.doall = 1             # <<<<<<<<<<<<<<
 * 
 *     if SendFlag.FROMORIGIN in flags:
 */
    __pyx_v_cflags->doall = 1;

    /* "libzfs.pyx":2577
 *         cflags.replicate = 1
 * 
 *     if SendFlag.DOALL in flags:             # <<<<<<<<<<<<<<
 *         cflags.doall = 1
 * 
 */
  }

  /* "libzfs.pyx":2580
 *         cflags.doall = 1
 * 
 *     if SendFlag.FROMORIGIN in flags:             # <<<<<<<<<<<<<<
 *         cflags.fromorigin = 1
 * 
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_SendFlag); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_FROMORIGIN); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_v_flags, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2580, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":2581
 * 
 *     if SendFlag.FROMORIGIN in flags:
 *         cflags.fromorigin = 1             # <<<<<<<<<<<<<<
 * 
 *     if SendFlag.DEDUP in flags:
 */
    __pyx_v_cflags->fromorigin = 1;

    /* "libzfs.pyx":2580
 *         cflags.doall = 1
 * 
 *     if SendFlag.FROMORIGIN in flags:             # <<<<<<<<<<<<<<
 *         cflags.fromorigin = 1
 * 
 */
  }

  /* "libzfs.pyx":2583
 *         cflags.fromorigin = 1
 * 
 *     if SendFlag.DEDUP in flags:             # <<<<<<<<<<<<<<
 *         cflags.dedup = 1
 * 
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_SendFlag); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DEDUP); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_v_flags, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2583, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":2584
 * 
 *     if SendFlag.DEDUP in flags:
 *         cflags.dedup = 1             # <<<<<<<<<<<<<<
 * 
 *     if SendFlag.PROPS in flags:
 */
    __pyx_v_cflags->dedup = 1;

    /* "libzfs.pyx":2583
 *         cflags.fromorigin = 1
 * 
 *     if SendFlag.DEDUP in flags:             # <<<<<<<<<<<<<<
 *         cflags.dedup = 1
 * 
 */
  }

  /* "libzfs.pyx":2586
 *         cflags.dedup = 1
 * 
 *     if SendFlag.PROPS in flags:             # <<<<<<<<<<<<<<
 *         cflags.props = 1
 * 
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_SendFlag); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_PROPS); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_v_flags, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2586, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":2587
 * 
 *     if SendFlag.PROPS in flags:
 *         cflags.props = 1             # <<<<<<<<<<<<<<
 * 
 *     if SendFlag.DRYRUN in flags:
 */
    __pyx_v_cflags->props = 1;

    /* "libzfs.pyx":2586
 *         cflags.dedup = 1
 * 
 *     if SendFlag.PROPS in flags:             # <<<<<<<<<<<<<<
 *         cflags.props = 1
 * 
 */
  }

  /* "libzfs.pyx":2589
 *         cflags.props = 1
 * 
 *     if SendFlag.DRYRUN in flags:             # <<<<<<<<<<<<<<
 *         cflags.dryrun = 1
 * 
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_SendFlag); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DRYRUN); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_v_flags, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2589, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":2590
 * 
 *     if SendFlag.DRYRUN in flags:
 *         cflags.dryrun = 1             # <<<<<<<<<<<<<<
 * 
 *     if SendFlag.PARSABLE in flags:
 */
    __pyx_v_cflags->dryrun = 1;

    /* "libzfs.pyx":2589
 *         cflags.props = 1
 * 
 *     if SendFlag.DRYRUN in flags:             # <<<<<<<<<<<<<<
 *         cflags.dryrun = 1
 * 
 */
  }

  /* "libzfs.pyx":2592
 *         cflags.dryrun = 1
 * 
 *     if SendFlag.PARSABLE in flags:             # <<<<<<<<<<<<<<
 *         cflags.parsable = 1
 * 
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_SendFlag); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_PARSABLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_v_flags, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2592, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":2593
 * 
 *     if SendFlag.PARSABLE in flags:
 *         cflags.parsable = 1             # <<<<<<<<<<<<<<
 * 
 *     if SendFlag.PROGRESS in flags:
 */
    __pyx_v_cflags->parsable = 1;

    /* "libzfs.pyx":2592
 *         cflags.dryrun = 1
 * 
 *     if SendFlag.PARSABLE in flags:             # <<<<<<<<<<<<<<
 *         cflags.parsable = 1
 * 
 */
  }

  /* "libzfs.pyx":2595
 *         cflags.parsable = 1
 * 
 *     if SendFlag.PROGRESS in flags:             # <<<<<<<<<<<<<<
 *         cflags.progress = 1
 * 
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_SendFlag); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_PROGRESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_v_flags, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2595, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":2596
 * 
 *     if SendFlag.PROGRESS in flags:
 *         cflags.progress = 1             # <<<<<<<<<<<<<<
 * 
 *     if SendFlag.LARGEBLOCK in flags:
 */
    __pyx_v_cflags->progress = 1;

    /* "libzfs.pyx":2595
 *         cflags.parsable = 1
 * 
 *     if SendFlag.PROGRESS in flags:             # <<<<<<<<<<<<<<
 *         cflags.progress = 1
 * 
 */
  }

  /* "libzfs.pyx":2598
 *         cflags.progress = 1
 * 
 *     if SendFlag.LARGEBLOCK in flags:             # <<<<<<<<<<<<<<
 *         cflags.largeblock = 1
 * 
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_SendFlag); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_LARGEBLOCK); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_v_flags, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":2599
 * 
 *     if SendFlag.LARGEBLOCK in flags:
 *         cflags.largeblock = 1             # <<<<<<<<<<<<<<
 * 
 *     if SendFlag.EMBED_DATA in flags:
 */
    __pyx_v_cflags->largeblock = 1;

    /* "libzfs.pyx":2598
 *         cflags.progress = 1
 * 
 *     if SendFlag.LARGEBLOCK in flags:             # <<<<<<<<<<<<<<
 *         cflags.largeblock = 1
 * 
 */
  }

  /* "libzfs.pyx":2601
 *         cflags.largeblock = 1
 * 
 *     if SendFlag.EMBED_DATA in flags:             # <<<<<<<<<<<<<<
 *         cflags.embed_data = 1
 * 
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_SendFlag); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_EMBED_DATA); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_v_flags, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2601, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "libzfs.pyx":2602
 * 
 *     if SendFlag.EMBED_DATA in flags:
 *         cflags.embed_data = 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_v_cflags->embed_data = 1;

    /* "libzfs.pyx":2601
 *         cflags.largeblock = 1
 * 
 *     if SendFlag.EMBED_DATA in flags:             # <<<<<<<<<<<<<<
 *         cflags.embed_data = 1
 * 
 */
  }

  /* "libzfs.pyx":2567
 * 
 * 
 * cdef convert_sendflags(flags, libzfs.sendflags_t *cflags):             # <<<<<<<<<<<<<<
 *     if not isinstance(flags, set):
 *         raise ValueError('flags must be passed as a set')
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("libzfs.convert_sendflags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2605
 * 
 * 
 * def nicestrtonum(ZFS zfs, value):             # <<<<<<<<<<<<<<
 *     cdef uint64_t result
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_9nicestrtonum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_9nicestrtonum = {"nicestrtonum", (PyCFunction)__pyx_pw_6libzfs_9nicestrtonum, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6libzfs_9nicestrtonum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_6libzfs_ZFS *__pyx_v_zfs = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("nicestrtonum (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_zfs,&__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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_zfs)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("nicestrtonum", 1, 2, 2, 1); __PYX_ERR(1, 2605, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "nicestrtonum") < 0)) __PYX_ERR(1, 2605, __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_zfs = ((struct __pyx_obj_6libzfs_ZFS *)values[0]);
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("nicestrtonum", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2605, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.nicestrtonum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_zfs), __pyx_ptype_6libzfs_ZFS, 1, "zfs", 0))) __PYX_ERR(1, 2605, __pyx_L1_error)
  __pyx_r = __pyx_pf_6libzfs_8nicestrtonum(__pyx_self, __pyx_v_zfs, __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_6libzfs_8nicestrtonum(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_6libzfs_ZFS *__pyx_v_zfs, PyObject *__pyx_v_value) {
  uint64_t __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char const *__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;
  __Pyx_RefNannySetupContext("nicestrtonum", 0);

  /* "libzfs.pyx":2608
 *     cdef uint64_t result
 * 
 *     if libzfs.zfs_nicestrtonum(zfs.handle, value, &result) != 0:             # <<<<<<<<<<<<<<
 *         raise ValueError('Cannot convert {0} to integer'.format(value))
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(1, 2608, __pyx_L1_error)
  __pyx_t_2 = ((zfs_nicestrtonum(__pyx_v_zfs->handle, __pyx_t_1, (&__pyx_v_result)) != 0) != 0);
  if (__pyx_t_2) {

    /* "libzfs.pyx":2609
 * 
 *     if libzfs.zfs_nicestrtonum(zfs.handle, value, &result) != 0:
 *         raise ValueError('Cannot convert {0} to integer'.format(value))             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Cannot_convert_0_to_integer, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_value);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2609, __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(1, 2609, __pyx_L1_error)

    /* "libzfs.pyx":2608
 *     cdef uint64_t result
 * 
 *     if libzfs.zfs_nicestrtonum(zfs.handle, value, &result) != 0:             # <<<<<<<<<<<<<<
 *         raise ValueError('Cannot convert {0} to integer'.format(value))
 * 
 */
  }

  /* "libzfs.pyx":2611
 *         raise ValueError('Cannot convert {0} to integer'.format(value))
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":2605
 * 
 * 
 * def nicestrtonum(ZFS zfs, value):             # <<<<<<<<<<<<<<
 *     cdef uint64_t result
 * 
 */

  /* function exit code */
  __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("libzfs.nicestrtonum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2614
 * 
 * 
 * def vdev_label_offset(psize, l, offset):             # <<<<<<<<<<<<<<
 *     return offset + l * sizeof(zfs.vdev_label_t) + 0 \
 *         if l < zfs.VDEV_LABELS / 2 \
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_11vdev_label_offset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_11vdev_label_offset = {"vdev_label_offset", (PyCFunction)__pyx_pw_6libzfs_11vdev_label_offset, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6libzfs_11vdev_label_offset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_psize = 0;
  PyObject *__pyx_v_l = 0;
  PyObject *__pyx_v_offset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("vdev_label_offset (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_psize,&__pyx_n_s_l,&__pyx_n_s_offset,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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_psize)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_l)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("vdev_label_offset", 1, 3, 3, 1); __PYX_ERR(1, 2614, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("vdev_label_offset", 1, 3, 3, 2); __PYX_ERR(1, 2614, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vdev_label_offset") < 0)) __PYX_ERR(1, 2614, __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_psize = values[0];
    __pyx_v_l = values[1];
    __pyx_v_offset = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("vdev_label_offset", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2614, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("libzfs.vdev_label_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6libzfs_10vdev_label_offset(__pyx_self, __pyx_v_psize, __pyx_v_l, __pyx_v_offset);

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

static PyObject *__pyx_pf_6libzfs_10vdev_label_offset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_psize, PyObject *__pyx_v_l, PyObject *__pyx_v_offset) {
  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;
  __Pyx_RefNannySetupContext("vdev_label_offset", 0);

  /* "libzfs.pyx":2615
 * 
 * def vdev_label_offset(psize, l, offset):
 *     return offset + l * sizeof(zfs.vdev_label_t) + 0 \             # <<<<<<<<<<<<<<
 *         if l < zfs.VDEV_LABELS / 2 \
 *         else psize - zfs.VDEV_LABELS * sizeof(zfs.vdev_label_t)
 */
  __Pyx_XDECREF(__pyx_r);

  /* "libzfs.pyx":2616
 * def vdev_label_offset(psize, l, offset):
 *     return offset + l * sizeof(zfs.vdev_label_t) + 0 \
 *         if l < zfs.VDEV_LABELS / 2 \             # <<<<<<<<<<<<<<
 *         else psize - zfs.VDEV_LABELS * sizeof(zfs.vdev_label_t)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_long(__Pyx_div_long(VDEV_LABELS, 2)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_l, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2616, __pyx_L1_error)
  __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(1, 2616, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "libzfs.pyx":2615
 * 
 * def vdev_label_offset(psize, l, offset):
 *     return offset + l * sizeof(zfs.vdev_label_t) + 0 \             # <<<<<<<<<<<<<<
 *         if l < zfs.VDEV_LABELS / 2 \
 *         else psize - zfs.VDEV_LABELS * sizeof(zfs.vdev_label_t)
 */
    __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(vdev_label_t))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyNumber_Multiply(__pyx_v_l, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Add(__pyx_v_offset, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {

    /* "libzfs.pyx":2617
 *     return offset + l * sizeof(zfs.vdev_label_t) + 0 \
 *         if l < zfs.VDEV_LABELS / 2 \
 *         else psize - zfs.VDEV_LABELS * sizeof(zfs.vdev_label_t)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_2 = __Pyx_PyInt_FromSize_t((VDEV_LABELS * (sizeof(vdev_label_t)))); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_Subtract(__pyx_v_psize, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":2614
 * 
 * 
 * def vdev_label_offset(psize, l, offset):             # <<<<<<<<<<<<<<
 *     return offset + l * sizeof(zfs.vdev_label_t) + 0 \
 *         if l < zfs.VDEV_LABELS / 2 \
 */

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

/* "libzfs.pyx":2620
 * 
 * 
 * def read_label(device):             # <<<<<<<<<<<<<<
 *     cdef nvpair.nvlist_t *handle
 *     cdef NVList nvlist
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_13read_label(PyObject *__pyx_self, PyObject *__pyx_v_device); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_13read_label = {"read_label", (PyCFunction)__pyx_pw_6libzfs_13read_label, METH_O, 0};
static PyObject *__pyx_pw_6libzfs_13read_label(PyObject *__pyx_self, PyObject *__pyx_v_device) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_label (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_12read_label(__pyx_self, ((PyObject *)__pyx_v_device));

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

static PyObject *__pyx_pf_6libzfs_12read_label(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_device) {
  nvlist_t *__pyx_v_handle;
  struct __pyx_obj_6libzfs_NVList *__pyx_v_nvlist = 0;
  int __pyx_v_ret;
  PyObject *__pyx_v_fd = NULL;
  PyObject *__pyx_v_st = 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;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("read_label", 0);

  /* "libzfs.pyx":2627
 *     cdef int ret
 * 
 *     fd = os.open(device, os.O_RDONLY)             # <<<<<<<<<<<<<<
 *     if fd < 0:
 *         raise OSError(errno, os.strerror(errno))
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_open); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_O_RDONLY); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_5 = 1;
    }
  }
  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__pyx_t_2) {
    __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
  }
  __Pyx_INCREF(__pyx_v_device);
  __Pyx_GIVEREF(__pyx_v_device);
  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_device);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_fd = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "libzfs.pyx":2628
 * 
 *     fd = os.open(device, os.O_RDONLY)
 *     if fd < 0:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_fd, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2628, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(1, 2628, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {

    /* "libzfs.pyx":2629
 *     fd = os.open(device, os.O_RDONLY)
 *     if fd < 0:
 *         raise OSError(errno, os.strerror(errno))             # <<<<<<<<<<<<<<
 * 
 *     st = os.fstat(fd)
 */
    __pyx_t_1 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strerror); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_2) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2629, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2629, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2629, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2629, __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_3);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2629, __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(1, 2629, __pyx_L1_error)

    /* "libzfs.pyx":2628
 * 
 *     fd = os.open(device, os.O_RDONLY)
 *     if fd < 0:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  }

  /* "libzfs.pyx":2631
 *         raise OSError(errno, os.strerror(errno))
 * 
 *     st = os.fstat(fd)             # <<<<<<<<<<<<<<
 *     if not stat.S_ISCHR(st.st_mode):
 *         os.close(fd)
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_fstat); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_fd); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_v_fd);
    __Pyx_GIVEREF(__pyx_v_fd);
    PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_fd);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_st = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "libzfs.pyx":2632
 * 
 *     st = os.fstat(fd)
 *     if not stat.S_ISCHR(st.st_mode):             # <<<<<<<<<<<<<<
 *         os.close(fd)
 *         raise OSError(errno.EINVAL, 'Not a character device')
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_stat); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_S_ISCHR); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_st, __pyx_n_s_st_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2632, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(1, 2632, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_9 = ((!__pyx_t_7) != 0);
  if (__pyx_t_9) {

    /* "libzfs.pyx":2633
 *     st = os.fstat(fd)
 *     if not stat.S_ISCHR(st.st_mode):
 *         os.close(fd)             # <<<<<<<<<<<<<<
 *         raise OSError(errno.EINVAL, 'Not a character device')
 * 
 */
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_close); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_fd); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2633, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2633, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_INCREF(__pyx_v_fd);
      __Pyx_GIVEREF(__pyx_v_fd);
      PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_fd);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2633, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "libzfs.pyx":2634
 *     if not stat.S_ISCHR(st.st_mode):
 *         os.close(fd)
 *         raise OSError(errno.EINVAL, 'Not a character device')             # <<<<<<<<<<<<<<
 * 
 *     ret = libzfs.zpool_read_label(fd, &handle)
 */
    __pyx_t_3 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_EINVAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
    __Pyx_INCREF(__pyx_kp_s_Not_a_character_device);
    __Pyx_GIVEREF(__pyx_kp_s_Not_a_character_device);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_s_Not_a_character_device);
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __PYX_ERR(1, 2634, __pyx_L1_error)

    /* "libzfs.pyx":2632
 * 
 *     st = os.fstat(fd)
 *     if not stat.S_ISCHR(st.st_mode):             # <<<<<<<<<<<<<<
 *         os.close(fd)
 *         raise OSError(errno.EINVAL, 'Not a character device')
 */
  }

  /* "libzfs.pyx":2636
 *         raise OSError(errno.EINVAL, 'Not a character device')
 * 
 *     ret = libzfs.zpool_read_label(fd, &handle)             # <<<<<<<<<<<<<<
 *     if ret != 0:
 *         os.close(fd)
 */
  __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_fd); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2636, __pyx_L1_error)
  __pyx_v_ret = zpool_read_label(__pyx_t_10, (&__pyx_v_handle));

  /* "libzfs.pyx":2637
 * 
 *     ret = libzfs.zpool_read_label(fd, &handle)
 *     if ret != 0:             # <<<<<<<<<<<<<<
 *         os.close(fd)
 *         raise OSError(errno.EINVAL, 'Cannot read label')
 */
  __pyx_t_9 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_9) {

    /* "libzfs.pyx":2638
 *     ret = libzfs.zpool_read_label(fd, &handle)
 *     if ret != 0:
 *         os.close(fd)             # <<<<<<<<<<<<<<
 *         raise OSError(errno.EINVAL, 'Cannot read label')
 * 
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && 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);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_fd); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2638, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    } else {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2638, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_fd);
      __Pyx_GIVEREF(__pyx_v_fd);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_fd);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2638, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "libzfs.pyx":2639
 *     if ret != 0:
 *         os.close(fd)
 *         raise OSError(errno.EINVAL, 'Cannot read label')             # <<<<<<<<<<<<<<
 * 
 *     os.close(fd)
 */
    __pyx_t_6 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_EINVAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_INCREF(__pyx_kp_s_Cannot_read_label);
    __Pyx_GIVEREF(__pyx_kp_s_Cannot_read_label);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_kp_s_Cannot_read_label);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 2639, __pyx_L1_error)

    /* "libzfs.pyx":2637
 * 
 *     ret = libzfs.zpool_read_label(fd, &handle)
 *     if ret != 0:             # <<<<<<<<<<<<<<
 *         os.close(fd)
 *         raise OSError(errno.EINVAL, 'Cannot read label')
 */
  }

  /* "libzfs.pyx":2641
 *         raise OSError(errno.EINVAL, 'Cannot read label')
 * 
 *     os.close(fd)             # <<<<<<<<<<<<<<
 *     nvlist = NVList(<uintptr_t>handle)
 *     return dict(nvlist)
 */
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_close); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL;
    __Pyx_INCREF(__pyx_v_fd);
    __Pyx_GIVEREF(__pyx_v_fd);
    PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_fd);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":2642
 * 
 *     os.close(fd)
 *     nvlist = NVList(<uintptr_t>handle)             # <<<<<<<<<<<<<<
 *     return dict(nvlist)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6libzfs_NVList), __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_nvlist = ((struct __pyx_obj_6libzfs_NVList *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "libzfs.pyx":2643
 *     os.close(fd)
 *     nvlist = NVList(<uintptr_t>handle)
 *     return dict(nvlist)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_nvlist));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_nvlist));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_nvlist));
  __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)(&PyDict_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "libzfs.pyx":2620
 * 
 * 
 * def read_label(device):             # <<<<<<<<<<<<<<
 *     cdef nvpair.nvlist_t *handle
 *     cdef NVList nvlist
 */

  /* 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("libzfs.read_label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_nvlist);
  __Pyx_XDECREF(__pyx_v_fd);
  __Pyx_XDECREF(__pyx_v_st);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libzfs.pyx":2646
 * 
 * 
 * def clear_label(device):             # <<<<<<<<<<<<<<
 *     cdef int fd
 *     cdef int err
 */

/* Python wrapper */
static PyObject *__pyx_pw_6libzfs_15clear_label(PyObject *__pyx_self, PyObject *__pyx_v_device); /*proto*/
static PyMethodDef __pyx_mdef_6libzfs_15clear_label = {"clear_label", (PyCFunction)__pyx_pw_6libzfs_15clear_label, METH_O, 0};
static PyObject *__pyx_pw_6libzfs_15clear_label(PyObject *__pyx_self, PyObject *__pyx_v_device) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clear_label (wrapper)", 0);
  __pyx_r = __pyx_pf_6libzfs_14clear_label(__pyx_self, ((PyObject *)__pyx_v_device));

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

static PyObject *__pyx_pf_6libzfs_14clear_label(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_device) {
  int __pyx_v_fd;
  int __pyx_v_err;
  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;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("clear_label", 0);

  /* "libzfs.pyx":2650
 *     cdef int err
 * 
 *     fd = os.open(device, os.O_WRONLY)             # <<<<<<<<<<<<<<
 *     if fd < 0:
 *         raise OSError(errno, os.strerror(errno))
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_open); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_O_WRONLY); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_5 = 1;
    }
  }
  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__pyx_t_2) {
    __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
  }
  __Pyx_INCREF(__pyx_v_device);
  __Pyx_GIVEREF(__pyx_v_device);
  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_device);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2650, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_fd = __pyx_t_7;

  /* "libzfs.pyx":2651
 * 
 *     fd = os.open(device, os.O_WRONLY)
 *     if fd < 0:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  __pyx_t_8 = ((__pyx_v_fd < 0) != 0);
  if (__pyx_t_8) {

    /* "libzfs.pyx":2652
 *     fd = os.open(device, os.O_WRONLY)
 *     if fd < 0:
 *         raise OSError(errno, os.strerror(errno))             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
 */
    __pyx_t_1 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strerror); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_2) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2652, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2652, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2652, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2652, __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_3);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2652, __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(1, 2652, __pyx_L1_error)

    /* "libzfs.pyx":2651
 * 
 *     fd = os.open(device, os.O_WRONLY)
 *     if fd < 0:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  }

  /* "libzfs.pyx":2654
 *         raise OSError(errno, os.strerror(errno))
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         err = libzfs.zpool_clear_label(fd)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "libzfs.pyx":2655
 * 
 *     with nogil:
 *         err = libzfs.zpool_clear_label(fd)             # <<<<<<<<<<<<<<
 * 
 *     if err != 0:
 */
        __pyx_v_err = zpool_clear_label(__pyx_v_fd);
      }

      /* "libzfs.pyx":2654
 *         raise OSError(errno, os.strerror(errno))
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         err = libzfs.zpool_clear_label(fd)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L6;
        }
        __pyx_L6:;
      }
  }

  /* "libzfs.pyx":2657
 *         err = libzfs.zpool_clear_label(fd)
 * 
 *     if err != 0:             # <<<<<<<<<<<<<<
 *         os.close(fd)
 *         raise OSError(errno, os.strerror(errno))
 */
  __pyx_t_8 = ((__pyx_v_err != 0) != 0);
  if (__pyx_t_8) {

    /* "libzfs.pyx":2658
 * 
 *     if err != 0:
 *         os.close(fd)             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    if (!__pyx_t_9) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2658, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2658, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); __pyx_t_9 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2658, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "libzfs.pyx":2659
 *     if err != 0:
 *         os.close(fd)
 *         raise OSError(errno, os.strerror(errno))             # <<<<<<<<<<<<<<
 * 
 *     os.close(fd)
 */
    __pyx_t_3 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strerror); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && 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);
      }
    }
    if (!__pyx_t_9) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2659, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2659, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_9); __pyx_t_9 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2659, __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_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_3 = 0;
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 2659, __pyx_L1_error)

    /* "libzfs.pyx":2657
 *         err = libzfs.zpool_clear_label(fd)
 * 
 *     if err != 0:             # <<<<<<<<<<<<<<
 *         os.close(fd)
 *         raise OSError(errno, os.strerror(errno))
 */
  }

  /* "libzfs.pyx":2661
 *         raise OSError(errno, os.strerror(errno))
 * 
 *     os.close(fd)             # <<<<<<<<<<<<<<
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2661, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":2646
 * 
 * 
 * def clear_label(device):             # <<<<<<<<<<<<<<
 *     cdef int fd
 *     cdef int err
 */

  /* 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_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("libzfs.clear_label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static struct __pyx_vtabstruct_6libzfs_NVList __pyx_vtable_6libzfs_NVList;

static PyObject *__pyx_tp_new_6libzfs_NVList(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6libzfs_NVList *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_6libzfs_NVList *)o);
  p->__pyx_vtab = __pyx_vtabptr_6libzfs_NVList;
  return o;
}

static void __pyx_tp_dealloc_6libzfs_NVList(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_6libzfs_6NVList_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}
static PyObject *__pyx_sq_item_6libzfs_NVList(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_6libzfs_NVList(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_6libzfs_6NVList_20__setitem__(o, i, v);
  }
  else {
    return __pyx_pw_6libzfs_6NVList_7__delitem__(o, i);
  }
}

static PyMethodDef __pyx_methods_6libzfs_NVList[] = {
  {"get", (PyCFunction)__pyx_pw_6libzfs_6NVList_12get, METH_VARARGS|METH_KEYWORDS, 0},
  {"type", (PyCFunction)__pyx_pw_6libzfs_6NVList_14type, METH_O, 0},
  {"set", (PyCFunction)__pyx_pw_6libzfs_6NVList_16set, METH_VARARGS|METH_KEYWORDS, 0},
  {"get_type", (PyCFunction)__pyx_pw_6libzfs_6NVList_22get_type, METH_O, 0},
  {"keys", (PyCFunction)__pyx_pw_6libzfs_6NVList_24keys, METH_NOARGS, 0},
  {"values", (PyCFunction)__pyx_pw_6libzfs_6NVList_26values, METH_NOARGS, 0},
  {"items", (PyCFunction)__pyx_pw_6libzfs_6NVList_28items, METH_VARARGS|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_NVList = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_6libzfs_NVList, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  __pyx_pw_6libzfs_6NVList_5__contains__, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_NVList = {
  0, /*mp_length*/
  __pyx_pw_6libzfs_6NVList_18__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_6libzfs_NVList, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_6libzfs_NVList = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.NVList", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs_NVList), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs_NVList, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_NVList, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_NVList, /*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*/
  __pyx_pw_6libzfs_6NVList_9__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6libzfs_NVList, /*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_6libzfs_6NVList_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6libzfs_NVList, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_6libzfs_ZFS __pyx_vtable_6libzfs_ZFS;

static PyObject *__pyx_tp_new_6libzfs_ZFS(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6libzfs_ZFS *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_6libzfs_ZFS *)o);
  p->__pyx_vtab = __pyx_vtabptr_6libzfs_ZFS;
  if (unlikely(__pyx_pw_6libzfs_3ZFS_1__cinit__(o, a, k) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6libzfs_ZFS(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_6libzfs_3ZFS_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_6libzfs_3ZFS_errno(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_3ZFS_5errno_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_3ZFS_errstr(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_3ZFS_6errstr_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_3ZFS_pools(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_3ZFS_5pools_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_3ZFS_datasets(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_3ZFS_8datasets_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_3ZFS_snapshots(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_3ZFS_9snapshots_1__get__(o);
}

static PyMethodDef __pyx_methods_6libzfs_ZFS[] = {
  {"__getstate__", (PyCFunction)__pyx_pw_6libzfs_3ZFS_5__getstate__, METH_NOARGS, 0},
  {"get", (PyCFunction)__pyx_pw_6libzfs_3ZFS_7get, METH_O, 0},
  {"find_import", (PyCFunction)__pyx_pw_6libzfs_3ZFS_9find_import, METH_VARARGS|METH_KEYWORDS, 0},
  {"import_pool", (PyCFunction)__pyx_pw_6libzfs_3ZFS_12import_pool, METH_VARARGS|METH_KEYWORDS, 0},
  {"export_pool", (PyCFunction)__pyx_pw_6libzfs_3ZFS_14export_pool, METH_O, 0},
  {"get_dataset", (PyCFunction)__pyx_pw_6libzfs_3ZFS_16get_dataset, METH_O, 0},
  {"get_snapshot", (PyCFunction)__pyx_pw_6libzfs_3ZFS_18get_snapshot, METH_O, 0},
  {"get_object", (PyCFunction)__pyx_pw_6libzfs_3ZFS_20get_object, METH_O, 0},
  {"get_dataset_by_path", (PyCFunction)__pyx_pw_6libzfs_3ZFS_22get_dataset_by_path, METH_O, 0},
  {"create", (PyCFunction)__pyx_pw_6libzfs_3ZFS_24create, METH_VARARGS|METH_KEYWORDS, 0},
  {"destroy", (PyCFunction)__pyx_pw_6libzfs_3ZFS_26destroy, METH_O, 0},
  {"receive", (PyCFunction)__pyx_pw_6libzfs_3ZFS_28receive, METH_VARARGS|METH_KEYWORDS, 0},
  {"write_history", (PyCFunction)__pyx_pw_6libzfs_3ZFS_30write_history, METH_VARARGS|METH_KEYWORDS, 0},
  {"generate_history_opts", (PyCFunction)__pyx_pw_6libzfs_3ZFS_32generate_history_opts, METH_VARARGS|METH_KEYWORDS, 0},
  {"history_vdevs_list", (PyCFunction)__pyx_pw_6libzfs_3ZFS_34history_vdevs_list, METH_O, 0},
  {"send_resume", (PyCFunction)__pyx_pw_6libzfs_3ZFS_36send_resume, METH_VARARGS|METH_KEYWORDS, 0},
  {"describe_resume_token", (PyCFunction)__pyx_pw_6libzfs_3ZFS_38describe_resume_token, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6libzfs_ZFS[] = {
  {(char *)"errno", __pyx_getprop_6libzfs_3ZFS_errno, 0, (char *)0, 0},
  {(char *)"errstr", __pyx_getprop_6libzfs_3ZFS_errstr, 0, (char *)0, 0},
  {(char *)"pools", __pyx_getprop_6libzfs_3ZFS_pools, 0, (char *)0, 0},
  {(char *)"datasets", __pyx_getprop_6libzfs_3ZFS_datasets, 0, (char *)0, 0},
  {(char *)"snapshots", __pyx_getprop_6libzfs_3ZFS_snapshots, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6libzfs_ZFS = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.ZFS", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs_ZFS), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs_ZFS, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6libzfs_ZFS, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6libzfs_ZFS, /*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_6libzfs_ZFS, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_6libzfs_ZPoolProperty(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6libzfs_ZPoolProperty *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_6libzfs_ZPoolProperty *)o);
  p->pool = ((struct __pyx_obj_6libzfs_ZFSPool *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6libzfs_ZPoolProperty(PyObject *o) {
  struct __pyx_obj_6libzfs_ZPoolProperty *p = (struct __pyx_obj_6libzfs_ZPoolProperty *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->pool);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6libzfs_ZPoolProperty(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs_ZPoolProperty *p = (struct __pyx_obj_6libzfs_ZPoolProperty *)o;
  if (p->pool) {
    e = (*v)(((PyObject*)p->pool), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs_ZPoolProperty(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs_ZPoolProperty *p = (struct __pyx_obj_6libzfs_ZPoolProperty *)o;
  tmp = ((PyObject*)p->pool);
  p->pool = ((struct __pyx_obj_6libzfs_ZFSPool *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6libzfs_13ZPoolProperty_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_13ZPoolProperty_4name_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_13ZPoolProperty_value(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_13ZPoolProperty_5value_1__get__(o);
}

static int __pyx_setprop_6libzfs_13ZPoolProperty_value(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6libzfs_13ZPoolProperty_5value_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6libzfs_13ZPoolProperty_rawvalue(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_13ZPoolProperty_8rawvalue_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_13ZPoolProperty_source(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_13ZPoolProperty_6source_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_13ZPoolProperty_parsed(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_13ZPoolProperty_6parsed_1__get__(o);
}

static int __pyx_setprop_6libzfs_13ZPoolProperty_parsed(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6libzfs_13ZPoolProperty_6parsed_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6libzfs_13ZPoolProperty_allowed_values(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_13ZPoolProperty_14allowed_values_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_13ZPoolProperty_pool(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_13ZPoolProperty_4pool_1__get__(o);
}

static PyMethodDef __pyx_methods_6libzfs_ZPoolProperty[] = {
  {"__getstate__", (PyCFunction)__pyx_pw_6libzfs_13ZPoolProperty_3__getstate__, METH_NOARGS, 0},
  {"reset", (PyCFunction)__pyx_pw_6libzfs_13ZPoolProperty_9reset, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6libzfs_ZPoolProperty[] = {
  {(char *)"name", __pyx_getprop_6libzfs_13ZPoolProperty_name, 0, (char *)0, 0},
  {(char *)"value", __pyx_getprop_6libzfs_13ZPoolProperty_value, __pyx_setprop_6libzfs_13ZPoolProperty_value, (char *)0, 0},
  {(char *)"rawvalue", __pyx_getprop_6libzfs_13ZPoolProperty_rawvalue, 0, (char *)0, 0},
  {(char *)"source", __pyx_getprop_6libzfs_13ZPoolProperty_source, 0, (char *)0, 0},
  {(char *)"parsed", __pyx_getprop_6libzfs_13ZPoolProperty_parsed, __pyx_setprop_6libzfs_13ZPoolProperty_parsed, (char *)0, 0},
  {(char *)"allowed_values", __pyx_getprop_6libzfs_13ZPoolProperty_allowed_values, 0, (char *)0, 0},
  {(char *)"pool", __pyx_getprop_6libzfs_13ZPoolProperty_pool, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6libzfs_ZPoolProperty = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.ZPoolProperty", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs_ZPoolProperty), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs_ZPoolProperty, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_6libzfs_13ZPoolProperty_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_6libzfs_13ZPoolProperty_5__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_6libzfs_ZPoolProperty, /*tp_traverse*/
  __pyx_tp_clear_6libzfs_ZPoolProperty, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6libzfs_ZPoolProperty, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6libzfs_ZPoolProperty, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6libzfs_13ZPoolProperty_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6libzfs_ZPoolProperty, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_6libzfs_ZPoolFeature(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6libzfs_ZPoolFeature *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_6libzfs_ZPoolFeature *)o);
  p->pool = ((struct __pyx_obj_6libzfs_ZFSPool *)Py_None); Py_INCREF(Py_None);
  p->nvlist = ((struct __pyx_obj_6libzfs_NVList *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6libzfs_ZPoolFeature(PyObject *o) {
  struct __pyx_obj_6libzfs_ZPoolFeature *p = (struct __pyx_obj_6libzfs_ZPoolFeature *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->pool);
  Py_CLEAR(p->nvlist);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6libzfs_ZPoolFeature(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs_ZPoolFeature *p = (struct __pyx_obj_6libzfs_ZPoolFeature *)o;
  if (p->pool) {
    e = (*v)(((PyObject*)p->pool), a); if (e) return e;
  }
  if (p->nvlist) {
    e = (*v)(((PyObject*)p->nvlist), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs_ZPoolFeature(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs_ZPoolFeature *p = (struct __pyx_obj_6libzfs_ZPoolFeature *)o;
  tmp = ((PyObject*)p->pool);
  p->pool = ((struct __pyx_obj_6libzfs_ZFSPool *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->nvlist);
  p->nvlist = ((struct __pyx_obj_6libzfs_NVList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6libzfs_12ZPoolFeature_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_12ZPoolFeature_4name_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_12ZPoolFeature_guid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_12ZPoolFeature_4guid_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_12ZPoolFeature_description(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_12ZPoolFeature_11description_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_12ZPoolFeature_state(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_12ZPoolFeature_5state_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_12ZPoolFeature_pool(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_12ZPoolFeature_4pool_1__get__(o);
}

static PyMethodDef __pyx_methods_6libzfs_ZPoolFeature[] = {
  {"__getstate__", (PyCFunction)__pyx_pw_6libzfs_12ZPoolFeature_1__getstate__, METH_NOARGS, 0},
  {"enable", (PyCFunction)__pyx_pw_6libzfs_12ZPoolFeature_3enable, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6libzfs_ZPoolFeature[] = {
  {(char *)"name", __pyx_getprop_6libzfs_12ZPoolFeature_name, 0, (char *)0, 0},
  {(char *)"guid", __pyx_getprop_6libzfs_12ZPoolFeature_guid, 0, (char *)0, 0},
  {(char *)"description", __pyx_getprop_6libzfs_12ZPoolFeature_description, 0, (char *)0, 0},
  {(char *)"state", __pyx_getprop_6libzfs_12ZPoolFeature_state, 0, (char *)0, 0},
  {(char *)"pool", __pyx_getprop_6libzfs_12ZPoolFeature_pool, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6libzfs_ZPoolFeature = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.ZPoolFeature", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs_ZPoolFeature), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs_ZPoolFeature, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs_ZPoolFeature, /*tp_traverse*/
  __pyx_tp_clear_6libzfs_ZPoolFeature, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6libzfs_ZPoolFeature, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6libzfs_ZPoolFeature, /*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_6libzfs_ZPoolFeature, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_6libzfs_ZFSProperty(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6libzfs_ZFSProperty *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_6libzfs_ZFSProperty *)o);
  p->dataset = ((struct __pyx_obj_6libzfs_ZFSObject *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6libzfs_ZFSProperty(PyObject *o) {
  struct __pyx_obj_6libzfs_ZFSProperty *p = (struct __pyx_obj_6libzfs_ZFSProperty *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->dataset);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6libzfs_ZFSProperty(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs_ZFSProperty *p = (struct __pyx_obj_6libzfs_ZFSProperty *)o;
  if (p->dataset) {
    e = (*v)(((PyObject*)p->dataset), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs_ZFSProperty(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs_ZFSProperty *p = (struct __pyx_obj_6libzfs_ZFSProperty *)o;
  tmp = ((PyObject*)p->dataset);
  p->dataset = ((struct __pyx_obj_6libzfs_ZFSObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6libzfs_11ZFSProperty_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_11ZFSProperty_4name_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_11ZFSProperty_value(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_11ZFSProperty_5value_1__get__(o);
}

static int __pyx_setprop_6libzfs_11ZFSProperty_value(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6libzfs_11ZFSProperty_5value_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6libzfs_11ZFSProperty_rawvalue(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_11ZFSProperty_8rawvalue_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_11ZFSProperty_source(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_11ZFSProperty_6source_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_11ZFSProperty_parsed(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_11ZFSProperty_6parsed_1__get__(o);
}

static int __pyx_setprop_6libzfs_11ZFSProperty_parsed(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6libzfs_11ZFSProperty_6parsed_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6libzfs_11ZFSProperty_allowed_values(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_11ZFSProperty_14allowed_values_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_11ZFSProperty_dataset(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_11ZFSProperty_7dataset_1__get__(o);
}

static PyMethodDef __pyx_methods_6libzfs_ZFSProperty[] = {
  {"__getstate__", (PyCFunction)__pyx_pw_6libzfs_11ZFSProperty_3__getstate__, METH_NOARGS, 0},
  {"refresh", (PyCFunction)__pyx_pw_6libzfs_11ZFSProperty_9refresh, METH_NOARGS, 0},
  {"inherit", (PyCFunction)__pyx_pw_6libzfs_11ZFSProperty_11inherit, METH_VARARGS|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6libzfs_ZFSProperty[] = {
  {(char *)"name", __pyx_getprop_6libzfs_11ZFSProperty_name, 0, (char *)0, 0},
  {(char *)"value", __pyx_getprop_6libzfs_11ZFSProperty_value, __pyx_setprop_6libzfs_11ZFSProperty_value, (char *)0, 0},
  {(char *)"rawvalue", __pyx_getprop_6libzfs_11ZFSProperty_rawvalue, 0, (char *)0, 0},
  {(char *)"source", __pyx_getprop_6libzfs_11ZFSProperty_source, 0, (char *)0, 0},
  {(char *)"parsed", __pyx_getprop_6libzfs_11ZFSProperty_parsed, __pyx_setprop_6libzfs_11ZFSProperty_parsed, (char *)0, 0},
  {(char *)"allowed_values", __pyx_getprop_6libzfs_11ZFSProperty_allowed_values, 0, (char *)0, 0},
  {(char *)"dataset", __pyx_getprop_6libzfs_11ZFSProperty_dataset, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6libzfs_ZFSProperty = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.ZFSProperty", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs_ZFSProperty), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs_ZFSProperty, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_6libzfs_11ZFSProperty_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_6libzfs_11ZFSProperty_5__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_6libzfs_ZFSProperty, /*tp_traverse*/
  __pyx_tp_clear_6libzfs_ZFSProperty, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6libzfs_ZFSProperty, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6libzfs_ZFSProperty, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6libzfs_11ZFSProperty_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6libzfs_ZFSProperty, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_6libzfs_ZFSUserProperty(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6libzfs_ZFSUserProperty *p;
  PyObject *o = __pyx_tp_new_6libzfs_ZFSProperty(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6libzfs_ZFSUserProperty *)o);
  p->values = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->name = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6libzfs_ZFSUserProperty(PyObject *o) {
  struct __pyx_obj_6libzfs_ZFSUserProperty *p = (struct __pyx_obj_6libzfs_ZFSUserProperty *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->values);
  Py_CLEAR(p->name);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6libzfs_ZFSProperty(o);
}

static int __pyx_tp_traverse_6libzfs_ZFSUserProperty(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs_ZFSUserProperty *p = (struct __pyx_obj_6libzfs_ZFSUserProperty *)o;
  e = __pyx_tp_traverse_6libzfs_ZFSProperty(o, v, a); if (e) return e;
  if (p->values) {
    e = (*v)(p->values, a); if (e) return e;
  }
  if (p->name) {
    e = (*v)(p->name, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs_ZFSUserProperty(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs_ZFSUserProperty *p = (struct __pyx_obj_6libzfs_ZFSUserProperty *)o;
  __pyx_tp_clear_6libzfs_ZFSProperty(o);
  tmp = ((PyObject*)p->values);
  p->values = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->name);
  p->name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6libzfs_15ZFSUserProperty_value(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_15ZFSUserProperty_5value_1__get__(o);
}

static int __pyx_setprop_6libzfs_15ZFSUserProperty_value(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6libzfs_15ZFSUserProperty_5value_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6libzfs_15ZFSUserProperty_rawvalue(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_15ZFSUserProperty_8rawvalue_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_15ZFSUserProperty_source(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_15ZFSUserProperty_6source_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_15ZFSUserProperty_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_15ZFSUserProperty_4name_1__get__(o);
}

static PyMethodDef __pyx_methods_6libzfs_ZFSUserProperty[] = {
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6libzfs_ZFSUserProperty[] = {
  {(char *)"value", __pyx_getprop_6libzfs_15ZFSUserProperty_value, __pyx_setprop_6libzfs_15ZFSUserProperty_value, (char *)0, 0},
  {(char *)"rawvalue", __pyx_getprop_6libzfs_15ZFSUserProperty_rawvalue, 0, (char *)0, 0},
  {(char *)"source", __pyx_getprop_6libzfs_15ZFSUserProperty_source, 0, (char *)0, 0},
  {(char *)"name", __pyx_getprop_6libzfs_15ZFSUserProperty_name, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6libzfs_ZFSUserProperty = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.ZFSUserProperty", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs_ZFSUserProperty), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs_ZFSUserProperty, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_6libzfs_15ZFSUserProperty_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_6libzfs_15ZFSUserProperty_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_6libzfs_ZFSUserProperty, /*tp_traverse*/
  __pyx_tp_clear_6libzfs_ZFSUserProperty, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6libzfs_ZFSUserProperty, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6libzfs_ZFSUserProperty, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6libzfs_15ZFSUserProperty_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6libzfs_ZFSUserProperty, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_6libzfs_ZFSVdevStats(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6libzfs_ZFSVdevStats *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_6libzfs_ZFSVdevStats *)o);
  p->vdev = ((struct __pyx_obj_6libzfs_ZFSVdev *)Py_None); Py_INCREF(Py_None);
  p->nvlist = ((struct __pyx_obj_6libzfs_NVList *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6libzfs_ZFSVdevStats(PyObject *o) {
  struct __pyx_obj_6libzfs_ZFSVdevStats *p = (struct __pyx_obj_6libzfs_ZFSVdevStats *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->vdev);
  Py_CLEAR(p->nvlist);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6libzfs_ZFSVdevStats(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs_ZFSVdevStats *p = (struct __pyx_obj_6libzfs_ZFSVdevStats *)o;
  if (p->vdev) {
    e = (*v)(((PyObject*)p->vdev), a); if (e) return e;
  }
  if (p->nvlist) {
    e = (*v)(((PyObject*)p->nvlist), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs_ZFSVdevStats(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs_ZFSVdevStats *p = (struct __pyx_obj_6libzfs_ZFSVdevStats *)o;
  tmp = ((PyObject*)p->vdev);
  p->vdev = ((struct __pyx_obj_6libzfs_ZFSVdev *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->nvlist);
  p->nvlist = ((struct __pyx_obj_6libzfs_NVList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6libzfs_12ZFSVdevStats_timestamp(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_12ZFSVdevStats_9timestamp_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_12ZFSVdevStats_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_12ZFSVdevStats_4size_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_12ZFSVdevStats_allocated(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_12ZFSVdevStats_9allocated_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_12ZFSVdevStats_read_errors(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_12ZFSVdevStats_11read_errors_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_12ZFSVdevStats_write_errors(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_12ZFSVdevStats_12write_errors_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_12ZFSVdevStats_checksum_errors(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_12ZFSVdevStats_15checksum_errors_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_12ZFSVdevStats_ops(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_12ZFSVdevStats_3ops_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_12ZFSVdevStats_bytes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_12ZFSVdevStats_5bytes_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_12ZFSVdevStats_configured_ashift(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_12ZFSVdevStats_17configured_ashift_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_12ZFSVdevStats_logical_ashift(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_12ZFSVdevStats_14logical_ashift_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_12ZFSVdevStats_physical_ashift(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_12ZFSVdevStats_15physical_ashift_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_12ZFSVdevStats_fragmentation(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_12ZFSVdevStats_13fragmentation_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_12ZFSVdevStats_vdev(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_12ZFSVdevStats_4vdev_1__get__(o);
}

static PyMethodDef __pyx_methods_6libzfs_ZFSVdevStats[] = {
  {"__getstate__", (PyCFunction)__pyx_pw_6libzfs_12ZFSVdevStats_1__getstate__, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6libzfs_ZFSVdevStats[] = {
  {(char *)"timestamp", __pyx_getprop_6libzfs_12ZFSVdevStats_timestamp, 0, (char *)0, 0},
  {(char *)"size", __pyx_getprop_6libzfs_12ZFSVdevStats_size, 0, (char *)0, 0},
  {(char *)"allocated", __pyx_getprop_6libzfs_12ZFSVdevStats_allocated, 0, (char *)0, 0},
  {(char *)"read_errors", __pyx_getprop_6libzfs_12ZFSVdevStats_read_errors, 0, (char *)0, 0},
  {(char *)"write_errors", __pyx_getprop_6libzfs_12ZFSVdevStats_write_errors, 0, (char *)0, 0},
  {(char *)"checksum_errors", __pyx_getprop_6libzfs_12ZFSVdevStats_checksum_errors, 0, (char *)0, 0},
  {(char *)"ops", __pyx_getprop_6libzfs_12ZFSVdevStats_ops, 0, (char *)0, 0},
  {(char *)"bytes", __pyx_getprop_6libzfs_12ZFSVdevStats_bytes, 0, (char *)0, 0},
  {(char *)"configured_ashift", __pyx_getprop_6libzfs_12ZFSVdevStats_configured_ashift, 0, (char *)0, 0},
  {(char *)"logical_ashift", __pyx_getprop_6libzfs_12ZFSVdevStats_logical_ashift, 0, (char *)0, 0},
  {(char *)"physical_ashift", __pyx_getprop_6libzfs_12ZFSVdevStats_physical_ashift, 0, (char *)0, 0},
  {(char *)"fragmentation", __pyx_getprop_6libzfs_12ZFSVdevStats_fragmentation, 0, (char *)0, 0},
  {(char *)"vdev", __pyx_getprop_6libzfs_12ZFSVdevStats_vdev, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6libzfs_ZFSVdevStats = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.ZFSVdevStats", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs_ZFSVdevStats), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs_ZFSVdevStats, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs_ZFSVdevStats, /*tp_traverse*/
  __pyx_tp_clear_6libzfs_ZFSVdevStats, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6libzfs_ZFSVdevStats, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6libzfs_ZFSVdevStats, /*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_6libzfs_ZFSVdevStats, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_6libzfs_ZFSVdev(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6libzfs_ZFSVdev *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_6libzfs_ZFSVdev *)o);
  p->zpool = ((struct __pyx_obj_6libzfs_ZFSPool *)Py_None); Py_INCREF(Py_None);
  p->root = ((struct __pyx_obj_6libzfs_ZFS *)Py_None); Py_INCREF(Py_None);
  p->parent = ((struct __pyx_obj_6libzfs_ZFSVdev *)Py_None); Py_INCREF(Py_None);
  p->group = Py_None; Py_INCREF(Py_None);
  p->nvlist = ((struct __pyx_obj_6libzfs_NVList *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6libzfs_ZFSVdev(PyObject *o) {
  struct __pyx_obj_6libzfs_ZFSVdev *p = (struct __pyx_obj_6libzfs_ZFSVdev *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->zpool);
  Py_CLEAR(p->root);
  Py_CLEAR(p->parent);
  Py_CLEAR(p->group);
  Py_CLEAR(p->nvlist);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6libzfs_ZFSVdev(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs_ZFSVdev *p = (struct __pyx_obj_6libzfs_ZFSVdev *)o;
  if (p->zpool) {
    e = (*v)(((PyObject*)p->zpool), a); if (e) return e;
  }
  if (p->root) {
    e = (*v)(((PyObject*)p->root), a); if (e) return e;
  }
  if (p->parent) {
    e = (*v)(((PyObject*)p->parent), a); if (e) return e;
  }
  if (p->group) {
    e = (*v)(p->group, a); if (e) return e;
  }
  if (p->nvlist) {
    e = (*v)(((PyObject*)p->nvlist), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs_ZFSVdev(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs_ZFSVdev *p = (struct __pyx_obj_6libzfs_ZFSVdev *)o;
  tmp = ((PyObject*)p->zpool);
  p->zpool = ((struct __pyx_obj_6libzfs_ZFSPool *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->root);
  p->root = ((struct __pyx_obj_6libzfs_ZFS *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->parent);
  p->parent = ((struct __pyx_obj_6libzfs_ZFSVdev *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->group);
  p->group = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->nvlist);
  p->nvlist = ((struct __pyx_obj_6libzfs_NVList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6libzfs_7ZFSVdev_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSVdev_4type_1__get__(o);
}

static int __pyx_setprop_6libzfs_7ZFSVdev_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6libzfs_7ZFSVdev_4type_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6libzfs_7ZFSVdev_guid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSVdev_4guid_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSVdev_path(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSVdev_4path_1__get__(o);
}

static int __pyx_setprop_6libzfs_7ZFSVdev_path(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6libzfs_7ZFSVdev_4path_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6libzfs_7ZFSVdev_status(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSVdev_6status_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSVdev_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSVdev_4size_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSVdev_stats(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSVdev_5stats_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSVdev_children(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSVdev_8children_1__get__(o);
}

static int __pyx_setprop_6libzfs_7ZFSVdev_children(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6libzfs_7ZFSVdev_8children_4__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6libzfs_7ZFSVdev_disks(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSVdev_5disks_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSVdev_zpool(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSVdev_5zpool_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSVdev_root(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSVdev_4root_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSVdev_parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSVdev_6parent_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSVdev_group(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSVdev_5group_1__get__(o);
}

static PyMethodDef __pyx_methods_6libzfs_ZFSVdev[] = {
  {"__getstate__", (PyCFunction)__pyx_pw_6libzfs_7ZFSVdev_7__getstate__, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_child_vdev", (PyCFunction)__pyx_pw_6libzfs_7ZFSVdev_9add_child_vdev, METH_O, 0},
  {"attach", (PyCFunction)__pyx_pw_6libzfs_7ZFSVdev_11attach, METH_O, 0},
  {"replace", (PyCFunction)__pyx_pw_6libzfs_7ZFSVdev_13replace, METH_O, 0},
  {"detach", (PyCFunction)__pyx_pw_6libzfs_7ZFSVdev_15detach, METH_NOARGS, 0},
  {"remove", (PyCFunction)__pyx_pw_6libzfs_7ZFSVdev_17remove, METH_NOARGS, 0},
  {"offline", (PyCFunction)__pyx_pw_6libzfs_7ZFSVdev_19offline, METH_VARARGS|METH_KEYWORDS, 0},
  {"online", (PyCFunction)__pyx_pw_6libzfs_7ZFSVdev_21online, METH_VARARGS|METH_KEYWORDS, 0},
  {"degrade", (PyCFunction)__pyx_pw_6libzfs_7ZFSVdev_23degrade, METH_O, 0},
  {"fault", (PyCFunction)__pyx_pw_6libzfs_7ZFSVdev_25fault, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6libzfs_ZFSVdev[] = {
  {(char *)"type", __pyx_getprop_6libzfs_7ZFSVdev_type, __pyx_setprop_6libzfs_7ZFSVdev_type, (char *)0, 0},
  {(char *)"guid", __pyx_getprop_6libzfs_7ZFSVdev_guid, 0, (char *)0, 0},
  {(char *)"path", __pyx_getprop_6libzfs_7ZFSVdev_path, __pyx_setprop_6libzfs_7ZFSVdev_path, (char *)0, 0},
  {(char *)"status", __pyx_getprop_6libzfs_7ZFSVdev_status, 0, (char *)0, 0},
  {(char *)"size", __pyx_getprop_6libzfs_7ZFSVdev_size, 0, (char *)0, 0},
  {(char *)"stats", __pyx_getprop_6libzfs_7ZFSVdev_stats, 0, (char *)0, 0},
  {(char *)"children", __pyx_getprop_6libzfs_7ZFSVdev_children, __pyx_setprop_6libzfs_7ZFSVdev_children, (char *)0, 0},
  {(char *)"disks", __pyx_getprop_6libzfs_7ZFSVdev_disks, 0, (char *)0, 0},
  {(char *)"zpool", __pyx_getprop_6libzfs_7ZFSVdev_zpool, 0, (char *)0, 0},
  {(char *)"root", __pyx_getprop_6libzfs_7ZFSVdev_root, 0, (char *)0, 0},
  {(char *)"parent", __pyx_getprop_6libzfs_7ZFSVdev_parent, 0, (char *)0, 0},
  {(char *)"group", __pyx_getprop_6libzfs_7ZFSVdev_group, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6libzfs_ZFSVdev = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.ZFSVdev", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs_ZFSVdev), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs_ZFSVdev, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_6libzfs_7ZFSVdev_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_6libzfs_7ZFSVdev_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_6libzfs_ZFSVdev, /*tp_traverse*/
  __pyx_tp_clear_6libzfs_ZFSVdev, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6libzfs_ZFSVdev, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6libzfs_ZFSVdev, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6libzfs_7ZFSVdev_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6libzfs_ZFSVdev, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_6libzfs_ZPoolScrub(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6libzfs_ZPoolScrub *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_6libzfs_ZPoolScrub *)o);
  p->root = ((struct __pyx_obj_6libzfs_ZFS *)Py_None); Py_INCREF(Py_None);
  p->pool = ((struct __pyx_obj_6libzfs_ZFSPool *)Py_None); Py_INCREF(Py_None);
  p->stat = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6libzfs_ZPoolScrub(PyObject *o) {
  struct __pyx_obj_6libzfs_ZPoolScrub *p = (struct __pyx_obj_6libzfs_ZPoolScrub *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->root);
  Py_CLEAR(p->pool);
  Py_CLEAR(p->stat);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6libzfs_ZPoolScrub(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs_ZPoolScrub *p = (struct __pyx_obj_6libzfs_ZPoolScrub *)o;
  if (p->root) {
    e = (*v)(((PyObject*)p->root), a); if (e) return e;
  }
  if (p->pool) {
    e = (*v)(((PyObject*)p->pool), a); if (e) return e;
  }
  if (p->stat) {
    e = (*v)(p->stat, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs_ZPoolScrub(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs_ZPoolScrub *p = (struct __pyx_obj_6libzfs_ZPoolScrub *)o;
  tmp = ((PyObject*)p->root);
  p->root = ((struct __pyx_obj_6libzfs_ZFS *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->pool);
  p->pool = ((struct __pyx_obj_6libzfs_ZFSPool *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->stat);
  p->stat = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6libzfs_10ZPoolScrub_state(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_10ZPoolScrub_5state_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_10ZPoolScrub_function(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_10ZPoolScrub_8function_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_10ZPoolScrub_start_time(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_10ZPoolScrub_10start_time_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_10ZPoolScrub_end_time(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_10ZPoolScrub_8end_time_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_10ZPoolScrub_bytes_to_scan(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_10ZPoolScrub_13bytes_to_scan_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_10ZPoolScrub_bytes_scanned(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_10ZPoolScrub_13bytes_scanned_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_10ZPoolScrub_errors(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_10ZPoolScrub_6errors_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_10ZPoolScrub_percentage(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_10ZPoolScrub_10percentage_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_10ZPoolScrub_root(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_10ZPoolScrub_4root_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_10ZPoolScrub_pool(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_10ZPoolScrub_4pool_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_10ZPoolScrub_stat(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_10ZPoolScrub_4stat_1__get__(o);
}

static PyMethodDef __pyx_methods_6libzfs_ZPoolScrub[] = {
  {"__getstate__", (PyCFunction)__pyx_pw_6libzfs_10ZPoolScrub_3__getstate__, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6libzfs_ZPoolScrub[] = {
  {(char *)"state", __pyx_getprop_6libzfs_10ZPoolScrub_state, 0, (char *)0, 0},
  {(char *)"function", __pyx_getprop_6libzfs_10ZPoolScrub_function, 0, (char *)0, 0},
  {(char *)"start_time", __pyx_getprop_6libzfs_10ZPoolScrub_start_time, 0, (char *)0, 0},
  {(char *)"end_time", __pyx_getprop_6libzfs_10ZPoolScrub_end_time, 0, (char *)0, 0},
  {(char *)"bytes_to_scan", __pyx_getprop_6libzfs_10ZPoolScrub_bytes_to_scan, 0, (char *)0, 0},
  {(char *)"bytes_scanned", __pyx_getprop_6libzfs_10ZPoolScrub_bytes_scanned, 0, (char *)0, 0},
  {(char *)"errors", __pyx_getprop_6libzfs_10ZPoolScrub_errors, 0, (char *)0, 0},
  {(char *)"percentage", __pyx_getprop_6libzfs_10ZPoolScrub_percentage, 0, (char *)0, 0},
  {(char *)"root", __pyx_getprop_6libzfs_10ZPoolScrub_root, 0, (char *)0, 0},
  {(char *)"pool", __pyx_getprop_6libzfs_10ZPoolScrub_pool, 0, (char *)0, 0},
  {(char *)"stat", __pyx_getprop_6libzfs_10ZPoolScrub_stat, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6libzfs_ZPoolScrub = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.ZPoolScrub", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs_ZPoolScrub), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs_ZPoolScrub, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs_ZPoolScrub, /*tp_traverse*/
  __pyx_tp_clear_6libzfs_ZPoolScrub, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6libzfs_ZPoolScrub, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6libzfs_ZPoolScrub, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6libzfs_10ZPoolScrub_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6libzfs_ZPoolScrub, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_6libzfs_ZFSPool __pyx_vtable_6libzfs_ZFSPool;

static PyObject *__pyx_tp_new_6libzfs_ZFSPool(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6libzfs_ZFSPool *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_6libzfs_ZFSPool *)o);
  p->__pyx_vtab = __pyx_vtabptr_6libzfs_ZFSPool;
  p->root = ((struct __pyx_obj_6libzfs_ZFS *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6libzfs_7ZFSPool_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6libzfs_ZFSPool(PyObject *o) {
  struct __pyx_obj_6libzfs_ZFSPool *p = (struct __pyx_obj_6libzfs_ZFSPool *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_6libzfs_7ZFSPool_5__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->root);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6libzfs_ZFSPool(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs_ZFSPool *p = (struct __pyx_obj_6libzfs_ZFSPool *)o;
  if (p->root) {
    e = (*v)(((PyObject*)p->root), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs_ZFSPool(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs_ZFSPool *p = (struct __pyx_obj_6libzfs_ZFSPool *)o;
  tmp = ((PyObject*)p->root);
  p->root = ((struct __pyx_obj_6libzfs_ZFS *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6libzfs_7ZFSPool_root_dataset(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSPool_12root_dataset_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSPool_root_vdev(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSPool_9root_vdev_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSPool_data_vdevs(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSPool_10data_vdevs_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSPool_log_vdevs(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSPool_9log_vdevs_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSPool_cache_vdevs(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSPool_11cache_vdevs_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSPool_spare_vdevs(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSPool_11spare_vdevs_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSPool_groups(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSPool_6groups_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSPool_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSPool_4name_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSPool_guid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSPool_4guid_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSPool_hostname(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSPool_8hostname_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSPool_state(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSPool_5state_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSPool_status(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSPool_6status_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSPool_error_count(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSPool_11error_count_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSPool_config(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSPool_6config_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSPool_properties(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSPool_10properties_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSPool_features(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSPool_8features_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSPool_disks(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSPool_5disks_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSPool_scrub(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSPool_5scrub_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_7ZFSPool_root(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_7ZFSPool_4root_1__get__(o);
}

static PyMethodDef __pyx_methods_6libzfs_ZFSPool[] = {
  {"__getstate__", (PyCFunction)__pyx_pw_6libzfs_7ZFSPool_11__getstate__, METH_VARARGS|METH_KEYWORDS, 0},
  {"create", (PyCFunction)__pyx_pw_6libzfs_7ZFSPool_13create, METH_VARARGS|METH_KEYWORDS, 0},
  {"attach_vdevs", (PyCFunction)__pyx_pw_6libzfs_7ZFSPool_15attach_vdevs, METH_O, 0},
  {"vdev_by_guid", (PyCFunction)__pyx_pw_6libzfs_7ZFSPool_17vdev_by_guid, METH_O, 0},
  {"delete", (PyCFunction)__pyx_pw_6libzfs_7ZFSPool_19delete, METH_NOARGS, 0},
  {"start_scrub", (PyCFunction)__pyx_pw_6libzfs_7ZFSPool_21start_scrub, METH_NOARGS, 0},
  {"stop_scrub", (PyCFunction)__pyx_pw_6libzfs_7ZFSPool_23stop_scrub, METH_NOARGS, 0},
  {"clear", (PyCFunction)__pyx_pw_6libzfs_7ZFSPool_25clear, METH_NOARGS, 0},
  {"upgrade", (PyCFunction)__pyx_pw_6libzfs_7ZFSPool_27upgrade, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6libzfs_ZFSPool[] = {
  {(char *)"root_dataset", __pyx_getprop_6libzfs_7ZFSPool_root_dataset, 0, (char *)0, 0},
  {(char *)"root_vdev", __pyx_getprop_6libzfs_7ZFSPool_root_vdev, 0, (char *)0, 0},
  {(char *)"data_vdevs", __pyx_getprop_6libzfs_7ZFSPool_data_vdevs, 0, (char *)0, 0},
  {(char *)"log_vdevs", __pyx_getprop_6libzfs_7ZFSPool_log_vdevs, 0, (char *)0, 0},
  {(char *)"cache_vdevs", __pyx_getprop_6libzfs_7ZFSPool_cache_vdevs, 0, (char *)0, 0},
  {(char *)"spare_vdevs", __pyx_getprop_6libzfs_7ZFSPool_spare_vdevs, 0, (char *)0, 0},
  {(char *)"groups", __pyx_getprop_6libzfs_7ZFSPool_groups, 0, (char *)0, 0},
  {(char *)"name", __pyx_getprop_6libzfs_7ZFSPool_name, 0, (char *)0, 0},
  {(char *)"guid", __pyx_getprop_6libzfs_7ZFSPool_guid, 0, (char *)0, 0},
  {(char *)"hostname", __pyx_getprop_6libzfs_7ZFSPool_hostname, 0, (char *)0, 0},
  {(char *)"state", __pyx_getprop_6libzfs_7ZFSPool_state, 0, (char *)0, 0},
  {(char *)"status", __pyx_getprop_6libzfs_7ZFSPool_status, 0, (char *)0, 0},
  {(char *)"error_count", __pyx_getprop_6libzfs_7ZFSPool_error_count, 0, (char *)0, 0},
  {(char *)"config", __pyx_getprop_6libzfs_7ZFSPool_config, 0, (char *)0, 0},
  {(char *)"properties", __pyx_getprop_6libzfs_7ZFSPool_properties, 0, (char *)0, 0},
  {(char *)"features", __pyx_getprop_6libzfs_7ZFSPool_features, 0, (char *)0, 0},
  {(char *)"disks", __pyx_getprop_6libzfs_7ZFSPool_disks, 0, (char *)0, 0},
  {(char *)"scrub", __pyx_getprop_6libzfs_7ZFSPool_scrub, 0, (char *)0, 0},
  {(char *)"root", __pyx_getprop_6libzfs_7ZFSPool_root, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6libzfs_ZFSPool = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.ZFSPool", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs_ZFSPool), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs_ZFSPool, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_6libzfs_7ZFSPool_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_6libzfs_7ZFSPool_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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs_ZFSPool, /*tp_traverse*/
  __pyx_tp_clear_6libzfs_ZFSPool, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6libzfs_ZFSPool, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6libzfs_ZFSPool, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6libzfs_7ZFSPool_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6libzfs_ZFSPool, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_6libzfs_ZFSImportablePool __pyx_vtable_6libzfs_ZFSImportablePool;

static PyObject *__pyx_tp_new_6libzfs_ZFSImportablePool(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6libzfs_ZFSImportablePool *p;
  PyObject *o = __pyx_tp_new_6libzfs_ZFSPool(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6libzfs_ZFSImportablePool *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6libzfs_ZFSPool*)__pyx_vtabptr_6libzfs_ZFSImportablePool;
  p->nvlist = ((struct __pyx_obj_6libzfs_NVList *)Py_None); Py_INCREF(Py_None);
  p->name = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6libzfs_ZFSImportablePool(PyObject *o) {
  struct __pyx_obj_6libzfs_ZFSImportablePool *p = (struct __pyx_obj_6libzfs_ZFSImportablePool *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->nvlist);
  Py_CLEAR(p->name);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6libzfs_ZFSPool(o);
}

static int __pyx_tp_traverse_6libzfs_ZFSImportablePool(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs_ZFSImportablePool *p = (struct __pyx_obj_6libzfs_ZFSImportablePool *)o;
  e = __pyx_tp_traverse_6libzfs_ZFSPool(o, v, a); if (e) return e;
  if (p->nvlist) {
    e = (*v)(((PyObject*)p->nvlist), a); if (e) return e;
  }
  if (p->name) {
    e = (*v)(p->name, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs_ZFSImportablePool(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs_ZFSImportablePool *p = (struct __pyx_obj_6libzfs_ZFSImportablePool *)o;
  __pyx_tp_clear_6libzfs_ZFSPool(o);
  tmp = ((PyObject*)p->nvlist);
  p->nvlist = ((struct __pyx_obj_6libzfs_NVList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->name);
  p->name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6libzfs_17ZFSImportablePool_config(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_17ZFSImportablePool_6config_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_17ZFSImportablePool_properties(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_17ZFSImportablePool_10properties_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_17ZFSImportablePool_root_dataset(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_17ZFSImportablePool_12root_dataset_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_17ZFSImportablePool_error_count(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_17ZFSImportablePool_11error_count_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_17ZFSImportablePool_features(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_17ZFSImportablePool_8features_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_17ZFSImportablePool_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_17ZFSImportablePool_4name_1__get__(o);
}

static int __pyx_setprop_6libzfs_17ZFSImportablePool_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6libzfs_17ZFSImportablePool_4name_3__set__(o, v);
  }
  else {
    return __pyx_pw_6libzfs_17ZFSImportablePool_4name_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_6libzfs_ZFSImportablePool[] = {
  {"create", (PyCFunction)__pyx_pw_6libzfs_17ZFSImportablePool_5create, METH_VARARGS|METH_KEYWORDS, 0},
  {"destroy", (PyCFunction)__pyx_pw_6libzfs_17ZFSImportablePool_7destroy, METH_O, 0},
  {"attach_vdev", (PyCFunction)__pyx_pw_6libzfs_17ZFSImportablePool_9attach_vdev, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6libzfs_ZFSImportablePool[] = {
  {(char *)"config", __pyx_getprop_6libzfs_17ZFSImportablePool_config, 0, (char *)0, 0},
  {(char *)"properties", __pyx_getprop_6libzfs_17ZFSImportablePool_properties, 0, (char *)0, 0},
  {(char *)"root_dataset", __pyx_getprop_6libzfs_17ZFSImportablePool_root_dataset, 0, (char *)0, 0},
  {(char *)"error_count", __pyx_getprop_6libzfs_17ZFSImportablePool_error_count, 0, (char *)0, 0},
  {(char *)"features", __pyx_getprop_6libzfs_17ZFSImportablePool_features, 0, (char *)0, 0},
  {(char *)"name", __pyx_getprop_6libzfs_17ZFSImportablePool_name, __pyx_setprop_6libzfs_17ZFSImportablePool_name, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6libzfs_ZFSImportablePool = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.ZFSImportablePool", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs_ZFSImportablePool), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs_ZFSImportablePool, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_6libzfs_17ZFSImportablePool_3__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_6libzfs_17ZFSImportablePool_1__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_6libzfs_ZFSImportablePool, /*tp_traverse*/
  __pyx_tp_clear_6libzfs_ZFSImportablePool, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6libzfs_ZFSImportablePool, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6libzfs_ZFSImportablePool, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6libzfs_7ZFSPool_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6libzfs_ZFSImportablePool, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_6libzfs_ZFSPropertyDict __pyx_vtable_6libzfs_ZFSPropertyDict;

static PyObject *__pyx_tp_new_6libzfs_ZFSPropertyDict(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6libzfs_ZFSPropertyDict *p;
  PyObject *o = (&PyDict_Type)->tp_new(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6libzfs_ZFSPropertyDict *)o);
  p->__pyx_vtab = __pyx_vtabptr_6libzfs_ZFSPropertyDict;
  p->parent = ((struct __pyx_obj_6libzfs_ZFSObject *)Py_None); Py_INCREF(Py_None);
  p->props = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6libzfs_ZFSPropertyDict(PyObject *o) {
  struct __pyx_obj_6libzfs_ZFSPropertyDict *p = (struct __pyx_obj_6libzfs_ZFSPropertyDict *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->parent);
  Py_CLEAR(p->props);
  PyObject_GC_Track(o);
  (&PyDict_Type)->tp_dealloc(o);
}

static int __pyx_tp_traverse_6libzfs_ZFSPropertyDict(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs_ZFSPropertyDict *p = (struct __pyx_obj_6libzfs_ZFSPropertyDict *)o;
  if (!(&PyDict_Type)->tp_traverse); else { e = (&PyDict_Type)->tp_traverse(o,v,a); if (e) return e; }
  if (p->parent) {
    e = (*v)(((PyObject*)p->parent), a); if (e) return e;
  }
  if (p->props) {
    e = (*v)(p->props, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs_ZFSPropertyDict(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs_ZFSPropertyDict *p = (struct __pyx_obj_6libzfs_ZFSPropertyDict *)o;
  if (!(&PyDict_Type)->tp_clear); else (&PyDict_Type)->tp_clear(o);
  tmp = ((PyObject*)p->parent);
  p->parent = ((struct __pyx_obj_6libzfs_ZFSObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->props);
  p->props = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
static PyObject *__pyx_sq_item_6libzfs_ZFSPropertyDict(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_6libzfs_ZFSPropertyDict(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_6libzfs_15ZFSPropertyDict_9__setitem__(o, i, v);
  }
  else {
    return __pyx_pw_6libzfs_15ZFSPropertyDict_5__delitem__(o, i);
  }
}

static PyMethodDef __pyx_methods_6libzfs_ZFSPropertyDict[] = {
  {"refresh", (PyCFunction)__pyx_pw_6libzfs_15ZFSPropertyDict_3refresh, METH_NOARGS, 0},
  {"get", (PyCFunction)__pyx_pw_6libzfs_15ZFSPropertyDict_14get, METH_VARARGS|METH_KEYWORDS, 0},
  {"setdefault", (PyCFunction)__pyx_pw_6libzfs_15ZFSPropertyDict_16setdefault, METH_VARARGS|METH_KEYWORDS, 0},
  {"keys", (PyCFunction)__pyx_pw_6libzfs_15ZFSPropertyDict_18keys, METH_NOARGS, 0},
  {"values", (PyCFunction)__pyx_pw_6libzfs_15ZFSPropertyDict_20values, METH_NOARGS, 0},
  {"iterkeys", (PyCFunction)__pyx_pw_6libzfs_15ZFSPropertyDict_22iterkeys, METH_NOARGS, 0},
  {"itervalues", (PyCFunction)__pyx_pw_6libzfs_15ZFSPropertyDict_24itervalues, METH_NOARGS, 0},
  {"has_key", (PyCFunction)__pyx_pw_6libzfs_15ZFSPropertyDict_26has_key, METH_O, 0},
  {"items", (PyCFunction)__pyx_pw_6libzfs_15ZFSPropertyDict_28items, METH_NOARGS, 0},
  {"update", (PyCFunction)__pyx_pw_6libzfs_15ZFSPropertyDict_30update, METH_VARARGS|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_ZFSPropertyDict = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_6libzfs_ZFSPropertyDict, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  __pyx_pw_6libzfs_15ZFSPropertyDict_32__contains__, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_ZFSPropertyDict = {
  0, /*mp_length*/
  __pyx_pw_6libzfs_15ZFSPropertyDict_7__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_6libzfs_ZFSPropertyDict, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_6libzfs_ZFSPropertyDict = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.ZFSPropertyDict", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs_ZFSPropertyDict), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs_ZFSPropertyDict, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_6libzfs_15ZFSPropertyDict_1__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_ZFSPropertyDict, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_ZFSPropertyDict, /*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_6libzfs_ZFSPropertyDict, /*tp_traverse*/
  __pyx_tp_clear_6libzfs_ZFSPropertyDict, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_6libzfs_15ZFSPropertyDict_11__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6libzfs_ZFSPropertyDict, /*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_6libzfs_ZFSPropertyDict, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_6libzfs_ZFSObject(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6libzfs_ZFSObject *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_6libzfs_ZFSObject *)o);
  p->root = ((struct __pyx_obj_6libzfs_ZFS *)Py_None); Py_INCREF(Py_None);
  p->pool = ((struct __pyx_obj_6libzfs_ZFSPool *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6libzfs_ZFSObject(PyObject *o) {
  struct __pyx_obj_6libzfs_ZFSObject *p = (struct __pyx_obj_6libzfs_ZFSObject *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_6libzfs_9ZFSObject_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->root);
  Py_CLEAR(p->pool);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6libzfs_ZFSObject(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs_ZFSObject *p = (struct __pyx_obj_6libzfs_ZFSObject *)o;
  if (p->root) {
    e = (*v)(((PyObject*)p->root), a); if (e) return e;
  }
  if (p->pool) {
    e = (*v)(((PyObject*)p->pool), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs_ZFSObject(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs_ZFSObject *p = (struct __pyx_obj_6libzfs_ZFSObject *)o;
  tmp = ((PyObject*)p->root);
  p->root = ((struct __pyx_obj_6libzfs_ZFS *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->pool);
  p->pool = ((struct __pyx_obj_6libzfs_ZFSPool *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6libzfs_9ZFSObject_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_9ZFSObject_4name_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_9ZFSObject_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_9ZFSObject_4type_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_9ZFSObject_properties(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_9ZFSObject_10properties_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_9ZFSObject_root(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_9ZFSObject_4root_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_9ZFSObject_pool(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_9ZFSObject_4pool_1__get__(o);
}

static PyMethodDef __pyx_methods_6libzfs_ZFSObject[] = {
  {"__getstate__", (PyCFunction)__pyx_pw_6libzfs_9ZFSObject_9__getstate__, METH_NOARGS, 0},
  {"rename", (PyCFunction)__pyx_pw_6libzfs_9ZFSObject_11rename, METH_VARARGS|METH_KEYWORDS, 0},
  {"delete", (PyCFunction)__pyx_pw_6libzfs_9ZFSObject_13delete, METH_NOARGS, 0},
  {"get_send_space", (PyCFunction)__pyx_pw_6libzfs_9ZFSObject_15get_send_space, METH_VARARGS|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6libzfs_ZFSObject[] = {
  {(char *)"name", __pyx_getprop_6libzfs_9ZFSObject_name, 0, (char *)0, 0},
  {(char *)"type", __pyx_getprop_6libzfs_9ZFSObject_type, 0, (char *)0, 0},
  {(char *)"properties", __pyx_getprop_6libzfs_9ZFSObject_properties, 0, (char *)0, 0},
  {(char *)"root", __pyx_getprop_6libzfs_9ZFSObject_root, 0, (char *)0, 0},
  {(char *)"pool", __pyx_getprop_6libzfs_9ZFSObject_pool, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6libzfs_ZFSObject = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.ZFSObject", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs_ZFSObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs_ZFSObject, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_6libzfs_9ZFSObject_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_6libzfs_9ZFSObject_5__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_6libzfs_ZFSObject, /*tp_traverse*/
  __pyx_tp_clear_6libzfs_ZFSObject, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6libzfs_ZFSObject, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6libzfs_ZFSObject, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6libzfs_9ZFSObject_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6libzfs_ZFSObject, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_6libzfs_ZFSDataset __pyx_vtable_6libzfs_ZFSDataset;

static PyObject *__pyx_tp_new_6libzfs_ZFSDataset(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6libzfs_ZFSDataset *p;
  PyObject *o = __pyx_tp_new_6libzfs_ZFSObject(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6libzfs_ZFSDataset *)o);
  p->__pyx_vtab = __pyx_vtabptr_6libzfs_ZFSDataset;
  return o;
}

static PyObject *__pyx_getprop_6libzfs_10ZFSDataset_children(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_10ZFSDataset_8children_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_10ZFSDataset_children_recursive(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_10ZFSDataset_18children_recursive_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_10ZFSDataset_snapshots(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_10ZFSDataset_9snapshots_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_10ZFSDataset_bookmarks(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_10ZFSDataset_9bookmarks_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_10ZFSDataset_snapshots_recursive(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_10ZFSDataset_19snapshots_recursive_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_10ZFSDataset_dependents(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_10ZFSDataset_10dependents_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_10ZFSDataset_mountpoint(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_10ZFSDataset_10mountpoint_1__get__(o);
}

static PyMethodDef __pyx_methods_6libzfs_ZFSDataset[] = {
  {"__getstate__", (PyCFunction)__pyx_pw_6libzfs_10ZFSDataset_1__getstate__, METH_VARARGS|METH_KEYWORDS, 0},
  {"destroy_snapshot", (PyCFunction)__pyx_pw_6libzfs_10ZFSDataset_3destroy_snapshot, METH_O, 0},
  {"mount", (PyCFunction)__pyx_pw_6libzfs_10ZFSDataset_5mount, METH_NOARGS, 0},
  {"mount_recursive", (PyCFunction)__pyx_pw_6libzfs_10ZFSDataset_7mount_recursive, METH_NOARGS, 0},
  {"umount", (PyCFunction)__pyx_pw_6libzfs_10ZFSDataset_9umount, METH_VARARGS|METH_KEYWORDS, 0},
  {"umount_recursive", (PyCFunction)__pyx_pw_6libzfs_10ZFSDataset_11umount_recursive, METH_VARARGS|METH_KEYWORDS, 0},
  {"send", (PyCFunction)__pyx_pw_6libzfs_10ZFSDataset_13send, METH_VARARGS|METH_KEYWORDS, 0},
  {"get_send_progress", (PyCFunction)__pyx_pw_6libzfs_10ZFSDataset_15get_send_progress, METH_O, 0},
  {"promote", (PyCFunction)__pyx_pw_6libzfs_10ZFSDataset_17promote, METH_NOARGS, 0},
  {"snapshot", (PyCFunction)__pyx_pw_6libzfs_10ZFSDataset_19snapshot, METH_VARARGS|METH_KEYWORDS, 0},
  {"receive", (PyCFunction)__pyx_pw_6libzfs_10ZFSDataset_21receive, METH_VARARGS|METH_KEYWORDS, 0},
  {"diff", (PyCFunction)__pyx_pw_6libzfs_10ZFSDataset_23diff, METH_VARARGS|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6libzfs_ZFSDataset[] = {
  {(char *)"children", __pyx_getprop_6libzfs_10ZFSDataset_children, 0, (char *)0, 0},
  {(char *)"children_recursive", __pyx_getprop_6libzfs_10ZFSDataset_children_recursive, 0, (char *)0, 0},
  {(char *)"snapshots", __pyx_getprop_6libzfs_10ZFSDataset_snapshots, 0, (char *)0, 0},
  {(char *)"bookmarks", __pyx_getprop_6libzfs_10ZFSDataset_bookmarks, 0, (char *)0, 0},
  {(char *)"snapshots_recursive", __pyx_getprop_6libzfs_10ZFSDataset_snapshots_recursive, 0, (char *)0, 0},
  {(char *)"dependents", __pyx_getprop_6libzfs_10ZFSDataset_dependents, 0, (char *)0, 0},
  {(char *)"mountpoint", __pyx_getprop_6libzfs_10ZFSDataset_mountpoint, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6libzfs_ZFSDataset = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.ZFSDataset", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs_ZFSDataset), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs_ZFSObject, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6libzfs_9ZFSObject_7__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_6libzfs_9ZFSObject_5__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_6libzfs_ZFSObject, /*tp_traverse*/
  __pyx_tp_clear_6libzfs_ZFSObject, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6libzfs_ZFSDataset, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6libzfs_ZFSDataset, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6libzfs_9ZFSObject_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6libzfs_ZFSDataset, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_6libzfs_ZFSSnapshot(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_6libzfs_ZFSObject(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyObject *__pyx_getprop_6libzfs_11ZFSSnapshot_snapshot_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_11ZFSSnapshot_13snapshot_name_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_11ZFSSnapshot_parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_11ZFSSnapshot_6parent_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_11ZFSSnapshot_holds(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_11ZFSSnapshot_5holds_1__get__(o);
}

static PyMethodDef __pyx_methods_6libzfs_ZFSSnapshot[] = {
  {"__getstate__", (PyCFunction)__pyx_pw_6libzfs_11ZFSSnapshot_1__getstate__, METH_NOARGS, 0},
  {"rollback", (PyCFunction)__pyx_pw_6libzfs_11ZFSSnapshot_3rollback, METH_VARARGS|METH_KEYWORDS, 0},
  {"bookmark", (PyCFunction)__pyx_pw_6libzfs_11ZFSSnapshot_5bookmark, METH_O, 0},
  {"clone", (PyCFunction)__pyx_pw_6libzfs_11ZFSSnapshot_7clone, METH_VARARGS|METH_KEYWORDS, 0},
  {"hold", (PyCFunction)__pyx_pw_6libzfs_11ZFSSnapshot_9hold, METH_VARARGS|METH_KEYWORDS, 0},
  {"release", (PyCFunction)__pyx_pw_6libzfs_11ZFSSnapshot_11release, METH_VARARGS|METH_KEYWORDS, 0},
  {"delete", (PyCFunction)__pyx_pw_6libzfs_11ZFSSnapshot_13delete, METH_VARARGS|METH_KEYWORDS, 0},
  {"send", (PyCFunction)__pyx_pw_6libzfs_11ZFSSnapshot_15send, METH_VARARGS|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6libzfs_ZFSSnapshot[] = {
  {(char *)"snapshot_name", __pyx_getprop_6libzfs_11ZFSSnapshot_snapshot_name, 0, (char *)0, 0},
  {(char *)"parent", __pyx_getprop_6libzfs_11ZFSSnapshot_parent, 0, (char *)0, 0},
  {(char *)"holds", __pyx_getprop_6libzfs_11ZFSSnapshot_holds, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6libzfs_ZFSSnapshot = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.ZFSSnapshot", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs_ZFSSnapshot), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs_ZFSObject, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6libzfs_9ZFSObject_7__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_6libzfs_9ZFSObject_5__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_6libzfs_ZFSObject, /*tp_traverse*/
  __pyx_tp_clear_6libzfs_ZFSObject, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6libzfs_ZFSSnapshot, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6libzfs_ZFSSnapshot, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6libzfs_9ZFSObject_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6libzfs_ZFSSnapshot, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_6libzfs_ZFSBookmark(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_6libzfs_ZFSObject(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyObject *__pyx_getprop_6libzfs_11ZFSBookmark_parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_11ZFSBookmark_6parent_1__get__(o);
}

static PyObject *__pyx_getprop_6libzfs_11ZFSBookmark_bookmark_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6libzfs_11ZFSBookmark_13bookmark_name_1__get__(o);
}

static PyMethodDef __pyx_methods_6libzfs_ZFSBookmark[] = {
  {"__getstate__", (PyCFunction)__pyx_pw_6libzfs_11ZFSBookmark_1__getstate__, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6libzfs_ZFSBookmark[] = {
  {(char *)"parent", __pyx_getprop_6libzfs_11ZFSBookmark_parent, 0, (char *)0, 0},
  {(char *)"bookmark_name", __pyx_getprop_6libzfs_11ZFSBookmark_bookmark_name, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6libzfs_ZFSBookmark = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.ZFSBookmark", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs_ZFSBookmark), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs_ZFSObject, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6libzfs_9ZFSObject_7__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_6libzfs_9ZFSObject_5__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_6libzfs_ZFSObject, /*tp_traverse*/
  __pyx_tp_clear_6libzfs_ZFSObject, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6libzfs_ZFSBookmark, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6libzfs_ZFSBookmark, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6libzfs_9ZFSObject_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6libzfs_ZFSBookmark, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6libzfs___pyx_scope_struct____iter__ *__pyx_freelist_6libzfs___pyx_scope_struct____iter__[8];
static int __pyx_freecount_6libzfs___pyx_scope_struct____iter__ = 0;

static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6libzfs___pyx_scope_struct____iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct____iter__)))) {
    o = (PyObject*)__pyx_freelist_6libzfs___pyx_scope_struct____iter__[--__pyx_freecount_6libzfs___pyx_scope_struct____iter__];
    memset(o, 0, sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct____iter__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6libzfs___pyx_scope_struct____iter__(PyObject *o) {
  struct __pyx_obj_6libzfs___pyx_scope_struct____iter__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct____iter__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6libzfs___pyx_scope_struct____iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct____iter__)))) {
    __pyx_freelist_6libzfs___pyx_scope_struct____iter__[__pyx_freecount_6libzfs___pyx_scope_struct____iter__++] = ((struct __pyx_obj_6libzfs___pyx_scope_struct____iter__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6libzfs___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs___pyx_scope_struct____iter__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct____iter__ *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs___pyx_scope_struct____iter__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs___pyx_scope_struct____iter__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct____iter__ *)o;
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6libzfs_NVList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6libzfs___pyx_scope_struct____iter__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.__pyx_scope_struct____iter__", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct____iter__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs___pyx_scope_struct____iter__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs___pyx_scope_struct____iter__, /*tp_traverse*/
  __pyx_tp_clear_6libzfs___pyx_scope_struct____iter__, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6libzfs___pyx_scope_struct____iter__, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6libzfs___pyx_scope_struct_1_items *__pyx_freelist_6libzfs___pyx_scope_struct_1_items[8];
static int __pyx_freecount_6libzfs___pyx_scope_struct_1_items = 0;

static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_1_items(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6libzfs___pyx_scope_struct_1_items > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_1_items)))) {
    o = (PyObject*)__pyx_freelist_6libzfs___pyx_scope_struct_1_items[--__pyx_freecount_6libzfs___pyx_scope_struct_1_items];
    memset(o, 0, sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_1_items));
    (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_6libzfs___pyx_scope_struct_1_items(PyObject *o) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_1_items *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_1_items *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_raw);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6libzfs___pyx_scope_struct_1_items < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_1_items)))) {
    __pyx_freelist_6libzfs___pyx_scope_struct_1_items[__pyx_freecount_6libzfs___pyx_scope_struct_1_items++] = ((struct __pyx_obj_6libzfs___pyx_scope_struct_1_items *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6libzfs___pyx_scope_struct_1_items(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs___pyx_scope_struct_1_items *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_1_items *)o;
  if (p->__pyx_v_raw) {
    e = (*v)(p->__pyx_v_raw, 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_6libzfs___pyx_scope_struct_1_items(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs___pyx_scope_struct_1_items *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_1_items *)o;
  tmp = ((PyObject*)p->__pyx_v_raw);
  p->__pyx_v_raw = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6libzfs_NVList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6libzfs___pyx_scope_struct_1_items = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.__pyx_scope_struct_1_items", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_1_items), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs___pyx_scope_struct_1_items, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs___pyx_scope_struct_1_items, /*tp_traverse*/
  __pyx_tp_clear_6libzfs___pyx_scope_struct_1_items, /*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_6libzfs___pyx_scope_struct_1_items, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6libzfs___pyx_scope_struct_2___get__ *__pyx_freelist_6libzfs___pyx_scope_struct_2___get__[8];
static int __pyx_freecount_6libzfs___pyx_scope_struct_2___get__ = 0;

static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_2___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6libzfs___pyx_scope_struct_2___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_2___get__)))) {
    o = (PyObject*)__pyx_freelist_6libzfs___pyx_scope_struct_2___get__[--__pyx_freecount_6libzfs___pyx_scope_struct_2___get__];
    memset(o, 0, sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_2___get__));
    (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_6libzfs___pyx_scope_struct_2___get__(PyObject *o) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_2___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_2___get__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_h);
  Py_CLEAR(p->__pyx_v_pool);
  Py_CLEAR(p->__pyx_v_pools);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6libzfs___pyx_scope_struct_2___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_2___get__)))) {
    __pyx_freelist_6libzfs___pyx_scope_struct_2___get__[__pyx_freecount_6libzfs___pyx_scope_struct_2___get__++] = ((struct __pyx_obj_6libzfs___pyx_scope_struct_2___get__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6libzfs___pyx_scope_struct_2___get__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs___pyx_scope_struct_2___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_2___get__ *)o;
  if (p->__pyx_v_h) {
    e = (*v)(p->__pyx_v_h, a); if (e) return e;
  }
  if (p->__pyx_v_pool) {
    e = (*v)(((PyObject*)p->__pyx_v_pool), a); if (e) return e;
  }
  if (p->__pyx_v_pools) {
    e = (*v)(p->__pyx_v_pools, 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_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs___pyx_scope_struct_2___get__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs___pyx_scope_struct_2___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_2___get__ *)o;
  tmp = ((PyObject*)p->__pyx_v_h);
  p->__pyx_v_h = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_pool);
  p->__pyx_v_pool = ((struct __pyx_obj_6libzfs_ZFSPool *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_pools);
  p->__pyx_v_pools = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6libzfs_ZFS *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6libzfs___pyx_scope_struct_2___get__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.__pyx_scope_struct_2___get__", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_2___get__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs___pyx_scope_struct_2___get__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs___pyx_scope_struct_2___get__, /*tp_traverse*/
  __pyx_tp_clear_6libzfs___pyx_scope_struct_2___get__, /*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_6libzfs___pyx_scope_struct_2___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
};

static struct __pyx_obj_6libzfs___pyx_scope_struct_3___get__ *__pyx_freelist_6libzfs___pyx_scope_struct_3___get__[8];
static int __pyx_freecount_6libzfs___pyx_scope_struct_3___get__ = 0;

static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_3___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6libzfs___pyx_scope_struct_3___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_3___get__)))) {
    o = (PyObject*)__pyx_freelist_6libzfs___pyx_scope_struct_3___get__[--__pyx_freecount_6libzfs___pyx_scope_struct_3___get__];
    memset(o, 0, sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_3___get__));
    (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_6libzfs___pyx_scope_struct_3___get__(PyObject *o) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_3___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_3___get__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_c);
  Py_CLEAR(p->__pyx_v_p);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_t_0);
  Py_CLEAR(p->__pyx_t_3);
  Py_CLEAR(p->__pyx_t_4);
  Py_CLEAR(p->__pyx_t_5);
  Py_CLEAR(p->__pyx_t_6);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6libzfs___pyx_scope_struct_3___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_3___get__)))) {
    __pyx_freelist_6libzfs___pyx_scope_struct_3___get__[__pyx_freecount_6libzfs___pyx_scope_struct_3___get__++] = ((struct __pyx_obj_6libzfs___pyx_scope_struct_3___get__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6libzfs___pyx_scope_struct_3___get__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs___pyx_scope_struct_3___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_3___get__ *)o;
  if (p->__pyx_v_c) {
    e = (*v)(p->__pyx_v_c, a); if (e) return e;
  }
  if (p->__pyx_v_p) {
    e = (*v)(p->__pyx_v_p, 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_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  if (p->__pyx_t_3) {
    e = (*v)(p->__pyx_t_3, a); if (e) return e;
  }
  if (p->__pyx_t_4) {
    e = (*v)(p->__pyx_t_4, a); if (e) return e;
  }
  if (p->__pyx_t_5) {
    e = (*v)(p->__pyx_t_5, a); if (e) return e;
  }
  if (p->__pyx_t_6) {
    e = (*v)(p->__pyx_t_6, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs___pyx_scope_struct_3___get__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs___pyx_scope_struct_3___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_3___get__ *)o;
  tmp = ((PyObject*)p->__pyx_v_c);
  p->__pyx_v_c = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_p);
  p->__pyx_v_p = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6libzfs_ZFS *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_3);
  p->__pyx_t_3 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_4);
  p->__pyx_t_4 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_5);
  p->__pyx_t_5 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_6);
  p->__pyx_t_6 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6libzfs___pyx_scope_struct_3___get__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.__pyx_scope_struct_3___get__", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_3___get__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs___pyx_scope_struct_3___get__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs___pyx_scope_struct_3___get__, /*tp_traverse*/
  __pyx_tp_clear_6libzfs___pyx_scope_struct_3___get__, /*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_6libzfs___pyx_scope_struct_3___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
};

static struct __pyx_obj_6libzfs___pyx_scope_struct_4___get__ *__pyx_freelist_6libzfs___pyx_scope_struct_4___get__[8];
static int __pyx_freecount_6libzfs___pyx_scope_struct_4___get__ = 0;

static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_4___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6libzfs___pyx_scope_struct_4___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_4___get__)))) {
    o = (PyObject*)__pyx_freelist_6libzfs___pyx_scope_struct_4___get__[--__pyx_freecount_6libzfs___pyx_scope_struct_4___get__];
    memset(o, 0, sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_4___get__));
    (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_6libzfs___pyx_scope_struct_4___get__(PyObject *o) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_4___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_4___get__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_c);
  Py_CLEAR(p->__pyx_v_p);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_t_0);
  Py_CLEAR(p->__pyx_t_1);
  Py_CLEAR(p->__pyx_t_4);
  Py_CLEAR(p->__pyx_t_5);
  Py_CLEAR(p->__pyx_t_6);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6libzfs___pyx_scope_struct_4___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_4___get__)))) {
    __pyx_freelist_6libzfs___pyx_scope_struct_4___get__[__pyx_freecount_6libzfs___pyx_scope_struct_4___get__++] = ((struct __pyx_obj_6libzfs___pyx_scope_struct_4___get__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6libzfs___pyx_scope_struct_4___get__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs___pyx_scope_struct_4___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_4___get__ *)o;
  if (p->__pyx_v_c) {
    e = (*v)(p->__pyx_v_c, a); if (e) return e;
  }
  if (p->__pyx_v_p) {
    e = (*v)(p->__pyx_v_p, 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_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  if (p->__pyx_t_1) {
    e = (*v)(p->__pyx_t_1, a); if (e) return e;
  }
  if (p->__pyx_t_4) {
    e = (*v)(p->__pyx_t_4, a); if (e) return e;
  }
  if (p->__pyx_t_5) {
    e = (*v)(p->__pyx_t_5, a); if (e) return e;
  }
  if (p->__pyx_t_6) {
    e = (*v)(p->__pyx_t_6, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs___pyx_scope_struct_4___get__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs___pyx_scope_struct_4___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_4___get__ *)o;
  tmp = ((PyObject*)p->__pyx_v_c);
  p->__pyx_v_c = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_p);
  p->__pyx_v_p = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6libzfs_ZFS *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_1);
  p->__pyx_t_1 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_4);
  p->__pyx_t_4 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_5);
  p->__pyx_t_5 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_6);
  p->__pyx_t_6 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6libzfs___pyx_scope_struct_4___get__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.__pyx_scope_struct_4___get__", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_4___get__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs___pyx_scope_struct_4___get__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs___pyx_scope_struct_4___get__, /*tp_traverse*/
  __pyx_tp_clear_6libzfs___pyx_scope_struct_4___get__, /*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_6libzfs___pyx_scope_struct_4___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
};

static struct __pyx_obj_6libzfs___pyx_scope_struct_5_find_import *__pyx_freelist_6libzfs___pyx_scope_struct_5_find_import[8];
static int __pyx_freecount_6libzfs___pyx_scope_struct_5_find_import = 0;

static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_5_find_import(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6libzfs___pyx_scope_struct_5_find_import > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_5_find_import)))) {
    o = (PyObject*)__pyx_freelist_6libzfs___pyx_scope_struct_5_find_import[--__pyx_freecount_6libzfs___pyx_scope_struct_5_find_import];
    memset(o, 0, sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_5_find_import));
    (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_6libzfs___pyx_scope_struct_5_find_import(PyObject *o) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_5_find_import *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_5_find_import *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_cachefile);
  Py_CLEAR(p->__pyx_v_config);
  Py_CLEAR(p->__pyx_v_destroyed);
  Py_CLEAR(p->__pyx_v_encoded);
  Py_CLEAR(p->__pyx_v_i);
  Py_CLEAR(p->__pyx_v_name);
  Py_CLEAR(p->__pyx_v_nv);
  Py_CLEAR(p->__pyx_v_p);
  Py_CLEAR(p->__pyx_v_pool);
  Py_CLEAR(p->__pyx_v_search_paths);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6libzfs___pyx_scope_struct_5_find_import < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_5_find_import)))) {
    __pyx_freelist_6libzfs___pyx_scope_struct_5_find_import[__pyx_freecount_6libzfs___pyx_scope_struct_5_find_import++] = ((struct __pyx_obj_6libzfs___pyx_scope_struct_5_find_import *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6libzfs___pyx_scope_struct_5_find_import(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs___pyx_scope_struct_5_find_import *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_5_find_import *)o;
  if (p->__pyx_v_cachefile) {
    e = (*v)(p->__pyx_v_cachefile, a); if (e) return e;
  }
  if (p->__pyx_v_config) {
    e = (*v)(p->__pyx_v_config, a); if (e) return e;
  }
  if (p->__pyx_v_destroyed) {
    e = (*v)(p->__pyx_v_destroyed, a); if (e) return e;
  }
  if (p->__pyx_v_encoded) {
    e = (*v)(p->__pyx_v_encoded, a); if (e) return e;
  }
  if (p->__pyx_v_i) {
    e = (*v)(p->__pyx_v_i, a); if (e) return e;
  }
  if (p->__pyx_v_name) {
    e = (*v)(p->__pyx_v_name, a); if (e) return e;
  }
  if (p->__pyx_v_nv) {
    e = (*v)(((PyObject*)p->__pyx_v_nv), a); if (e) return e;
  }
  if (p->__pyx_v_p) {
    e = (*v)(p->__pyx_v_p, a); if (e) return e;
  }
  if (p->__pyx_v_pool) {
    e = (*v)(((PyObject*)p->__pyx_v_pool), a); if (e) return e;
  }
  if (p->__pyx_v_search_paths) {
    e = (*v)(p->__pyx_v_search_paths, 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_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs___pyx_scope_struct_5_find_import(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs___pyx_scope_struct_5_find_import *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_5_find_import *)o;
  tmp = ((PyObject*)p->__pyx_v_cachefile);
  p->__pyx_v_cachefile = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_config);
  p->__pyx_v_config = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_destroyed);
  p->__pyx_v_destroyed = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_encoded);
  p->__pyx_v_encoded = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_i);
  p->__pyx_v_i = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_name);
  p->__pyx_v_name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_nv);
  p->__pyx_v_nv = ((struct __pyx_obj_6libzfs_NVList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_p);
  p->__pyx_v_p = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_pool);
  p->__pyx_v_pool = ((struct __pyx_obj_6libzfs_ZFSImportablePool *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_search_paths);
  p->__pyx_v_search_paths = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6libzfs_ZFS *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6libzfs___pyx_scope_struct_5_find_import = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.__pyx_scope_struct_5_find_import", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_5_find_import), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs___pyx_scope_struct_5_find_import, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs___pyx_scope_struct_5_find_import, /*tp_traverse*/
  __pyx_tp_clear_6libzfs___pyx_scope_struct_5_find_import, /*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_6libzfs___pyx_scope_struct_5_find_import, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history *__pyx_freelist_6libzfs___pyx_scope_struct_6_write_history[8];
static int __pyx_freecount_6libzfs___pyx_scope_struct_6_write_history = 0;

static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_6_write_history(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6libzfs___pyx_scope_struct_6_write_history > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history)))) {
    o = (PyObject*)__pyx_freelist_6libzfs___pyx_scope_struct_6_write_history[--__pyx_freecount_6libzfs___pyx_scope_struct_6_write_history];
    memset(o, 0, sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history));
    (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_6libzfs___pyx_scope_struct_6_write_history(PyObject *o) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_arg);
  Py_CLEAR(p->__pyx_v_eval_arg);
  Py_CLEAR(p->__pyx_v_eval_dict);
  Py_CLEAR(p->__pyx_v_eval_list);
  Py_CLEAR(p->__pyx_v_eval_str);
  Py_CLEAR(p->__pyx_v_eval_tuple);
  Py_CLEAR(p->__pyx_v_eval_zfsvdev);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6libzfs___pyx_scope_struct_6_write_history < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history)))) {
    __pyx_freelist_6libzfs___pyx_scope_struct_6_write_history[__pyx_freecount_6libzfs___pyx_scope_struct_6_write_history++] = ((struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6libzfs___pyx_scope_struct_6_write_history(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history *)o;
  if (p->__pyx_v_arg) {
    e = (*v)(p->__pyx_v_arg, a); if (e) return e;
  }
  if (p->__pyx_v_eval_arg) {
    e = (*v)(p->__pyx_v_eval_arg, a); if (e) return e;
  }
  if (p->__pyx_v_eval_dict) {
    e = (*v)(p->__pyx_v_eval_dict, a); if (e) return e;
  }
  if (p->__pyx_v_eval_list) {
    e = (*v)(p->__pyx_v_eval_list, a); if (e) return e;
  }
  if (p->__pyx_v_eval_str) {
    e = (*v)(p->__pyx_v_eval_str, a); if (e) return e;
  }
  if (p->__pyx_v_eval_tuple) {
    e = (*v)(p->__pyx_v_eval_tuple, a); if (e) return e;
  }
  if (p->__pyx_v_eval_zfsvdev) {
    e = (*v)(p->__pyx_v_eval_zfsvdev, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs___pyx_scope_struct_6_write_history(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history *)o;
  tmp = ((PyObject*)p->__pyx_v_arg);
  p->__pyx_v_arg = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_eval_arg);
  p->__pyx_v_eval_arg = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_eval_dict);
  p->__pyx_v_eval_dict = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_eval_list);
  p->__pyx_v_eval_list = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_eval_str);
  p->__pyx_v_eval_str = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_eval_tuple);
  p->__pyx_v_eval_tuple = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_eval_zfsvdev);
  p->__pyx_v_eval_zfsvdev = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6libzfs___pyx_scope_struct_6_write_history = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.__pyx_scope_struct_6_write_history", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_6_write_history), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs___pyx_scope_struct_6_write_history, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs___pyx_scope_struct_6_write_history, /*tp_traverse*/
  __pyx_tp_clear_6libzfs___pyx_scope_struct_6_write_history, /*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_6libzfs___pyx_scope_struct_6_write_history, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6libzfs___pyx_scope_struct_7___get__ *__pyx_freelist_6libzfs___pyx_scope_struct_7___get__[8];
static int __pyx_freecount_6libzfs___pyx_scope_struct_7___get__ = 0;

static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_7___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6libzfs___pyx_scope_struct_7___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_7___get__)))) {
    o = (PyObject*)__pyx_freelist_6libzfs___pyx_scope_struct_7___get__[--__pyx_freecount_6libzfs___pyx_scope_struct_7___get__];
    memset(o, 0, sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_7___get__));
    (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_6libzfs___pyx_scope_struct_7___get__(PyObject *o) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_7___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_7___get__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_i);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_vdev);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6libzfs___pyx_scope_struct_7___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_7___get__)))) {
    __pyx_freelist_6libzfs___pyx_scope_struct_7___get__[__pyx_freecount_6libzfs___pyx_scope_struct_7___get__++] = ((struct __pyx_obj_6libzfs___pyx_scope_struct_7___get__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6libzfs___pyx_scope_struct_7___get__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs___pyx_scope_struct_7___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_7___get__ *)o;
  if (p->__pyx_v_i) {
    e = (*v)(p->__pyx_v_i, 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_vdev) {
    e = (*v)(((PyObject*)p->__pyx_v_vdev), a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs___pyx_scope_struct_7___get__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs___pyx_scope_struct_7___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_7___get__ *)o;
  tmp = ((PyObject*)p->__pyx_v_i);
  p->__pyx_v_i = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6libzfs_ZFSVdev *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_vdev);
  p->__pyx_v_vdev = ((struct __pyx_obj_6libzfs_ZFSVdev *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6libzfs___pyx_scope_struct_7___get__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.__pyx_scope_struct_7___get__", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_7___get__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs___pyx_scope_struct_7___get__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs___pyx_scope_struct_7___get__, /*tp_traverse*/
  __pyx_tp_clear_6libzfs___pyx_scope_struct_7___get__, /*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_6libzfs___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
};

static struct __pyx_obj_6libzfs___pyx_scope_struct_8___get__ *__pyx_freelist_6libzfs___pyx_scope_struct_8___get__[8];
static int __pyx_freecount_6libzfs___pyx_scope_struct_8___get__ = 0;

static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_8___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6libzfs___pyx_scope_struct_8___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_8___get__)))) {
    o = (PyObject*)__pyx_freelist_6libzfs___pyx_scope_struct_8___get__[--__pyx_freecount_6libzfs___pyx_scope_struct_8___get__];
    memset(o, 0, sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_8___get__));
    (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_6libzfs___pyx_scope_struct_8___get__(PyObject *o) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_8___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_8___get__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_child);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_vdev);
  Py_CLEAR(p->__pyx_v_vdev_tree);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6libzfs___pyx_scope_struct_8___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_8___get__)))) {
    __pyx_freelist_6libzfs___pyx_scope_struct_8___get__[__pyx_freecount_6libzfs___pyx_scope_struct_8___get__++] = ((struct __pyx_obj_6libzfs___pyx_scope_struct_8___get__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6libzfs___pyx_scope_struct_8___get__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs___pyx_scope_struct_8___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_8___get__ *)o;
  if (p->__pyx_v_child) {
    e = (*v)(p->__pyx_v_child, 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_vdev) {
    e = (*v)(((PyObject*)p->__pyx_v_vdev), a); if (e) return e;
  }
  if (p->__pyx_v_vdev_tree) {
    e = (*v)(((PyObject*)p->__pyx_v_vdev_tree), a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs___pyx_scope_struct_8___get__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs___pyx_scope_struct_8___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_8___get__ *)o;
  tmp = ((PyObject*)p->__pyx_v_child);
  p->__pyx_v_child = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6libzfs_ZFSPool *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_vdev);
  p->__pyx_v_vdev = ((struct __pyx_obj_6libzfs_ZFSVdev *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_vdev_tree);
  p->__pyx_v_vdev_tree = ((struct __pyx_obj_6libzfs_NVList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6libzfs___pyx_scope_struct_8___get__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.__pyx_scope_struct_8___get__", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_8___get__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs___pyx_scope_struct_8___get__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs___pyx_scope_struct_8___get__, /*tp_traverse*/
  __pyx_tp_clear_6libzfs___pyx_scope_struct_8___get__, /*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_6libzfs___pyx_scope_struct_8___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
};

static struct __pyx_obj_6libzfs___pyx_scope_struct_9___get__ *__pyx_freelist_6libzfs___pyx_scope_struct_9___get__[8];
static int __pyx_freecount_6libzfs___pyx_scope_struct_9___get__ = 0;

static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_9___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6libzfs___pyx_scope_struct_9___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_9___get__)))) {
    o = (PyObject*)__pyx_freelist_6libzfs___pyx_scope_struct_9___get__[--__pyx_freecount_6libzfs___pyx_scope_struct_9___get__];
    memset(o, 0, sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_9___get__));
    (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_6libzfs___pyx_scope_struct_9___get__(PyObject *o) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_9___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_9___get__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_child);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_vdev);
  Py_CLEAR(p->__pyx_v_vdev_tree);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6libzfs___pyx_scope_struct_9___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_9___get__)))) {
    __pyx_freelist_6libzfs___pyx_scope_struct_9___get__[__pyx_freecount_6libzfs___pyx_scope_struct_9___get__++] = ((struct __pyx_obj_6libzfs___pyx_scope_struct_9___get__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6libzfs___pyx_scope_struct_9___get__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs___pyx_scope_struct_9___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_9___get__ *)o;
  if (p->__pyx_v_child) {
    e = (*v)(p->__pyx_v_child, 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_vdev) {
    e = (*v)(((PyObject*)p->__pyx_v_vdev), a); if (e) return e;
  }
  if (p->__pyx_v_vdev_tree) {
    e = (*v)(((PyObject*)p->__pyx_v_vdev_tree), a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs___pyx_scope_struct_9___get__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs___pyx_scope_struct_9___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_9___get__ *)o;
  tmp = ((PyObject*)p->__pyx_v_child);
  p->__pyx_v_child = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6libzfs_ZFSPool *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_vdev);
  p->__pyx_v_vdev = ((struct __pyx_obj_6libzfs_ZFSVdev *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_vdev_tree);
  p->__pyx_v_vdev_tree = ((struct __pyx_obj_6libzfs_NVList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6libzfs___pyx_scope_struct_9___get__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.__pyx_scope_struct_9___get__", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_9___get__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs___pyx_scope_struct_9___get__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs___pyx_scope_struct_9___get__, /*tp_traverse*/
  __pyx_tp_clear_6libzfs___pyx_scope_struct_9___get__, /*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_6libzfs___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
};

static struct __pyx_obj_6libzfs___pyx_scope_struct_10___get__ *__pyx_freelist_6libzfs___pyx_scope_struct_10___get__[8];
static int __pyx_freecount_6libzfs___pyx_scope_struct_10___get__ = 0;

static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_10___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6libzfs___pyx_scope_struct_10___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_10___get__)))) {
    o = (PyObject*)__pyx_freelist_6libzfs___pyx_scope_struct_10___get__[--__pyx_freecount_6libzfs___pyx_scope_struct_10___get__];
    memset(o, 0, sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_10___get__));
    (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_6libzfs___pyx_scope_struct_10___get__(PyObject *o) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_10___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_10___get__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_child);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_vdev);
  Py_CLEAR(p->__pyx_v_vdev_tree);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6libzfs___pyx_scope_struct_10___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_10___get__)))) {
    __pyx_freelist_6libzfs___pyx_scope_struct_10___get__[__pyx_freecount_6libzfs___pyx_scope_struct_10___get__++] = ((struct __pyx_obj_6libzfs___pyx_scope_struct_10___get__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6libzfs___pyx_scope_struct_10___get__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs___pyx_scope_struct_10___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_10___get__ *)o;
  if (p->__pyx_v_child) {
    e = (*v)(p->__pyx_v_child, 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_vdev) {
    e = (*v)(((PyObject*)p->__pyx_v_vdev), a); if (e) return e;
  }
  if (p->__pyx_v_vdev_tree) {
    e = (*v)(((PyObject*)p->__pyx_v_vdev_tree), a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs___pyx_scope_struct_10___get__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs___pyx_scope_struct_10___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_10___get__ *)o;
  tmp = ((PyObject*)p->__pyx_v_child);
  p->__pyx_v_child = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6libzfs_ZFSPool *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_vdev);
  p->__pyx_v_vdev = ((struct __pyx_obj_6libzfs_ZFSVdev *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_vdev_tree);
  p->__pyx_v_vdev_tree = ((struct __pyx_obj_6libzfs_NVList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6libzfs___pyx_scope_struct_10___get__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.__pyx_scope_struct_10___get__", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_10___get__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs___pyx_scope_struct_10___get__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs___pyx_scope_struct_10___get__, /*tp_traverse*/
  __pyx_tp_clear_6libzfs___pyx_scope_struct_10___get__, /*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_6libzfs___pyx_scope_struct_10___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
};

static struct __pyx_obj_6libzfs___pyx_scope_struct_11___get__ *__pyx_freelist_6libzfs___pyx_scope_struct_11___get__[8];
static int __pyx_freecount_6libzfs___pyx_scope_struct_11___get__ = 0;

static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_11___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6libzfs___pyx_scope_struct_11___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_11___get__)))) {
    o = (PyObject*)__pyx_freelist_6libzfs___pyx_scope_struct_11___get__[--__pyx_freecount_6libzfs___pyx_scope_struct_11___get__];
    memset(o, 0, sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_11___get__));
    (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_6libzfs___pyx_scope_struct_11___get__(PyObject *o) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_11___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_11___get__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_child);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_vdev);
  Py_CLEAR(p->__pyx_v_vdev_tree);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6libzfs___pyx_scope_struct_11___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_11___get__)))) {
    __pyx_freelist_6libzfs___pyx_scope_struct_11___get__[__pyx_freecount_6libzfs___pyx_scope_struct_11___get__++] = ((struct __pyx_obj_6libzfs___pyx_scope_struct_11___get__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6libzfs___pyx_scope_struct_11___get__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs___pyx_scope_struct_11___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_11___get__ *)o;
  if (p->__pyx_v_child) {
    e = (*v)(p->__pyx_v_child, 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_vdev) {
    e = (*v)(((PyObject*)p->__pyx_v_vdev), a); if (e) return e;
  }
  if (p->__pyx_v_vdev_tree) {
    e = (*v)(((PyObject*)p->__pyx_v_vdev_tree), a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs___pyx_scope_struct_11___get__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs___pyx_scope_struct_11___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_11___get__ *)o;
  tmp = ((PyObject*)p->__pyx_v_child);
  p->__pyx_v_child = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6libzfs_ZFSPool *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_vdev);
  p->__pyx_v_vdev = ((struct __pyx_obj_6libzfs_ZFSVdev *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_vdev_tree);
  p->__pyx_v_vdev_tree = ((struct __pyx_obj_6libzfs_NVList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6libzfs___pyx_scope_struct_11___get__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.__pyx_scope_struct_11___get__", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_11___get__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs___pyx_scope_struct_11___get__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs___pyx_scope_struct_11___get__, /*tp_traverse*/
  __pyx_tp_clear_6libzfs___pyx_scope_struct_11___get__, /*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_6libzfs___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
};

static struct __pyx_obj_6libzfs___pyx_scope_struct_12___get__ *__pyx_freelist_6libzfs___pyx_scope_struct_12___get__[8];
static int __pyx_freecount_6libzfs___pyx_scope_struct_12___get__ = 0;

static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_12___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6libzfs___pyx_scope_struct_12___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_12___get__)))) {
    o = (PyObject*)__pyx_freelist_6libzfs___pyx_scope_struct_12___get__[--__pyx_freecount_6libzfs___pyx_scope_struct_12___get__];
    memset(o, 0, sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_12___get__));
    (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_6libzfs___pyx_scope_struct_12___get__(PyObject *o) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_12___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_12___get__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_f);
  Py_CLEAR(p->__pyx_v_features_nv);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6libzfs___pyx_scope_struct_12___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_12___get__)))) {
    __pyx_freelist_6libzfs___pyx_scope_struct_12___get__[__pyx_freecount_6libzfs___pyx_scope_struct_12___get__++] = ((struct __pyx_obj_6libzfs___pyx_scope_struct_12___get__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6libzfs___pyx_scope_struct_12___get__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs___pyx_scope_struct_12___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_12___get__ *)o;
  if (p->__pyx_v_f) {
    e = (*v)(((PyObject*)p->__pyx_v_f), a); if (e) return e;
  }
  if (p->__pyx_v_features_nv) {
    e = (*v)(((PyObject*)p->__pyx_v_features_nv), 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_6libzfs___pyx_scope_struct_12___get__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs___pyx_scope_struct_12___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_12___get__ *)o;
  tmp = ((PyObject*)p->__pyx_v_f);
  p->__pyx_v_f = ((struct __pyx_obj_6libzfs_ZPoolFeature *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_features_nv);
  p->__pyx_v_features_nv = ((struct __pyx_obj_6libzfs_NVList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6libzfs_ZFSPool *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6libzfs___pyx_scope_struct_12___get__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.__pyx_scope_struct_12___get__", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_12___get__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs___pyx_scope_struct_12___get__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs___pyx_scope_struct_12___get__, /*tp_traverse*/
  __pyx_tp_clear_6libzfs___pyx_scope_struct_12___get__, /*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_6libzfs___pyx_scope_struct_12___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
};

static struct __pyx_obj_6libzfs___pyx_scope_struct_13_vdev_by_guid *__pyx_freelist_6libzfs___pyx_scope_struct_13_vdev_by_guid[8];
static int __pyx_freecount_6libzfs___pyx_scope_struct_13_vdev_by_guid = 0;

static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_13_vdev_by_guid(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6libzfs___pyx_scope_struct_13_vdev_by_guid > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_13_vdev_by_guid)))) {
    o = (PyObject*)__pyx_freelist_6libzfs___pyx_scope_struct_13_vdev_by_guid[--__pyx_freecount_6libzfs___pyx_scope_struct_13_vdev_by_guid];
    memset(o, 0, sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_13_vdev_by_guid));
    (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_6libzfs___pyx_scope_struct_13_vdev_by_guid(PyObject *o) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_13_vdev_by_guid *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_13_vdev_by_guid *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_search_vdev);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6libzfs___pyx_scope_struct_13_vdev_by_guid < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_13_vdev_by_guid)))) {
    __pyx_freelist_6libzfs___pyx_scope_struct_13_vdev_by_guid[__pyx_freecount_6libzfs___pyx_scope_struct_13_vdev_by_guid++] = ((struct __pyx_obj_6libzfs___pyx_scope_struct_13_vdev_by_guid *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6libzfs___pyx_scope_struct_13_vdev_by_guid(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs___pyx_scope_struct_13_vdev_by_guid *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_13_vdev_by_guid *)o;
  if (p->__pyx_v_search_vdev) {
    e = (*v)(p->__pyx_v_search_vdev, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs___pyx_scope_struct_13_vdev_by_guid(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs___pyx_scope_struct_13_vdev_by_guid *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_13_vdev_by_guid *)o;
  tmp = ((PyObject*)p->__pyx_v_search_vdev);
  p->__pyx_v_search_vdev = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6libzfs___pyx_scope_struct_13_vdev_by_guid = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.__pyx_scope_struct_13_vdev_by_guid", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_13_vdev_by_guid), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs___pyx_scope_struct_13_vdev_by_guid, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs___pyx_scope_struct_13_vdev_by_guid, /*tp_traverse*/
  __pyx_tp_clear_6libzfs___pyx_scope_struct_13_vdev_by_guid, /*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_6libzfs___pyx_scope_struct_13_vdev_by_guid, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6libzfs___pyx_scope_struct_14___iter__ *__pyx_freelist_6libzfs___pyx_scope_struct_14___iter__[8];
static int __pyx_freecount_6libzfs___pyx_scope_struct_14___iter__ = 0;

static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_14___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6libzfs___pyx_scope_struct_14___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_14___iter__)))) {
    o = (PyObject*)__pyx_freelist_6libzfs___pyx_scope_struct_14___iter__[--__pyx_freecount_6libzfs___pyx_scope_struct_14___iter__];
    memset(o, 0, sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_14___iter__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6libzfs___pyx_scope_struct_14___iter__(PyObject *o) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_14___iter__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_14___iter__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_i);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6libzfs___pyx_scope_struct_14___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_14___iter__)))) {
    __pyx_freelist_6libzfs___pyx_scope_struct_14___iter__[__pyx_freecount_6libzfs___pyx_scope_struct_14___iter__++] = ((struct __pyx_obj_6libzfs___pyx_scope_struct_14___iter__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6libzfs___pyx_scope_struct_14___iter__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs___pyx_scope_struct_14___iter__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_14___iter__ *)o;
  if (p->__pyx_v_i) {
    e = (*v)(p->__pyx_v_i, 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_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs___pyx_scope_struct_14___iter__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs___pyx_scope_struct_14___iter__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_14___iter__ *)o;
  tmp = ((PyObject*)p->__pyx_v_i);
  p->__pyx_v_i = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6libzfs_ZFSPropertyDict *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6libzfs___pyx_scope_struct_14___iter__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.__pyx_scope_struct_14___iter__", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_14___iter__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs___pyx_scope_struct_14___iter__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs___pyx_scope_struct_14___iter__, /*tp_traverse*/
  __pyx_tp_clear_6libzfs___pyx_scope_struct_14___iter__, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6libzfs___pyx_scope_struct_14___iter__, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6libzfs___pyx_scope_struct_15___get__ *__pyx_freelist_6libzfs___pyx_scope_struct_15___get__[8];
static int __pyx_freecount_6libzfs___pyx_scope_struct_15___get__ = 0;

static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_15___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6libzfs___pyx_scope_struct_15___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_15___get__)))) {
    o = (PyObject*)__pyx_freelist_6libzfs___pyx_scope_struct_15___get__[--__pyx_freecount_6libzfs___pyx_scope_struct_15___get__];
    memset(o, 0, sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_15___get__));
    (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_6libzfs___pyx_scope_struct_15___get__(PyObject *o) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_15___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_15___get__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dataset);
  Py_CLEAR(p->__pyx_v_datasets);
  Py_CLEAR(p->__pyx_v_h);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6libzfs___pyx_scope_struct_15___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_15___get__)))) {
    __pyx_freelist_6libzfs___pyx_scope_struct_15___get__[__pyx_freecount_6libzfs___pyx_scope_struct_15___get__++] = ((struct __pyx_obj_6libzfs___pyx_scope_struct_15___get__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6libzfs___pyx_scope_struct_15___get__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs___pyx_scope_struct_15___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_15___get__ *)o;
  if (p->__pyx_v_dataset) {
    e = (*v)(((PyObject*)p->__pyx_v_dataset), a); if (e) return e;
  }
  if (p->__pyx_v_datasets) {
    e = (*v)(p->__pyx_v_datasets, a); if (e) return e;
  }
  if (p->__pyx_v_h) {
    e = (*v)(p->__pyx_v_h, 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_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs___pyx_scope_struct_15___get__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs___pyx_scope_struct_15___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_15___get__ *)o;
  tmp = ((PyObject*)p->__pyx_v_dataset);
  p->__pyx_v_dataset = ((struct __pyx_obj_6libzfs_ZFSDataset *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_datasets);
  p->__pyx_v_datasets = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_h);
  p->__pyx_v_h = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6libzfs_ZFSDataset *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6libzfs___pyx_scope_struct_15___get__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.__pyx_scope_struct_15___get__", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_15___get__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs___pyx_scope_struct_15___get__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs___pyx_scope_struct_15___get__, /*tp_traverse*/
  __pyx_tp_clear_6libzfs___pyx_scope_struct_15___get__, /*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_6libzfs___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
};

static struct __pyx_obj_6libzfs___pyx_scope_struct_16___get__ *__pyx_freelist_6libzfs___pyx_scope_struct_16___get__[8];
static int __pyx_freecount_6libzfs___pyx_scope_struct_16___get__ = 0;

static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_16___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6libzfs___pyx_scope_struct_16___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_16___get__)))) {
    o = (PyObject*)__pyx_freelist_6libzfs___pyx_scope_struct_16___get__[--__pyx_freecount_6libzfs___pyx_scope_struct_16___get__];
    memset(o, 0, sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_16___get__));
    (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_6libzfs___pyx_scope_struct_16___get__(PyObject *o) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_16___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_16___get__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_c);
  Py_CLEAR(p->__pyx_v_i);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_t_0);
  Py_CLEAR(p->__pyx_t_3);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6libzfs___pyx_scope_struct_16___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_16___get__)))) {
    __pyx_freelist_6libzfs___pyx_scope_struct_16___get__[__pyx_freecount_6libzfs___pyx_scope_struct_16___get__++] = ((struct __pyx_obj_6libzfs___pyx_scope_struct_16___get__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6libzfs___pyx_scope_struct_16___get__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs___pyx_scope_struct_16___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_16___get__ *)o;
  if (p->__pyx_v_c) {
    e = (*v)(p->__pyx_v_c, a); if (e) return e;
  }
  if (p->__pyx_v_i) {
    e = (*v)(p->__pyx_v_i, 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_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  if (p->__pyx_t_3) {
    e = (*v)(p->__pyx_t_3, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs___pyx_scope_struct_16___get__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs___pyx_scope_struct_16___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_16___get__ *)o;
  tmp = ((PyObject*)p->__pyx_v_c);
  p->__pyx_v_c = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_i);
  p->__pyx_v_i = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6libzfs_ZFSDataset *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_3);
  p->__pyx_t_3 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6libzfs___pyx_scope_struct_16___get__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.__pyx_scope_struct_16___get__", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_16___get__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs___pyx_scope_struct_16___get__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs___pyx_scope_struct_16___get__, /*tp_traverse*/
  __pyx_tp_clear_6libzfs___pyx_scope_struct_16___get__, /*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_6libzfs___pyx_scope_struct_16___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
};

static struct __pyx_obj_6libzfs___pyx_scope_struct_17___get__ *__pyx_freelist_6libzfs___pyx_scope_struct_17___get__[8];
static int __pyx_freecount_6libzfs___pyx_scope_struct_17___get__ = 0;

static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_17___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6libzfs___pyx_scope_struct_17___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_17___get__)))) {
    o = (PyObject*)__pyx_freelist_6libzfs___pyx_scope_struct_17___get__[--__pyx_freecount_6libzfs___pyx_scope_struct_17___get__];
    memset(o, 0, sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_17___get__));
    (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_6libzfs___pyx_scope_struct_17___get__(PyObject *o) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_17___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_17___get__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_h);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_snapshot);
  Py_CLEAR(p->__pyx_v_snapshots);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6libzfs___pyx_scope_struct_17___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_17___get__)))) {
    __pyx_freelist_6libzfs___pyx_scope_struct_17___get__[__pyx_freecount_6libzfs___pyx_scope_struct_17___get__++] = ((struct __pyx_obj_6libzfs___pyx_scope_struct_17___get__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6libzfs___pyx_scope_struct_17___get__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs___pyx_scope_struct_17___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_17___get__ *)o;
  if (p->__pyx_v_h) {
    e = (*v)(p->__pyx_v_h, 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_snapshot) {
    e = (*v)(((PyObject*)p->__pyx_v_snapshot), a); if (e) return e;
  }
  if (p->__pyx_v_snapshots) {
    e = (*v)(p->__pyx_v_snapshots, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs___pyx_scope_struct_17___get__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs___pyx_scope_struct_17___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_17___get__ *)o;
  tmp = ((PyObject*)p->__pyx_v_h);
  p->__pyx_v_h = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6libzfs_ZFSDataset *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_snapshot);
  p->__pyx_v_snapshot = ((struct __pyx_obj_6libzfs_ZFSSnapshot *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_snapshots);
  p->__pyx_v_snapshots = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6libzfs___pyx_scope_struct_17___get__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.__pyx_scope_struct_17___get__", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_17___get__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs___pyx_scope_struct_17___get__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs___pyx_scope_struct_17___get__, /*tp_traverse*/
  __pyx_tp_clear_6libzfs___pyx_scope_struct_17___get__, /*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_6libzfs___pyx_scope_struct_17___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
};

static struct __pyx_obj_6libzfs___pyx_scope_struct_18___get__ *__pyx_freelist_6libzfs___pyx_scope_struct_18___get__[8];
static int __pyx_freecount_6libzfs___pyx_scope_struct_18___get__ = 0;

static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_18___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6libzfs___pyx_scope_struct_18___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_18___get__)))) {
    o = (PyObject*)__pyx_freelist_6libzfs___pyx_scope_struct_18___get__[--__pyx_freecount_6libzfs___pyx_scope_struct_18___get__];
    memset(o, 0, sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_18___get__));
    (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_6libzfs___pyx_scope_struct_18___get__(PyObject *o) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_18___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_18___get__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_b);
  Py_CLEAR(p->__pyx_v_bookmark);
  Py_CLEAR(p->__pyx_v_bookmarks);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6libzfs___pyx_scope_struct_18___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_18___get__)))) {
    __pyx_freelist_6libzfs___pyx_scope_struct_18___get__[__pyx_freecount_6libzfs___pyx_scope_struct_18___get__++] = ((struct __pyx_obj_6libzfs___pyx_scope_struct_18___get__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6libzfs___pyx_scope_struct_18___get__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs___pyx_scope_struct_18___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_18___get__ *)o;
  if (p->__pyx_v_b) {
    e = (*v)(p->__pyx_v_b, a); if (e) return e;
  }
  if (p->__pyx_v_bookmark) {
    e = (*v)(((PyObject*)p->__pyx_v_bookmark), a); if (e) return e;
  }
  if (p->__pyx_v_bookmarks) {
    e = (*v)(p->__pyx_v_bookmarks, 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_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs___pyx_scope_struct_18___get__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs___pyx_scope_struct_18___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_18___get__ *)o;
  tmp = ((PyObject*)p->__pyx_v_b);
  p->__pyx_v_b = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_bookmark);
  p->__pyx_v_bookmark = ((struct __pyx_obj_6libzfs_ZFSBookmark *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_bookmarks);
  p->__pyx_v_bookmarks = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6libzfs_ZFSDataset *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6libzfs___pyx_scope_struct_18___get__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.__pyx_scope_struct_18___get__", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_18___get__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs___pyx_scope_struct_18___get__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs___pyx_scope_struct_18___get__, /*tp_traverse*/
  __pyx_tp_clear_6libzfs___pyx_scope_struct_18___get__, /*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_6libzfs___pyx_scope_struct_18___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
};

static struct __pyx_obj_6libzfs___pyx_scope_struct_19___get__ *__pyx_freelist_6libzfs___pyx_scope_struct_19___get__[8];
static int __pyx_freecount_6libzfs___pyx_scope_struct_19___get__ = 0;

static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_19___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6libzfs___pyx_scope_struct_19___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_19___get__)))) {
    o = (PyObject*)__pyx_freelist_6libzfs___pyx_scope_struct_19___get__[--__pyx_freecount_6libzfs___pyx_scope_struct_19___get__];
    memset(o, 0, sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_19___get__));
    (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_6libzfs___pyx_scope_struct_19___get__(PyObject *o) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_19___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_19___get__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_c);
  Py_CLEAR(p->__pyx_v_i);
  Py_CLEAR(p->__pyx_v_s);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_t_0);
  Py_CLEAR(p->__pyx_t_3);
  Py_CLEAR(p->__pyx_t_6);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6libzfs___pyx_scope_struct_19___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_19___get__)))) {
    __pyx_freelist_6libzfs___pyx_scope_struct_19___get__[__pyx_freecount_6libzfs___pyx_scope_struct_19___get__++] = ((struct __pyx_obj_6libzfs___pyx_scope_struct_19___get__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6libzfs___pyx_scope_struct_19___get__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs___pyx_scope_struct_19___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_19___get__ *)o;
  if (p->__pyx_v_c) {
    e = (*v)(p->__pyx_v_c, a); if (e) return e;
  }
  if (p->__pyx_v_i) {
    e = (*v)(p->__pyx_v_i, a); if (e) return e;
  }
  if (p->__pyx_v_s) {
    e = (*v)(p->__pyx_v_s, 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_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  if (p->__pyx_t_3) {
    e = (*v)(p->__pyx_t_3, a); if (e) return e;
  }
  if (p->__pyx_t_6) {
    e = (*v)(p->__pyx_t_6, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs___pyx_scope_struct_19___get__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs___pyx_scope_struct_19___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_19___get__ *)o;
  tmp = ((PyObject*)p->__pyx_v_c);
  p->__pyx_v_c = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_i);
  p->__pyx_v_i = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_s);
  p->__pyx_v_s = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6libzfs_ZFSDataset *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_3);
  p->__pyx_t_3 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_6);
  p->__pyx_t_6 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6libzfs___pyx_scope_struct_19___get__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.__pyx_scope_struct_19___get__", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_19___get__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs___pyx_scope_struct_19___get__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs___pyx_scope_struct_19___get__, /*tp_traverse*/
  __pyx_tp_clear_6libzfs___pyx_scope_struct_19___get__, /*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_6libzfs___pyx_scope_struct_19___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
};

static struct __pyx_obj_6libzfs___pyx_scope_struct_20___get__ *__pyx_freelist_6libzfs___pyx_scope_struct_20___get__[8];
static int __pyx_freecount_6libzfs___pyx_scope_struct_20___get__ = 0;

static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_20___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6libzfs___pyx_scope_struct_20___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_20___get__)))) {
    o = (PyObject*)__pyx_freelist_6libzfs___pyx_scope_struct_20___get__[--__pyx_freecount_6libzfs___pyx_scope_struct_20___get__];
    memset(o, 0, sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_20___get__));
    (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_6libzfs___pyx_scope_struct_20___get__(PyObject *o) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_20___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_20___get__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dataset);
  Py_CLEAR(p->__pyx_v_dependents);
  Py_CLEAR(p->__pyx_v_h);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_snapshot);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6libzfs___pyx_scope_struct_20___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_20___get__)))) {
    __pyx_freelist_6libzfs___pyx_scope_struct_20___get__[__pyx_freecount_6libzfs___pyx_scope_struct_20___get__++] = ((struct __pyx_obj_6libzfs___pyx_scope_struct_20___get__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6libzfs___pyx_scope_struct_20___get__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs___pyx_scope_struct_20___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_20___get__ *)o;
  if (p->__pyx_v_dataset) {
    e = (*v)(((PyObject*)p->__pyx_v_dataset), a); if (e) return e;
  }
  if (p->__pyx_v_dependents) {
    e = (*v)(p->__pyx_v_dependents, a); if (e) return e;
  }
  if (p->__pyx_v_h) {
    e = (*v)(p->__pyx_v_h, 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_snapshot) {
    e = (*v)(((PyObject*)p->__pyx_v_snapshot), a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs___pyx_scope_struct_20___get__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs___pyx_scope_struct_20___get__ *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_20___get__ *)o;
  tmp = ((PyObject*)p->__pyx_v_dataset);
  p->__pyx_v_dataset = ((struct __pyx_obj_6libzfs_ZFSDataset *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_dependents);
  p->__pyx_v_dependents = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_h);
  p->__pyx_v_h = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6libzfs_ZFSDataset *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_snapshot);
  p->__pyx_v_snapshot = ((struct __pyx_obj_6libzfs_ZFSSnapshot *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6libzfs___pyx_scope_struct_20___get__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.__pyx_scope_struct_20___get__", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_20___get__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs___pyx_scope_struct_20___get__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs___pyx_scope_struct_20___get__, /*tp_traverse*/
  __pyx_tp_clear_6libzfs___pyx_scope_struct_20___get__, /*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_6libzfs___pyx_scope_struct_20___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
};

static struct __pyx_obj_6libzfs___pyx_scope_struct_21_diff *__pyx_freelist_6libzfs___pyx_scope_struct_21_diff[8];
static int __pyx_freecount_6libzfs___pyx_scope_struct_21_diff = 0;

static PyObject *__pyx_tp_new_6libzfs___pyx_scope_struct_21_diff(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6libzfs___pyx_scope_struct_21_diff > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_21_diff)))) {
    o = (PyObject*)__pyx_freelist_6libzfs___pyx_scope_struct_21_diff[--__pyx_freecount_6libzfs___pyx_scope_struct_21_diff];
    memset(o, 0, sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_21_diff));
    (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_6libzfs___pyx_scope_struct_21_diff(PyObject *o) {
  struct __pyx_obj_6libzfs___pyx_scope_struct_21_diff *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_21_diff *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_f);
  Py_CLEAR(p->__pyx_v_fromsnap);
  Py_CLEAR(p->__pyx_v_line);
  Py_CLEAR(p->__pyx_v_ret);
  Py_CLEAR(p->__pyx_v_rfd);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_thr);
  Py_CLEAR(p->__pyx_v_tosnap);
  Py_CLEAR(p->__pyx_v_wfd);
  Py_CLEAR(p->__pyx_v_worker);
  Py_CLEAR(p->__pyx_t_0);
  Py_CLEAR(p->__pyx_t_2);
  Py_CLEAR(p->__pyx_t_3);
  Py_CLEAR(p->__pyx_t_4);
  Py_CLEAR(p->__pyx_t_5);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6libzfs___pyx_scope_struct_21_diff < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_21_diff)))) {
    __pyx_freelist_6libzfs___pyx_scope_struct_21_diff[__pyx_freecount_6libzfs___pyx_scope_struct_21_diff++] = ((struct __pyx_obj_6libzfs___pyx_scope_struct_21_diff *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6libzfs___pyx_scope_struct_21_diff(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6libzfs___pyx_scope_struct_21_diff *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_21_diff *)o;
  if (p->__pyx_v_f) {
    e = (*v)(p->__pyx_v_f, a); if (e) return e;
  }
  if (p->__pyx_v_fromsnap) {
    e = (*v)(p->__pyx_v_fromsnap, a); if (e) return e;
  }
  if (p->__pyx_v_line) {
    e = (*v)(p->__pyx_v_line, a); if (e) return e;
  }
  if (p->__pyx_v_ret) {
    e = (*v)(p->__pyx_v_ret, a); if (e) return e;
  }
  if (p->__pyx_v_rfd) {
    e = (*v)(p->__pyx_v_rfd, 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_thr) {
    e = (*v)(p->__pyx_v_thr, a); if (e) return e;
  }
  if (p->__pyx_v_tosnap) {
    e = (*v)(p->__pyx_v_tosnap, a); if (e) return e;
  }
  if (p->__pyx_v_wfd) {
    e = (*v)(p->__pyx_v_wfd, a); if (e) return e;
  }
  if (p->__pyx_v_worker) {
    e = (*v)(p->__pyx_v_worker, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  if (p->__pyx_t_2) {
    e = (*v)(p->__pyx_t_2, a); if (e) return e;
  }
  if (p->__pyx_t_3) {
    e = (*v)(p->__pyx_t_3, a); if (e) return e;
  }
  if (p->__pyx_t_4) {
    e = (*v)(p->__pyx_t_4, a); if (e) return e;
  }
  if (p->__pyx_t_5) {
    e = (*v)(p->__pyx_t_5, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6libzfs___pyx_scope_struct_21_diff(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6libzfs___pyx_scope_struct_21_diff *p = (struct __pyx_obj_6libzfs___pyx_scope_struct_21_diff *)o;
  tmp = ((PyObject*)p->__pyx_v_f);
  p->__pyx_v_f = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_fromsnap);
  p->__pyx_v_fromsnap = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_line);
  p->__pyx_v_line = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_ret);
  p->__pyx_v_ret = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_rfd);
  p->__pyx_v_rfd = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6libzfs_ZFSDataset *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_thr);
  p->__pyx_v_thr = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_tosnap);
  p->__pyx_v_tosnap = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_wfd);
  p->__pyx_v_wfd = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_worker);
  p->__pyx_v_worker = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_2);
  p->__pyx_t_2 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_3);
  p->__pyx_t_3 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_4);
  p->__pyx_t_4 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_5);
  p->__pyx_t_5 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6libzfs___pyx_scope_struct_21_diff = {
  PyVarObject_HEAD_INIT(0, 0)
  "libzfs.__pyx_scope_struct_21_diff", /*tp_name*/
  sizeof(struct __pyx_obj_6libzfs___pyx_scope_struct_21_diff), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6libzfs___pyx_scope_struct_21_diff, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6libzfs___pyx_scope_struct_21_diff, /*tp_traverse*/
  __pyx_tp_clear_6libzfs___pyx_scope_struct_21_diff, /*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_6libzfs___pyx_scope_struct_21_diff, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
  #if PY_VERSION_HEX < 0x03020000
    { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
  #else
    PyModuleDef_HEAD_INIT,
  #endif
    "libzfs",
    0, /* m_doc */
    -1, /* m_size */
    __pyx_methods /* m_methods */,
    NULL, /* m_reload */
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_s_0, __pyx_k_0, sizeof(__pyx_k_0), 0, 0, 1, 0},
  {&__pyx_kp_s_0_1, __pyx_k_0_1, sizeof(__pyx_k_0_1), 0, 0, 1, 0},
  {&__pyx_kp_s_0_1_2, __pyx_k_0_1_2, sizeof(__pyx_k_0_1_2), 0, 0, 1, 0},
  {&__pyx_n_s_ACTIVE, __pyx_k_ACTIVE, sizeof(__pyx_k_ACTIVE), 0, 0, 1, 1},
  {&__pyx_n_s_ADD, __pyx_k_ADD, sizeof(__pyx_k_ADD), 0, 0, 1, 1},
  {&__pyx_n_s_ASHIFT_TOO_BIG, __pyx_k_ASHIFT_TOO_BIG, sizeof(__pyx_k_ASHIFT_TOO_BIG), 0, 0, 1, 1},
  {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
  {&__pyx_n_s_B, __pyx_k_B, sizeof(__pyx_k_B), 0, 0, 1, 1},
  {&__pyx_n_s_BADBACKUP, __pyx_k_BADBACKUP, sizeof(__pyx_k_BADBACKUP), 0, 0, 1, 1},
  {&__pyx_n_s_BADCACHE, __pyx_k_BADCACHE, sizeof(__pyx_k_BADCACHE), 0, 0, 1, 1},
  {&__pyx_n_s_BADDEV, __pyx_k_BADDEV, sizeof(__pyx_k_BADDEV), 0, 0, 1, 1},
  {&__pyx_n_s_BADPATH, __pyx_k_BADPATH, sizeof(__pyx_k_BADPATH), 0, 0, 1, 1},
  {&__pyx_n_s_BADPERM, __pyx_k_BADPERM, sizeof(__pyx_k_BADPERM), 0, 0, 1, 1},
  {&__pyx_n_s_BADPERMSET, __pyx_k_BADPERMSET, sizeof(__pyx_k_BADPERMSET), 0, 0, 1, 1},
  {&__pyx_n_s_BADPROP, __pyx_k_BADPROP, sizeof(__pyx_k_BADPROP), 0, 0, 1, 1},
  {&__pyx_n_s_BADRESTORE, __pyx_k_BADRESTORE, sizeof(__pyx_k_BADRESTORE), 0, 0, 1, 1},
  {&__pyx_n_s_BADSTREAM, __pyx_k_BADSTREAM, sizeof(__pyx_k_BADSTREAM), 0, 0, 1, 1},
  {&__pyx_n_s_BADTARGET, __pyx_k_BADTARGET, sizeof(__pyx_k_BADTARGET), 0, 0, 1, 1},
  {&__pyx_n_s_BADTYPE, __pyx_k_BADTYPE, sizeof(__pyx_k_BADTYPE), 0, 0, 1, 1},
  {&__pyx_n_s_BADVERSION, __pyx_k_BADVERSION, sizeof(__pyx_k_BADVERSION), 0, 0, 1, 1},
  {&__pyx_n_s_BADWHO, __pyx_k_BADWHO, sizeof(__pyx_k_BADWHO), 0, 0, 1, 1},
  {&__pyx_n_s_BAD_GUID_SUM, __pyx_k_BAD_GUID_SUM, sizeof(__pyx_k_BAD_GUID_SUM), 0, 0, 1, 1},
  {&__pyx_n_s_BAD_LABEL, __pyx_k_BAD_LABEL, sizeof(__pyx_k_BAD_LABEL), 0, 0, 1, 1},
  {&__pyx_n_s_BAD_LOG, __pyx_k_BAD_LOG, sizeof(__pyx_k_BAD_LOG), 0, 0, 1, 1},
  {&__pyx_n_s_BLOCK, __pyx_k_BLOCK, sizeof(__pyx_k_BLOCK), 0, 0, 1, 1},
  {&__pyx_n_s_BOOKMARK, __pyx_k_BOOKMARK, sizeof(__pyx_k_BOOKMARK), 0, 0, 1, 1},
  {&__pyx_n_s_BUSY, __pyx_k_BUSY, sizeof(__pyx_k_BUSY), 0, 0, 1, 1},
  {&__pyx_n_s_C, __pyx_k_C, sizeof(__pyx_k_C), 0, 0, 1, 1},
  {&__pyx_n_s_CANCELED, __pyx_k_CANCELED, sizeof(__pyx_k_CANCELED), 0, 0, 1, 1},
  {&__pyx_n_s_CANT_OPEN, __pyx_k_CANT_OPEN, sizeof(__pyx_k_CANT_OPEN), 0, 0, 1, 1},
  {&__pyx_n_s_CHAR, __pyx_k_CHAR, sizeof(__pyx_k_CHAR), 0, 0, 1, 1},
  {&__pyx_n_s_CLAIM, __pyx_k_CLAIM, sizeof(__pyx_k_CLAIM), 0, 0, 1, 1},
  {&__pyx_n_s_CLOSED, __pyx_k_CLOSED, sizeof(__pyx_k_CLOSED), 0, 0, 1, 1},
  {&__pyx_n_s_CORRUPT_CACHE, __pyx_k_CORRUPT_CACHE, sizeof(__pyx_k_CORRUPT_CACHE), 0, 0, 1, 1},
  {&__pyx_n_s_CORRUPT_DATA, __pyx_k_CORRUPT_DATA, sizeof(__pyx_k_CORRUPT_DATA), 0, 0, 1, 1},
  {&__pyx_n_s_CORRUPT_LABEL_NR, __pyx_k_CORRUPT_LABEL_NR, sizeof(__pyx_k_CORRUPT_LABEL_NR), 0, 0, 1, 1},
  {&__pyx_n_s_CORRUPT_LABEL_R, __pyx_k_CORRUPT_LABEL_R, sizeof(__pyx_k_CORRUPT_LABEL_R), 0, 0, 1, 1},
  {&__pyx_n_s_CORRUPT_POOL, __pyx_k_CORRUPT_POOL, sizeof(__pyx_k_CORRUPT_POOL), 0, 0, 1, 1},
  {&__pyx_n_s_CROSSTARGET, __pyx_k_CROSSTARGET, sizeof(__pyx_k_CROSSTARGET), 0, 0, 1, 1},
  {&__pyx_kp_s_Can_attach_disks_to_mirrors_and, __pyx_k_Can_attach_disks_to_mirrors_and, sizeof(__pyx_k_Can_attach_disks_to_mirrors_and), 0, 0, 1, 0},
  {&__pyx_kp_s_Can_detach_disks_from_mirrors_an, __pyx_k_Can_detach_disks_from_mirrors_an, sizeof(__pyx_k_Can_detach_disks_from_mirrors_an), 0, 0, 1, 0},
  {&__pyx_kp_s_Can_make_disks_offline_only, __pyx_k_Can_make_disks_offline_only, sizeof(__pyx_k_Can_make_disks_offline_only), 0, 0, 1, 0},
  {&__pyx_kp_s_Can_make_disks_online_only, __pyx_k_Can_make_disks_online_only, sizeof(__pyx_k_Can_make_disks_online_only), 0, 0, 1, 0},
  {&__pyx_kp_s_Can_replace_disks_in_mirror_and, __pyx_k_Can_replace_disks_in_mirror_and, sizeof(__pyx_k_Can_replace_disks_in_mirror_and), 0, 0, 1, 0},
  {&__pyx_kp_s_Can_replace_disks_only, __pyx_k_Can_replace_disks_only, sizeof(__pyx_k_Can_replace_disks_only), 0, 0, 1, 0},
  {&__pyx_kp_s_Cannot_convert_0_to_integer, __pyx_k_Cannot_convert_0_to_integer, sizeof(__pyx_k_Cannot_convert_0_to_integer), 0, 0, 1, 0},
  {&__pyx_kp_s_Cannot_detach_virtual_vdevs, __pyx_k_Cannot_detach_virtual_vdevs, sizeof(__pyx_k_Cannot_detach_virtual_vdevs), 0, 0, 1, 0},
  {&__pyx_kp_s_Cannot_obtain_send_progress, __pyx_k_Cannot_obtain_send_progress, sizeof(__pyx_k_Cannot_obtain_send_progress), 0, 0, 1, 0},
  {&__pyx_kp_s_Cannot_obtain_space_estimate, __pyx_k_Cannot_obtain_space_estimate, sizeof(__pyx_k_Cannot_obtain_space_estimate), 0, 0, 1, 0},
  {&__pyx_kp_s_Cannot_overwrite_existing_proper, __pyx_k_Cannot_overwrite_existing_proper, sizeof(__pyx_k_Cannot_overwrite_existing_proper), 0, 0, 1, 0},
  {&__pyx_kp_s_Cannot_read_label, __pyx_k_Cannot_read_label, sizeof(__pyx_k_Cannot_read_label), 0, 0, 1, 0},
  {&__pyx_kp_s_Cannot_replace_a_top_level_vdev, __pyx_k_Cannot_replace_a_top_level_vdev, sizeof(__pyx_k_Cannot_replace_a_top_level_vdev), 0, 0, 1, 0},
  {&__pyx_n_s_DEDUP, __pyx_k_DEDUP, sizeof(__pyx_k_DEDUP), 0, 0, 1, 1},
  {&__pyx_n_s_DEFAULT, __pyx_k_DEFAULT, sizeof(__pyx_k_DEFAULT), 0, 0, 1, 1},
  {&__pyx_n_s_DEGRADED, __pyx_k_DEGRADED, sizeof(__pyx_k_DEGRADED), 0, 0, 1, 1},
  {&__pyx_n_s_DESTROYED, __pyx_k_DESTROYED, sizeof(__pyx_k_DESTROYED), 0, 0, 1, 1},
  {&__pyx_n_s_DEVOVERFLOW, __pyx_k_DEVOVERFLOW, sizeof(__pyx_k_DEVOVERFLOW), 0, 0, 1, 1},
  {&__pyx_n_s_DIFF, __pyx_k_DIFF, sizeof(__pyx_k_DIFF), 0, 0, 1, 1},
  {&__pyx_n_s_DIFFDATA, __pyx_k_DIFFDATA, sizeof(__pyx_k_DIFFDATA), 0, 0, 1, 1},
  {&__pyx_n_s_DIRECTORY, __pyx_k_DIRECTORY, sizeof(__pyx_k_DIRECTORY), 0, 0, 1, 1},
  {&__pyx_n_s_DISABLED, __pyx_k_DISABLED, sizeof(__pyx_k_DISABLED), 0, 0, 1, 1},
  {&__pyx_n_s_DOALL, __pyx_k_DOALL, sizeof(__pyx_k_DOALL), 0, 0, 1, 1},
  {&__pyx_n_s_DRYRUN, __pyx_k_DRYRUN, sizeof(__pyx_k_DRYRUN), 0, 0, 1, 1},
  {&__pyx_n_s_DSREADONLY, __pyx_k_DSREADONLY, sizeof(__pyx_k_DSREADONLY), 0, 0, 1, 1},
  {&__pyx_n_s_DatasetType, __pyx_k_DatasetType, sizeof(__pyx_k_DatasetType), 0, 0, 1, 1},
  {&__pyx_kp_s_Dataset_0_not_found, __pyx_k_Dataset_0_not_found, sizeof(__pyx_k_Dataset_0_not_found), 0, 0, 1, 0},
  {&__pyx_kp_s_Dataset_with_path_0_not_found, __pyx_k_Dataset_with_path_0_not_found, sizeof(__pyx_k_Dataset_with_path_0_not_found), 0, 0, 1, 0},
  {&__pyx_n_s_DiffFileType, __pyx_k_DiffFileType, sizeof(__pyx_k_DiffFileType), 0, 0, 1, 1},
  {&__pyx_n_s_DiffRecord, __pyx_k_DiffRecord, sizeof(__pyx_k_DiffRecord), 0, 0, 1, 1},
  {&__pyx_n_s_DiffRecordType, __pyx_k_DiffRecordType, sizeof(__pyx_k_DiffRecordType), 0, 0, 1, 1},
  {&__pyx_n_s_DiffRecord___getstate, __pyx_k_DiffRecord___getstate, sizeof(__pyx_k_DiffRecord___getstate), 0, 0, 1, 1},
  {&__pyx_n_s_DiffRecord___init, __pyx_k_DiffRecord___init, sizeof(__pyx_k_DiffRecord___init), 0, 0, 1, 1},
  {&__pyx_n_s_DiffRecord___repr, __pyx_k_DiffRecord___repr, sizeof(__pyx_k_DiffRecord___repr), 0, 0, 1, 1},
  {&__pyx_n_s_DiffRecord___str, __pyx_k_DiffRecord___str, sizeof(__pyx_k_DiffRecord___str), 0, 0, 1, 1},
  {&__pyx_n_s_E, __pyx_k_E, sizeof(__pyx_k_E), 0, 0, 1, 1},
  {&__pyx_n_s_EINVAL, __pyx_k_EINVAL, sizeof(__pyx_k_EINVAL), 0, 0, 1, 1},
  {&__pyx_n_s_EMBED_DATA, __pyx_k_EMBED_DATA, sizeof(__pyx_k_EMBED_DATA), 0, 0, 1, 1},
  {&__pyx_n_s_ENABLED, __pyx_k_ENABLED, sizeof(__pyx_k_ENABLED), 0, 0, 1, 1},
  {&__pyx_n_s_ERR_EXCEEDED, __pyx_k_ERR_EXCEEDED, sizeof(__pyx_k_ERR_EXCEEDED), 0, 0, 1, 1},
  {&__pyx_n_s_EXISTS, __pyx_k_EXISTS, sizeof(__pyx_k_EXISTS), 0, 0, 1, 1},
  {&__pyx_n_s_EXPORTED, __pyx_k_EXPORTED, sizeof(__pyx_k_EXPORTED), 0, 0, 1, 1},
  {&__pyx_n_s_EXTERNAL, __pyx_k_EXTERNAL, sizeof(__pyx_k_EXTERNAL), 0, 0, 1, 1},
  {&__pyx_n_s_Enum, __pyx_k_Enum, sizeof(__pyx_k_Enum), 0, 0, 1, 1},
  {&__pyx_n_s_Error, __pyx_k_Error, sizeof(__pyx_k_Error), 0, 0, 1, 1},
  {&__pyx_n_s_F, __pyx_k_F, sizeof(__pyx_k_F), 0, 0, 1, 1},
  {&__pyx_n_s_FAILING_DEV, __pyx_k_FAILING_DEV, sizeof(__pyx_k_FAILING_DEV), 0, 0, 1, 1},
  {&__pyx_n_s_FAULT, __pyx_k_FAULT, sizeof(__pyx_k_FAULT), 0, 0, 1, 1},
  {&__pyx_n_s_FAULTED, __pyx_k_FAULTED, sizeof(__pyx_k_FAULTED), 0, 0, 1, 1},
  {&__pyx_n_s_FAULTED_DEV_NR, __pyx_k_FAULTED_DEV_NR, sizeof(__pyx_k_FAULTED_DEV_NR), 0, 0, 1, 1},
  {&__pyx_n_s_FAULTED_DEV_R, __pyx_k_FAULTED_DEV_R, sizeof(__pyx_k_FAULTED_DEV_R), 0, 0, 1, 1},
  {&__pyx_n_s_FEAT_DISABLED, __pyx_k_FEAT_DISABLED, sizeof(__pyx_k_FEAT_DISABLED), 0, 0, 1, 1},
  {&__pyx_n_s_FILE, __pyx_k_FILE, sizeof(__pyx_k_FILE), 0, 0, 1, 1},
  {&__pyx_n_s_FILESYSTEM, __pyx_k_FILESYSTEM, sizeof(__pyx_k_FILESYSTEM), 0, 0, 1, 1},
  {&__pyx_n_s_FINISHED, __pyx_k_FINISHED, sizeof(__pyx_k_FINISHED), 0, 0, 1, 1},
  {&__pyx_n_s_FREE, __pyx_k_FREE, sizeof(__pyx_k_FREE), 0, 0, 1, 1},
  {&__pyx_n_s_FROMORIGIN, __pyx_k_FROMORIGIN, sizeof(__pyx_k_FROMORIGIN), 0, 0, 1, 1},
  {&__pyx_n_s_FeatureState, __pyx_k_FeatureState, sizeof(__pyx_k_FeatureState), 0, 0, 1, 1},
  {&__pyx_n_s_HEALTHY, __pyx_k_HEALTHY, sizeof(__pyx_k_HEALTHY), 0, 0, 1, 1},
  {&__pyx_n_s_HOLD, __pyx_k_HOLD, sizeof(__pyx_k_HOLD), 0, 0, 1, 1},
  {&__pyx_n_s_HOSTID_MISMATCH, __pyx_k_HOSTID_MISMATCH, sizeof(__pyx_k_HOSTID_MISMATCH), 0, 0, 1, 1},
  {&__pyx_n_s_INHERITED, __pyx_k_INHERITED, sizeof(__pyx_k_INHERITED), 0, 0, 1, 1},
  {&__pyx_n_s_INTR, __pyx_k_INTR, sizeof(__pyx_k_INTR), 0, 0, 1, 1},
  {&__pyx_n_s_INVALARG, __pyx_k_INVALARG, sizeof(__pyx_k_INVALARG), 0, 0, 1, 1},
  {&__pyx_n_s_INVALCONFIG, __pyx_k_INVALCONFIG, sizeof(__pyx_k_INVALCONFIG), 0, 0, 1, 1},
  {&__pyx_n_s_INVALIDNAME, __pyx_k_INVALIDNAME, sizeof(__pyx_k_INVALIDNAME), 0, 0, 1, 1},
  {&__pyx_n_s_IO, __pyx_k_IO, sizeof(__pyx_k_IO), 0, 0, 1, 1},
  {&__pyx_n_s_IOCTL, __pyx_k_IOCTL, sizeof(__pyx_k_IOCTL), 0, 0, 1, 1},
  {&__pyx_n_s_IO_FAILURE, __pyx_k_IO_FAILURE, sizeof(__pyx_k_IO_FAILURE), 0, 0, 1, 1},
  {&__pyx_n_s_IO_FAILURE_CONTINUE, __pyx_k_IO_FAILURE_CONTINUE, sizeof(__pyx_k_IO_FAILURE_CONTINUE), 0, 0, 1, 1},
  {&__pyx_n_s_IO_FAILURE_WAIT, __pyx_k_IO_FAILURE_WAIT, sizeof(__pyx_k_IO_FAILURE_WAIT), 0, 0, 1, 1},
  {&__pyx_n_s_ISL2CACHE, __pyx_k_ISL2CACHE, sizeof(__pyx_k_ISL2CACHE), 0, 0, 1, 1},
  {&__pyx_n_s_ISSPARE, __pyx_k_ISSPARE, sizeof(__pyx_k_ISSPARE), 0, 0, 1, 1},
  {&__pyx_n_s_IntEnum, __pyx_k_IntEnum, sizeof(__pyx_k_IntEnum), 0, 0, 1, 1},
  {&__pyx_kp_s_Invalid_vdev_type, __pyx_k_Invalid_vdev_type, sizeof(__pyx_k_Invalid_vdev_type), 0, 0, 1, 0},
  {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
  {&__pyx_kp_s_Key_0_not_found, __pyx_k_Key_0_not_found, sizeof(__pyx_k_Key_0_not_found), 0, 0, 1, 0},
  {&__pyx_n_s_L2CACHE, __pyx_k_L2CACHE, sizeof(__pyx_k_L2CACHE), 0, 0, 1, 1},
  {&__pyx_n_s_LABELFAILED, __pyx_k_LABELFAILED, sizeof(__pyx_k_LABELFAILED), 0, 0, 1, 1},
  {&__pyx_n_s_LARGEBLOCK, __pyx_k_LARGEBLOCK, sizeof(__pyx_k_LARGEBLOCK), 0, 0, 1, 1},
  {&__pyx_n_s_LOCAL, __pyx_k_LOCAL, sizeof(__pyx_k_LOCAL), 0, 0, 1, 1},
  {&__pyx_n_s_LOGS, __pyx_k_LOGS, sizeof(__pyx_k_LOGS), 0, 0, 1, 1},
  {&__pyx_n_s_M, __pyx_k_M, sizeof(__pyx_k_M), 0, 0, 1, 1},
  {&__pyx_n_s_MISSING_DEV_NR, __pyx_k_MISSING_DEV_NR, sizeof(__pyx_k_MISSING_DEV_NR), 0, 0, 1, 1},
  {&__pyx_n_s_MISSING_DEV_R, __pyx_k_MISSING_DEV_R, sizeof(__pyx_k_MISSING_DEV_R), 0, 0, 1, 1},
  {&__pyx_n_s_MODIFY, __pyx_k_MODIFY, sizeof(__pyx_k_MODIFY), 0, 0, 1, 1},
  {&__pyx_n_s_MOUNTFAILED, __pyx_k_MOUNTFAILED, sizeof(__pyx_k_MOUNTFAILED), 0, 0, 1, 1},
  {&__pyx_n_s_NAMETOOLONG, __pyx_k_NAMETOOLONG, sizeof(__pyx_k_NAMETOOLONG), 0, 0, 1, 1},
  {&__pyx_n_s_NOCAP, __pyx_k_NOCAP, sizeof(__pyx_k_NOCAP), 0, 0, 1, 1},
  {&__pyx_n_s_NODELEGATION, __pyx_k_NODELEGATION, sizeof(__pyx_k_NODELEGATION), 0, 0, 1, 1},
  {&__pyx_n_s_NODEVICE, __pyx_k_NODEVICE, sizeof(__pyx_k_NODEVICE), 0, 0, 1, 1},
  {&__pyx_n_s_NOENT, __pyx_k_NOENT, sizeof(__pyx_k_NOENT), 0, 0, 1, 1},
  {&__pyx_n_s_NOHISTORY, __pyx_k_NOHISTORY, sizeof(__pyx_k_NOHISTORY), 0, 0, 1, 1},
  {&__pyx_n_s_NOMEM, __pyx_k_NOMEM, sizeof(__pyx_k_NOMEM), 0, 0, 1, 1},
  {&__pyx_n_s_NONE, __pyx_k_NONE, sizeof(__pyx_k_NONE), 0, 0, 1, 1},
  {&__pyx_n_s_NON_NATIVE_ASHIFT, __pyx_k_NON_NATIVE_ASHIFT, sizeof(__pyx_k_NON_NATIVE_ASHIFT), 0, 0, 1, 1},
  {&__pyx_n_s_NOREPLICAS, __pyx_k_NOREPLICAS, sizeof(__pyx_k_NOREPLICAS), 0, 0, 1, 1},
  {&__pyx_n_s_NOSPC, __pyx_k_NOSPC, sizeof(__pyx_k_NOSPC), 0, 0, 1, 1},
  {&__pyx_n_s_NOTSUP, __pyx_k_NOTSUP, sizeof(__pyx_k_NOTSUP), 0, 0, 1, 1},
  {&__pyx_n_s_NO_REPLICAS, __pyx_k_NO_REPLICAS, sizeof(__pyx_k_NO_REPLICAS), 0, 0, 1, 1},
  {&__pyx_n_s_NVList___iter, __pyx_k_NVList___iter, sizeof(__pyx_k_NVList___iter), 0, 0, 1, 1},
  {&__pyx_n_s_NVList_items, __pyx_k_NVList_items, sizeof(__pyx_k_NVList_items), 0, 0, 1, 1},
  {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
  {&__pyx_kp_s_Not_a_character_device, __pyx_k_Not_a_character_device, sizeof(__pyx_k_Not_a_character_device), 0, 0, 1, 0},
  {&__pyx_n_s_Number, __pyx_k_Number, sizeof(__pyx_k_Number), 0, 0, 1, 1},
  {&__pyx_kp_s_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 1, 0},
  {&__pyx_n_s_OFFLINE, __pyx_k_OFFLINE, sizeof(__pyx_k_OFFLINE), 0, 0, 1, 1},
  {&__pyx_n_s_OFFLINE_DEV, __pyx_k_OFFLINE_DEV, sizeof(__pyx_k_OFFLINE_DEV), 0, 0, 1, 1},
  {&__pyx_n_s_OK, __pyx_k_OK, sizeof(__pyx_k_OK), 0, 0, 1, 1},
  {&__pyx_n_s_ONLINE, __pyx_k_ONLINE, sizeof(__pyx_k_ONLINE), 0, 0, 1, 1},
  {&__pyx_n_s_OPENFAILED, __pyx_k_OPENFAILED, sizeof(__pyx_k_OPENFAILED), 0, 0, 1, 1},
  {&__pyx_n_s_OPEN_FAILED, __pyx_k_OPEN_FAILED, sizeof(__pyx_k_OPEN_FAILED), 0, 0, 1, 1},
  {&__pyx_kp_s_ORIGIN, __pyx_k_ORIGIN, sizeof(__pyx_k_ORIGIN), 0, 0, 1, 0},
  {&__pyx_n_s_OSError, __pyx_k_OSError, sizeof(__pyx_k_OSError), 0, 0, 1, 1},
  {&__pyx_n_s_O_RDONLY, __pyx_k_O_RDONLY, sizeof(__pyx_k_O_RDONLY), 0, 0, 1, 1},
  {&__pyx_n_s_O_WRONLY, __pyx_k_O_WRONLY, sizeof(__pyx_k_O_WRONLY), 0, 0, 1, 1},
  {&__pyx_n_s_PARSABLE, __pyx_k_PARSABLE, sizeof(__pyx_k_PARSABLE), 0, 0, 1, 1},
  {&__pyx_n_s_PERM, __pyx_k_PERM, sizeof(__pyx_k_PERM), 0, 0, 1, 1},
  {&__pyx_n_s_PIPEFAILED, __pyx_k_PIPEFAILED, sizeof(__pyx_k_PIPEFAILED), 0, 0, 1, 1},
  {&__pyx_n_s_POOLPROPS, __pyx_k_POOLPROPS, sizeof(__pyx_k_POOLPROPS), 0, 0, 1, 1},
  {&__pyx_n_s_POOLREADONLY, __pyx_k_POOLREADONLY, sizeof(__pyx_k_POOLREADONLY), 0, 0, 1, 1},
  {&__pyx_n_s_POOLUNAVAIL, __pyx_k_POOLUNAVAIL, sizeof(__pyx_k_POOLUNAVAIL), 0, 0, 1, 1},
  {&__pyx_n_s_POOL_NOTSUP, __pyx_k_POOL_NOTSUP, sizeof(__pyx_k_POOL_NOTSUP), 0, 0, 1, 1},
  {&__pyx_n_s_POTENTIALLY_ACTIVE, __pyx_k_POTENTIALLY_ACTIVE, sizeof(__pyx_k_POTENTIALLY_ACTIVE), 0, 0, 1, 1},
  {&__pyx_n_s_PROGRESS, __pyx_k_PROGRESS, sizeof(__pyx_k_PROGRESS), 0, 0, 1, 1},
  {&__pyx_n_s_PROPNONINHERIT, __pyx_k_PROPNONINHERIT, sizeof(__pyx_k_PROPNONINHERIT), 0, 0, 1, 1},
  {&__pyx_n_s_PROPREADONLY, __pyx_k_PROPREADONLY, sizeof(__pyx_k_PROPREADONLY), 0, 0, 1, 1},
  {&__pyx_n_s_PROPS, __pyx_k_PROPS, sizeof(__pyx_k_PROPS), 0, 0, 1, 1},
  {&__pyx_n_s_PROPSPACE, __pyx_k_PROPSPACE, sizeof(__pyx_k_PROPSPACE), 0, 0, 1, 1},
  {&__pyx_n_s_PROPTYPE, __pyx_k_PROPTYPE, sizeof(__pyx_k_PROPTYPE), 0, 0, 1, 1},
  {&__pyx_n_s_PoolState, __pyx_k_PoolState, sizeof(__pyx_k_PoolState), 0, 0, 1, 1},
  {&__pyx_n_s_PoolStatus, __pyx_k_PoolStatus, sizeof(__pyx_k_PoolStatus), 0, 0, 1, 1},
  {&__pyx_kp_s_Pool_0_not_found, __pyx_k_Pool_0_not_found, sizeof(__pyx_k_Pool_0_not_found), 0, 0, 1, 0},
  {&__pyx_n_s_PropertySource, __pyx_k_PropertySource, sizeof(__pyx_k_PropertySource), 0, 0, 1, 1},
  {&__pyx_kp_s_Property_is_not_nullable, __pyx_k_Property_is_not_nullable, sizeof(__pyx_k_Property_is_not_nullable), 0, 0, 1, 0},
  {&__pyx_kp_s_Property_is_read_only, __pyx_k_Property_is_read_only, sizeof(__pyx_k_Property_is_read_only), 0, 0, 1, 0},
  {&__pyx_n_s_R, __pyx_k_R, sizeof(__pyx_k_R), 0, 0, 1, 1},
  {&__pyx_n_s_READ, __pyx_k_READ, sizeof(__pyx_k_READ), 0, 0, 1, 1},
  {&__pyx_n_s_RECEIVED, __pyx_k_RECEIVED, sizeof(__pyx_k_RECEIVED), 0, 0, 1, 1},
  {&__pyx_n_s_RECURSIVE, __pyx_k_RECURSIVE, sizeof(__pyx_k_RECURSIVE), 0, 0, 1, 1},
  {&__pyx_n_s_RELE, __pyx_k_RELE, sizeof(__pyx_k_RELE), 0, 0, 1, 1},
  {&__pyx_n_s_REMOVE, __pyx_k_REMOVE, sizeof(__pyx_k_REMOVE), 0, 0, 1, 1},
  {&__pyx_n_s_REMOVED, __pyx_k_REMOVED, sizeof(__pyx_k_REMOVED), 0, 0, 1, 1},
  {&__pyx_n_s_REMOVED_DEV, __pyx_k_REMOVED_DEV, sizeof(__pyx_k_REMOVED_DEV), 0, 0, 1, 1},
  {&__pyx_n_s_RENAME, __pyx_k_RENAME, sizeof(__pyx_k_RENAME), 0, 0, 1, 1},
  {&__pyx_n_s_REPLICATE, __pyx_k_REPLICATE, sizeof(__pyx_k_REPLICATE), 0, 0, 1, 1},
  {&__pyx_n_s_RESILVER, __pyx_k_RESILVER, sizeof(__pyx_k_RESILVER), 0, 0, 1, 1},
  {&__pyx_n_s_RESILVERING, __pyx_k_RESILVERING, sizeof(__pyx_k_RESILVERING), 0, 0, 1, 1},
  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
  {&__pyx_n_s_SCANNING, __pyx_k_SCANNING, sizeof(__pyx_k_SCANNING), 0, 0, 1, 1},
  {&__pyx_n_s_SCRUB, __pyx_k_SCRUB, sizeof(__pyx_k_SCRUB), 0, 0, 1, 1},
  {&__pyx_n_s_SCRUBBING, __pyx_k_SCRUBBING, sizeof(__pyx_k_SCRUBBING), 0, 0, 1, 1},
  {&__pyx_n_s_SHARENFSFAILED, __pyx_k_SHARENFSFAILED, sizeof(__pyx_k_SHARENFSFAILED), 0, 0, 1, 1},
  {&__pyx_n_s_SHARESMBFAILED, __pyx_k_SHARESMBFAILED, sizeof(__pyx_k_SHARESMBFAILED), 0, 0, 1, 1},
  {&__pyx_n_s_SNAPSHOT, __pyx_k_SNAPSHOT, sizeof(__pyx_k_SNAPSHOT), 0, 0, 1, 1},
  {&__pyx_n_s_SOCKET, __pyx_k_SOCKET, sizeof(__pyx_k_SOCKET), 0, 0, 1, 1},
  {&__pyx_n_s_SPARE, __pyx_k_SPARE, sizeof(__pyx_k_SPARE), 0, 0, 1, 1},
  {&__pyx_n_s_SPARED, __pyx_k_SPARED, sizeof(__pyx_k_SPARED), 0, 0, 1, 1},
  {&__pyx_n_s_SPLIT_POOL, __pyx_k_SPLIT_POOL, sizeof(__pyx_k_SPLIT_POOL), 0, 0, 1, 1},
  {&__pyx_n_s_SUCCESS, __pyx_k_SUCCESS, sizeof(__pyx_k_SUCCESS), 0, 0, 1, 1},
  {&__pyx_n_s_SYMLINK, __pyx_k_SYMLINK, sizeof(__pyx_k_SYMLINK), 0, 0, 1, 1},
  {&__pyx_n_s_S_ISCHR, __pyx_k_S_ISCHR, sizeof(__pyx_k_S_ISCHR), 0, 0, 1, 1},
  {&__pyx_n_s_ScanFunction, __pyx_k_ScanFunction, sizeof(__pyx_k_ScanFunction), 0, 0, 1, 1},
  {&__pyx_n_s_ScanState, __pyx_k_ScanState, sizeof(__pyx_k_ScanState), 0, 0, 1, 1},
  {&__pyx_n_s_SendFlag, __pyx_k_SendFlag, sizeof(__pyx_k_SendFlag), 0, 0, 1, 1},
  {&__pyx_n_s_SendFlags, __pyx_k_SendFlags, sizeof(__pyx_k_SendFlags), 0, 0, 1, 1},
  {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
  {&__pyx_kp_s_Snapshot_0_not_found, __pyx_k_Snapshot_0_not_found, sizeof(__pyx_k_Snapshot_0_not_found), 0, 0, 1, 0},
  {&__pyx_n_s_TAGTOOLONG, __pyx_k_TAGTOOLONG, sizeof(__pyx_k_TAGTOOLONG), 0, 0, 1, 1},
  {&__pyx_n_s_TEMPORARY, __pyx_k_TEMPORARY, sizeof(__pyx_k_TEMPORARY), 0, 0, 1, 1},
  {&__pyx_n_s_THREADCREATEFAILED, __pyx_k_THREADCREATEFAILED, sizeof(__pyx_k_THREADCREATEFAILED), 0, 0, 1, 1},
  {&__pyx_n_s_TOO_SMALL, __pyx_k_TOO_SMALL, sizeof(__pyx_k_TOO_SMALL), 0, 0, 1, 1},
  {&__pyx_n_s_Thread, __pyx_k_Thread, sizeof(__pyx_k_Thread), 0, 0, 1, 1},
  {&__pyx_n_s_UMOUNTFAILED, __pyx_k_UMOUNTFAILED, sizeof(__pyx_k_UMOUNTFAILED), 0, 0, 1, 1},
  {&__pyx_n_s_UNAVAIL, __pyx_k_UNAVAIL, sizeof(__pyx_k_UNAVAIL), 0, 0, 1, 1},
  {&__pyx_n_s_UNINITIALIZED, __pyx_k_UNINITIALIZED, sizeof(__pyx_k_UNINITIALIZED), 0, 0, 1, 1},
  {&__pyx_n_s_UNKNOWN, __pyx_k_UNKNOWN, sizeof(__pyx_k_UNKNOWN), 0, 0, 1, 1},
  {&__pyx_n_s_UNSHARENFSFAILED, __pyx_k_UNSHARENFSFAILED, sizeof(__pyx_k_UNSHARENFSFAILED), 0, 0, 1, 1},
  {&__pyx_n_s_UNSHARESMBFAILED, __pyx_k_UNSHARESMBFAILED, sizeof(__pyx_k_UNSHARESMBFAILED), 0, 0, 1, 1},
  {&__pyx_n_s_UNSUP_FEAT, __pyx_k_UNSUP_FEAT, sizeof(__pyx_k_UNSUP_FEAT), 0, 0, 1, 1},
  {&__pyx_n_s_UNSUP_FEAT_READ, __pyx_k_UNSUP_FEAT_READ, sizeof(__pyx_k_UNSUP_FEAT_READ), 0, 0, 1, 1},
  {&__pyx_n_s_UNSUP_FEAT_WRITE, __pyx_k_UNSUP_FEAT_WRITE, sizeof(__pyx_k_UNSUP_FEAT_WRITE), 0, 0, 1, 1},
  {&__pyx_n_s_VDEVNOTSUP, __pyx_k_VDEVNOTSUP, sizeof(__pyx_k_VDEVNOTSUP), 0, 0, 1, 1},
  {&__pyx_n_s_VDevAuxState, __pyx_k_VDevAuxState, sizeof(__pyx_k_VDevAuxState), 0, 0, 1, 1},
  {&__pyx_n_s_VDevState, __pyx_k_VDevState, sizeof(__pyx_k_VDevState), 0, 0, 1, 1},
  {&__pyx_n_s_VERBOSE, __pyx_k_VERBOSE, sizeof(__pyx_k_VERBOSE), 0, 0, 1, 1},
  {&__pyx_n_s_VERSION_NEWER, __pyx_k_VERSION_NEWER, sizeof(__pyx_k_VERSION_NEWER), 0, 0, 1, 1},
  {&__pyx_n_s_VERSION_OLDER, __pyx_k_VERSION_OLDER, sizeof(__pyx_k_VERSION_OLDER), 0, 0, 1, 1},
  {&__pyx_n_s_VOLTOOBIG, __pyx_k_VOLTOOBIG, sizeof(__pyx_k_VOLTOOBIG), 0, 0, 1, 1},
  {&__pyx_n_s_VOLUME, __pyx_k_VOLUME, sizeof(__pyx_k_VOLUME), 0, 0, 1, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_kp_s_Value_not_compatible_with_type_s, __pyx_k_Value_not_compatible_with_type_s, sizeof(__pyx_k_Value_not_compatible_with_type_s), 0, 0, 1, 0},
  {&__pyx_kp_s_Value_should_be_of_type_ZFSUserP, __pyx_k_Value_should_be_of_type_ZFSUserP, sizeof(__pyx_k_Value_should_be_of_type_ZFSUserP), 0, 0, 1, 0},
  {&__pyx_n_s_WRITE, __pyx_k_WRITE, sizeof(__pyx_k_WRITE), 0, 0, 1, 1},
  {&__pyx_n_s_ZFSDataset___get, __pyx_k_ZFSDataset___get, sizeof(__pyx_k_ZFSDataset___get), 0, 0, 1, 1},
  {&__pyx_n_s_ZFSDataset_diff, __pyx_k_ZFSDataset_diff, sizeof(__pyx_k_ZFSDataset_diff), 0, 0, 1, 1},
  {&__pyx_n_s_ZFSException, __pyx_k_ZFSException, sizeof(__pyx_k_ZFSException), 0, 0, 1, 1},
  {&__pyx_n_s_ZFSException___init, __pyx_k_ZFSException___init, sizeof(__pyx_k_ZFSException___init), 0, 0, 1, 1},
  {&__pyx_kp_s_ZFSObject_cannot_be_instantiated, __pyx_k_ZFSObject_cannot_be_instantiated, sizeof(__pyx_k_ZFSObject_cannot_be_instantiated), 0, 0, 1, 0},
  {&__pyx_n_s_ZFSPool___get, __pyx_k_ZFSPool___get, sizeof(__pyx_k_ZFSPool___get), 0, 0, 1, 1},
  {&__pyx_kp_s_ZFSPool_cannot_be_instantiated_b, __pyx_k_ZFSPool_cannot_be_instantiated_b, sizeof(__pyx_k_ZFSPool_cannot_be_instantiated_b), 0, 0, 1, 0},
  {&__pyx_n_s_ZFSPropertyDict___iter, __pyx_k_ZFSPropertyDict___iter, sizeof(__pyx_k_ZFSPropertyDict___iter), 0, 0, 1, 1},
  {&__pyx_kp_s_ZFSProperty_cannot_be_instantiat, __pyx_k_ZFSProperty_cannot_be_instantiat, sizeof(__pyx_k_ZFSProperty_cannot_be_instantiat), 0, 0, 1, 0},
  {&__pyx_n_s_ZFSVdev___get, __pyx_k_ZFSVdev___get, sizeof(__pyx_k_ZFSVdev___get), 0, 0, 1, 1},
  {&__pyx_n_s_ZFS_ONLINE_EXPAND, __pyx_k_ZFS_ONLINE_EXPAND, sizeof(__pyx_k_ZFS_ONLINE_EXPAND), 0, 0, 1, 1},
  {&__pyx_n_s_ZFS_PROPERTY_CONVERTERS, __pyx_k_ZFS_PROPERTY_CONVERTERS, sizeof(__pyx_k_ZFS_PROPERTY_CONVERTERS), 0, 0, 1, 1},
  {&__pyx_n_s_ZFS_TYPE_DATASET, __pyx_k_ZFS_TYPE_DATASET, sizeof(__pyx_k_ZFS_TYPE_DATASET), 0, 0, 1, 1},
  {&__pyx_n_s_ZFS___get, __pyx_k_ZFS___get, sizeof(__pyx_k_ZFS___get), 0, 0, 1, 1},
  {&__pyx_n_s_ZFS_find_import, __pyx_k_ZFS_find_import, sizeof(__pyx_k_ZFS_find_import), 0, 0, 1, 1},
  {&__pyx_n_s_ZIOType, __pyx_k_ZIOType, sizeof(__pyx_k_ZIOType), 0, 0, 1, 1},
  {&__pyx_n_s_ZONED, __pyx_k_ZONED, sizeof(__pyx_k_ZONED), 0, 0, 1, 1},
  {&__pyx_n_s_ZPOOL_PROPERTY_CONVERTERS, __pyx_k_ZPOOL_PROPERTY_CONVERTERS, sizeof(__pyx_k_ZPOOL_PROPERTY_CONVERTERS), 0, 0, 1, 1},
  {&__pyx_kp_s_ZPoolProperty_cannot_be_instanti, __pyx_k_ZPoolProperty_cannot_be_instanti, sizeof(__pyx_k_ZPoolProperty_cannot_be_instanti), 0, 0, 1, 0},
  {&__pyx_n_s_ZfsConverter, __pyx_k_ZfsConverter, sizeof(__pyx_k_ZfsConverter), 0, 0, 1, 1},
  {&__pyx_n_s_ZfsConverter___init, __pyx_k_ZfsConverter___init, sizeof(__pyx_k_ZfsConverter___init), 0, 0, 1, 1},
  {&__pyx_n_s_ZfsConverter_to_native, __pyx_k_ZfsConverter_to_native, sizeof(__pyx_k_ZfsConverter_to_native), 0, 0, 1, 1},
  {&__pyx_n_s_ZfsConverter_to_property, __pyx_k_ZfsConverter_to_property, sizeof(__pyx_k_ZfsConverter_to_property), 0, 0, 1, 1},
  {&__pyx_kp_s__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 0, 1, 0},
  {&__pyx_kp_s__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 1, 0},
  {&__pyx_kp_s__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 0, 1, 0},
  {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0},
  {&__pyx_kp_s__49, __pyx_k__49, sizeof(__pyx_k__49), 0, 0, 1, 0},
  {&__pyx_kp_s__50, __pyx_k__50, sizeof(__pyx_k__50), 0, 0, 1, 0},
  {&__pyx_kp_s__51, __pyx_k__51, sizeof(__pyx_k__51), 0, 0, 1, 0},
  {&__pyx_kp_s__59, __pyx_k__59, sizeof(__pyx_k__59), 0, 0, 1, 0},
  {&__pyx_kp_s__62, __pyx_k__62, sizeof(__pyx_k__62), 0, 0, 1, 0},
  {&__pyx_kp_s__80, __pyx_k__80, sizeof(__pyx_k__80), 0, 0, 1, 0},
  {&__pyx_kp_s__81, __pyx_k__81, sizeof(__pyx_k__81), 0, 0, 1, 0},
  {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0},
  {&__pyx_n_s_aclinherit, __pyx_k_aclinherit, sizeof(__pyx_k_aclinherit), 0, 0, 1, 1},
  {&__pyx_n_s_aclmode, __pyx_k_aclmode, sizeof(__pyx_k_aclmode), 0, 0, 1, 1},
  {&__pyx_n_s_add_child_vdev, __pyx_k_add_child_vdev, sizeof(__pyx_k_add_child_vdev), 0, 0, 1, 1},
  {&__pyx_n_s_allocated, __pyx_k_allocated, sizeof(__pyx_k_allocated), 0, 0, 1, 1},
  {&__pyx_n_s_altroot, __pyx_k_altroot, sizeof(__pyx_k_altroot), 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_argument, __pyx_k_argument, sizeof(__pyx_k_argument), 0, 0, 1, 1},
  {&__pyx_n_s_ashift, __pyx_k_ashift, sizeof(__pyx_k_ashift), 0, 0, 1, 1},
  {&__pyx_n_s_asize, __pyx_k_asize, sizeof(__pyx_k_asize), 0, 0, 1, 1},
  {&__pyx_n_s_atime, __pyx_k_atime, sizeof(__pyx_k_atime), 0, 0, 1, 1},
  {&__pyx_n_s_autoexpand, __pyx_k_autoexpand, sizeof(__pyx_k_autoexpand), 0, 0, 1, 1},
  {&__pyx_n_s_autoreplace, __pyx_k_autoreplace, sizeof(__pyx_k_autoreplace), 0, 0, 1, 1},
  {&__pyx_n_s_available, __pyx_k_available, sizeof(__pyx_k_available), 0, 0, 1, 1},
  {&__pyx_n_s_bookmark_name, __pyx_k_bookmark_name, sizeof(__pyx_k_bookmark_name), 0, 0, 1, 1},
  {&__pyx_n_s_bootfs, __pyx_k_bootfs, sizeof(__pyx_k_bootfs), 0, 0, 1, 1},
  {&__pyx_n_s_buf, __pyx_k_buf, sizeof(__pyx_k_buf), 0, 0, 1, 1},
  {&__pyx_n_s_bytes, __pyx_k_bytes, sizeof(__pyx_k_bytes), 0, 0, 1, 1},
  {&__pyx_n_s_bytes_processed, __pyx_k_bytes_processed, sizeof(__pyx_k_bytes_processed), 0, 0, 1, 1},
  {&__pyx_n_s_bytes_scanned, __pyx_k_bytes_scanned, sizeof(__pyx_k_bytes_scanned), 0, 0, 1, 1},
  {&__pyx_n_s_bytes_to_process, __pyx_k_bytes_to_process, sizeof(__pyx_k_bytes_to_process), 0, 0, 1, 1},
  {&__pyx_n_s_bytes_to_scan, __pyx_k_bytes_to_scan, sizeof(__pyx_k_bytes_to_scan), 0, 0, 1, 1},
  {&__pyx_n_s_c_fd, __pyx_k_c_fd, sizeof(__pyx_k_c_fd), 0, 0, 1, 1},
  {&__pyx_n_s_c_ret, __pyx_k_c_ret, sizeof(__pyx_k_c_ret), 0, 0, 1, 1},
  {&__pyx_n_s_cache, __pyx_k_cache, sizeof(__pyx_k_cache), 0, 0, 1, 1},
  {&__pyx_n_s_cache_vdevs, __pyx_k_cache_vdevs, sizeof(__pyx_k_cache_vdevs), 0, 0, 1, 1},
  {&__pyx_n_s_cachefile, __pyx_k_cachefile, sizeof(__pyx_k_cachefile), 0, 0, 1, 1},
  {&__pyx_n_s_cachemode, __pyx_k_cachemode, sizeof(__pyx_k_cachemode), 0, 0, 1, 1},
  {&__pyx_n_s_canmount, __pyx_k_canmount, sizeof(__pyx_k_canmount), 0, 0, 1, 1},
  {&__pyx_n_s_capacity, __pyx_k_capacity, sizeof(__pyx_k_capacity), 0, 0, 1, 1},
  {&__pyx_n_s_casesensitivity, __pyx_k_casesensitivity, sizeof(__pyx_k_casesensitivity), 0, 0, 1, 1},
  {&__pyx_n_s_checksum, __pyx_k_checksum, sizeof(__pyx_k_checksum), 0, 0, 1, 1},
  {&__pyx_n_s_checksum_errors, __pyx_k_checksum_errors, sizeof(__pyx_k_checksum_errors), 0, 0, 1, 1},
  {&__pyx_n_s_children, __pyx_k_children, sizeof(__pyx_k_children), 0, 0, 1, 1},
  {&__pyx_n_s_children_recursive, __pyx_k_children_recursive, sizeof(__pyx_k_children_recursive), 0, 0, 1, 1},
  {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
  {&__pyx_n_s_clear_label, __pyx_k_clear_label, sizeof(__pyx_k_clear_label), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_n_s_cmd, __pyx_k_cmd, sizeof(__pyx_k_cmd), 0, 0, 1, 1},
  {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1},
  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
  {&__pyx_n_s_comment, __pyx_k_comment, sizeof(__pyx_k_comment), 0, 0, 1, 1},
  {&__pyx_n_s_compression, __pyx_k_compression, sizeof(__pyx_k_compression), 0, 0, 1, 1},
  {&__pyx_n_s_config, __pyx_k_config, sizeof(__pyx_k_config), 0, 0, 1, 1},
  {&__pyx_n_s_configured_ashift, __pyx_k_configured_ashift, sizeof(__pyx_k_configured_ashift), 0, 0, 1, 1},
  {&__pyx_n_s_copies, __pyx_k_copies, sizeof(__pyx_k_copies), 0, 0, 1, 1},
  {&__pyx_n_s_creation, __pyx_k_creation, sizeof(__pyx_k_creation), 0, 0, 1, 1},
  {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1},
  {&__pyx_n_s_daemon, __pyx_k_daemon, sizeof(__pyx_k_daemon), 0, 0, 1, 1},
  {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
  {&__pyx_n_s_data_vdevs, __pyx_k_data_vdevs, sizeof(__pyx_k_data_vdevs), 0, 0, 1, 1},
  {&__pyx_n_s_dataset, __pyx_k_dataset, sizeof(__pyx_k_dataset), 0, 0, 1, 1},
  {&__pyx_n_s_datasets_recursive, __pyx_k_datasets_recursive, sizeof(__pyx_k_datasets_recursive), 0, 0, 1, 1},
  {&__pyx_n_s_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1},
  {&__pyx_n_s_dedup, __pyx_k_dedup, sizeof(__pyx_k_dedup), 0, 0, 1, 1},
  {&__pyx_n_s_dedupditto, __pyx_k_dedupditto, sizeof(__pyx_k_dedupditto), 0, 0, 1, 1},
  {&__pyx_n_s_dedupratio, __pyx_k_dedupratio, sizeof(__pyx_k_dedupratio), 0, 0, 1, 1},
  {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
  {&__pyx_n_s_delegation, __pyx_k_delegation, sizeof(__pyx_k_delegation), 0, 0, 1, 1},
  {&__pyx_n_s_delete, __pyx_k_delete, sizeof(__pyx_k_delete), 0, 0, 1, 1},
  {&__pyx_n_s_description, __pyx_k_description, sizeof(__pyx_k_description), 0, 0, 1, 1},
  {&__pyx_n_s_destroy_snapshot, __pyx_k_destroy_snapshot, sizeof(__pyx_k_destroy_snapshot), 0, 0, 1, 1},
  {&__pyx_n_s_destroyed, __pyx_k_destroyed, sizeof(__pyx_k_destroyed), 0, 0, 1, 1},
  {&__pyx_n_s_device, __pyx_k_device, sizeof(__pyx_k_device), 0, 0, 1, 1},
  {&__pyx_n_s_devices, __pyx_k_devices, sizeof(__pyx_k_devices), 0, 0, 1, 1},
  {&__pyx_n_s_diff, __pyx_k_diff, sizeof(__pyx_k_diff), 0, 0, 1, 1},
  {&__pyx_n_s_diff_locals_worker, __pyx_k_diff_locals_worker, sizeof(__pyx_k_diff_locals_worker), 0, 0, 1, 1},
  {&__pyx_n_s_disk, __pyx_k_disk, sizeof(__pyx_k_disk), 0, 0, 1, 1},
  {&__pyx_n_s_disks, __pyx_k_disks, sizeof(__pyx_k_disks), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_kp_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 0},
  {&__pyx_n_s_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 0, 1, 1},
  {&__pyx_n_s_enabled, __pyx_k_enabled, sizeof(__pyx_k_enabled), 0, 0, 1, 1},
  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {&__pyx_n_s_end_time, __pyx_k_end_time, sizeof(__pyx_k_end_time), 0, 0, 1, 1},
  {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
  {&__pyx_n_s_enum, __pyx_k_enum, sizeof(__pyx_k_enum), 0, 0, 1, 1},
  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
  {&__pyx_n_s_err, __pyx_k_err, sizeof(__pyx_k_err), 0, 0, 1, 1},
  {&__pyx_n_s_errno, __pyx_k_errno, sizeof(__pyx_k_errno), 0, 0, 1, 1},
  {&__pyx_n_s_error_count, __pyx_k_error_count, sizeof(__pyx_k_error_count), 0, 0, 1, 1},
  {&__pyx_n_s_errors, __pyx_k_errors, sizeof(__pyx_k_errors), 0, 0, 1, 1},
  {&__pyx_n_s_errstr, __pyx_k_errstr, sizeof(__pyx_k_errstr), 0, 0, 1, 1},
  {&__pyx_n_s_eval_arg, __pyx_k_eval_arg, sizeof(__pyx_k_eval_arg), 0, 0, 1, 1},
  {&__pyx_n_s_eval_dict, __pyx_k_eval_dict, sizeof(__pyx_k_eval_dict), 0, 0, 1, 1},
  {&__pyx_n_s_eval_list, __pyx_k_eval_list, sizeof(__pyx_k_eval_list), 0, 0, 1, 1},
  {&__pyx_n_s_eval_str, __pyx_k_eval_str, sizeof(__pyx_k_eval_str), 0, 0, 1, 1},
  {&__pyx_n_s_eval_tuple, __pyx_k_eval_tuple, sizeof(__pyx_k_eval_tuple), 0, 0, 1, 1},
  {&__pyx_n_s_eval_zfsvdev, __pyx_k_eval_zfsvdev, sizeof(__pyx_k_eval_zfsvdev), 0, 0, 1, 1},
  {&__pyx_n_s_exec, __pyx_k_exec, sizeof(__pyx_k_exec), 0, 0, 1, 1},
  {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
  {&__pyx_n_s_expand, __pyx_k_expand, sizeof(__pyx_k_expand), 0, 0, 1, 1},
  {&__pyx_n_s_expandsize, __pyx_k_expandsize, sizeof(__pyx_k_expandsize), 0, 0, 1, 1},
  {&__pyx_kp_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 0},
  {&__pyx_n_s_failmode, __pyx_k_failmode, sizeof(__pyx_k_failmode), 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_kp_s_feature_0, __pyx_k_feature_0, sizeof(__pyx_k_feature_0), 0, 0, 1, 0},
  {&__pyx_n_s_features, __pyx_k_features, sizeof(__pyx_k_features), 0, 0, 1, 1},
  {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
  {&__pyx_n_s_filesystem_count, __pyx_k_filesystem_count, sizeof(__pyx_k_filesystem_count), 0, 0, 1, 1},
  {&__pyx_n_s_filesystem_limit, __pyx_k_filesystem_limit, sizeof(__pyx_k_filesystem_limit), 0, 0, 1, 1},
  {&__pyx_n_s_find_import, __pyx_k_find_import, sizeof(__pyx_k_find_import), 0, 0, 1, 1},
  {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
  {&__pyx_kp_s_flags_must_be_passed_as_a_set, __pyx_k_flags_must_be_passed_as_a_set, sizeof(__pyx_k_flags_must_be_passed_as_a_set), 0, 0, 1, 0},
  {&__pyx_n_s_force, __pyx_k_force, sizeof(__pyx_k_force), 0, 0, 1, 1},
  {&__pyx_n_s_forceunmount, __pyx_k_forceunmount, sizeof(__pyx_k_forceunmount), 0, 0, 1, 1},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_n_s_fragmentation, __pyx_k_fragmentation, sizeof(__pyx_k_fragmentation), 0, 0, 1, 1},
  {&__pyx_n_s_free, __pyx_k_free, sizeof(__pyx_k_free), 0, 0, 1, 1},
  {&__pyx_n_s_freeing, __pyx_k_freeing, sizeof(__pyx_k_freeing), 0, 0, 1, 1},
  {&__pyx_n_s_fromname, __pyx_k_fromname, sizeof(__pyx_k_fromname), 0, 0, 1, 1},
  {&__pyx_n_s_fromsnap, __pyx_k_fromsnap, sizeof(__pyx_k_fromsnap), 0, 0, 1, 1},
  {&__pyx_n_s_fromtimestamp, __pyx_k_fromtimestamp, sizeof(__pyx_k_fromtimestamp), 0, 0, 1, 1},
  {&__pyx_n_s_fsopts, __pyx_k_fsopts, sizeof(__pyx_k_fsopts), 0, 0, 1, 1},
  {&__pyx_n_s_fstat, __pyx_k_fstat, sizeof(__pyx_k_fstat), 0, 0, 1, 1},
  {&__pyx_n_s_fstype, __pyx_k_fstype, sizeof(__pyx_k_fstype), 0, 0, 1, 1},
  {&__pyx_n_s_function, __pyx_k_function, sizeof(__pyx_k_function), 0, 0, 1, 1},
  {&__pyx_n_s_g, __pyx_k_g, sizeof(__pyx_k_g), 0, 0, 1, 1},
  {&__pyx_n_s_generate_history_opts, __pyx_k_generate_history_opts, sizeof(__pyx_k_generate_history_opts), 0, 0, 1, 1},
  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 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_dataset, __pyx_k_get_dataset, sizeof(__pyx_k_get_dataset), 0, 0, 1, 1},
  {&__pyx_n_s_get_snapshot, __pyx_k_get_snapshot, sizeof(__pyx_k_get_snapshot), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_n_s_groups, __pyx_k_groups, sizeof(__pyx_k_groups), 0, 0, 1, 1},
  {&__pyx_n_s_guid, __pyx_k_guid, sizeof(__pyx_k_guid), 0, 0, 1, 1},
  {&__pyx_n_s_handle, __pyx_k_handle, sizeof(__pyx_k_handle), 0, 0, 1, 1},
  {&__pyx_n_s_health, __pyx_k_health, sizeof(__pyx_k_health), 0, 0, 1, 1},
  {&__pyx_n_s_hidden, __pyx_k_hidden, sizeof(__pyx_k_hidden), 0, 0, 1, 1},
  {&__pyx_n_s_history, __pyx_k_history, sizeof(__pyx_k_history), 0, 0, 1, 1},
  {&__pyx_kp_s_history_is_a_boolean_parameter, __pyx_k_history_is_a_boolean_parameter, sizeof(__pyx_k_history_is_a_boolean_parameter), 0, 0, 1, 0},
  {&__pyx_n_s_history_prefix, __pyx_k_history_prefix, sizeof(__pyx_k_history_prefix), 0, 0, 1, 1},
  {&__pyx_kp_s_history_prefix_is_a_string_param, __pyx_k_history_prefix_is_a_string_param, sizeof(__pyx_k_history_prefix_is_a_string_param), 0, 0, 1, 0},
  {&__pyx_n_s_history_vdevs_list, __pyx_k_history_vdevs_list, sizeof(__pyx_k_history_vdevs_list), 0, 0, 1, 1},
  {&__pyx_n_s_holds, __pyx_k_holds, sizeof(__pyx_k_holds), 0, 0, 1, 1},
  {&__pyx_n_s_hostname, __pyx_k_hostname, sizeof(__pyx_k_hostname), 0, 0, 1, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
  {&__pyx_kp_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 0},
  {&__pyx_n_s_import_2, __pyx_k_import_2, sizeof(__pyx_k_import_2), 0, 0, 1, 1},
  {&__pyx_n_s_inherit, __pyx_k_inherit, sizeof(__pyx_k_inherit), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_is_log, __pyx_k_is_log, sizeof(__pyx_k_is_log), 0, 0, 1, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
  {&__pyx_n_s_iterkeys, __pyx_k_iterkeys, sizeof(__pyx_k_iterkeys), 0, 0, 1, 1},
  {&__pyx_n_s_itervalues, __pyx_k_itervalues, sizeof(__pyx_k_itervalues), 0, 0, 1, 1},
  {&__pyx_n_s_jailed, __pyx_k_jailed, sizeof(__pyx_k_jailed), 0, 0, 1, 1},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1},
  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
  {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
  {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_l, __pyx_k_l, sizeof(__pyx_k_l), 0, 0, 1, 1},
  {&__pyx_n_s_l2cache, __pyx_k_l2cache, sizeof(__pyx_k_l2cache), 0, 0, 1, 1},
  {&__pyx_n_s_leaked, __pyx_k_leaked, sizeof(__pyx_k_leaked), 0, 0, 1, 1},
  {&__pyx_n_s_libzfs, __pyx_k_libzfs, sizeof(__pyx_k_libzfs), 0, 0, 1, 1},
  {&__pyx_kp_s_libzfs_0_name_1_type_2, __pyx_k_libzfs_0_name_1_type_2, sizeof(__pyx_k_libzfs_0_name_1_type_2), 0, 0, 1, 0},
  {&__pyx_kp_s_libzfs_ZFSImportablePool_name_0, __pyx_k_libzfs_ZFSImportablePool_name_0, sizeof(__pyx_k_libzfs_ZFSImportablePool_name_0), 0, 0, 1, 0},
  {&__pyx_kp_s_libzfs_ZFSPool_name_0_guid_1, __pyx_k_libzfs_ZFSPool_name_0_guid_1, sizeof(__pyx_k_libzfs_ZFSPool_name_0_guid_1), 0, 0, 1, 0},
  {&__pyx_kp_s_libzfs_ZFSProperty_name_0_value, __pyx_k_libzfs_ZFSProperty_name_0_value, sizeof(__pyx_k_libzfs_ZFSProperty_name_0_value), 0, 0, 1, 0},
  {&__pyx_kp_s_libzfs_ZFSUserProperty_name_0_v, __pyx_k_libzfs_ZFSUserProperty_name_0_v, sizeof(__pyx_k_libzfs_ZFSUserProperty_name_0_v), 0, 0, 1, 0},
  {&__pyx_kp_s_libzfs_ZFSVdev_type_0, __pyx_k_libzfs_ZFSVdev_type_0, sizeof(__pyx_k_libzfs_ZFSVdev_type_0), 0, 0, 1, 0},
  {&__pyx_kp_s_libzfs_ZFSVdev_type_0_path_1, __pyx_k_libzfs_ZFSVdev_type_0_path_1, sizeof(__pyx_k_libzfs_ZFSVdev_type_0_path_1), 0, 0, 1, 0},
  {&__pyx_kp_s_libzfs_ZPoolProperty_name_0_val, __pyx_k_libzfs_ZPoolProperty_name_0_val, sizeof(__pyx_k_libzfs_ZPoolProperty_name_0_val), 0, 0, 1, 0},
  {&__pyx_n_s_limitds, __pyx_k_limitds, sizeof(__pyx_k_limitds), 0, 0, 1, 1},
  {&__pyx_n_s_listsnapshots, __pyx_k_listsnapshots, sizeof(__pyx_k_listsnapshots), 0, 0, 1, 1},
  {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
  {&__pyx_n_s_log_vdevs, __pyx_k_log_vdevs, sizeof(__pyx_k_log_vdevs), 0, 0, 1, 1},
  {&__pyx_n_s_logbias, __pyx_k_logbias, sizeof(__pyx_k_logbias), 0, 0, 1, 1},
  {&__pyx_n_s_logical_ashift, __pyx_k_logical_ashift, sizeof(__pyx_k_logical_ashift), 0, 0, 1, 1},
  {&__pyx_n_s_logicalreferenced, __pyx_k_logicalreferenced, sizeof(__pyx_k_logicalreferenced), 0, 0, 1, 1},
  {&__pyx_n_s_logicalused, __pyx_k_logicalused, sizeof(__pyx_k_logicalused), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_maxsplit, __pyx_k_maxsplit, sizeof(__pyx_k_maxsplit), 0, 0, 1, 1},
  {&__pyx_n_s_message, __pyx_k_message, sizeof(__pyx_k_message), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_mirror, __pyx_k_mirror, sizeof(__pyx_k_mirror), 0, 0, 1, 1},
  {&__pyx_n_s_mislabel, __pyx_k_mislabel, sizeof(__pyx_k_mislabel), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_mount, __pyx_k_mount, sizeof(__pyx_k_mount), 0, 0, 1, 1},
  {&__pyx_n_s_mount_recursive, __pyx_k_mount_recursive, sizeof(__pyx_k_mount_recursive), 0, 0, 1, 1},
  {&__pyx_n_s_mounted, __pyx_k_mounted, sizeof(__pyx_k_mounted), 0, 0, 1, 1},
  {&__pyx_n_s_mountpoint, __pyx_k_mountpoint, sizeof(__pyx_k_mountpoint), 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_nbmand, __pyx_k_nbmand, sizeof(__pyx_k_nbmand), 0, 0, 1, 1},
  {&__pyx_n_s_new_name, __pyx_k_new_name, sizeof(__pyx_k_new_name), 0, 0, 1, 1},
  {&__pyx_n_s_newname, __pyx_k_newname, sizeof(__pyx_k_newname), 0, 0, 1, 1},
  {&__pyx_n_s_nicestrtonum, __pyx_k_nicestrtonum, sizeof(__pyx_k_nicestrtonum), 0, 0, 1, 1},
  {&__pyx_n_s_no, __pyx_k_no, sizeof(__pyx_k_no), 0, 0, 1, 1},
  {&__pyx_n_s_nomount, __pyx_k_nomount, sizeof(__pyx_k_nomount), 0, 0, 1, 1},
  {&__pyx_n_s_none, __pyx_k_none, sizeof(__pyx_k_none), 0, 0, 1, 1},
  {&__pyx_n_s_normalization, __pyx_k_normalization, sizeof(__pyx_k_normalization), 0, 0, 1, 1},
  {&__pyx_n_s_nounmount, __pyx_k_nounmount, sizeof(__pyx_k_nounmount), 0, 0, 1, 1},
  {&__pyx_n_s_nparity, __pyx_k_nparity, sizeof(__pyx_k_nparity), 0, 0, 1, 1},
  {&__pyx_n_s_null, __pyx_k_null, sizeof(__pyx_k_null), 0, 0, 1, 1},
  {&__pyx_n_s_nullable, __pyx_k_nullable, sizeof(__pyx_k_nullable), 0, 0, 1, 1},
  {&__pyx_n_s_numbers, __pyx_k_numbers, sizeof(__pyx_k_numbers), 0, 0, 1, 1},
  {&__pyx_n_s_nvlist, __pyx_k_nvlist, sizeof(__pyx_k_nvlist), 0, 0, 1, 1},
  {&__pyx_kp_s_o, __pyx_k_o, sizeof(__pyx_k_o), 0, 0, 1, 0},
  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
  {&__pyx_n_s_off, __pyx_k_off, sizeof(__pyx_k_off), 0, 0, 1, 1},
  {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1},
  {&__pyx_n_s_oldpath, __pyx_k_oldpath, sizeof(__pyx_k_oldpath), 0, 0, 1, 1},
  {&__pyx_n_s_on, __pyx_k_on, sizeof(__pyx_k_on), 0, 0, 1, 1},
  {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
  {&__pyx_n_s_ops, __pyx_k_ops, sizeof(__pyx_k_ops), 0, 0, 1, 1},
  {&__pyx_n_s_opt_dict, __pyx_k_opt_dict, sizeof(__pyx_k_opt_dict), 0, 0, 1, 1},
  {&__pyx_n_s_opts, __pyx_k_opts, sizeof(__pyx_k_opts), 0, 0, 1, 1},
  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
  {&__pyx_n_s_otherdict, __pyx_k_otherdict, sizeof(__pyx_k_otherdict), 0, 0, 1, 1},
  {&__pyx_n_s_out, __pyx_k_out, sizeof(__pyx_k_out), 0, 0, 1, 1},
  {&__pyx_n_s_parent, __pyx_k_parent, sizeof(__pyx_k_parent), 0, 0, 1, 1},
  {&__pyx_n_s_parse_zfs_prop, __pyx_k_parse_zfs_prop, sizeof(__pyx_k_parse_zfs_prop), 0, 0, 1, 1},
  {&__pyx_n_s_parse_zpool_prop, __pyx_k_parse_zpool_prop, sizeof(__pyx_k_parse_zpool_prop), 0, 0, 1, 1},
  {&__pyx_n_s_parsed, __pyx_k_parsed, sizeof(__pyx_k_parsed), 0, 0, 1, 1},
  {&__pyx_n_s_partition, __pyx_k_partition, sizeof(__pyx_k_partition), 0, 0, 1, 1},
  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
  {&__pyx_n_s_paths, __pyx_k_paths, sizeof(__pyx_k_paths), 0, 0, 1, 1},
  {&__pyx_n_s_percentage, __pyx_k_percentage, sizeof(__pyx_k_percentage), 0, 0, 1, 1},
  {&__pyx_n_s_physical_ashift, __pyx_k_physical_ashift, sizeof(__pyx_k_physical_ashift), 0, 0, 1, 1},
  {&__pyx_n_s_pipe, __pyx_k_pipe, sizeof(__pyx_k_pipe), 0, 0, 1, 1},
  {&__pyx_n_s_pool, __pyx_k_pool, sizeof(__pyx_k_pool), 0, 0, 1, 1},
  {&__pyx_n_s_pool_guid, __pyx_k_pool_guid, sizeof(__pyx_k_pool_guid), 0, 0, 1, 1},
  {&__pyx_n_s_pools, __pyx_k_pools, sizeof(__pyx_k_pools), 0, 0, 1, 1},
  {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
  {&__pyx_n_s_prefix, __pyx_k_prefix, sizeof(__pyx_k_prefix), 0, 0, 1, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_primarycache, __pyx_k_primarycache, sizeof(__pyx_k_primarycache), 0, 0, 1, 1},
  {&__pyx_n_s_prop, __pyx_k_prop, sizeof(__pyx_k_prop), 0, 0, 1, 1},
  {&__pyx_n_s_properties, __pyx_k_properties, sizeof(__pyx_k_properties), 0, 0, 1, 1},
  {&__pyx_n_s_props, __pyx_k_props, sizeof(__pyx_k_props), 0, 0, 1, 1},
  {&__pyx_n_s_psize, __pyx_k_psize, sizeof(__pyx_k_psize), 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_quota, __pyx_k_quota, sizeof(__pyx_k_quota), 0, 0, 1, 1},
  {&__pyx_kp_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 0},
  {&__pyx_n_s_r_2, __pyx_k_r_2, sizeof(__pyx_k_r_2), 0, 0, 1, 1},
  {&__pyx_n_s_raidz, __pyx_k_raidz, sizeof(__pyx_k_raidz), 0, 0, 1, 1},
  {&__pyx_n_s_raidz1, __pyx_k_raidz1, sizeof(__pyx_k_raidz1), 0, 0, 1, 1},
  {&__pyx_n_s_raidz2, __pyx_k_raidz2, sizeof(__pyx_k_raidz2), 0, 0, 1, 1},
  {&__pyx_n_s_raidz3, __pyx_k_raidz3, sizeof(__pyx_k_raidz3), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_raw, __pyx_k_raw, sizeof(__pyx_k_raw), 0, 0, 1, 1},
  {&__pyx_n_s_rawvalue, __pyx_k_rawvalue, sizeof(__pyx_k_rawvalue), 0, 0, 1, 1},
  {&__pyx_n_s_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1},
  {&__pyx_n_s_read_errors, __pyx_k_read_errors, sizeof(__pyx_k_read_errors), 0, 0, 1, 1},
  {&__pyx_n_s_read_label, __pyx_k_read_label, sizeof(__pyx_k_read_label), 0, 0, 1, 1},
  {&__pyx_n_s_read_null, __pyx_k_read_null, sizeof(__pyx_k_read_null), 0, 0, 1, 1},
  {&__pyx_n_s_readonly, __pyx_k_readonly, sizeof(__pyx_k_readonly), 0, 0, 1, 1},
  {&__pyx_n_s_receive, __pyx_k_receive, sizeof(__pyx_k_receive), 0, 0, 1, 1},
  {&__pyx_n_s_received, __pyx_k_received, sizeof(__pyx_k_received), 0, 0, 1, 1},
  {&__pyx_n_s_recordsize, __pyx_k_recordsize, sizeof(__pyx_k_recordsize), 0, 0, 1, 1},
  {&__pyx_n_s_recursive, __pyx_k_recursive, sizeof(__pyx_k_recursive), 0, 0, 1, 1},
  {&__pyx_kp_s_recvd, __pyx_k_recvd, sizeof(__pyx_k_recvd), 0, 0, 1, 0},
  {&__pyx_n_s_redundant_metadata, __pyx_k_redundant_metadata, sizeof(__pyx_k_redundant_metadata), 0, 0, 1, 1},
  {&__pyx_n_s_refcompressratio, __pyx_k_refcompressratio, sizeof(__pyx_k_refcompressratio), 0, 0, 1, 1},
  {&__pyx_n_s_referenced, __pyx_k_referenced, sizeof(__pyx_k_referenced), 0, 0, 1, 1},
  {&__pyx_n_s_refquota, __pyx_k_refquota, sizeof(__pyx_k_refquota), 0, 0, 1, 1},
  {&__pyx_n_s_refreservation, __pyx_k_refreservation, sizeof(__pyx_k_refreservation), 0, 0, 1, 1},
  {&__pyx_n_s_refresh, __pyx_k_refresh, sizeof(__pyx_k_refresh), 0, 0, 1, 1},
  {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1},
  {&__pyx_n_s_reservation, __pyx_k_reservation, sizeof(__pyx_k_reservation), 0, 0, 1, 1},
  {&__pyx_n_s_rest, __pyx_k_rest, sizeof(__pyx_k_rest), 0, 0, 1, 1},
  {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {&__pyx_n_s_resumable, __pyx_k_resumable, sizeof(__pyx_k_resumable), 0, 0, 1, 1},
  {&__pyx_n_s_ret, __pyx_k_ret, sizeof(__pyx_k_ret), 0, 0, 1, 1},
  {&__pyx_kp_s_rewind_request, __pyx_k_rewind_request, sizeof(__pyx_k_rewind_request), 0, 0, 1, 0},
  {&__pyx_n_s_root, __pyx_k_root, sizeof(__pyx_k_root), 0, 0, 1, 1},
  {&__pyx_n_s_root_dataset, __pyx_k_root_dataset, sizeof(__pyx_k_root_dataset), 0, 0, 1, 1},
  {&__pyx_n_s_root_vdev, __pyx_k_root_vdev, sizeof(__pyx_k_root_vdev), 0, 0, 1, 1},
  {&__pyx_n_s_scan, __pyx_k_scan, sizeof(__pyx_k_scan), 0, 0, 1, 1},
  {&__pyx_n_s_scan_stats, __pyx_k_scan_stats, sizeof(__pyx_k_scan_stats), 0, 0, 1, 1},
  {&__pyx_n_s_scrub, __pyx_k_scrub, sizeof(__pyx_k_scrub), 0, 0, 1, 1},
  {&__pyx_n_s_search_paths, __pyx_k_search_paths, sizeof(__pyx_k_search_paths), 0, 0, 1, 1},
  {&__pyx_n_s_search_vdev, __pyx_k_search_vdev, sizeof(__pyx_k_search_vdev), 0, 0, 1, 1},
  {&__pyx_n_s_secondarycache, __pyx_k_secondarycache, sizeof(__pyx_k_secondarycache), 0, 0, 1, 1},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  {&__pyx_n_s_serialize_zfs_prop, __pyx_k_serialize_zfs_prop, sizeof(__pyx_k_serialize_zfs_prop), 0, 0, 1, 1},
  {&__pyx_n_s_serialize_zpool_prop, __pyx_k_serialize_zpool_prop, sizeof(__pyx_k_serialize_zpool_prop), 0, 0, 1, 1},
  {&__pyx_n_s_set, __pyx_k_set, sizeof(__pyx_k_set), 0, 0, 1, 1},
  {&__pyx_n_s_setuid, __pyx_k_setuid, sizeof(__pyx_k_setuid), 0, 0, 1, 1},
  {&__pyx_n_s_sharenfs, __pyx_k_sharenfs, sizeof(__pyx_k_sharenfs), 0, 0, 1, 1},
  {&__pyx_n_s_sharesmb, __pyx_k_sharesmb, sizeof(__pyx_k_sharesmb), 0, 0, 1, 1},
  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {&__pyx_n_s_snapdir, __pyx_k_snapdir, sizeof(__pyx_k_snapdir), 0, 0, 1, 1},
  {&__pyx_n_s_snapshot_count, __pyx_k_snapshot_count, sizeof(__pyx_k_snapshot_count), 0, 0, 1, 1},
  {&__pyx_n_s_snapshot_limit, __pyx_k_snapshot_limit, sizeof(__pyx_k_snapshot_limit), 0, 0, 1, 1},
  {&__pyx_n_s_snapshot_name, __pyx_k_snapshot_name, sizeof(__pyx_k_snapshot_name), 0, 0, 1, 1},
  {&__pyx_n_s_snapshots, __pyx_k_snapshots, sizeof(__pyx_k_snapshots), 0, 0, 1, 1},
  {&__pyx_n_s_snapshots_recursive, __pyx_k_snapshots_recursive, sizeof(__pyx_k_snapshots_recursive), 0, 0, 1, 1},
  {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1},
  {&__pyx_n_s_spare, __pyx_k_spare, sizeof(__pyx_k_spare), 0, 0, 1, 1},
  {&__pyx_n_s_spare_vdevs, __pyx_k_spare_vdevs, sizeof(__pyx_k_spare_vdevs), 0, 0, 1, 1},
  {&__pyx_n_s_spares, __pyx_k_spares, sizeof(__pyx_k_spares), 0, 0, 1, 1},
  {&__pyx_n_s_sparse_vol, __pyx_k_sparse_vol, sizeof(__pyx_k_sparse_vol), 0, 0, 1, 1},
  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {&__pyx_n_s_st, __pyx_k_st, sizeof(__pyx_k_st), 0, 0, 1, 1},
  {&__pyx_n_s_st_mode, __pyx_k_st_mode, sizeof(__pyx_k_st_mode), 0, 0, 1, 1},
  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
  {&__pyx_n_s_start_time, __pyx_k_start_time, sizeof(__pyx_k_start_time), 0, 0, 1, 1},
  {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1},
  {&__pyx_n_s_stat, __pyx_k_stat, sizeof(__pyx_k_stat), 0, 0, 1, 1},
  {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
  {&__pyx_n_s_stats, __pyx_k_stats, sizeof(__pyx_k_stats), 0, 0, 1, 1},
  {&__pyx_n_s_status, __pyx_k_status, sizeof(__pyx_k_status), 0, 0, 1, 1},
  {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
  {&__pyx_n_s_strerror, __pyx_k_strerror, sizeof(__pyx_k_strerror), 0, 0, 1, 1},
  {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
  {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  {&__pyx_n_s_sync, __pyx_k_sync, sizeof(__pyx_k_sync), 0, 0, 1, 1},
  {&__pyx_kp_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 0},
  {&__pyx_n_s_tag, __pyx_k_tag, sizeof(__pyx_k_tag), 0, 0, 1, 1},
  {&__pyx_n_s_target, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1},
  {&__pyx_n_s_temporary, __pyx_k_temporary, sizeof(__pyx_k_temporary), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_threading, __pyx_k_threading, sizeof(__pyx_k_threading), 0, 0, 1, 1},
  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {&__pyx_n_s_timestamp, __pyx_k_timestamp, sizeof(__pyx_k_timestamp), 0, 0, 1, 1},
  {&__pyx_n_s_to_native, __pyx_k_to_native, sizeof(__pyx_k_to_native), 0, 0, 1, 1},
  {&__pyx_n_s_to_property, __pyx_k_to_property, sizeof(__pyx_k_to_property), 0, 0, 1, 1},
  {&__pyx_n_s_token, __pyx_k_token, sizeof(__pyx_k_token), 0, 0, 1, 1},
  {&__pyx_n_s_toname, __pyx_k_toname, sizeof(__pyx_k_toname), 0, 0, 1, 1},
  {&__pyx_kp_s_toname_argument_is_required, __pyx_k_toname_argument_is_required, sizeof(__pyx_k_toname_argument_is_required), 0, 0, 1, 0},
  {&__pyx_n_s_topology, __pyx_k_topology, sizeof(__pyx_k_topology), 0, 0, 1, 1},
  {&__pyx_n_s_tosnap, __pyx_k_tosnap, sizeof(__pyx_k_tosnap), 0, 0, 1, 1},
  {&__pyx_n_s_tup, __pyx_k_tup, sizeof(__pyx_k_tup), 0, 0, 1, 1},
  {&__pyx_n_s_typ, __pyx_k_typ, sizeof(__pyx_k_typ), 0, 0, 1, 1},
  {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
  {&__pyx_n_s_typeid, __pyx_k_typeid, sizeof(__pyx_k_typeid), 0, 0, 1, 1},
  {&__pyx_kp_s_u, __pyx_k_u, sizeof(__pyx_k_u), 0, 0, 1, 0},
  {&__pyx_n_s_umount, __pyx_k_umount, sizeof(__pyx_k_umount), 0, 0, 1, 1},
  {&__pyx_n_s_umount_recursive, __pyx_k_umount_recursive, sizeof(__pyx_k_umount_recursive), 0, 0, 1, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_n_s_used, __pyx_k_used, sizeof(__pyx_k_used), 0, 0, 1, 1},
  {&__pyx_n_s_usedbychildren, __pyx_k_usedbychildren, sizeof(__pyx_k_usedbychildren), 0, 0, 1, 1},
  {&__pyx_n_s_usedbydataset, __pyx_k_usedbydataset, sizeof(__pyx_k_usedbydataset), 0, 0, 1, 1},
  {&__pyx_n_s_usedbyrefreservation, __pyx_k_usedbyrefreservation, sizeof(__pyx_k_usedbyrefreservation), 0, 0, 1, 1},
  {&__pyx_n_s_usedbysnapshots, __pyx_k_usedbysnapshots, sizeof(__pyx_k_usedbysnapshots), 0, 0, 1, 1},
  {&__pyx_kp_s_usr_nas_source_py_libzfs_conver, __pyx_k_usr_nas_source_py_libzfs_conver, sizeof(__pyx_k_usr_nas_source_py_libzfs_conver), 0, 0, 1, 0},
  {&__pyx_kp_s_usr_nas_source_py_libzfs_libzfs, __pyx_k_usr_nas_source_py_libzfs_libzfs, sizeof(__pyx_k_usr_nas_source_py_libzfs_libzfs), 0, 0, 1, 0},
  {&__pyx_n_s_utcfromtimestamp, __pyx_k_utcfromtimestamp, sizeof(__pyx_k_utcfromtimestamp), 0, 0, 1, 1},
  {&__pyx_n_s_utf8only, __pyx_k_utf8only, sizeof(__pyx_k_utf8only), 0, 0, 1, 1},
  {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
  {&__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_vdev, __pyx_k_vdev, sizeof(__pyx_k_vdev), 0, 0, 1, 1},
  {&__pyx_n_s_vdev_by_guid_locals_search_vdev, __pyx_k_vdev_by_guid_locals_search_vdev, sizeof(__pyx_k_vdev_by_guid_locals_search_vdev), 0, 0, 1, 1},
  {&__pyx_n_s_vdev_label_offset, __pyx_k_vdev_label_offset, sizeof(__pyx_k_vdev_label_offset), 0, 0, 1, 1},
  {&__pyx_n_s_vdev_stats, __pyx_k_vdev_stats, sizeof(__pyx_k_vdev_stats), 0, 0, 1, 1},
  {&__pyx_n_s_vdev_tree, __pyx_k_vdev_tree, sizeof(__pyx_k_vdev_tree), 0, 0, 1, 1},
  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
  {&__pyx_n_s_visible, __pyx_k_visible, sizeof(__pyx_k_visible), 0, 0, 1, 1},
  {&__pyx_n_s_volblocksize, __pyx_k_volblocksize, sizeof(__pyx_k_volblocksize), 0, 0, 1, 1},
  {&__pyx_n_s_volmode, __pyx_k_volmode, sizeof(__pyx_k_volmode), 0, 0, 1, 1},
  {&__pyx_n_s_volsize, __pyx_k_volsize, sizeof(__pyx_k_volsize), 0, 0, 1, 1},
  {&__pyx_n_s_vscan, __pyx_k_vscan, sizeof(__pyx_k_vscan), 0, 0, 1, 1},
  {&__pyx_n_s_worker, __pyx_k_worker, sizeof(__pyx_k_worker), 0, 0, 1, 1},
  {&__pyx_n_s_write_errors, __pyx_k_write_errors, sizeof(__pyx_k_write_errors), 0, 0, 1, 1},
  {&__pyx_n_s_write_history, __pyx_k_write_history, sizeof(__pyx_k_write_history), 0, 0, 1, 1},
  {&__pyx_n_s_write_history_locals_eval_arg, __pyx_k_write_history_locals_eval_arg, sizeof(__pyx_k_write_history_locals_eval_arg), 0, 0, 1, 1},
  {&__pyx_n_s_write_history_locals_eval_dict, __pyx_k_write_history_locals_eval_dict, sizeof(__pyx_k_write_history_locals_eval_dict), 0, 0, 1, 1},
  {&__pyx_n_s_write_history_locals_eval_list, __pyx_k_write_history_locals_eval_list, sizeof(__pyx_k_write_history_locals_eval_list), 0, 0, 1, 1},
  {&__pyx_n_s_write_history_locals_eval_str, __pyx_k_write_history_locals_eval_str, sizeof(__pyx_k_write_history_locals_eval_str), 0, 0, 1, 1},
  {&__pyx_n_s_write_history_locals_eval_tuple, __pyx_k_write_history_locals_eval_tuple, sizeof(__pyx_k_write_history_locals_eval_tuple), 0, 0, 1, 1},
  {&__pyx_n_s_write_history_locals_eval_zfsvde, __pyx_k_write_history_locals_eval_zfsvde, sizeof(__pyx_k_write_history_locals_eval_zfsvde), 0, 0, 1, 1},
  {&__pyx_n_s_written, __pyx_k_written, sizeof(__pyx_k_written), 0, 0, 1, 1},
  {&__pyx_n_s_xattr, __pyx_k_xattr, sizeof(__pyx_k_xattr), 0, 0, 1, 1},
  {&__pyx_n_s_yes, __pyx_k_yes, sizeof(__pyx_k_yes), 0, 0, 1, 1},
  {&__pyx_n_s_zfs, __pyx_k_zfs, sizeof(__pyx_k_zfs), 0, 0, 1, 1},
  {&__pyx_kp_s_zfs_clone, __pyx_k_zfs_clone, sizeof(__pyx_k_zfs_clone), 0, 0, 1, 0},
  {&__pyx_n_s_zfs_cmd, __pyx_k_zfs_cmd, sizeof(__pyx_k_zfs_cmd), 0, 0, 1, 1},
  {&__pyx_kp_s_zfs_destroy, __pyx_k_zfs_destroy, sizeof(__pyx_k_zfs_destroy), 0, 0, 1, 0},
  {&__pyx_kp_s_zfs_hold, __pyx_k_zfs_hold, sizeof(__pyx_k_zfs_hold), 0, 0, 1, 0},
  {&__pyx_kp_s_zfs_inherit, __pyx_k_zfs_inherit, sizeof(__pyx_k_zfs_inherit), 0, 0, 1, 0},
  {&__pyx_kp_s_zfs_mount, __pyx_k_zfs_mount, sizeof(__pyx_k_zfs_mount), 0, 0, 1, 0},
  {&__pyx_kp_s_zfs_promote, __pyx_k_zfs_promote, sizeof(__pyx_k_zfs_promote), 0, 0, 1, 0},
  {&__pyx_kp_s_zfs_release, __pyx_k_zfs_release, sizeof(__pyx_k_zfs_release), 0, 0, 1, 0},
  {&__pyx_kp_s_zfs_rename, __pyx_k_zfs_rename, sizeof(__pyx_k_zfs_rename), 0, 0, 1, 0},
  {&__pyx_kp_s_zfs_rollback, __pyx_k_zfs_rollback, sizeof(__pyx_k_zfs_rollback), 0, 0, 1, 0},
  {&__pyx_kp_s_zfs_set, __pyx_k_zfs_set, sizeof(__pyx_k_zfs_set), 0, 0, 1, 0},
  {&__pyx_kp_s_zfs_snapshot, __pyx_k_zfs_snapshot, sizeof(__pyx_k_zfs_snapshot), 0, 0, 1, 0},
  {&__pyx_kp_s_zfs_umount, __pyx_k_zfs_umount, sizeof(__pyx_k_zfs_umount), 0, 0, 1, 0},
  {&__pyx_kp_s_zpool_clear, __pyx_k_zpool_clear, sizeof(__pyx_k_zpool_clear), 0, 0, 1, 0},
  {&__pyx_kp_s_zpool_create, __pyx_k_zpool_create, sizeof(__pyx_k_zpool_create), 0, 0, 1, 0},
  {&__pyx_kp_s_zpool_export, __pyx_k_zpool_export, sizeof(__pyx_k_zpool_export), 0, 0, 1, 0},
  {&__pyx_kp_s_zpool_import, __pyx_k_zpool_import, sizeof(__pyx_k_zpool_import), 0, 0, 1, 0},
  {&__pyx_kp_s_zpool_scrub, __pyx_k_zpool_scrub, sizeof(__pyx_k_zpool_scrub), 0, 0, 1, 0},
  {&__pyx_kp_s_zpool_scrub_s, __pyx_k_zpool_scrub_s, sizeof(__pyx_k_zpool_scrub_s), 0, 0, 1, 0},
  {&__pyx_kp_s_zpool_set, __pyx_k_zpool_set, sizeof(__pyx_k_zpool_set), 0, 0, 1, 0},
  {&__pyx_kp_s_zpool_upgrade, __pyx_k_zpool_upgrade, sizeof(__pyx_k_zpool_upgrade), 0, 0, 1, 0},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 29, __pyx_L1_error)
  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(1, 310, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 67, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(2, 274, __pyx_L1_error)
  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 181, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(1, 312, __pyx_L1_error)
  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(1, 1506, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(1, 1704, __pyx_L1_error)
  __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(1, 1879, __pyx_L1_error)
  __pyx_builtin_OSError = __Pyx_GetBuiltinName(__pyx_n_s_OSError); if (!__pyx_builtin_OSError) __PYX_ERR(1, 2452, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "converter.pxi":32
 *     def __init__(self, typ, **kwargs):
 *         self.typ = typ
 *         self.readonly = kwargs.pop('readonly', False)             # <<<<<<<<<<<<<<
 *         self.nullable = kwargs.pop('nullable', False)
 *         self.null = kwargs.pop('null', '-')
 */
  __pyx_tuple_ = PyTuple_Pack(2, __pyx_n_s_readonly, Py_False); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "converter.pxi":33
 *         self.typ = typ
 *         self.readonly = kwargs.pop('readonly', False)
 *         self.nullable = kwargs.pop('nullable', False)             # <<<<<<<<<<<<<<
 *         self.null = kwargs.pop('null', '-')
 *         self.read_null = kwargs.pop('read_null', self.null)
 */
  __pyx_tuple__2 = PyTuple_Pack(2, __pyx_n_s_nullable, Py_False); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "converter.pxi":34
 *         self.readonly = kwargs.pop('readonly', False)
 *         self.nullable = kwargs.pop('nullable', False)
 *         self.null = kwargs.pop('null', '-')             # <<<<<<<<<<<<<<
 *         self.read_null = kwargs.pop('read_null', self.null)
 *         self.no = kwargs.pop('no', 'off')
 */
  __pyx_tuple__4 = PyTuple_Pack(2, __pyx_n_s_null, __pyx_kp_s__3); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "converter.pxi":36
 *         self.null = kwargs.pop('null', '-')
 *         self.read_null = kwargs.pop('read_null', self.null)
 *         self.no = kwargs.pop('no', 'off')             # <<<<<<<<<<<<<<
 *         self.yes = kwargs.pop('yes', 'on')
 * 
 */
  __pyx_tuple__5 = PyTuple_Pack(2, __pyx_n_s_no, __pyx_n_s_off); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "converter.pxi":37
 *         self.read_null = kwargs.pop('read_null', self.null)
 *         self.no = kwargs.pop('no', 'off')
 *         self.yes = kwargs.pop('yes', 'on')             # <<<<<<<<<<<<<<
 * 
 *     def to_native(self, value):
 */
  __pyx_tuple__6 = PyTuple_Pack(2, __pyx_n_s_yes, __pyx_n_s_on); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "converter.pxi":69
 *     def to_property(self, value):
 *         if self.readonly:
 *             raise ValueError('Property is read-only')             # <<<<<<<<<<<<<<
 * 
 *         if value is None:
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_Property_is_read_only); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "converter.pxi":73
 *         if value is None:
 *             if not self.nullable:
 *                 raise ValueError('Property is not nullable')             # <<<<<<<<<<<<<<
 * 
 *             return self.null
 */
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_Property_is_not_nullable); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "libzfs.pyx":278
 *     def __init__(self, raw):
 *         timestamp, cmd, typ, rest = raw.split(maxsplit=3)
 *         paths = rest.split('->', maxsplit=2)             # <<<<<<<<<<<<<<
 *         self.raw = raw
 *         self.timestamp = datetime.utcfromtimestamp(float(timestamp))
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s__9); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(1, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "libzfs.pyx":444
 * 
 *         if name:
 *             encoded = name.encode('utf-8')             # <<<<<<<<<<<<<<
 *             c_name = encoded
 *             iargs.poolname = c_name
 */
  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "libzfs.pyx":688
 *         history_message = ""
 * 
 *         def eval_arg(argument):             # <<<<<<<<<<<<<<
 *             if isinstance(argument, str):
 *                 return eval_str(argument)
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_n_s_argument); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(1, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);
  __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_libzfs, __pyx_n_s_eval_arg, 688, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(1, 688, __pyx_L1_error)

  /* "libzfs.pyx":700
 *                 return eval_zfsvdev(argument)
 * 
 *         def eval_str(argument):             # <<<<<<<<<<<<<<
 *             return " " + argument
 * 
 */
  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_n_s_argument); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);
  __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_libzfs, __pyx_n_s_eval_str, 700, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(1, 700, __pyx_L1_error)

  /* "libzfs.pyx":703
 *             return " " + argument
 * 
 *         def eval_dict(argument):             # <<<<<<<<<<<<<<
 *             out = ""
 *             for tup in arg.items():
 */
  __pyx_tuple__19 = PyTuple_Pack(3, __pyx_n_s_argument, __pyx_n_s_out, __pyx_n_s_tup); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);
  __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_libzfs, __pyx_n_s_eval_dict, 703, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(1, 703, __pyx_L1_error)

  /* "libzfs.pyx":709
 *             return out
 * 
 *         def eval_tuple(argument):             # <<<<<<<<<<<<<<
 *             if len(argument) == 2:
 *                 if isinstance(argument[1], str):
 */
  __pyx_tuple__21 = PyTuple_Pack(3, __pyx_n_s_argument, __pyx_n_s_out, __pyx_n_s_i); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(1, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);
  __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_libzfs, __pyx_n_s_eval_tuple, 709, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(1, 709, __pyx_L1_error)

  /* "libzfs.pyx":719
 *             return out
 * 
 *         def eval_list(argument):             # <<<<<<<<<<<<<<
 *             out = ""
 *             for i in argument:
 */
  __pyx_tuple__23 = PyTuple_Pack(3, __pyx_n_s_argument, __pyx_n_s_out, __pyx_n_s_i); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(1, 719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);
  __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_libzfs, __pyx_n_s_eval_list, 719, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(1, 719, __pyx_L1_error)

  /* "libzfs.pyx":725
 *             return out
 * 
 *         def eval_zfsvdev(argument):             # <<<<<<<<<<<<<<
 *             disks = argument.disks
 *             if len(disks):
 */
  __pyx_tuple__25 = PyTuple_Pack(4, __pyx_n_s_argument, __pyx_n_s_disks, __pyx_n_s_out, __pyx_n_s_disk); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(1, 725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);
  __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_libzfs, __pyx_n_s_eval_zfsvdev, 725, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(1, 725, __pyx_L1_error)

  /* "libzfs.pyx":760
 *         out = []
 *         if self.history:
 *             data_vdevs = topology.get('data', None)             # <<<<<<<<<<<<<<
 *             if data_vdevs:
 *                 if data_vdevs[0].type == 'disk':
 */
  __pyx_tuple__27 = PyTuple_Pack(2, __pyx_n_s_data, Py_None); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(1, 760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "libzfs.pyx":767
 *                 out.append(data_vdevs)
 * 
 *             if topology.get('cache', False):             # <<<<<<<<<<<<<<
 *                 out.append('cache')
 *                 out.append(topology.get('cache'))
 */
  __pyx_tuple__28 = PyTuple_Pack(2, __pyx_n_s_cache, Py_False); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "libzfs.pyx":769
 *             if topology.get('cache', False):
 *                 out.append('cache')
 *                 out.append(topology.get('cache'))             # <<<<<<<<<<<<<<
 * 
 *             if topology.get('log', False):
 */
  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_n_s_cache); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "libzfs.pyx":771
 *                 out.append(topology.get('cache'))
 * 
 *             if topology.get('log', False):             # <<<<<<<<<<<<<<
 *                 out.append('log')
 *                 out.append(topology.get('log'))
 */
  __pyx_tuple__30 = PyTuple_Pack(2, __pyx_n_s_log, Py_False); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(1, 771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);

  /* "libzfs.pyx":773
 *             if topology.get('log', False):
 *                 out.append('log')
 *                 out.append(topology.get('log'))             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_n_s_log); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(1, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "libzfs.pyx":804
 * 
 *     def __init__(self):
 *         raise RuntimeError('ZPoolProperty cannot be instantiated by the user')             # <<<<<<<<<<<<<<
 * 
 *     def __getstate__(self):
 */
  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_ZPoolProperty_cannot_be_instanti); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(1, 804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "libzfs.pyx":952
 * 
 *     def __init__(self):
 *         raise RuntimeError('ZFSProperty cannot be instantiated by the user')             # <<<<<<<<<<<<<<
 * 
 *     def __getstate__(self):
 */
  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_ZFSProperty_cannot_be_instantiat); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(1, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);

  /* "libzfs.pyx":1142
 *     property ops:
 *         def __get__(self):
 *             return self.nvlist['vdev_stats'][8:13]             # <<<<<<<<<<<<<<
 * 
 *     property bytes:
 */
  __pyx_slice__34 = PySlice_New(__pyx_int_8, __pyx_int_13, Py_None); if (unlikely(!__pyx_slice__34)) __PYX_ERR(1, 1142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__34);
  __Pyx_GIVEREF(__pyx_slice__34);

  /* "libzfs.pyx":1146
 *     property bytes:
 *         def __get__(self):
 *             return self.nvlist['vdev_stats'][14:19]             # <<<<<<<<<<<<<<
 * 
 *     property configured_ashift:
 */
  __pyx_slice__35 = PySlice_New(__pyx_int_14, __pyx_int_19, Py_None); if (unlikely(!__pyx_slice__35)) __PYX_ERR(1, 1146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__35);
  __Pyx_GIVEREF(__pyx_slice__35);

  /* "libzfs.pyx":1317
 *     property type:
 *         def __get__(self):
 *             value = self.nvlist.get('type')             # <<<<<<<<<<<<<<
 *             if value == 'raidz':
 *                 return value + str(self.nvlist.get('nparity'))
 */
  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_n_s_type); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(1, 1317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "libzfs.pyx":1319
 *             value = self.nvlist.get('type')
 *             if value == 'raidz':
 *                 return value + str(self.nvlist.get('nparity'))             # <<<<<<<<<<<<<<
 * 
 *             return value
 */
  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_n_s_nparity); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(1, 1319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "libzfs.pyx":1325
 *         def __set__(self, value):
 *             if value not in ('root', 'disk', 'file', 'raidz1', 'raidz2', 'raidz3', 'mirror'):
 *                 raise ValueError('Invalid vdev type')             # <<<<<<<<<<<<<<
 * 
 *             self.nvlist['type'] = value
 */
  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_Invalid_vdev_type); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(1, 1325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);

  /* "libzfs.pyx":1329
 *             self.nvlist['type'] = value
 * 
 *             if value.startswith('raidz'):             # <<<<<<<<<<<<<<
 *                 self.nvlist['type'] = 'raidz'
 *                 self.nvlist['nparity'] = long(value[-1])
 */
  __pyx_tuple__39 = PyTuple_Pack(1, __pyx_n_s_raidz); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(1, 1329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);

  /* "libzfs.pyx":1335
 *     property guid:
 *         def __get__(self):
 *             return self.nvlist.get('guid')             # <<<<<<<<<<<<<<
 * 
 *     property path:
 */
  __pyx_tuple__40 = PyTuple_Pack(1, __pyx_n_s_guid); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(1, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);

  /* "libzfs.pyx":1339
 *     property path:
 *         def __get__(self):
 *             return self.nvlist.get('path')             # <<<<<<<<<<<<<<
 * 
 *         def __set__(self, value):
 */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_n_s_path); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(1, 1339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "libzfs.pyx":1488
 * 
 *     def __init__(self):
 *         raise RuntimeError('ZFSPool cannot be instantiated by the user')             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_ZFSPool_cannot_be_instantiated_b); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(1, 1488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);

  /* "libzfs.pyx":1520
 *             'features': [i.__getstate__() for i in self.features] if self.features else None,
 *             'scan': self.scrub.__getstate__(),
 *             'root_vdev': self.root_vdev.__getstate__(False),             # <<<<<<<<<<<<<<
 *             'groups': {
 *                 'data': [i.__getstate__() for i in self.data_vdevs],
 */
  __pyx_tuple__43 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(1, 1520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "libzfs.pyx":1653
 *     property hostname:
 *         def __get__(self):
 *             return self.config.get('hostname')             # <<<<<<<<<<<<<<
 * 
 *     property state:
 */
  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_n_s_hostname); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(1, 1653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "libzfs.pyx":1666
 *     property error_count:
 *         def __get__(self):
 *             return self.config.get('error_count')             # <<<<<<<<<<<<<<
 * 
 *     property config:
 */
  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_n_s_error_count); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(1, 1666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "libzfs.pyx":1767
 * 
 *     def vdev_by_guid(self, guid):
 *         def search_vdev(vdev, g):             # <<<<<<<<<<<<<<
 *             if vdev.guid == g:
 *                 return vdev
 */
  __pyx_tuple__47 = PyTuple_Pack(4, __pyx_n_s_vdev, __pyx_n_s_g, __pyx_n_s_i, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(1, 1767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);
  __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_libzfs, __pyx_n_s_search_vdev, 1767, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(1, 1767, __pyx_L1_error)

  /* "libzfs.pyx":1949
 * 
 *         if key in self.props:
 *             raise KeyError('Cannot overwrite existing property')             # <<<<<<<<<<<<<<
 * 
 *         if type(value) is not ZFSUserProperty:
 */
  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_s_Cannot_overwrite_existing_proper); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(1, 1949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);

  /* "libzfs.pyx":1952
 * 
 *         if type(value) is not ZFSUserProperty:
 *             raise ValueError('Value should be of type ZFSUserProperty')             # <<<<<<<<<<<<<<
 * 
 *         userprop = <ZFSUserProperty>value
 */
  __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_s_Value_should_be_of_type_ZFSUserP); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(1, 1952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);

  /* "libzfs.pyx":2012
 * 
 *     def __init__(self):
 *         raise RuntimeError('ZFSObject cannot be instantiated by the user')             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_s_ZFSObject_cannot_be_instantiated); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(1, 2012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "libzfs.pyx":2308
 * 
 *         if not toname:
 *             raise ValueError('toname argument is required')             # <<<<<<<<<<<<<<
 * 
 *         ctoname = toname
 */
  __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_s_toname_argument_is_required); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(1, 2308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);

  /* "libzfs.pyx":2390
 *         ret = None
 * 
 *         def worker(fd):             # <<<<<<<<<<<<<<
 *             cdef int c_fd = fd
 *             cdef int c_ret
 */
  __pyx_tuple__56 = PyTuple_Pack(3, __pyx_n_s_fd, __pyx_n_s_c_fd, __pyx_n_s_c_ret); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(1, 2390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);
  __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_libzfs, __pyx_n_s_worker, 2390, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(1, 2390, __pyx_L1_error)

  /* "libzfs.pyx":2404
 *         thr.start()
 * 
 *         with os.fdopen(rfd, 'r') as f:             # <<<<<<<<<<<<<<
 *             for line in f:
 *                 yield DiffRecord(raw=line)
 */
  __pyx_tuple__58 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(1, 2404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);

  /* "libzfs.pyx":2531
 *     property snapshot_name:
 *         def __get__(self):
 *             return self.name.partition('@')[-1]             # <<<<<<<<<<<<<<
 * 
 *     property parent:
 */
  __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_s__59); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(1, 2531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);

  /* "libzfs.pyx":2535
 *     property parent:
 *         def __get__(self):
 *             return self.root.get_dataset(self.name.partition('@')[0])             # <<<<<<<<<<<<<<
 * 
 *     property holds:
 */
  __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_s__59); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(1, 2535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);

  /* "libzfs.pyx":2560
 *     property parent:
 *         def __get__(self):
 *             return self.root.get_dataset(self.name.partition('#')[0])             # <<<<<<<<<<<<<<
 * 
 *     property bookmark_name:
 */
  __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s__62); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(1, 2560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);

  /* "libzfs.pyx":2564
 *     property bookmark_name:
 *         def __get__(self):
 *             return self.name.partition('#')[-1]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_s__62); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(1, 2564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);

  /* "libzfs.pyx":2569
 * cdef convert_sendflags(flags, libzfs.sendflags_t *cflags):
 *     if not isinstance(flags, set):
 *         raise ValueError('flags must be passed as a set')             # <<<<<<<<<<<<<<
 * 
 *     if SendFlag.VERBOSE in flags:
 */
  __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_s_flags_must_be_passed_as_a_set); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(1, 2569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);

  /* "converter.pxi":30
 * 
 * class ZfsConverter(object):
 *     def __init__(self, typ, **kwargs):             # <<<<<<<<<<<<<<
 *         self.typ = typ
 *         self.readonly = kwargs.pop('readonly', False)
 */
  __pyx_tuple__66 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_typ, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);
  __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_conver, __pyx_n_s_init, 30, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 30, __pyx_L1_error)

  /* "converter.pxi":39
 *         self.yes = kwargs.pop('yes', 'on')
 * 
 *     def to_native(self, value):             # <<<<<<<<<<<<<<
 *         if value is None:
 *             return None
 */
  __pyx_tuple__68 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);
  __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_conver, __pyx_n_s_to_native, 39, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 39, __pyx_L1_error)

  /* "converter.pxi":67
 *             return datetime.fromtimestamp(int(value))
 * 
 *     def to_property(self, value):             # <<<<<<<<<<<<<<
 *         if self.readonly:
 *             raise ValueError('Property is read-only')
 */
  __pyx_tuple__70 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);
  __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_conver, __pyx_n_s_to_property, 67, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 67, __pyx_L1_error)

  /* "converter.pxi":178
 * 
 * 
 * def parse_zfs_prop(prop, value):             # <<<<<<<<<<<<<<
 *     try:
 *         return ZFS_PROPERTY_CONVERTERS[prop].to_native(value)
 */
  __pyx_tuple__72 = PyTuple_Pack(2, __pyx_n_s_prop, __pyx_n_s_value); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);
  __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_conver, __pyx_n_s_parse_zfs_prop, 178, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 178, __pyx_L1_error)

  /* "converter.pxi":185
 * 
 * 
 * def serialize_zfs_prop(prop, value):             # <<<<<<<<<<<<<<
 *     try:
 *         return ZFS_PROPERTY_CONVERTERS[prop].to_property(value)
 */
  __pyx_tuple__74 = PyTuple_Pack(2, __pyx_n_s_prop, __pyx_n_s_value); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);
  __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_conver, __pyx_n_s_serialize_zfs_prop, 185, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 185, __pyx_L1_error)

  /* "converter.pxi":192
 * 
 * 
 * def parse_zpool_prop(prop, value):             # <<<<<<<<<<<<<<
 *     try:
 *         return ZPOOL_PROPERTY_CONVERTERS[prop].to_native(value)
 */
  __pyx_tuple__76 = PyTuple_Pack(2, __pyx_n_s_prop, __pyx_n_s_value); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);
  __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_conver, __pyx_n_s_parse_zpool_prop, 192, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 192, __pyx_L1_error)

  /* "converter.pxi":199
 * 
 * 
 * def serialize_zpool_prop(prop, value):             # <<<<<<<<<<<<<<
 *     try:
 *         return ZPOOL_PROPERTY_CONVERTERS[prop].to_property(value)
 */
  __pyx_tuple__78 = PyTuple_Pack(2, __pyx_n_s_prop, __pyx_n_s_value); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);
  __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_conver, __pyx_n_s_serialize_zpool_prop, 199, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(0, 199, __pyx_L1_error)

  /* "libzfs.pyx":276
 * 
 * class DiffRecord(object):
 *     def __init__(self, raw):             # <<<<<<<<<<<<<<
 *         timestamp, cmd, typ, rest = raw.split(maxsplit=3)
 *         paths = rest.split('->', maxsplit=2)
 */
  __pyx_tuple__82 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_raw, __pyx_n_s_timestamp, __pyx_n_s_cmd, __pyx_n_s_typ, __pyx_n_s_rest, __pyx_n_s_paths); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(1, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);
  __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_libzfs, __pyx_n_s_init, 276, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(1, 276, __pyx_L1_error)

  /* "libzfs.pyx":288
 *             self.oldpath = paths[1].strip()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.raw
 * 
 */
  __pyx_tuple__84 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(1, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);
  __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_libzfs, __pyx_n_s_str, 288, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(1, 288, __pyx_L1_error)

  /* "libzfs.pyx":291
 *         return self.raw
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */
  __pyx_tuple__86 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(1, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);
  __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_libzfs, __pyx_n_s_repr, 291, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(1, 291, __pyx_L1_error)

  /* "libzfs.pyx":294
 *         return str(self)
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return {
 *             'timestamp': self.timestamp,
 */
  __pyx_tuple__88 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(1, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);
  __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_libzfs, __pyx_n_s_getstate, 294, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(1, 294, __pyx_L1_error)

  /* "libzfs.pyx":311
 * 
 * class ZFSException(RuntimeError):
 *     def __init__(self, code, message):             # <<<<<<<<<<<<<<
 *         super(ZFSException, self).__init__(message)
 *         self.code = code
 */
  __pyx_tuple__90 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_code, __pyx_n_s_message); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(1, 311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);
  __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_libzfs, __pyx_n_s_init, 311, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(1, 311, __pyx_L1_error)

  /* "libzfs.pyx":2605
 * 
 * 
 * def nicestrtonum(ZFS zfs, value):             # <<<<<<<<<<<<<<
 *     cdef uint64_t result
 * 
 */
  __pyx_tuple__92 = PyTuple_Pack(3, __pyx_n_s_zfs, __pyx_n_s_value, __pyx_n_s_result); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(1, 2605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);
  __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_libzfs, __pyx_n_s_nicestrtonum, 2605, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(1, 2605, __pyx_L1_error)

  /* "libzfs.pyx":2614
 * 
 * 
 * def vdev_label_offset(psize, l, offset):             # <<<<<<<<<<<<<<
 *     return offset + l * sizeof(zfs.vdev_label_t) + 0 \
 *         if l < zfs.VDEV_LABELS / 2 \
 */
  __pyx_tuple__94 = PyTuple_Pack(3, __pyx_n_s_psize, __pyx_n_s_l, __pyx_n_s_offset); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(1, 2614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);
  __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_libzfs, __pyx_n_s_vdev_label_offset, 2614, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(1, 2614, __pyx_L1_error)

  /* "libzfs.pyx":2620
 * 
 * 
 * def read_label(device):             # <<<<<<<<<<<<<<
 *     cdef nvpair.nvlist_t *handle
 *     cdef NVList nvlist
 */
  __pyx_tuple__96 = PyTuple_Pack(8, __pyx_n_s_device, __pyx_n_s_handle, __pyx_n_s_nvlist, __pyx_n_s_buf, __pyx_n_s_read, __pyx_n_s_ret, __pyx_n_s_fd, __pyx_n_s_st); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(1, 2620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);
  __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_libzfs, __pyx_n_s_read_label, 2620, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(1, 2620, __pyx_L1_error)

  /* "libzfs.pyx":2646
 * 
 * 
 * def clear_label(device):             # <<<<<<<<<<<<<<
 *     cdef int fd
 *     cdef int err
 */
  __pyx_tuple__98 = PyTuple_Pack(3, __pyx_n_s_device, __pyx_n_s_fd, __pyx_n_s_err); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(1, 2646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);
  __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__98, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_libzfs_libzfs, __pyx_n_s_clear_label, 2646, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(1, 2646, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_int_13 = PyInt_FromLong(13); if (unlikely(!__pyx_int_13)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_int_14 = PyInt_FromLong(14); if (unlikely(!__pyx_int_14)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_int_19 = PyInt_FromLong(19); if (unlikely(!__pyx_int_19)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_int_1L = PyLong_FromString((char *)"1", 0, 0); if (unlikely(!__pyx_int_1L)) __PYX_ERR(1, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initlibzfs(void); /*proto*/
PyMODINIT_FUNC initlibzfs(void)
#else
PyMODINIT_FUNC PyInit_libzfs(void); /*proto*/
PyMODINIT_FUNC PyInit_libzfs(void)
#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;
  __Pyx_RefNannyDeclarations
  #if CYTHON_REFNANNY
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
      PyErr_Clear();
      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
      if (!__Pyx_RefNanny)
          Py_FatalError("failed to import 'refnanny' module");
  }
  #endif
  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_libzfs(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(1, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(1, 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 PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("libzfs", __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(1, 1, __pyx_L1_error)
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(1, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(1, 1, __pyx_L1_error)
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(1, 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(1, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_libzfs) {
    if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(1, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "libzfs")) {
      if (unlikely(PyDict_SetItemString(modules, "libzfs", __pyx_m) < 0)) __PYX_ERR(1, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  /*--- Global init code ---*/
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  __pyx_vtabptr_6libzfs_NVList = &__pyx_vtable_6libzfs_NVList;
  __pyx_vtable_6libzfs_NVList.get_raw = (PyObject *(*)(struct __pyx_obj_6libzfs_NVList *, PyObject *))__pyx_f_6libzfs_6NVList_get_raw;
  __pyx_vtable_6libzfs_NVList.__pyx___get_pair = (nvpair_t *(*)(struct __pyx_obj_6libzfs_NVList *, PyObject *))__pyx_f_6libzfs_6NVList___get_pair;
  __pyx_vtable_6libzfs_NVList.__pyx___get_value = (PyObject *(*)(struct __pyx_obj_6libzfs_NVList *, nvpair_t *, struct __pyx_opt_args_6libzfs_6NVList___get_value *__pyx_optional_args))__pyx_f_6libzfs_6NVList___get_value;
  if (PyType_Ready(&__pyx_type_6libzfs_NVList) < 0) __PYX_ERR(2, 38, __pyx_L1_error)
  __pyx_type_6libzfs_NVList.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_6libzfs_NVList.tp_dict, __pyx_vtabptr_6libzfs_NVList) < 0) __PYX_ERR(2, 38, __pyx_L1_error)
  __pyx_ptype_6libzfs_NVList = &__pyx_type_6libzfs_NVList;
  __pyx_vtabptr_6libzfs_ZFS = &__pyx_vtable_6libzfs_ZFS;
  __pyx_vtable_6libzfs_ZFS.__pyx___iterate_pools = (int (*)(zpool_handle_t *, void *))__pyx_f_6libzfs_3ZFS___iterate_pools;
  __pyx_vtable_6libzfs_ZFS.get_error = (PyObject *(*)(struct __pyx_obj_6libzfs_ZFS *))__pyx_f_6libzfs_3ZFS_get_error;
  __pyx_vtable_6libzfs_ZFS.make_vdev_tree = (struct __pyx_obj_6libzfs_ZFSVdev *(*)(struct __pyx_obj_6libzfs_ZFS *, PyObject *))__pyx_f_6libzfs_3ZFS_make_vdev_tree;
  if (PyType_Ready(&__pyx_type_6libzfs_ZFS) < 0) __PYX_ERR(1, 316, __pyx_L1_error)
  __pyx_type_6libzfs_ZFS.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_6libzfs_ZFS.tp_dict, __pyx_vtabptr_6libzfs_ZFS) < 0) __PYX_ERR(1, 316, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "ZFS", (PyObject *)&__pyx_type_6libzfs_ZFS) < 0) __PYX_ERR(1, 316, __pyx_L1_error)
  __pyx_ptype_6libzfs_ZFS = &__pyx_type_6libzfs_ZFS;
  if (PyType_Ready(&__pyx_type_6libzfs_ZPoolProperty) < 0) __PYX_ERR(1, 799, __pyx_L1_error)
  __pyx_type_6libzfs_ZPoolProperty.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "ZPoolProperty", (PyObject *)&__pyx_type_6libzfs_ZPoolProperty) < 0) __PYX_ERR(1, 799, __pyx_L1_error)
  __pyx_ptype_6libzfs_ZPoolProperty = &__pyx_type_6libzfs_ZPoolProperty;
  if (PyType_Ready(&__pyx_type_6libzfs_ZPoolFeature) < 0) __PYX_ERR(1, 890, __pyx_L1_error)
  __pyx_type_6libzfs_ZPoolFeature.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "ZPoolFeature", (PyObject *)&__pyx_type_6libzfs_ZPoolFeature) < 0) __PYX_ERR(1, 890, __pyx_L1_error)
  __pyx_ptype_6libzfs_ZPoolFeature = &__pyx_type_6libzfs_ZPoolFeature;
  if (PyType_Ready(&__pyx_type_6libzfs_ZFSProperty) < 0) __PYX_ERR(1, 942, __pyx_L1_error)
  __pyx_type_6libzfs_ZFSProperty.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "ZFSProperty", (PyObject *)&__pyx_type_6libzfs_ZFSProperty) < 0) __PYX_ERR(1, 942, __pyx_L1_error)
  __pyx_ptype_6libzfs_ZFSProperty = &__pyx_type_6libzfs_ZFSProperty;
  __pyx_type_6libzfs_ZFSUserProperty.tp_base = __pyx_ptype_6libzfs_ZFSProperty;
  if (PyType_Ready(&__pyx_type_6libzfs_ZFSUserProperty) < 0) __PYX_ERR(1, 1044, __pyx_L1_error)
  __pyx_type_6libzfs_ZFSUserProperty.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "ZFSUserProperty", (PyObject *)&__pyx_type_6libzfs_ZFSUserProperty) < 0) __PYX_ERR(1, 1044, __pyx_L1_error)
  __pyx_ptype_6libzfs_ZFSUserProperty = &__pyx_type_6libzfs_ZFSUserProperty;
  if (PyType_Ready(&__pyx_type_6libzfs_ZFSVdevStats) < 0) __PYX_ERR(1, 1096, __pyx_L1_error)
  __pyx_type_6libzfs_ZFSVdevStats.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "ZFSVdevStats", (PyObject *)&__pyx_type_6libzfs_ZFSVdevStats) < 0) __PYX_ERR(1, 1096, __pyx_L1_error)
  __pyx_ptype_6libzfs_ZFSVdevStats = &__pyx_type_6libzfs_ZFSVdevStats;
  if (PyType_Ready(&__pyx_type_6libzfs_ZFSVdev) < 0) __PYX_ERR(1, 1165, __pyx_L1_error)
  __pyx_type_6libzfs_ZFSVdev.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "ZFSVdev", (PyObject *)&__pyx_type_6libzfs_ZFSVdev) < 0) __PYX_ERR(1, 1165, __pyx_L1_error)
  __pyx_ptype_6libzfs_ZFSVdev = &__pyx_type_6libzfs_ZFSVdev;
  if (PyType_Ready(&__pyx_type_6libzfs_ZPoolScrub) < 0) __PYX_ERR(1, 1395, __pyx_L1_error)
  __pyx_type_6libzfs_ZPoolScrub.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "ZPoolScrub", (PyObject *)&__pyx_type_6libzfs_ZPoolScrub) < 0) __PYX_ERR(1, 1395, __pyx_L1_error)
  __pyx_ptype_6libzfs_ZPoolScrub = &__pyx_type_6libzfs_ZPoolScrub;
  __pyx_vtabptr_6libzfs_ZFSPool = &__pyx_vtable_6libzfs_ZFSPool;
  __pyx_vtable_6libzfs_ZFSPool.__pyx___iterate_props = (int (*)(int, void *))__pyx_f_6libzfs_7ZFSPool___iterate_props;
  __pyx_vtable_6libzfs_ZFSPool.get_raw_config = (struct __pyx_obj_6libzfs_NVList *(*)(struct __pyx_obj_6libzfs_ZFSPool *))__pyx_f_6libzfs_7ZFSPool_get_raw_config;
  if (PyType_Ready(&__pyx_type_6libzfs_ZFSPool) < 0) __PYX_ERR(1, 1479, __pyx_L1_error)
  __pyx_type_6libzfs_ZFSPool.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_6libzfs_ZFSPool.tp_dict, __pyx_vtabptr_6libzfs_ZFSPool) < 0) __PYX_ERR(1, 1479, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "ZFSPool", (PyObject *)&__pyx_type_6libzfs_ZFSPool) < 0) __PYX_ERR(1, 1479, __pyx_L1_error)
  __pyx_ptype_6libzfs_ZFSPool = &__pyx_type_6libzfs_ZFSPool;
  __pyx_vtabptr_6libzfs_ZFSImportablePool = &__pyx_vtable_6libzfs_ZFSImportablePool;
  __pyx_vtable_6libzfs_ZFSImportablePool.__pyx_base = *__pyx_vtabptr_6libzfs_ZFSPool;
  __pyx_vtable_6libzfs_ZFSImportablePool.__pyx_base.get_raw_config = (struct __pyx_obj_6libzfs_NVList *(*)(struct __pyx_obj_6libzfs_ZFSPool *))__pyx_f_6libzfs_17ZFSImportablePool_get_raw_config;
  __pyx_type_6libzfs_ZFSImportablePool.tp_base = __pyx_ptype_6libzfs_ZFSPool;
  if (PyType_Ready(&__pyx_type_6libzfs_ZFSImportablePool) < 0) __PYX_ERR(1, 1845, __pyx_L1_error)
  __pyx_type_6libzfs_ZFSImportablePool.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_6libzfs_ZFSImportablePool.tp_dict, __pyx_vtabptr_6libzfs_ZFSImportablePool) < 0) __PYX_ERR(1, 1845, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "ZFSImportablePool", (PyObject *)&__pyx_type_6libzfs_ZFSImportablePool) < 0) __PYX_ERR(1, 1845, __pyx_L1_error)
  __pyx_ptype_6libzfs_ZFSImportablePool = &__pyx_type_6libzfs_ZFSImportablePool;
  __pyx_vtabptr_6libzfs_ZFSPropertyDict = &__pyx_vtable_6libzfs_ZFSPropertyDict;
  __pyx_vtable_6libzfs_ZFSPropertyDict.__pyx___iterate_props = (int (*)(int, void *))__pyx_f_6libzfs_15ZFSPropertyDict___iterate_props;
  __pyx_type_6libzfs_ZFSPropertyDict.tp_base = (&PyDict_Type);
  if (PyType_Ready(&__pyx_type_6libzfs_ZFSPropertyDict) < 0) __PYX_ERR(1, 1888, __pyx_L1_error)
  __pyx_type_6libzfs_ZFSPropertyDict.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_6libzfs_ZFSPropertyDict.tp_dict, __pyx_vtabptr_6libzfs_ZFSPropertyDict) < 0) __PYX_ERR(1, 1888, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "ZFSPropertyDict", (PyObject *)&__pyx_type_6libzfs_ZFSPropertyDict) < 0) __PYX_ERR(1, 1888, __pyx_L1_error)
  __pyx_ptype_6libzfs_ZFSPropertyDict = &__pyx_type_6libzfs_ZFSPropertyDict;
  if (PyType_Ready(&__pyx_type_6libzfs_ZFSObject) < 0) __PYX_ERR(1, 2006, __pyx_L1_error)
  __pyx_type_6libzfs_ZFSObject.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "ZFSObject", (PyObject *)&__pyx_type_6libzfs_ZFSObject) < 0) __PYX_ERR(1, 2006, __pyx_L1_error)
  __pyx_ptype_6libzfs_ZFSObject = &__pyx_type_6libzfs_ZFSObject;
  __pyx_vtabptr_6libzfs_ZFSDataset = &__pyx_vtable_6libzfs_ZFSDataset;
  __pyx_vtable_6libzfs_ZFSDataset.__pyx___iterate_children = (int (*)(zfs_handle_t *, void *))__pyx_f_6libzfs_10ZFSDataset___iterate_children;
  __pyx_vtable_6libzfs_ZFSDataset.__pyx___iterate_snapshots = (int (*)(zfs_handle_t *, void *))__pyx_f_6libzfs_10ZFSDataset___iterate_snapshots;
  __pyx_vtable_6libzfs_ZFSDataset.__pyx___iterate_bookmarks = (int (*)(zfs_handle_t *, void *))__pyx_f_6libzfs_10ZFSDataset___iterate_bookmarks;
  __pyx_vtable_6libzfs_ZFSDataset.__pyx___iterate_dependents = (int (*)(zfs_handle_t *, void *))__pyx_f_6libzfs_10ZFSDataset___iterate_dependents;
  __pyx_type_6libzfs_ZFSDataset.tp_base = __pyx_ptype_6libzfs_ZFSObject;
  if (PyType_Ready(&__pyx_type_6libzfs_ZFSDataset) < 0) __PYX_ERR(1, 2099, __pyx_L1_error)
  __pyx_type_6libzfs_ZFSDataset.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_6libzfs_ZFSDataset.tp_dict, __pyx_vtabptr_6libzfs_ZFSDataset) < 0) __PYX_ERR(1, 2099, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "ZFSDataset", (PyObject *)&__pyx_type_6libzfs_ZFSDataset) < 0) __PYX_ERR(1, 2099, __pyx_L1_error)
  __pyx_ptype_6libzfs_ZFSDataset = &__pyx_type_6libzfs_ZFSDataset;
  __pyx_type_6libzfs_ZFSSnapshot.tp_base = __pyx_ptype_6libzfs_ZFSObject;
  if (PyType_Ready(&__pyx_type_6libzfs_ZFSSnapshot) < 0) __PYX_ERR(1, 2414, __pyx_L1_error)
  __pyx_type_6libzfs_ZFSSnapshot.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "ZFSSnapshot", (PyObject *)&__pyx_type_6libzfs_ZFSSnapshot) < 0) __PYX_ERR(1, 2414, __pyx_L1_error)
  __pyx_ptype_6libzfs_ZFSSnapshot = &__pyx_type_6libzfs_ZFSSnapshot;
  __pyx_type_6libzfs_ZFSBookmark.tp_base = __pyx_ptype_6libzfs_ZFSObject;
  if (PyType_Ready(&__pyx_type_6libzfs_ZFSBookmark) < 0) __PYX_ERR(1, 2549, __pyx_L1_error)
  __pyx_type_6libzfs_ZFSBookmark.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "ZFSBookmark", (PyObject *)&__pyx_type_6libzfs_ZFSBookmark) < 0) __PYX_ERR(1, 2549, __pyx_L1_error)
  __pyx_ptype_6libzfs_ZFSBookmark = &__pyx_type_6libzfs_ZFSBookmark;
  if (PyType_Ready(&__pyx_type_6libzfs___pyx_scope_struct____iter__) < 0) __PYX_ERR(2, 181, __pyx_L1_error)
  __pyx_type_6libzfs___pyx_scope_struct____iter__.tp_print = 0;
  __pyx_ptype_6libzfs___pyx_scope_struct____iter__ = &__pyx_type_6libzfs___pyx_scope_struct____iter__;
  if (PyType_Ready(&__pyx_type_6libzfs___pyx_scope_struct_1_items) < 0) __PYX_ERR(2, 418, __pyx_L1_error)
  __pyx_type_6libzfs___pyx_scope_struct_1_items.tp_print = 0;
  __pyx_ptype_6libzfs___pyx_scope_struct_1_items = &__pyx_type_6libzfs___pyx_scope_struct_1_items;
  if (PyType_Ready(&__pyx_type_6libzfs___pyx_scope_struct_2___get__) < 0) __PYX_ERR(1, 379, __pyx_L1_error)
  __pyx_type_6libzfs___pyx_scope_struct_2___get__.tp_print = 0;
  __pyx_ptype_6libzfs___pyx_scope_struct_2___get__ = &__pyx_type_6libzfs___pyx_scope_struct_2___get__;
  if (PyType_Ready(&__pyx_type_6libzfs___pyx_scope_struct_3___get__) < 0) __PYX_ERR(1, 396, __pyx_L1_error)
  __pyx_type_6libzfs___pyx_scope_struct_3___get__.tp_print = 0;
  __pyx_ptype_6libzfs___pyx_scope_struct_3___get__ = &__pyx_type_6libzfs___pyx_scope_struct_3___get__;
  if (PyType_Ready(&__pyx_type_6libzfs___pyx_scope_struct_4___get__) < 0) __PYX_ERR(1, 406, __pyx_L1_error)
  __pyx_type_6libzfs___pyx_scope_struct_4___get__.tp_print = 0;
  __pyx_ptype_6libzfs___pyx_scope_struct_4___get__ = &__pyx_type_6libzfs___pyx_scope_struct_4___get__;
  if (PyType_Ready(&__pyx_type_6libzfs___pyx_scope_struct_5_find_import) < 0) __PYX_ERR(1, 430, __pyx_L1_error)
  __pyx_type_6libzfs___pyx_scope_struct_5_find_import.tp_print = 0;
  __pyx_ptype_6libzfs___pyx_scope_struct_5_find_import = &__pyx_type_6libzfs___pyx_scope_struct_5_find_import;
  if (PyType_Ready(&__pyx_type_6libzfs___pyx_scope_struct_6_write_history) < 0) __PYX_ERR(1, 683, __pyx_L1_error)
  __pyx_type_6libzfs___pyx_scope_struct_6_write_history.tp_print = 0;
  __pyx_ptype_6libzfs___pyx_scope_struct_6_write_history = &__pyx_type_6libzfs___pyx_scope_struct_6_write_history;
  if (PyType_Ready(&__pyx_type_6libzfs___pyx_scope_struct_7___get__) < 0) __PYX_ERR(1, 1363, __pyx_L1_error)
  __pyx_type_6libzfs___pyx_scope_struct_7___get__.tp_print = 0;
  __pyx_ptype_6libzfs___pyx_scope_struct_7___get__ = &__pyx_type_6libzfs___pyx_scope_struct_7___get__;
  if (PyType_Ready(&__pyx_type_6libzfs___pyx_scope_struct_8___get__) < 0) __PYX_ERR(1, 1569, __pyx_L1_error)
  __pyx_type_6libzfs___pyx_scope_struct_8___get__.tp_print = 0;
  __pyx_ptype_6libzfs___pyx_scope_struct_8___get__ = &__pyx_type_6libzfs___pyx_scope_struct_8___get__;
  if (PyType_Ready(&__pyx_type_6libzfs___pyx_scope_struct_9___get__) < 0) __PYX_ERR(1, 1586, __pyx_L1_error)
  __pyx_type_6libzfs___pyx_scope_struct_9___get__.tp_print = 0;
  __pyx_ptype_6libzfs___pyx_scope_struct_9___get__ = &__pyx_type_6libzfs___pyx_scope_struct_9___get__;
  if (PyType_Ready(&__pyx_type_6libzfs___pyx_scope_struct_10___get__) < 0) __PYX_ERR(1, 1603, __pyx_L1_error)
  __pyx_type_6libzfs___pyx_scope_struct_10___get__.tp_print = 0;
  __pyx_ptype_6libzfs___pyx_scope_struct_10___get__ = &__pyx_type_6libzfs___pyx_scope_struct_10___get__;
  if (PyType_Ready(&__pyx_type_6libzfs___pyx_scope_struct_11___get__) < 0) __PYX_ERR(1, 1619, __pyx_L1_error)
  __pyx_type_6libzfs___pyx_scope_struct_11___get__.tp_print = 0;
  __pyx_ptype_6libzfs___pyx_scope_struct_11___get__ = &__pyx_type_6libzfs___pyx_scope_struct_11___get__;
  if (PyType_Ready(&__pyx_type_6libzfs___pyx_scope_struct_12___get__) < 0) __PYX_ERR(1, 1690, __pyx_L1_error)
  __pyx_type_6libzfs___pyx_scope_struct_12___get__.tp_print = 0;
  __pyx_ptype_6libzfs___pyx_scope_struct_12___get__ = &__pyx_type_6libzfs___pyx_scope_struct_12___get__;
  if (PyType_Ready(&__pyx_type_6libzfs___pyx_scope_struct_13_vdev_by_guid) < 0) __PYX_ERR(1, 1766, __pyx_L1_error)
  __pyx_type_6libzfs___pyx_scope_struct_13_vdev_by_guid.tp_print = 0;
  __pyx_ptype_6libzfs___pyx_scope_struct_13_vdev_by_guid = &__pyx_type_6libzfs___pyx_scope_struct_13_vdev_by_guid;
  if (PyType_Ready(&__pyx_type_6libzfs___pyx_scope_struct_14___iter__) < 0) __PYX_ERR(1, 1971, __pyx_L1_error)
  __pyx_type_6libzfs___pyx_scope_struct_14___iter__.tp_print = 0;
  __pyx_ptype_6libzfs___pyx_scope_struct_14___iter__ = &__pyx_type_6libzfs___pyx_scope_struct_14___iter__;
  if (PyType_Ready(&__pyx_type_6libzfs___pyx_scope_struct_15___get__) < 0) __PYX_ERR(1, 2134, __pyx_L1_error)
  __pyx_type_6libzfs___pyx_scope_struct_15___get__.tp_print = 0;
  __pyx_ptype_6libzfs___pyx_scope_struct_15___get__ = &__pyx_type_6libzfs___pyx_scope_struct_15___get__;
  if (PyType_Ready(&__pyx_type_6libzfs___pyx_scope_struct_16___get__) < 0) __PYX_ERR(1, 2149, __pyx_L1_error)
  __pyx_type_6libzfs___pyx_scope_struct_16___get__.tp_print = 0;
  __pyx_ptype_6libzfs___pyx_scope_struct_16___get__ = &__pyx_type_6libzfs___pyx_scope_struct_16___get__;
  if (PyType_Ready(&__pyx_type_6libzfs___pyx_scope_struct_17___get__) < 0) __PYX_ERR(1, 2156, __pyx_L1_error)
  __pyx_type_6libzfs___pyx_scope_struct_17___get__.tp_print = 0;
  __pyx_ptype_6libzfs___pyx_scope_struct_17___get__ = &__pyx_type_6libzfs___pyx_scope_struct_17___get__;
  if (PyType_Ready(&__pyx_type_6libzfs___pyx_scope_struct_18___get__) < 0) __PYX_ERR(1, 2174, __pyx_L1_error)
  __pyx_type_6libzfs___pyx_scope_struct_18___get__.tp_print = 0;
  __pyx_ptype_6libzfs___pyx_scope_struct_18___get__ = &__pyx_type_6libzfs___pyx_scope_struct_18___get__;
  if (PyType_Ready(&__pyx_type_6libzfs___pyx_scope_struct_19___get__) < 0) __PYX_ERR(1, 2190, __pyx_L1_error)
  __pyx_type_6libzfs___pyx_scope_struct_19___get__.tp_print = 0;
  __pyx_ptype_6libzfs___pyx_scope_struct_19___get__ = &__pyx_type_6libzfs___pyx_scope_struct_19___get__;
  if (PyType_Ready(&__pyx_type_6libzfs___pyx_scope_struct_20___get__) < 0) __PYX_ERR(1, 2202, __pyx_L1_error)
  __pyx_type_6libzfs___pyx_scope_struct_20___get__.tp_print = 0;
  __pyx_ptype_6libzfs___pyx_scope_struct_20___get__ = &__pyx_type_6libzfs___pyx_scope_struct_20___get__;
  if (PyType_Ready(&__pyx_type_6libzfs___pyx_scope_struct_21_diff) < 0) __PYX_ERR(1, 2384, __pyx_L1_error)
  __pyx_type_6libzfs___pyx_scope_struct_21_diff.tp_print = 0;
  __pyx_ptype_6libzfs___pyx_scope_struct_21_diff = &__pyx_type_6libzfs___pyx_scope_struct_21_diff;
  /*--- Type import code ---*/
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif

  /* "libzfs.pyx":28
 * #
 * 
 * import os             # <<<<<<<<<<<<<<
 * import stat
 * import enum
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(1, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":29
 * 
 * import os
 * import stat             # <<<<<<<<<<<<<<
 * import enum
 * import errno
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_stat, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_stat, __pyx_t_1) < 0) __PYX_ERR(1, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":30
 * import os
 * import stat
 * import enum             # <<<<<<<<<<<<<<
 * import errno
 * import threading
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_enum, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_enum, __pyx_t_1) < 0) __PYX_ERR(1, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":31
 * import stat
 * import enum
 * import errno             # <<<<<<<<<<<<<<
 * import threading
 * import cython
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_errno, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_errno, __pyx_t_1) < 0) __PYX_ERR(1, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":32
 * import enum
 * import errno
 * import threading             # <<<<<<<<<<<<<<
 * import cython
 * cimport libzfs
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_threading, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_threading, __pyx_t_1) < 0) __PYX_ERR(1, 32, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "libzfs.pyx":37
 * cimport zfs
 * cimport nvpair
 * from datetime import datetime             # <<<<<<<<<<<<<<
 * from libc.errno cimport errno
 * from libc.stdint cimport uintptr_t
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_datetime);
  __Pyx_GIVEREF(__pyx_n_s_datetime);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_datetime);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 37, __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_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __pyx_t_1) < 0) __PYX_ERR(1, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "nvpair.pxi":29
 * 
 * cimport nvpair
 * import collections             # <<<<<<<<<<<<<<
 * import numbers
 * import cython
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_2) < 0) __PYX_ERR(2, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "nvpair.pxi":30
 * cimport nvpair
 * import collections
 * import numbers             # <<<<<<<<<<<<<<
 * import cython
 * from types cimport *
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_numbers, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_2) < 0) __PYX_ERR(2, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "converter.pxi":29
 * 
 * 
 * class ZfsConverter(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, typ, **kwargs):
 *         self.typ = typ
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ZfsConverter, __pyx_n_s_ZfsConverter, (PyObject *) NULL, __pyx_n_s_libzfs, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "converter.pxi":30
 * 
 * class ZfsConverter(object):
 *     def __init__(self, typ, **kwargs):             # <<<<<<<<<<<<<<
 *         self.typ = typ
 *         self.readonly = kwargs.pop('readonly', False)
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6libzfs_12ZfsConverter_1__init__, 0, __pyx_n_s_ZfsConverter___init, NULL, __pyx_n_s_libzfs, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "converter.pxi":39
 *         self.yes = kwargs.pop('yes', 'on')
 * 
 *     def to_native(self, value):             # <<<<<<<<<<<<<<
 *         if value is None:
 *             return None
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6libzfs_12ZfsConverter_3to_native, 0, __pyx_n_s_ZfsConverter_to_native, NULL, __pyx_n_s_libzfs, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_to_native, __pyx_t_4) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "converter.pxi":67
 *             return datetime.fromtimestamp(int(value))
 * 
 *     def to_property(self, value):             # <<<<<<<<<<<<<<
 *         if self.readonly:
 *             raise ValueError('Property is read-only')
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6libzfs_12ZfsConverter_5to_property, 0, __pyx_n_s_ZfsConverter_to_property, NULL, __pyx_n_s_libzfs, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_to_property, __pyx_t_4) < 0) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "converter.pxi":29
 * 
 * 
 * class ZfsConverter(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, typ, **kwargs):
 *         self.typ = typ
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ZfsConverter, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ZfsConverter, __pyx_t_4) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "converter.pxi":91
 * 
 * ZPOOL_PROPERTY_CONVERTERS = {
 *     'name': ZfsConverter(str, readonly=True),             # <<<<<<<<<<<<<<
 *     'size': ZfsConverter(int, readonly=True, nullable=True),
 *     'capacity': ZfsConverter(str, readonly=True, nullable=True),
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)(&PyString_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(&PyString_Type)));
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name_2, __pyx_t_5) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":92
 * ZPOOL_PROPERTY_CONVERTERS = {
 *     'name': ZfsConverter(str, readonly=True),
 *     'size': ZfsConverter(int, readonly=True, nullable=True),             # <<<<<<<<<<<<<<
 *     'capacity': ZfsConverter(str, readonly=True, nullable=True),
 *     'altroot': ZfsConverter(str, nullable=True),
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_size, __pyx_t_1) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":93
 *     'name': ZfsConverter(str, readonly=True),
 *     'size': ZfsConverter(int, readonly=True, nullable=True),
 *     'capacity': ZfsConverter(str, readonly=True, nullable=True),             # <<<<<<<<<<<<<<
 *     'altroot': ZfsConverter(str, nullable=True),
 *     'health': ZfsConverter(str, readonly=True),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)(&PyString_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(&PyString_Type)));
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_capacity, __pyx_t_5) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":94
 *     'size': ZfsConverter(int, readonly=True, nullable=True),
 *     'capacity': ZfsConverter(str, readonly=True, nullable=True),
 *     'altroot': ZfsConverter(str, nullable=True),             # <<<<<<<<<<<<<<
 *     'health': ZfsConverter(str, readonly=True),
 *     'guid': ZfsConverter(int, readonly=True),
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)(&PyString_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyString_Type)));
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_altroot, __pyx_t_1) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":95
 *     'capacity': ZfsConverter(str, readonly=True, nullable=True),
 *     'altroot': ZfsConverter(str, nullable=True),
 *     'health': ZfsConverter(str, readonly=True),             # <<<<<<<<<<<<<<
 *     'guid': ZfsConverter(int, readonly=True),
 *     'version': ZfsConverter(int, nullable=True),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)(&PyString_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(&PyString_Type)));
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_health, __pyx_t_5) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":96
 *     'altroot': ZfsConverter(str, nullable=True),
 *     'health': ZfsConverter(str, readonly=True),
 *     'guid': ZfsConverter(int, readonly=True),             # <<<<<<<<<<<<<<
 *     'version': ZfsConverter(int, nullable=True),
 *     'bootfs': ZfsConverter(str, nullable=True),
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 96, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_guid, __pyx_t_1) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":97
 *     'health': ZfsConverter(str, readonly=True),
 *     'guid': ZfsConverter(int, readonly=True),
 *     'version': ZfsConverter(int, nullable=True),             # <<<<<<<<<<<<<<
 *     'bootfs': ZfsConverter(str, nullable=True),
 *     'delegation': ZfsConverter(bool, nullable=True),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_version, __pyx_t_5) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":98
 *     'guid': ZfsConverter(int, readonly=True),
 *     'version': ZfsConverter(int, nullable=True),
 *     'bootfs': ZfsConverter(str, nullable=True),             # <<<<<<<<<<<<<<
 *     'delegation': ZfsConverter(bool, nullable=True),
 *     'autoreplace': ZfsConverter(bool, nullable=True),
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)(&PyString_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyString_Type)));
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_bootfs, __pyx_t_1) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":99
 *     'version': ZfsConverter(int, nullable=True),
 *     'bootfs': ZfsConverter(str, nullable=True),
 *     'delegation': ZfsConverter(bool, nullable=True),             # <<<<<<<<<<<<<<
 *     'autoreplace': ZfsConverter(bool, nullable=True),
 *     'cachemode': ZfsConverter(str, nullable=True),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject*)&PyBool_Type));
  __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject*)&PyBool_Type));
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 99, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_delegation, __pyx_t_5) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":100
 *     'bootfs': ZfsConverter(str, nullable=True),
 *     'delegation': ZfsConverter(bool, nullable=True),
 *     'autoreplace': ZfsConverter(bool, nullable=True),             # <<<<<<<<<<<<<<
 *     'cachemode': ZfsConverter(str, nullable=True),
 *     'failmode': ZfsConverter(str, nullable=True),
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject*)&PyBool_Type));
  __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject*)&PyBool_Type));
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 100, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_autoreplace, __pyx_t_1) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":101
 *     'delegation': ZfsConverter(bool, nullable=True),
 *     'autoreplace': ZfsConverter(bool, nullable=True),
 *     'cachemode': ZfsConverter(str, nullable=True),             # <<<<<<<<<<<<<<
 *     'failmode': ZfsConverter(str, nullable=True),
 *     'listsnapshots': ZfsConverter(bool, nullable=True),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)(&PyString_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(&PyString_Type)));
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_cachemode, __pyx_t_5) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":102
 *     'autoreplace': ZfsConverter(bool, nullable=True),
 *     'cachemode': ZfsConverter(str, nullable=True),
 *     'failmode': ZfsConverter(str, nullable=True),             # <<<<<<<<<<<<<<
 *     'listsnapshots': ZfsConverter(bool, nullable=True),
 *     'autoexpand': ZfsConverter(bool, nullable=True),
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)(&PyString_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyString_Type)));
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 102, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_failmode, __pyx_t_1) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":103
 *     'cachemode': ZfsConverter(str, nullable=True),
 *     'failmode': ZfsConverter(str, nullable=True),
 *     'listsnapshots': ZfsConverter(bool, nullable=True),             # <<<<<<<<<<<<<<
 *     'autoexpand': ZfsConverter(bool, nullable=True),
 *     'dedupditto': ZfsConverter(int, readonly=True, nullable=True),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject*)&PyBool_Type));
  __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject*)&PyBool_Type));
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 103, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_listsnapshots, __pyx_t_5) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":104
 *     'failmode': ZfsConverter(str, nullable=True),
 *     'listsnapshots': ZfsConverter(bool, nullable=True),
 *     'autoexpand': ZfsConverter(bool, nullable=True),             # <<<<<<<<<<<<<<
 *     'dedupditto': ZfsConverter(int, readonly=True, nullable=True),
 *     'dedupratio': ZfsConverter(str, readonly=True, nullable=True),
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject*)&PyBool_Type));
  __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject*)&PyBool_Type));
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_autoexpand, __pyx_t_1) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":105
 *     'listsnapshots': ZfsConverter(bool, nullable=True),
 *     'autoexpand': ZfsConverter(bool, nullable=True),
 *     'dedupditto': ZfsConverter(int, readonly=True, nullable=True),             # <<<<<<<<<<<<<<
 *     'dedupratio': ZfsConverter(str, readonly=True, nullable=True),
 *     'free': ZfsConverter(int, readonly=True, nullable=True),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dedupditto, __pyx_t_5) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":106
 *     'autoexpand': ZfsConverter(bool, nullable=True),
 *     'dedupditto': ZfsConverter(int, readonly=True, nullable=True),
 *     'dedupratio': ZfsConverter(str, readonly=True, nullable=True),             # <<<<<<<<<<<<<<
 *     'free': ZfsConverter(int, readonly=True, nullable=True),
 *     'allocated': ZfsConverter(int, readonly=True, nullable=True),
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)(&PyString_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyString_Type)));
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 106, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 106, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dedupratio, __pyx_t_1) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":107
 *     'dedupditto': ZfsConverter(int, readonly=True, nullable=True),
 *     'dedupratio': ZfsConverter(str, readonly=True, nullable=True),
 *     'free': ZfsConverter(int, readonly=True, nullable=True),             # <<<<<<<<<<<<<<
 *     'allocated': ZfsConverter(int, readonly=True, nullable=True),
 *     'readonly': ZfsConverter(bool, nullable=True),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 107, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 107, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_free, __pyx_t_5) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":108
 *     'dedupratio': ZfsConverter(str, readonly=True, nullable=True),
 *     'free': ZfsConverter(int, readonly=True, nullable=True),
 *     'allocated': ZfsConverter(int, readonly=True, nullable=True),             # <<<<<<<<<<<<<<
 *     'readonly': ZfsConverter(bool, nullable=True),
 *     'comment': ZfsConverter(str, nullable=True),
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_allocated, __pyx_t_1) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":109
 *     'free': ZfsConverter(int, readonly=True, nullable=True),
 *     'allocated': ZfsConverter(int, readonly=True, nullable=True),
 *     'readonly': ZfsConverter(bool, nullable=True),             # <<<<<<<<<<<<<<
 *     'comment': ZfsConverter(str, nullable=True),
 *     'expandsize': ZfsConverter(int, nullable=True),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject*)&PyBool_Type));
  __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject*)&PyBool_Type));
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_readonly, __pyx_t_5) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":110
 *     'allocated': ZfsConverter(int, readonly=True, nullable=True),
 *     'readonly': ZfsConverter(bool, nullable=True),
 *     'comment': ZfsConverter(str, nullable=True),             # <<<<<<<<<<<<<<
 *     'expandsize': ZfsConverter(int, nullable=True),
 *     'freeing': ZfsConverter(int, readonly=True, nullable=True),
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)(&PyString_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyString_Type)));
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_comment, __pyx_t_1) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":111
 *     'readonly': ZfsConverter(bool, nullable=True),
 *     'comment': ZfsConverter(str, nullable=True),
 *     'expandsize': ZfsConverter(int, nullable=True),             # <<<<<<<<<<<<<<
 *     'freeing': ZfsConverter(int, readonly=True, nullable=True),
 *     'fragmentation': ZfsConverter(str, readonly=True, nullable=True),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_expandsize, __pyx_t_5) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":112
 *     'comment': ZfsConverter(str, nullable=True),
 *     'expandsize': ZfsConverter(int, nullable=True),
 *     'freeing': ZfsConverter(int, readonly=True, nullable=True),             # <<<<<<<<<<<<<<
 *     'fragmentation': ZfsConverter(str, readonly=True, nullable=True),
 *     'leaked': ZfsConverter(int, readonly=True, nullable=True)
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_freeing, __pyx_t_1) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":113
 *     'expandsize': ZfsConverter(int, nullable=True),
 *     'freeing': ZfsConverter(int, readonly=True, nullable=True),
 *     'fragmentation': ZfsConverter(str, readonly=True, nullable=True),             # <<<<<<<<<<<<<<
 *     'leaked': ZfsConverter(int, readonly=True, nullable=True)
 * }
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)(&PyString_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(&PyString_Type)));
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fragmentation, __pyx_t_5) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":114
 *     'freeing': ZfsConverter(int, readonly=True, nullable=True),
 *     'fragmentation': ZfsConverter(str, readonly=True, nullable=True),
 *     'leaked': ZfsConverter(int, readonly=True, nullable=True)             # <<<<<<<<<<<<<<
 * }
 * 
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_leaked, __pyx_t_1) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ZPOOL_PROPERTY_CONVERTERS, __pyx_t_2) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "converter.pxi":119
 * 
 * ZFS_PROPERTY_CONVERTERS = {
 *     'type': ZfsConverter(str, readonly=True),             # <<<<<<<<<<<<<<
 *     'creation': ZfsConverter(datetime, readonly=True),
 *     'used': ZfsConverter(int, readonly=True),
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)(&PyString_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(&PyString_Type)));
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_type, __pyx_t_5) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":120
 * ZFS_PROPERTY_CONVERTERS = {
 *     'type': ZfsConverter(str, readonly=True),
 *     'creation': ZfsConverter(datetime, readonly=True),             # <<<<<<<<<<<<<<
 *     'used': ZfsConverter(int, readonly=True),
 *     'available': ZfsConverter(int, readonly=True),
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 120, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_creation, __pyx_t_1) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":121
 *     'type': ZfsConverter(str, readonly=True),
 *     'creation': ZfsConverter(datetime, readonly=True),
 *     'used': ZfsConverter(int, readonly=True),             # <<<<<<<<<<<<<<
 *     'available': ZfsConverter(int, readonly=True),
 *     'referenced': ZfsConverter(int, readonly=True),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 121, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_used, __pyx_t_5) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":122
 *     'creation': ZfsConverter(datetime, readonly=True),
 *     'used': ZfsConverter(int, readonly=True),
 *     'available': ZfsConverter(int, readonly=True),             # <<<<<<<<<<<<<<
 *     'referenced': ZfsConverter(int, readonly=True),
 *     'mounted': ZfsConverter(bool, readonly=True, yes='yes', no='no'),
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 122, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_available, __pyx_t_1) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":123
 *     'used': ZfsConverter(int, readonly=True),
 *     'available': ZfsConverter(int, readonly=True),
 *     'referenced': ZfsConverter(int, readonly=True),             # <<<<<<<<<<<<<<
 *     'mounted': ZfsConverter(bool, readonly=True, yes='yes', no='no'),
 *     'quota': ZfsConverter(int, nullable=True, null='none', read_null='0'),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 123, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_referenced, __pyx_t_5) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":124
 *     'available': ZfsConverter(int, readonly=True),
 *     'referenced': ZfsConverter(int, readonly=True),
 *     'mounted': ZfsConverter(bool, readonly=True, yes='yes', no='no'),             # <<<<<<<<<<<<<<
 *     'quota': ZfsConverter(int, nullable=True, null='none', read_null='0'),
 *     'reservation': ZfsConverter(int, nullable=True, null='none', read_null='0'),
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject*)&PyBool_Type));
  __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject*)&PyBool_Type));
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_yes, __pyx_n_s_yes) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_no, __pyx_n_s_no) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_mounted, __pyx_t_1) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":125
 *     'referenced': ZfsConverter(int, readonly=True),
 *     'mounted': ZfsConverter(bool, readonly=True, yes='yes', no='no'),
 *     'quota': ZfsConverter(int, nullable=True, null='none', read_null='0'),             # <<<<<<<<<<<<<<
 *     'reservation': ZfsConverter(int, nullable=True, null='none', read_null='0'),
 *     'recordsize': ZfsConverter(str),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_null, __pyx_n_s_none) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_read_null, __pyx_kp_s_0) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_quota, __pyx_t_5) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":126
 *     'mounted': ZfsConverter(bool, readonly=True, yes='yes', no='no'),
 *     'quota': ZfsConverter(int, nullable=True, null='none', read_null='0'),
 *     'reservation': ZfsConverter(int, nullable=True, null='none', read_null='0'),             # <<<<<<<<<<<<<<
 *     'recordsize': ZfsConverter(str),
 *     'mountpoint': ZfsConverter(str),
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 126, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_null, __pyx_n_s_none) < 0) __PYX_ERR(0, 126, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_read_null, __pyx_kp_s_0) < 0) __PYX_ERR(0, 126, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_reservation, __pyx_t_1) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":127
 *     'quota': ZfsConverter(int, nullable=True, null='none', read_null='0'),
 *     'reservation': ZfsConverter(int, nullable=True, null='none', read_null='0'),
 *     'recordsize': ZfsConverter(str),             # <<<<<<<<<<<<<<
 *     'mountpoint': ZfsConverter(str),
 *     'sharenfs': ZfsConverter(str, nullable=True, null='off'),
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)(&PyString_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    __Pyx_INCREF(((PyObject *)(&PyString_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)(&PyString_Type)));
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_recordsize, __pyx_t_1) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":128
 *     'reservation': ZfsConverter(int, nullable=True, null='none', read_null='0'),
 *     'recordsize': ZfsConverter(str),
 *     'mountpoint': ZfsConverter(str),             # <<<<<<<<<<<<<<
 *     'sharenfs': ZfsConverter(str, nullable=True, null='off'),
 *     'checksum': ZfsConverter(bool),
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)(&PyString_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
    __Pyx_INCREF(((PyObject *)(&PyString_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
    PyTuple_SET_ITEM(__pyx_t_3, 0+1, ((PyObject *)(&PyString_Type)));
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_mountpoint, __pyx_t_1) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":129
 *     'recordsize': ZfsConverter(str),
 *     'mountpoint': ZfsConverter(str),
 *     'sharenfs': ZfsConverter(str, nullable=True, null='off'),             # <<<<<<<<<<<<<<
 *     'checksum': ZfsConverter(bool),
 *     'compression': ZfsConverter(str),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)(&PyString_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyString_Type)));
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_null, __pyx_n_s_off) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_sharenfs, __pyx_t_5) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":130
 *     'mountpoint': ZfsConverter(str),
 *     'sharenfs': ZfsConverter(str, nullable=True, null='off'),
 *     'checksum': ZfsConverter(bool),             # <<<<<<<<<<<<<<
 *     'compression': ZfsConverter(str),
 *     'atime': ZfsConverter(bool),
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject*)&PyBool_Type)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  } else {
    __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_INCREF(((PyObject*)&PyBool_Type));
    __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
    PyTuple_SET_ITEM(__pyx_t_1, 0+1, ((PyObject*)&PyBool_Type));
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_checksum, __pyx_t_5) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":131
 *     'sharenfs': ZfsConverter(str, nullable=True, null='off'),
 *     'checksum': ZfsConverter(bool),
 *     'compression': ZfsConverter(str),             # <<<<<<<<<<<<<<
 *     'atime': ZfsConverter(bool),
 *     'devices': ZfsConverter(bool),
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_1) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)(&PyString_Type))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = NULL;
    __Pyx_INCREF(((PyObject *)(&PyString_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)(&PyString_Type)));
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 131, __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 (PyDict_SetItem(__pyx_t_2, __pyx_n_s_compression, __pyx_t_5) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":132
 *     'checksum': ZfsConverter(bool),
 *     'compression': ZfsConverter(str),
 *     'atime': ZfsConverter(bool),             # <<<<<<<<<<<<<<
 *     'devices': ZfsConverter(bool),
 *     'exec': ZfsConverter(bool),
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject*)&PyBool_Type)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  } else {
    __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_INCREF(((PyObject*)&PyBool_Type));
    __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
    PyTuple_SET_ITEM(__pyx_t_1, 0+1, ((PyObject*)&PyBool_Type));
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_atime, __pyx_t_5) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":133
 *     'compression': ZfsConverter(str),
 *     'atime': ZfsConverter(bool),
 *     'devices': ZfsConverter(bool),             # <<<<<<<<<<<<<<
 *     'exec': ZfsConverter(bool),
 *     'setuid': ZfsConverter(bool),
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_1) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject*)&PyBool_Type)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = NULL;
    __Pyx_INCREF(((PyObject*)&PyBool_Type));
    __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject*)&PyBool_Type));
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 133, __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 (PyDict_SetItem(__pyx_t_2, __pyx_n_s_devices, __pyx_t_5) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":134
 *     'atime': ZfsConverter(bool),
 *     'devices': ZfsConverter(bool),
 *     'exec': ZfsConverter(bool),             # <<<<<<<<<<<<<<
 *     'setuid': ZfsConverter(bool),
 *     'readonly': ZfsConverter(bool),
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject*)&PyBool_Type)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  } else {
    __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_INCREF(((PyObject*)&PyBool_Type));
    __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
    PyTuple_SET_ITEM(__pyx_t_1, 0+1, ((PyObject*)&PyBool_Type));
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_exec, __pyx_t_5) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":135
 *     'devices': ZfsConverter(bool),
 *     'exec': ZfsConverter(bool),
 *     'setuid': ZfsConverter(bool),             # <<<<<<<<<<<<<<
 *     'readonly': ZfsConverter(bool),
 *     'jailed': ZfsConverter(bool),
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_1) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject*)&PyBool_Type)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = NULL;
    __Pyx_INCREF(((PyObject*)&PyBool_Type));
    __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject*)&PyBool_Type));
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 135, __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 (PyDict_SetItem(__pyx_t_2, __pyx_n_s_setuid, __pyx_t_5) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":136
 *     'exec': ZfsConverter(bool),
 *     'setuid': ZfsConverter(bool),
 *     'readonly': ZfsConverter(bool),             # <<<<<<<<<<<<<<
 *     'jailed': ZfsConverter(bool),
 *     'snapdir': ZfsConverter(bool, off='hidden', on='visible'),
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject*)&PyBool_Type)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  } else {
    __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_INCREF(((PyObject*)&PyBool_Type));
    __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
    PyTuple_SET_ITEM(__pyx_t_1, 0+1, ((PyObject*)&PyBool_Type));
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_readonly, __pyx_t_5) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":137
 *     'setuid': ZfsConverter(bool),
 *     'readonly': ZfsConverter(bool),
 *     'jailed': ZfsConverter(bool),             # <<<<<<<<<<<<<<
 *     'snapdir': ZfsConverter(bool, off='hidden', on='visible'),
 *     'aclmode': ZfsConverter(str),
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_1) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject*)&PyBool_Type)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = NULL;
    __Pyx_INCREF(((PyObject*)&PyBool_Type));
    __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject*)&PyBool_Type));
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 137, __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 (PyDict_SetItem(__pyx_t_2, __pyx_n_s_jailed, __pyx_t_5) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":138
 *     'readonly': ZfsConverter(bool),
 *     'jailed': ZfsConverter(bool),
 *     'snapdir': ZfsConverter(bool, off='hidden', on='visible'),             # <<<<<<<<<<<<<<
 *     'aclmode': ZfsConverter(str),
 *     'aclinherit': ZfsConverter(str),
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject*)&PyBool_Type));
  __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject*)&PyBool_Type));
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_off, __pyx_n_s_hidden) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_on, __pyx_n_s_visible) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_snapdir, __pyx_t_1) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":139
 *     'jailed': ZfsConverter(bool),
 *     'snapdir': ZfsConverter(bool, off='hidden', on='visible'),
 *     'aclmode': ZfsConverter(str),             # <<<<<<<<<<<<<<
 *     'aclinherit': ZfsConverter(str),
 *     'canmount': ZfsConverter(bool),
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)(&PyString_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    __Pyx_INCREF(((PyObject *)(&PyString_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)(&PyString_Type)));
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_aclmode, __pyx_t_1) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":140
 *     'snapdir': ZfsConverter(bool, off='hidden', on='visible'),
 *     'aclmode': ZfsConverter(str),
 *     'aclinherit': ZfsConverter(str),             # <<<<<<<<<<<<<<
 *     'canmount': ZfsConverter(bool),
 *     'xattr': ZfsConverter(bool),
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)(&PyString_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
    __Pyx_INCREF(((PyObject *)(&PyString_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
    PyTuple_SET_ITEM(__pyx_t_3, 0+1, ((PyObject *)(&PyString_Type)));
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_aclinherit, __pyx_t_1) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":141
 *     'aclmode': ZfsConverter(str),
 *     'aclinherit': ZfsConverter(str),
 *     'canmount': ZfsConverter(bool),             # <<<<<<<<<<<<<<
 *     'xattr': ZfsConverter(bool),
 *     'copies': ZfsConverter(int),
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject*)&PyBool_Type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    __Pyx_INCREF(((PyObject*)&PyBool_Type));
    __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject*)&PyBool_Type));
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_canmount, __pyx_t_1) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":142
 *     'aclinherit': ZfsConverter(str),
 *     'canmount': ZfsConverter(bool),
 *     'xattr': ZfsConverter(bool),             # <<<<<<<<<<<<<<
 *     'copies': ZfsConverter(int),
 *     'version': ZfsConverter(int, nullable=True, null=''),
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject*)&PyBool_Type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
    __Pyx_INCREF(((PyObject*)&PyBool_Type));
    __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
    PyTuple_SET_ITEM(__pyx_t_3, 0+1, ((PyObject*)&PyBool_Type));
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_xattr, __pyx_t_1) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":143
 *     'canmount': ZfsConverter(bool),
 *     'xattr': ZfsConverter(bool),
 *     'copies': ZfsConverter(int),             # <<<<<<<<<<<<<<
 *     'version': ZfsConverter(int, nullable=True, null=''),
 *     'utf8only': ZfsConverter(bool),
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)(&PyInt_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)(&PyInt_Type)));
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_copies, __pyx_t_1) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "converter.pxi":144
 *     'xattr': ZfsConverter(bool),
 *     'copies': ZfsConverter(int),
 *     'version': ZfsConverter(int, nullable=True, null=''),             # <<<<<<<<<<<<<<
 *     'utf8only': ZfsConverter(bool),
 *     'normalization': ZfsConverter(str),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 144, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_null, __pyx_kp_s__11) < 0) __PYX_ERR(0, 144, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_version, __pyx_t_3) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "converter.pxi":145
 *     'copies': ZfsConverter(int),
 *     'version': ZfsConverter(int, nullable=True, null=''),
 *     'utf8only': ZfsConverter(bool),             # <<<<<<<<<<<<<<
 *     'normalization': ZfsConverter(str),
 *     'casesensitivity': ZfsConverter(str),
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject*)&PyBool_Type)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_INCREF(((PyObject*)&PyBool_Type));
    __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
    PyTuple_SET_ITEM(__pyx_t_1, 0+1, ((PyObject*)&PyBool_Type));
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_utf8only, __pyx_t_3) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "converter.pxi":146
 *     'version': ZfsConverter(int, nullable=True, null=''),
 *     'utf8only': ZfsConverter(bool),
 *     'normalization': ZfsConverter(str),             # <<<<<<<<<<<<<<
 *     'casesensitivity': ZfsConverter(str),
 *     'vscan': ZfsConverter(bool),
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_1) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)(&PyString_Type))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = NULL;
    __Pyx_INCREF(((PyObject *)(&PyString_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)(&PyString_Type)));
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_normalization, __pyx_t_3) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "converter.pxi":147
 *     'utf8only': ZfsConverter(bool),
 *     'normalization': ZfsConverter(str),
 *     'casesensitivity': ZfsConverter(str),             # <<<<<<<<<<<<<<
 *     'vscan': ZfsConverter(bool),
 *     'nbmand': ZfsConverter(bool),
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)(&PyString_Type))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_INCREF(((PyObject *)(&PyString_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
    PyTuple_SET_ITEM(__pyx_t_1, 0+1, ((PyObject *)(&PyString_Type)));
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_casesensitivity, __pyx_t_3) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "converter.pxi":148
 *     'normalization': ZfsConverter(str),
 *     'casesensitivity': ZfsConverter(str),
 *     'vscan': ZfsConverter(bool),             # <<<<<<<<<<<<<<
 *     'nbmand': ZfsConverter(bool),
 *     'sharesmb': ZfsConverter(str, nullable=True, null='off'),
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_1) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject*)&PyBool_Type)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = NULL;
    __Pyx_INCREF(((PyObject*)&PyBool_Type));
    __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject*)&PyBool_Type));
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_vscan, __pyx_t_3) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "converter.pxi":149
 *     'casesensitivity': ZfsConverter(str),
 *     'vscan': ZfsConverter(bool),
 *     'nbmand': ZfsConverter(bool),             # <<<<<<<<<<<<<<
 *     'sharesmb': ZfsConverter(str, nullable=True, null='off'),
 *     'refquota': ZfsConverter(int, nullable=True, null='none', read_null='0'),
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject*)&PyBool_Type)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_INCREF(((PyObject*)&PyBool_Type));
    __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
    PyTuple_SET_ITEM(__pyx_t_1, 0+1, ((PyObject*)&PyBool_Type));
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_nbmand, __pyx_t_3) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "converter.pxi":150
 *     'vscan': ZfsConverter(bool),
 *     'nbmand': ZfsConverter(bool),
 *     'sharesmb': ZfsConverter(str, nullable=True, null='off'),             # <<<<<<<<<<<<<<
 *     'refquota': ZfsConverter(int, nullable=True, null='none', read_null='0'),
 *     'refreservation': ZfsConverter(int, nullable=True, null='none', read_null='0'),
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)(&PyString_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)(&PyString_Type)));
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_null, __pyx_n_s_off) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_sharesmb, __pyx_t_4) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "converter.pxi":151
 *     'nbmand': ZfsConverter(bool),
 *     'sharesmb': ZfsConverter(str, nullable=True, null='off'),
 *     'refquota': ZfsConverter(int, nullable=True, null='none', read_null='0'),             # <<<<<<<<<<<<<<
 *     'refreservation': ZfsConverter(int, nullable=True, null='none', read_null='0'),
 *     'primarycache': ZfsConverter(str),
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_null, __pyx_n_s_none) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_read_null, __pyx_kp_s_0) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_refquota, __pyx_t_3) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "converter.pxi":152
 *     'sharesmb': ZfsConverter(str, nullable=True, null='off'),
 *     'refquota': ZfsConverter(int, nullable=True, null='none', read_null='0'),
 *     'refreservation': ZfsConverter(int, nullable=True, null='none', read_null='0'),             # <<<<<<<<<<<<<<
 *     'primarycache': ZfsConverter(str),
 *     'secondarycache': ZfsConverter(str),
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_nullable, Py_True) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_null, __pyx_n_s_none) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_read_null, __pyx_kp_s_0) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_refreservation, __pyx_t_4) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "converter.pxi":153
 *     'refquota': ZfsConverter(int, nullable=True, null='none', read_null='0'),
 *     'refreservation': ZfsConverter(int, nullable=True, null='none', read_null='0'),
 *     'primarycache': ZfsConverter(str),             # <<<<<<<<<<<<<<
 *     'secondarycache': ZfsConverter(str),
 *     'usedbysnapshots': ZfsConverter(int, readonly=True),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)(&PyString_Type))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
    __Pyx_INCREF(((PyObject *)(&PyString_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
    PyTuple_SET_ITEM(__pyx_t_3, 0+1, ((PyObject *)(&PyString_Type)));
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_primarycache, __pyx_t_4) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "converter.pxi":154
 *     'refreservation': ZfsConverter(int, nullable=True, null='none', read_null='0'),
 *     'primarycache': ZfsConverter(str),
 *     'secondarycache': ZfsConverter(str),             # <<<<<<<<<<<<<<
 *     'usedbysnapshots': ZfsConverter(int, readonly=True),
 *     'usedbydataset': ZfsConverter(int, readonly=True),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)(&PyString_Type))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    __Pyx_INCREF(((PyObject *)(&PyString_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)(&PyString_Type)));
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_secondarycache, __pyx_t_4) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "converter.pxi":155
 *     'primarycache': ZfsConverter(str),
 *     'secondarycache': ZfsConverter(str),
 *     'usedbysnapshots': ZfsConverter(int, readonly=True),             # <<<<<<<<<<<<<<
 *     'usedbydataset': ZfsConverter(int, readonly=True),
 *     'usedbychildren': ZfsConverter(int, readonly=True),
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 155, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_usedbysnapshots, __pyx_t_3) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "converter.pxi":156
 *     'secondarycache': ZfsConverter(str),
 *     'usedbysnapshots': ZfsConverter(int, readonly=True),
 *     'usedbydataset': ZfsConverter(int, readonly=True),             # <<<<<<<<<<<<<<
 *     'usedbychildren': ZfsConverter(int, readonly=True),
 *     'usedbyrefreservation': ZfsConverter(int, readonly=True),
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_usedbydataset, __pyx_t_4) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "converter.pxi":157
 *     'usedbysnapshots': ZfsConverter(int, readonly=True),
 *     'usedbydataset': ZfsConverter(int, readonly=True),
 *     'usedbychildren': ZfsConverter(int, readonly=True),             # <<<<<<<<<<<<<<
 *     'usedbyrefreservation': ZfsConverter(int, readonly=True),
 *     'logbias': ZfsConverter(str),
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 157, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_usedbychildren, __pyx_t_3) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "converter.pxi":158
 *     'usedbydataset': ZfsConverter(int, readonly=True),
 *     'usedbychildren': ZfsConverter(int, readonly=True),
 *     'usedbyrefreservation': ZfsConverter(int, readonly=True),             # <<<<<<<<<<<<<<
 *     'logbias': ZfsConverter(str),
 *     'dedup': ZfsConverter(str),
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_usedbyrefreservation, __pyx_t_4) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "converter.pxi":159
 *     'usedbychildren': ZfsConverter(int, readonly=True),
 *     'usedbyrefreservation': ZfsConverter(int, readonly=True),
 *     'logbias': ZfsConverter(str),             # <<<<<<<<<<<<<<
 *     'dedup': ZfsConverter(str),
 *     'mislabel': ZfsConverter(str),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)(&PyString_Type))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
    __Pyx_INCREF(((PyObject *)(&PyString_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
    PyTuple_SET_ITEM(__pyx_t_3, 0+1, ((PyObject *)(&PyString_Type)));
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_logbias, __pyx_t_4) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "converter.pxi":160
 *     'usedbyrefreservation': ZfsConverter(int, readonly=True),
 *     'logbias': ZfsConverter(str),
 *     'dedup': ZfsConverter(str),             # <<<<<<<<<<<<<<
 *     'mislabel': ZfsConverter(str),
 *     'sync': ZfsConverter(str),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)(&PyString_Type))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    __Pyx_INCREF(((PyObject *)(&PyString_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)(&PyString_Type)));
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dedup, __pyx_t_4) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "converter.pxi":161
 *     'logbias': ZfsConverter(str),
 *     'dedup': ZfsConverter(str),
 *     'mislabel': ZfsConverter(str),             # <<<<<<<<<<<<<<
 *     'sync': ZfsConverter(str),
 *     'refcompressratio': ZfsConverter(str, readonly=True),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)(&PyString_Type))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
    __Pyx_INCREF(((PyObject *)(&PyString_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
    PyTuple_SET_ITEM(__pyx_t_3, 0+1, ((PyObject *)(&PyString_Type)));
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_mislabel, __pyx_t_4) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "converter.pxi":162
 *     'dedup': ZfsConverter(str),
 *     'mislabel': ZfsConverter(str),
 *     'sync': ZfsConverter(str),             # <<<<<<<<<<<<<<
 *     'refcompressratio': ZfsConverter(str, readonly=True),
 *     'written': ZfsConverter(int, readonly=True),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)(&PyString_Type))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    __Pyx_INCREF(((PyObject *)(&PyString_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)(&PyString_Type)));
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_sync, __pyx_t_4) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "converter.pxi":163
 *     'mislabel': ZfsConverter(str),
 *     'sync': ZfsConverter(str),
 *     'refcompressratio': ZfsConverter(str, readonly=True),             # <<<<<<<<<<<<<<
 *     'written': ZfsConverter(int, readonly=True),
 *     'logicalused': ZfsConverter(int, readonly=True),
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)(&PyString_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&PyString_Type)));
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 163, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_refcompressratio, __pyx_t_3) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "converter.pxi":164
 *     'sync': ZfsConverter(str),
 *     'refcompressratio': ZfsConverter(str, readonly=True),
 *     'written': ZfsConverter(int, readonly=True),             # <<<<<<<<<<<<<<
 *     'logicalused': ZfsConverter(int, readonly=True),
 *     'logicalreferenced': ZfsConverter(int, readonly=True),
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 164, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_written, __pyx_t_4) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "converter.pxi":165
 *     'refcompressratio': ZfsConverter(str, readonly=True),
 *     'written': ZfsConverter(int, readonly=True),
 *     'logicalused': ZfsConverter(int, readonly=True),             # <<<<<<<<<<<<<<
 *     'logicalreferenced': ZfsConverter(int, readonly=True),
 *     'volmode': ZfsConverter(str),
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_logicalused, __pyx_t_3) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "converter.pxi":166
 *     'written': ZfsConverter(int, readonly=True),
 *     'logicalused': ZfsConverter(int, readonly=True),
 *     'logicalreferenced': ZfsConverter(int, readonly=True),             # <<<<<<<<<<<<<<
 *     'volmode': ZfsConverter(str),
 *     'volsize': ZfsConverter(int),
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 166, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_logicalreferenced, __pyx_t_4) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "converter.pxi":167
 *     'logicalused': ZfsConverter(int, readonly=True),
 *     'logicalreferenced': ZfsConverter(int, readonly=True),
 *     'volmode': ZfsConverter(str),             # <<<<<<<<<<<<<<
 *     'volsize': ZfsConverter(int),
 *     'volblocksize': ZfsConverter(int),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)(&PyString_Type))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
    __Pyx_INCREF(((PyObject *)(&PyString_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
    PyTuple_SET_ITEM(__pyx_t_3, 0+1, ((PyObject *)(&PyString_Type)));
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_volmode, __pyx_t_4) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "converter.pxi":168
 *     'logicalreferenced': ZfsConverter(int, readonly=True),
 *     'volmode': ZfsConverter(str),
 *     'volsize': ZfsConverter(int),             # <<<<<<<<<<<<<<
 *     'volblocksize': ZfsConverter(int),
 *     'filesystem_limit': ZfsConverter(int),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)(&PyInt_Type))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)(&PyInt_Type)));
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_volsize, __pyx_t_4) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "converter.pxi":169
 *     'volmode': ZfsConverter(str),
 *     'volsize': ZfsConverter(int),
 *     'volblocksize': ZfsConverter(int),             # <<<<<<<<<<<<<<
 *     'filesystem_limit': ZfsConverter(int),
 *     'snapshot_limit': ZfsConverter(int),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)(&PyInt_Type))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
    __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
    PyTuple_SET_ITEM(__pyx_t_3, 0+1, ((PyObject *)(&PyInt_Type)));
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_volblocksize, __pyx_t_4) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "converter.pxi":170
 *     'volsize': ZfsConverter(int),
 *     'volblocksize': ZfsConverter(int),
 *     'filesystem_limit': ZfsConverter(int),             # <<<<<<<<<<<<<<
 *     'snapshot_limit': ZfsConverter(int),
 *     'filesystem_count': ZfsConverter(int, readonly=True),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)(&PyInt_Type))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)(&PyInt_Type)));
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_filesystem_limit, __pyx_t_4) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "converter.pxi":171
 *     'volblocksize': ZfsConverter(int),
 *     'filesystem_limit': ZfsConverter(int),
 *     'snapshot_limit': ZfsConverter(int),             # <<<<<<<<<<<<<<
 *     'filesystem_count': ZfsConverter(int, readonly=True),
 *     'snapshot_count': ZfsConverter(int, readonly=True),
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)(&PyInt_Type))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
    __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
    PyTuple_SET_ITEM(__pyx_t_3, 0+1, ((PyObject *)(&PyInt_Type)));
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_snapshot_limit, __pyx_t_4) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "converter.pxi":172
 *     'filesystem_limit': ZfsConverter(int),
 *     'snapshot_limit': ZfsConverter(int),
 *     'filesystem_count': ZfsConverter(int, readonly=True),             # <<<<<<<<<<<<<<
 *     'snapshot_count': ZfsConverter(int, readonly=True),
 *     'redundant_metadata': ZfsConverter(str)
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 172, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_filesystem_count, __pyx_t_5) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "converter.pxi":173
 *     'snapshot_limit': ZfsConverter(int),
 *     'filesystem_count': ZfsConverter(int, readonly=True),
 *     'snapshot_count': ZfsConverter(int, readonly=True),             # <<<<<<<<<<<<<<
 *     'redundant_metadata': ZfsConverter(str)
 * }
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(&PyInt_Type)));
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_readonly, Py_True) < 0) __PYX_ERR(0, 173, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __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;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_snapshot_count, __pyx_t_4) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "converter.pxi":174
 *     'filesystem_count': ZfsConverter(int, readonly=True),
 *     'snapshot_count': ZfsConverter(int, readonly=True),
 *     'redundant_metadata': ZfsConverter(str)             # <<<<<<<<<<<<<<
 * }
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ZfsConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)(&PyString_Type))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    __Pyx_INCREF(((PyObject *)(&PyString_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)(&PyString_Type)));
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_redundant_metadata, __pyx_t_4) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ZFS_PROPERTY_CONVERTERS, __pyx_t_2) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "converter.pxi":178
 * 
 * 
 * def parse_zfs_prop(prop, value):             # <<<<<<<<<<<<<<
 *     try:
 *         return ZFS_PROPERTY_CONVERTERS[prop].to_native(value)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6libzfs_1parse_zfs_prop, NULL, __pyx_n_s_libzfs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_zfs_prop, __pyx_t_2) < 0) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "converter.pxi":185
 * 
 * 
 * def serialize_zfs_prop(prop, value):             # <<<<<<<<<<<<<<
 *     try:
 *         return ZFS_PROPERTY_CONVERTERS[prop].to_property(value)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6libzfs_3serialize_zfs_prop, NULL, __pyx_n_s_libzfs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_serialize_zfs_prop, __pyx_t_2) < 0) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "converter.pxi":192
 * 
 * 
 * def parse_zpool_prop(prop, value):             # <<<<<<<<<<<<<<
 *     try:
 *         return ZPOOL_PROPERTY_CONVERTERS[prop].to_native(value)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6libzfs_5parse_zpool_prop, NULL, __pyx_n_s_libzfs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_zpool_prop, __pyx_t_2) < 0) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "converter.pxi":199
 * 
 * 
 * def serialize_zpool_prop(prop, value):             # <<<<<<<<<<<<<<
 *     try:
 *         return ZPOOL_PROPERTY_CONVERTERS[prop].to_property(value)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6libzfs_7serialize_zpool_prop, NULL, __pyx_n_s_libzfs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_serialize_zpool_prop, __pyx_t_2) < 0) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":48
 * 
 * 
 * class DatasetType(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     FILESYSTEM = zfs.ZFS_TYPE_FILESYSTEM
 *     VOLUME = zfs.ZFS_TYPE_VOLUME
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_DatasetType, __pyx_n_s_DatasetType, (PyObject *) NULL, __pyx_n_s_libzfs, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "libzfs.pyx":49
 * 
 * class DatasetType(enum.IntEnum):
 *     FILESYSTEM = zfs.ZFS_TYPE_FILESYSTEM             # <<<<<<<<<<<<<<
 *     VOLUME = zfs.ZFS_TYPE_VOLUME
 *     SNAPSHOT = zfs.ZFS_TYPE_SNAPSHOT
 */
  __pyx_t_5 = __Pyx_PyInt_From_zfs_type_t(ZFS_TYPE_FILESYSTEM); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_FILESYSTEM, __pyx_t_5) < 0) __PYX_ERR(1, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":50
 * class DatasetType(enum.IntEnum):
 *     FILESYSTEM = zfs.ZFS_TYPE_FILESYSTEM
 *     VOLUME = zfs.ZFS_TYPE_VOLUME             # <<<<<<<<<<<<<<
 *     SNAPSHOT = zfs.ZFS_TYPE_SNAPSHOT
 *     BOOKMARK = zfs.ZFS_TYPE_BOOKMARK
 */
  __pyx_t_5 = __Pyx_PyInt_From_zfs_type_t(ZFS_TYPE_VOLUME); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_VOLUME, __pyx_t_5) < 0) __PYX_ERR(1, 50, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":51
 *     FILESYSTEM = zfs.ZFS_TYPE_FILESYSTEM
 *     VOLUME = zfs.ZFS_TYPE_VOLUME
 *     SNAPSHOT = zfs.ZFS_TYPE_SNAPSHOT             # <<<<<<<<<<<<<<
 *     BOOKMARK = zfs.ZFS_TYPE_BOOKMARK
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_zfs_type_t(ZFS_TYPE_SNAPSHOT); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_SNAPSHOT, __pyx_t_5) < 0) __PYX_ERR(1, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":52
 *     VOLUME = zfs.ZFS_TYPE_VOLUME
 *     SNAPSHOT = zfs.ZFS_TYPE_SNAPSHOT
 *     BOOKMARK = zfs.ZFS_TYPE_BOOKMARK             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_zfs_type_t(ZFS_TYPE_BOOKMARK); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_BOOKMARK, __pyx_t_5) < 0) __PYX_ERR(1, 52, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":48
 * 
 * 
 * class DatasetType(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     FILESYSTEM = zfs.ZFS_TYPE_FILESYSTEM
 *     VOLUME = zfs.ZFS_TYPE_VOLUME
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_DatasetType, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DatasetType, __pyx_t_5) < 0) __PYX_ERR(1, 48, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":55
 * 
 * 
 * class Error(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     SUCCESS = libzfs.EZFS_SUCCESS
 *     NOMEM = libzfs.EZFS_NOMEM
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_Error, __pyx_n_s_Error, (PyObject *) NULL, __pyx_n_s_libzfs, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "libzfs.pyx":56
 * 
 * class Error(enum.IntEnum):
 *     SUCCESS = libzfs.EZFS_SUCCESS             # <<<<<<<<<<<<<<
 *     NOMEM = libzfs.EZFS_NOMEM
 *     BADPROP = libzfs.EZFS_BADPROP
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_SUCCESS); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_SUCCESS, __pyx_t_5) < 0) __PYX_ERR(1, 56, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":57
 * class Error(enum.IntEnum):
 *     SUCCESS = libzfs.EZFS_SUCCESS
 *     NOMEM = libzfs.EZFS_NOMEM             # <<<<<<<<<<<<<<
 *     BADPROP = libzfs.EZFS_BADPROP
 *     PROPREADONLY = libzfs.EZFS_PROPREADONLY
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_NOMEM); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_NOMEM, __pyx_t_5) < 0) __PYX_ERR(1, 57, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":58
 *     SUCCESS = libzfs.EZFS_SUCCESS
 *     NOMEM = libzfs.EZFS_NOMEM
 *     BADPROP = libzfs.EZFS_BADPROP             # <<<<<<<<<<<<<<
 *     PROPREADONLY = libzfs.EZFS_PROPREADONLY
 *     PROPTYPE = libzfs.EZFS_PROPTYPE
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_BADPROP); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_BADPROP, __pyx_t_5) < 0) __PYX_ERR(1, 58, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":59
 *     NOMEM = libzfs.EZFS_NOMEM
 *     BADPROP = libzfs.EZFS_BADPROP
 *     PROPREADONLY = libzfs.EZFS_PROPREADONLY             # <<<<<<<<<<<<<<
 *     PROPTYPE = libzfs.EZFS_PROPTYPE
 *     PROPNONINHERIT = libzfs.EZFS_PROPNONINHERIT
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_PROPREADONLY); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_PROPREADONLY, __pyx_t_5) < 0) __PYX_ERR(1, 59, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":60
 *     BADPROP = libzfs.EZFS_BADPROP
 *     PROPREADONLY = libzfs.EZFS_PROPREADONLY
 *     PROPTYPE = libzfs.EZFS_PROPTYPE             # <<<<<<<<<<<<<<
 *     PROPNONINHERIT = libzfs.EZFS_PROPNONINHERIT
 *     PROPSPACE = libzfs.EZFS_PROPSPACE
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_PROPTYPE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_PROPTYPE, __pyx_t_5) < 0) __PYX_ERR(1, 60, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":61
 *     PROPREADONLY = libzfs.EZFS_PROPREADONLY
 *     PROPTYPE = libzfs.EZFS_PROPTYPE
 *     PROPNONINHERIT = libzfs.EZFS_PROPNONINHERIT             # <<<<<<<<<<<<<<
 *     PROPSPACE = libzfs.EZFS_PROPSPACE
 *     BADTYPE = libzfs.EZFS_BADTYPE
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_PROPNONINHERIT); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_PROPNONINHERIT, __pyx_t_5) < 0) __PYX_ERR(1, 61, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":62
 *     PROPTYPE = libzfs.EZFS_PROPTYPE
 *     PROPNONINHERIT = libzfs.EZFS_PROPNONINHERIT
 *     PROPSPACE = libzfs.EZFS_PROPSPACE             # <<<<<<<<<<<<<<
 *     BADTYPE = libzfs.EZFS_BADTYPE
 *     BUSY = libzfs.EZFS_BUSY
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_PROPSPACE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_PROPSPACE, __pyx_t_5) < 0) __PYX_ERR(1, 62, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":63
 *     PROPNONINHERIT = libzfs.EZFS_PROPNONINHERIT
 *     PROPSPACE = libzfs.EZFS_PROPSPACE
 *     BADTYPE = libzfs.EZFS_BADTYPE             # <<<<<<<<<<<<<<
 *     BUSY = libzfs.EZFS_BUSY
 *     EXISTS = libzfs.EZFS_EXISTS
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_BADTYPE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_BADTYPE, __pyx_t_5) < 0) __PYX_ERR(1, 63, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":64
 *     PROPSPACE = libzfs.EZFS_PROPSPACE
 *     BADTYPE = libzfs.EZFS_BADTYPE
 *     BUSY = libzfs.EZFS_BUSY             # <<<<<<<<<<<<<<
 *     EXISTS = libzfs.EZFS_EXISTS
 *     NOENT = libzfs.EZFS_NOENT
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_BUSY); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_BUSY, __pyx_t_5) < 0) __PYX_ERR(1, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":65
 *     BADTYPE = libzfs.EZFS_BADTYPE
 *     BUSY = libzfs.EZFS_BUSY
 *     EXISTS = libzfs.EZFS_EXISTS             # <<<<<<<<<<<<<<
 *     NOENT = libzfs.EZFS_NOENT
 *     BADSTREAM = libzfs.EZFS_BADSTREAM
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_EXISTS); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_EXISTS, __pyx_t_5) < 0) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":66
 *     BUSY = libzfs.EZFS_BUSY
 *     EXISTS = libzfs.EZFS_EXISTS
 *     NOENT = libzfs.EZFS_NOENT             # <<<<<<<<<<<<<<
 *     BADSTREAM = libzfs.EZFS_BADSTREAM
 *     DSREADONLY = libzfs.EZFS_DSREADONLY
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_NOENT); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_NOENT, __pyx_t_5) < 0) __PYX_ERR(1, 66, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":67
 *     EXISTS = libzfs.EZFS_EXISTS
 *     NOENT = libzfs.EZFS_NOENT
 *     BADSTREAM = libzfs.EZFS_BADSTREAM             # <<<<<<<<<<<<<<
 *     DSREADONLY = libzfs.EZFS_DSREADONLY
 *     VOLTOOBIG = libzfs.EZFS_VOLTOOBIG
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_BADSTREAM); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_BADSTREAM, __pyx_t_5) < 0) __PYX_ERR(1, 67, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":68
 *     NOENT = libzfs.EZFS_NOENT
 *     BADSTREAM = libzfs.EZFS_BADSTREAM
 *     DSREADONLY = libzfs.EZFS_DSREADONLY             # <<<<<<<<<<<<<<
 *     VOLTOOBIG = libzfs.EZFS_VOLTOOBIG
 *     INVALIDNAME = libzfs.EZFS_INVALIDNAME
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_DSREADONLY); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_DSREADONLY, __pyx_t_5) < 0) __PYX_ERR(1, 68, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":69
 *     BADSTREAM = libzfs.EZFS_BADSTREAM
 *     DSREADONLY = libzfs.EZFS_DSREADONLY
 *     VOLTOOBIG = libzfs.EZFS_VOLTOOBIG             # <<<<<<<<<<<<<<
 *     INVALIDNAME = libzfs.EZFS_INVALIDNAME
 *     BADRESTORE = libzfs.EZFS_BADRESTORE
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_VOLTOOBIG); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_VOLTOOBIG, __pyx_t_5) < 0) __PYX_ERR(1, 69, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":70
 *     DSREADONLY = libzfs.EZFS_DSREADONLY
 *     VOLTOOBIG = libzfs.EZFS_VOLTOOBIG
 *     INVALIDNAME = libzfs.EZFS_INVALIDNAME             # <<<<<<<<<<<<<<
 *     BADRESTORE = libzfs.EZFS_BADRESTORE
 *     BADBACKUP = libzfs.EZFS_BADBACKUP
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_INVALIDNAME); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_INVALIDNAME, __pyx_t_5) < 0) __PYX_ERR(1, 70, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":71
 *     VOLTOOBIG = libzfs.EZFS_VOLTOOBIG
 *     INVALIDNAME = libzfs.EZFS_INVALIDNAME
 *     BADRESTORE = libzfs.EZFS_BADRESTORE             # <<<<<<<<<<<<<<
 *     BADBACKUP = libzfs.EZFS_BADBACKUP
 *     BADTARGET = libzfs.EZFS_BADTARGET
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_BADRESTORE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_BADRESTORE, __pyx_t_5) < 0) __PYX_ERR(1, 71, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":72
 *     INVALIDNAME = libzfs.EZFS_INVALIDNAME
 *     BADRESTORE = libzfs.EZFS_BADRESTORE
 *     BADBACKUP = libzfs.EZFS_BADBACKUP             # <<<<<<<<<<<<<<
 *     BADTARGET = libzfs.EZFS_BADTARGET
 *     NODEVICE = libzfs.EZFS_NODEVICE
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_BADBACKUP); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_BADBACKUP, __pyx_t_5) < 0) __PYX_ERR(1, 72, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":73
 *     BADRESTORE = libzfs.EZFS_BADRESTORE
 *     BADBACKUP = libzfs.EZFS_BADBACKUP
 *     BADTARGET = libzfs.EZFS_BADTARGET             # <<<<<<<<<<<<<<
 *     NODEVICE = libzfs.EZFS_NODEVICE
 *     BADDEV = libzfs.EZFS_BADDEV
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_BADTARGET); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_BADTARGET, __pyx_t_5) < 0) __PYX_ERR(1, 73, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":74
 *     BADBACKUP = libzfs.EZFS_BADBACKUP
 *     BADTARGET = libzfs.EZFS_BADTARGET
 *     NODEVICE = libzfs.EZFS_NODEVICE             # <<<<<<<<<<<<<<
 *     BADDEV = libzfs.EZFS_BADDEV
 *     NOREPLICAS = libzfs.EZFS_NOREPLICAS
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_NODEVICE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_NODEVICE, __pyx_t_5) < 0) __PYX_ERR(1, 74, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":75
 *     BADTARGET = libzfs.EZFS_BADTARGET
 *     NODEVICE = libzfs.EZFS_NODEVICE
 *     BADDEV = libzfs.EZFS_BADDEV             # <<<<<<<<<<<<<<
 *     NOREPLICAS = libzfs.EZFS_NOREPLICAS
 *     RESILVERING = libzfs.EZFS_RESILVERING
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_BADDEV); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_BADDEV, __pyx_t_5) < 0) __PYX_ERR(1, 75, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":76
 *     NODEVICE = libzfs.EZFS_NODEVICE
 *     BADDEV = libzfs.EZFS_BADDEV
 *     NOREPLICAS = libzfs.EZFS_NOREPLICAS             # <<<<<<<<<<<<<<
 *     RESILVERING = libzfs.EZFS_RESILVERING
 *     BADVERSION = libzfs.EZFS_BADVERSION
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_NOREPLICAS); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_NOREPLICAS, __pyx_t_5) < 0) __PYX_ERR(1, 76, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":77
 *     BADDEV = libzfs.EZFS_BADDEV
 *     NOREPLICAS = libzfs.EZFS_NOREPLICAS
 *     RESILVERING = libzfs.EZFS_RESILVERING             # <<<<<<<<<<<<<<
 *     BADVERSION = libzfs.EZFS_BADVERSION
 *     POOLUNAVAIL = libzfs.EZFS_POOLUNAVAIL
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_RESILVERING); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_RESILVERING, __pyx_t_5) < 0) __PYX_ERR(1, 77, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":78
 *     NOREPLICAS = libzfs.EZFS_NOREPLICAS
 *     RESILVERING = libzfs.EZFS_RESILVERING
 *     BADVERSION = libzfs.EZFS_BADVERSION             # <<<<<<<<<<<<<<
 *     POOLUNAVAIL = libzfs.EZFS_POOLUNAVAIL
 *     DEVOVERFLOW = libzfs.EZFS_DEVOVERFLOW
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_BADVERSION); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_BADVERSION, __pyx_t_5) < 0) __PYX_ERR(1, 78, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":79
 *     RESILVERING = libzfs.EZFS_RESILVERING
 *     BADVERSION = libzfs.EZFS_BADVERSION
 *     POOLUNAVAIL = libzfs.EZFS_POOLUNAVAIL             # <<<<<<<<<<<<<<
 *     DEVOVERFLOW = libzfs.EZFS_DEVOVERFLOW
 *     BADPATH = libzfs.EZFS_BADPATH
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_POOLUNAVAIL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_POOLUNAVAIL, __pyx_t_5) < 0) __PYX_ERR(1, 79, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":80
 *     BADVERSION = libzfs.EZFS_BADVERSION
 *     POOLUNAVAIL = libzfs.EZFS_POOLUNAVAIL
 *     DEVOVERFLOW = libzfs.EZFS_DEVOVERFLOW             # <<<<<<<<<<<<<<
 *     BADPATH = libzfs.EZFS_BADPATH
 *     CROSSTARGET = libzfs.EZFS_CROSSTARGET
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_DEVOVERFLOW); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_DEVOVERFLOW, __pyx_t_5) < 0) __PYX_ERR(1, 80, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":81
 *     POOLUNAVAIL = libzfs.EZFS_POOLUNAVAIL
 *     DEVOVERFLOW = libzfs.EZFS_DEVOVERFLOW
 *     BADPATH = libzfs.EZFS_BADPATH             # <<<<<<<<<<<<<<
 *     CROSSTARGET = libzfs.EZFS_CROSSTARGET
 *     ZONED = libzfs.EZFS_ZONED
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_BADPATH); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_BADPATH, __pyx_t_5) < 0) __PYX_ERR(1, 81, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":82
 *     DEVOVERFLOW = libzfs.EZFS_DEVOVERFLOW
 *     BADPATH = libzfs.EZFS_BADPATH
 *     CROSSTARGET = libzfs.EZFS_CROSSTARGET             # <<<<<<<<<<<<<<
 *     ZONED = libzfs.EZFS_ZONED
 *     MOUNTFAILED = libzfs.EZFS_MOUNTFAILED
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_CROSSTARGET); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_CROSSTARGET, __pyx_t_5) < 0) __PYX_ERR(1, 82, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":83
 *     BADPATH = libzfs.EZFS_BADPATH
 *     CROSSTARGET = libzfs.EZFS_CROSSTARGET
 *     ZONED = libzfs.EZFS_ZONED             # <<<<<<<<<<<<<<
 *     MOUNTFAILED = libzfs.EZFS_MOUNTFAILED
 *     UMOUNTFAILED = libzfs.EZFS_UMOUNTFAILED
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_ZONED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_ZONED, __pyx_t_5) < 0) __PYX_ERR(1, 83, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":84
 *     CROSSTARGET = libzfs.EZFS_CROSSTARGET
 *     ZONED = libzfs.EZFS_ZONED
 *     MOUNTFAILED = libzfs.EZFS_MOUNTFAILED             # <<<<<<<<<<<<<<
 *     UMOUNTFAILED = libzfs.EZFS_UMOUNTFAILED
 *     UNSHARENFSFAILED = libzfs.EZFS_UNSHARENFSFAILED
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_MOUNTFAILED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_MOUNTFAILED, __pyx_t_5) < 0) __PYX_ERR(1, 84, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":85
 *     ZONED = libzfs.EZFS_ZONED
 *     MOUNTFAILED = libzfs.EZFS_MOUNTFAILED
 *     UMOUNTFAILED = libzfs.EZFS_UMOUNTFAILED             # <<<<<<<<<<<<<<
 *     UNSHARENFSFAILED = libzfs.EZFS_UNSHARENFSFAILED
 *     SHARENFSFAILED = libzfs.EZFS_SHARENFSFAILED
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_UMOUNTFAILED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_UMOUNTFAILED, __pyx_t_5) < 0) __PYX_ERR(1, 85, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":86
 *     MOUNTFAILED = libzfs.EZFS_MOUNTFAILED
 *     UMOUNTFAILED = libzfs.EZFS_UMOUNTFAILED
 *     UNSHARENFSFAILED = libzfs.EZFS_UNSHARENFSFAILED             # <<<<<<<<<<<<<<
 *     SHARENFSFAILED = libzfs.EZFS_SHARENFSFAILED
 *     PERM = libzfs.EZFS_PERM
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_UNSHARENFSFAILED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_UNSHARENFSFAILED, __pyx_t_5) < 0) __PYX_ERR(1, 86, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":87
 *     UMOUNTFAILED = libzfs.EZFS_UMOUNTFAILED
 *     UNSHARENFSFAILED = libzfs.EZFS_UNSHARENFSFAILED
 *     SHARENFSFAILED = libzfs.EZFS_SHARENFSFAILED             # <<<<<<<<<<<<<<
 *     PERM = libzfs.EZFS_PERM
 *     NOSPC = libzfs.EZFS_NOSPC
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_SHARENFSFAILED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_SHARENFSFAILED, __pyx_t_5) < 0) __PYX_ERR(1, 87, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":88
 *     UNSHARENFSFAILED = libzfs.EZFS_UNSHARENFSFAILED
 *     SHARENFSFAILED = libzfs.EZFS_SHARENFSFAILED
 *     PERM = libzfs.EZFS_PERM             # <<<<<<<<<<<<<<
 *     NOSPC = libzfs.EZFS_NOSPC
 *     FAULT = libzfs.EZFS_FAULT
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_PERM); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_PERM, __pyx_t_5) < 0) __PYX_ERR(1, 88, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":89
 *     SHARENFSFAILED = libzfs.EZFS_SHARENFSFAILED
 *     PERM = libzfs.EZFS_PERM
 *     NOSPC = libzfs.EZFS_NOSPC             # <<<<<<<<<<<<<<
 *     FAULT = libzfs.EZFS_FAULT
 *     IO = libzfs.EZFS_IO
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_NOSPC); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_NOSPC, __pyx_t_5) < 0) __PYX_ERR(1, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":90
 *     PERM = libzfs.EZFS_PERM
 *     NOSPC = libzfs.EZFS_NOSPC
 *     FAULT = libzfs.EZFS_FAULT             # <<<<<<<<<<<<<<
 *     IO = libzfs.EZFS_IO
 *     INTR = libzfs.EZFS_INTR
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_FAULT); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_FAULT, __pyx_t_5) < 0) __PYX_ERR(1, 90, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":91
 *     NOSPC = libzfs.EZFS_NOSPC
 *     FAULT = libzfs.EZFS_FAULT
 *     IO = libzfs.EZFS_IO             # <<<<<<<<<<<<<<
 *     INTR = libzfs.EZFS_INTR
 *     ISSPARE = libzfs.EZFS_ISSPARE
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_IO); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_IO, __pyx_t_5) < 0) __PYX_ERR(1, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":92
 *     FAULT = libzfs.EZFS_FAULT
 *     IO = libzfs.EZFS_IO
 *     INTR = libzfs.EZFS_INTR             # <<<<<<<<<<<<<<
 *     ISSPARE = libzfs.EZFS_ISSPARE
 *     INVALCONFIG = libzfs.EZFS_INVALCONFIG
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_INTR); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_INTR, __pyx_t_5) < 0) __PYX_ERR(1, 92, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":93
 *     IO = libzfs.EZFS_IO
 *     INTR = libzfs.EZFS_INTR
 *     ISSPARE = libzfs.EZFS_ISSPARE             # <<<<<<<<<<<<<<
 *     INVALCONFIG = libzfs.EZFS_INVALCONFIG
 *     RECURSIVE = libzfs.EZFS_RECURSIVE
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_ISSPARE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_ISSPARE, __pyx_t_5) < 0) __PYX_ERR(1, 93, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":94
 *     INTR = libzfs.EZFS_INTR
 *     ISSPARE = libzfs.EZFS_ISSPARE
 *     INVALCONFIG = libzfs.EZFS_INVALCONFIG             # <<<<<<<<<<<<<<
 *     RECURSIVE = libzfs.EZFS_RECURSIVE
 *     NOHISTORY = libzfs.EZFS_NOHISTORY
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_INVALCONFIG); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_INVALCONFIG, __pyx_t_5) < 0) __PYX_ERR(1, 94, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":95
 *     ISSPARE = libzfs.EZFS_ISSPARE
 *     INVALCONFIG = libzfs.EZFS_INVALCONFIG
 *     RECURSIVE = libzfs.EZFS_RECURSIVE             # <<<<<<<<<<<<<<
 *     NOHISTORY = libzfs.EZFS_NOHISTORY
 *     POOLPROPS = libzfs.EZFS_POOLPROPS
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_RECURSIVE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_RECURSIVE, __pyx_t_5) < 0) __PYX_ERR(1, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":96
 *     INVALCONFIG = libzfs.EZFS_INVALCONFIG
 *     RECURSIVE = libzfs.EZFS_RECURSIVE
 *     NOHISTORY = libzfs.EZFS_NOHISTORY             # <<<<<<<<<<<<<<
 *     POOLPROPS = libzfs.EZFS_POOLPROPS
 *     POOL_NOTSUP = libzfs.EZFS_POOL_NOTSUP
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_NOHISTORY); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_NOHISTORY, __pyx_t_5) < 0) __PYX_ERR(1, 96, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":97
 *     RECURSIVE = libzfs.EZFS_RECURSIVE
 *     NOHISTORY = libzfs.EZFS_NOHISTORY
 *     POOLPROPS = libzfs.EZFS_POOLPROPS             # <<<<<<<<<<<<<<
 *     POOL_NOTSUP = libzfs.EZFS_POOL_NOTSUP
 *     INVALARG = libzfs.EZFS_POOL_INVALARG
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_POOLPROPS); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_POOLPROPS, __pyx_t_5) < 0) __PYX_ERR(1, 97, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":98
 *     NOHISTORY = libzfs.EZFS_NOHISTORY
 *     POOLPROPS = libzfs.EZFS_POOLPROPS
 *     POOL_NOTSUP = libzfs.EZFS_POOL_NOTSUP             # <<<<<<<<<<<<<<
 *     INVALARG = libzfs.EZFS_POOL_INVALARG
 *     NAMETOOLONG = libzfs.EZFS_NAMETOOLONG
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_POOL_NOTSUP); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_POOL_NOTSUP, __pyx_t_5) < 0) __PYX_ERR(1, 98, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":99
 *     POOLPROPS = libzfs.EZFS_POOLPROPS
 *     POOL_NOTSUP = libzfs.EZFS_POOL_NOTSUP
 *     INVALARG = libzfs.EZFS_POOL_INVALARG             # <<<<<<<<<<<<<<
 *     NAMETOOLONG = libzfs.EZFS_NAMETOOLONG
 *     OPENFAILED = libzfs.EZFS_OPENFAILED
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_POOL_INVALARG); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_INVALARG, __pyx_t_5) < 0) __PYX_ERR(1, 99, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":100
 *     POOL_NOTSUP = libzfs.EZFS_POOL_NOTSUP
 *     INVALARG = libzfs.EZFS_POOL_INVALARG
 *     NAMETOOLONG = libzfs.EZFS_NAMETOOLONG             # <<<<<<<<<<<<<<
 *     OPENFAILED = libzfs.EZFS_OPENFAILED
 *     NOCAP = libzfs.EZFS_NOCAP
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_NAMETOOLONG); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_NAMETOOLONG, __pyx_t_5) < 0) __PYX_ERR(1, 100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":101
 *     INVALARG = libzfs.EZFS_POOL_INVALARG
 *     NAMETOOLONG = libzfs.EZFS_NAMETOOLONG
 *     OPENFAILED = libzfs.EZFS_OPENFAILED             # <<<<<<<<<<<<<<
 *     NOCAP = libzfs.EZFS_NOCAP
 *     LABELFAILED = libzfs.EZFS_LABELFAILED
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_OPENFAILED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_OPENFAILED, __pyx_t_5) < 0) __PYX_ERR(1, 101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":102
 *     NAMETOOLONG = libzfs.EZFS_NAMETOOLONG
 *     OPENFAILED = libzfs.EZFS_OPENFAILED
 *     NOCAP = libzfs.EZFS_NOCAP             # <<<<<<<<<<<<<<
 *     LABELFAILED = libzfs.EZFS_LABELFAILED
 *     BADWHO = libzfs.EZFS_BADWHO
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_NOCAP); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_NOCAP, __pyx_t_5) < 0) __PYX_ERR(1, 102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":103
 *     OPENFAILED = libzfs.EZFS_OPENFAILED
 *     NOCAP = libzfs.EZFS_NOCAP
 *     LABELFAILED = libzfs.EZFS_LABELFAILED             # <<<<<<<<<<<<<<
 *     BADWHO = libzfs.EZFS_BADWHO
 *     BADPERM = libzfs.EZFS_BADPERM
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_LABELFAILED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_LABELFAILED, __pyx_t_5) < 0) __PYX_ERR(1, 103, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":104
 *     NOCAP = libzfs.EZFS_NOCAP
 *     LABELFAILED = libzfs.EZFS_LABELFAILED
 *     BADWHO = libzfs.EZFS_BADWHO             # <<<<<<<<<<<<<<
 *     BADPERM = libzfs.EZFS_BADPERM
 *     BADPERMSET = libzfs.EZFS_BADPERMSET
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_BADWHO); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_BADWHO, __pyx_t_5) < 0) __PYX_ERR(1, 104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":105
 *     LABELFAILED = libzfs.EZFS_LABELFAILED
 *     BADWHO = libzfs.EZFS_BADWHO
 *     BADPERM = libzfs.EZFS_BADPERM             # <<<<<<<<<<<<<<
 *     BADPERMSET = libzfs.EZFS_BADPERMSET
 *     NODELEGATION = libzfs.EZFS_NODELEGATION
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_BADPERM); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_BADPERM, __pyx_t_5) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":106
 *     BADWHO = libzfs.EZFS_BADWHO
 *     BADPERM = libzfs.EZFS_BADPERM
 *     BADPERMSET = libzfs.EZFS_BADPERMSET             # <<<<<<<<<<<<<<
 *     NODELEGATION = libzfs.EZFS_NODELEGATION
 *     UNSHARESMBFAILED = libzfs.EZFS_UNSHARESMBFAILED
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_BADPERMSET); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_BADPERMSET, __pyx_t_5) < 0) __PYX_ERR(1, 106, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":107
 *     BADPERM = libzfs.EZFS_BADPERM
 *     BADPERMSET = libzfs.EZFS_BADPERMSET
 *     NODELEGATION = libzfs.EZFS_NODELEGATION             # <<<<<<<<<<<<<<
 *     UNSHARESMBFAILED = libzfs.EZFS_UNSHARESMBFAILED
 *     SHARESMBFAILED = libzfs.EZFS_SHARESMBFAILED
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_NODELEGATION); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_NODELEGATION, __pyx_t_5) < 0) __PYX_ERR(1, 107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":108
 *     BADPERMSET = libzfs.EZFS_BADPERMSET
 *     NODELEGATION = libzfs.EZFS_NODELEGATION
 *     UNSHARESMBFAILED = libzfs.EZFS_UNSHARESMBFAILED             # <<<<<<<<<<<<<<
 *     SHARESMBFAILED = libzfs.EZFS_SHARESMBFAILED
 *     BADCACHE = libzfs.EZFS_BADCACHE
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_UNSHARESMBFAILED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_UNSHARESMBFAILED, __pyx_t_5) < 0) __PYX_ERR(1, 108, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":109
 *     NODELEGATION = libzfs.EZFS_NODELEGATION
 *     UNSHARESMBFAILED = libzfs.EZFS_UNSHARESMBFAILED
 *     SHARESMBFAILED = libzfs.EZFS_SHARESMBFAILED             # <<<<<<<<<<<<<<
 *     BADCACHE = libzfs.EZFS_BADCACHE
 *     ISL2CACHE = libzfs.EZFS_ISL2CACHE
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_SHARESMBFAILED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_SHARESMBFAILED, __pyx_t_5) < 0) __PYX_ERR(1, 109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":110
 *     UNSHARESMBFAILED = libzfs.EZFS_UNSHARESMBFAILED
 *     SHARESMBFAILED = libzfs.EZFS_SHARESMBFAILED
 *     BADCACHE = libzfs.EZFS_BADCACHE             # <<<<<<<<<<<<<<
 *     ISL2CACHE = libzfs.EZFS_ISL2CACHE
 *     VDEVNOTSUP = libzfs.EZFS_VDEVNOTSUP
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_BADCACHE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_BADCACHE, __pyx_t_5) < 0) __PYX_ERR(1, 110, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":111
 *     SHARESMBFAILED = libzfs.EZFS_SHARESMBFAILED
 *     BADCACHE = libzfs.EZFS_BADCACHE
 *     ISL2CACHE = libzfs.EZFS_ISL2CACHE             # <<<<<<<<<<<<<<
 *     VDEVNOTSUP = libzfs.EZFS_VDEVNOTSUP
 *     NOTSUP = libzfs.EZFS_NOTSUP
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_ISL2CACHE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_ISL2CACHE, __pyx_t_5) < 0) __PYX_ERR(1, 111, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":112
 *     BADCACHE = libzfs.EZFS_BADCACHE
 *     ISL2CACHE = libzfs.EZFS_ISL2CACHE
 *     VDEVNOTSUP = libzfs.EZFS_VDEVNOTSUP             # <<<<<<<<<<<<<<
 *     NOTSUP = libzfs.EZFS_NOTSUP
 *     SPARE = libzfs.EZFS_ACTIVE_SPARE
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_VDEVNOTSUP); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_VDEVNOTSUP, __pyx_t_5) < 0) __PYX_ERR(1, 112, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":113
 *     ISL2CACHE = libzfs.EZFS_ISL2CACHE
 *     VDEVNOTSUP = libzfs.EZFS_VDEVNOTSUP
 *     NOTSUP = libzfs.EZFS_NOTSUP             # <<<<<<<<<<<<<<
 *     SPARE = libzfs.EZFS_ACTIVE_SPARE
 *     LOGS = libzfs.EZFS_UNPLAYED_LOGS
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_NOTSUP); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_NOTSUP, __pyx_t_5) < 0) __PYX_ERR(1, 113, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":114
 *     VDEVNOTSUP = libzfs.EZFS_VDEVNOTSUP
 *     NOTSUP = libzfs.EZFS_NOTSUP
 *     SPARE = libzfs.EZFS_ACTIVE_SPARE             # <<<<<<<<<<<<<<
 *     LOGS = libzfs.EZFS_UNPLAYED_LOGS
 *     RELE = libzfs.EZFS_REFTAG_RELE
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_ACTIVE_SPARE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_SPARE, __pyx_t_5) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":115
 *     NOTSUP = libzfs.EZFS_NOTSUP
 *     SPARE = libzfs.EZFS_ACTIVE_SPARE
 *     LOGS = libzfs.EZFS_UNPLAYED_LOGS             # <<<<<<<<<<<<<<
 *     RELE = libzfs.EZFS_REFTAG_RELE
 *     HOLD = libzfs.EZFS_REFTAG_HOLD
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_UNPLAYED_LOGS); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_LOGS, __pyx_t_5) < 0) __PYX_ERR(1, 115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":116
 *     SPARE = libzfs.EZFS_ACTIVE_SPARE
 *     LOGS = libzfs.EZFS_UNPLAYED_LOGS
 *     RELE = libzfs.EZFS_REFTAG_RELE             # <<<<<<<<<<<<<<
 *     HOLD = libzfs.EZFS_REFTAG_HOLD
 *     TAGTOOLONG = libzfs.EZFS_TAGTOOLONG
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_REFTAG_RELE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_RELE, __pyx_t_5) < 0) __PYX_ERR(1, 116, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":117
 *     LOGS = libzfs.EZFS_UNPLAYED_LOGS
 *     RELE = libzfs.EZFS_REFTAG_RELE
 *     HOLD = libzfs.EZFS_REFTAG_HOLD             # <<<<<<<<<<<<<<
 *     TAGTOOLONG = libzfs.EZFS_TAGTOOLONG
 *     PIPEFAILED = libzfs.EZFS_PIPEFAILED
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_REFTAG_HOLD); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_HOLD, __pyx_t_5) < 0) __PYX_ERR(1, 117, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":118
 *     RELE = libzfs.EZFS_REFTAG_RELE
 *     HOLD = libzfs.EZFS_REFTAG_HOLD
 *     TAGTOOLONG = libzfs.EZFS_TAGTOOLONG             # <<<<<<<<<<<<<<
 *     PIPEFAILED = libzfs.EZFS_PIPEFAILED
 *     THREADCREATEFAILED = libzfs.EZFS_THREADCREATEFAILED
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_TAGTOOLONG); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_TAGTOOLONG, __pyx_t_5) < 0) __PYX_ERR(1, 118, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":119
 *     HOLD = libzfs.EZFS_REFTAG_HOLD
 *     TAGTOOLONG = libzfs.EZFS_TAGTOOLONG
 *     PIPEFAILED = libzfs.EZFS_PIPEFAILED             # <<<<<<<<<<<<<<
 *     THREADCREATEFAILED = libzfs.EZFS_THREADCREATEFAILED
 *     ONLINE = libzfs.EZFS_POSTSPLIT_ONLINE
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_PIPEFAILED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_PIPEFAILED, __pyx_t_5) < 0) __PYX_ERR(1, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":120
 *     TAGTOOLONG = libzfs.EZFS_TAGTOOLONG
 *     PIPEFAILED = libzfs.EZFS_PIPEFAILED
 *     THREADCREATEFAILED = libzfs.EZFS_THREADCREATEFAILED             # <<<<<<<<<<<<<<
 *     ONLINE = libzfs.EZFS_POSTSPLIT_ONLINE
 *     SCRUBBING = libzfs.EZFS_SCRUBBING
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_THREADCREATEFAILED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_THREADCREATEFAILED, __pyx_t_5) < 0) __PYX_ERR(1, 120, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":121
 *     PIPEFAILED = libzfs.EZFS_PIPEFAILED
 *     THREADCREATEFAILED = libzfs.EZFS_THREADCREATEFAILED
 *     ONLINE = libzfs.EZFS_POSTSPLIT_ONLINE             # <<<<<<<<<<<<<<
 *     SCRUBBING = libzfs.EZFS_SCRUBBING
 *     SCRUB = libzfs.EZFS_NO_SCRUB
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_POSTSPLIT_ONLINE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_ONLINE, __pyx_t_5) < 0) __PYX_ERR(1, 121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":122
 *     THREADCREATEFAILED = libzfs.EZFS_THREADCREATEFAILED
 *     ONLINE = libzfs.EZFS_POSTSPLIT_ONLINE
 *     SCRUBBING = libzfs.EZFS_SCRUBBING             # <<<<<<<<<<<<<<
 *     SCRUB = libzfs.EZFS_NO_SCRUB
 *     DIFF = libzfs.EZFS_DIFF
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_SCRUBBING); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_SCRUBBING, __pyx_t_5) < 0) __PYX_ERR(1, 122, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":123
 *     ONLINE = libzfs.EZFS_POSTSPLIT_ONLINE
 *     SCRUBBING = libzfs.EZFS_SCRUBBING
 *     SCRUB = libzfs.EZFS_NO_SCRUB             # <<<<<<<<<<<<<<
 *     DIFF = libzfs.EZFS_DIFF
 *     DIFFDATA = libzfs.EZFS_DIFFDATA
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_NO_SCRUB); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_SCRUB, __pyx_t_5) < 0) __PYX_ERR(1, 123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":124
 *     SCRUBBING = libzfs.EZFS_SCRUBBING
 *     SCRUB = libzfs.EZFS_NO_SCRUB
 *     DIFF = libzfs.EZFS_DIFF             # <<<<<<<<<<<<<<
 *     DIFFDATA = libzfs.EZFS_DIFFDATA
 *     POOLREADONLY = libzfs.EZFS_POOLREADONLY
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_DIFF); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_DIFF, __pyx_t_5) < 0) __PYX_ERR(1, 124, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":125
 *     SCRUB = libzfs.EZFS_NO_SCRUB
 *     DIFF = libzfs.EZFS_DIFF
 *     DIFFDATA = libzfs.EZFS_DIFFDATA             # <<<<<<<<<<<<<<
 *     POOLREADONLY = libzfs.EZFS_POOLREADONLY
 *     UNKNOWN = libzfs.EZFS_UNKNOWN
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_DIFFDATA); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_DIFFDATA, __pyx_t_5) < 0) __PYX_ERR(1, 125, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":126
 *     DIFF = libzfs.EZFS_DIFF
 *     DIFFDATA = libzfs.EZFS_DIFFDATA
 *     POOLREADONLY = libzfs.EZFS_POOLREADONLY             # <<<<<<<<<<<<<<
 *     UNKNOWN = libzfs.EZFS_UNKNOWN
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_POOLREADONLY); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_POOLREADONLY, __pyx_t_5) < 0) __PYX_ERR(1, 126, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":127
 *     DIFFDATA = libzfs.EZFS_DIFFDATA
 *     POOLREADONLY = libzfs.EZFS_POOLREADONLY
 *     UNKNOWN = libzfs.EZFS_UNKNOWN             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(EZFS_UNKNOWN); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_UNKNOWN, __pyx_t_5) < 0) __PYX_ERR(1, 127, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":55
 * 
 * 
 * class Error(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     SUCCESS = libzfs.EZFS_SUCCESS
 *     NOMEM = libzfs.EZFS_NOMEM
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_Error, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Error, __pyx_t_5) < 0) __PYX_ERR(1, 55, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":130
 * 
 * 
 * class PropertySource(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     NONE = zfs.ZPROP_SRC_NONE
 *     DEFAULT = zfs.ZPROP_SRC_DEFAULT
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_PropertySource, __pyx_n_s_PropertySource, (PyObject *) NULL, __pyx_n_s_libzfs, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "libzfs.pyx":131
 * 
 * class PropertySource(enum.IntEnum):
 *     NONE = zfs.ZPROP_SRC_NONE             # <<<<<<<<<<<<<<
 *     DEFAULT = zfs.ZPROP_SRC_DEFAULT
 *     TEMPORARY = zfs.ZPROP_SRC_TEMPORARY
 */
  __pyx_t_5 = __Pyx_PyInt_From_zprop_source_t(ZPROP_SRC_NONE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_NONE, __pyx_t_5) < 0) __PYX_ERR(1, 131, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":132
 * class PropertySource(enum.IntEnum):
 *     NONE = zfs.ZPROP_SRC_NONE
 *     DEFAULT = zfs.ZPROP_SRC_DEFAULT             # <<<<<<<<<<<<<<
 *     TEMPORARY = zfs.ZPROP_SRC_TEMPORARY
 *     LOCAL = zfs.ZPROP_SRC_LOCAL
 */
  __pyx_t_5 = __Pyx_PyInt_From_zprop_source_t(ZPROP_SRC_DEFAULT); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_DEFAULT, __pyx_t_5) < 0) __PYX_ERR(1, 132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":133
 *     NONE = zfs.ZPROP_SRC_NONE
 *     DEFAULT = zfs.ZPROP_SRC_DEFAULT
 *     TEMPORARY = zfs.ZPROP_SRC_TEMPORARY             # <<<<<<<<<<<<<<
 *     LOCAL = zfs.ZPROP_SRC_LOCAL
 *     INHERITED = zfs.ZPROP_SRC_INHERITED
 */
  __pyx_t_5 = __Pyx_PyInt_From_zprop_source_t(ZPROP_SRC_TEMPORARY); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_TEMPORARY, __pyx_t_5) < 0) __PYX_ERR(1, 133, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":134
 *     DEFAULT = zfs.ZPROP_SRC_DEFAULT
 *     TEMPORARY = zfs.ZPROP_SRC_TEMPORARY
 *     LOCAL = zfs.ZPROP_SRC_LOCAL             # <<<<<<<<<<<<<<
 *     INHERITED = zfs.ZPROP_SRC_INHERITED
 *     RECEIVED = zfs.ZPROP_SRC_RECEIVED
 */
  __pyx_t_5 = __Pyx_PyInt_From_zprop_source_t(ZPROP_SRC_LOCAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_LOCAL, __pyx_t_5) < 0) __PYX_ERR(1, 134, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":135
 *     TEMPORARY = zfs.ZPROP_SRC_TEMPORARY
 *     LOCAL = zfs.ZPROP_SRC_LOCAL
 *     INHERITED = zfs.ZPROP_SRC_INHERITED             # <<<<<<<<<<<<<<
 *     RECEIVED = zfs.ZPROP_SRC_RECEIVED
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_zprop_source_t(ZPROP_SRC_INHERITED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_INHERITED, __pyx_t_5) < 0) __PYX_ERR(1, 135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":136
 *     LOCAL = zfs.ZPROP_SRC_LOCAL
 *     INHERITED = zfs.ZPROP_SRC_INHERITED
 *     RECEIVED = zfs.ZPROP_SRC_RECEIVED             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_zprop_source_t(ZPROP_SRC_RECEIVED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_RECEIVED, __pyx_t_5) < 0) __PYX_ERR(1, 136, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":130
 * 
 * 
 * class PropertySource(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     NONE = zfs.ZPROP_SRC_NONE
 *     DEFAULT = zfs.ZPROP_SRC_DEFAULT
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_PropertySource, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PropertySource, __pyx_t_5) < 0) __PYX_ERR(1, 130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":139
 * 
 * 
 * class VDevState(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     UNKNOWN = zfs.VDEV_STATE_UNKNOWN
 *     CLOSED = zfs.VDEV_STATE_CLOSED
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_VDevState, __pyx_n_s_VDevState, (PyObject *) NULL, __pyx_n_s_libzfs, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "libzfs.pyx":140
 * 
 * class VDevState(enum.IntEnum):
 *     UNKNOWN = zfs.VDEV_STATE_UNKNOWN             # <<<<<<<<<<<<<<
 *     CLOSED = zfs.VDEV_STATE_CLOSED
 *     OFFLINE = zfs.VDEV_STATE_OFFLINE
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_state_t(VDEV_STATE_UNKNOWN); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_UNKNOWN, __pyx_t_5) < 0) __PYX_ERR(1, 140, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":141
 * class VDevState(enum.IntEnum):
 *     UNKNOWN = zfs.VDEV_STATE_UNKNOWN
 *     CLOSED = zfs.VDEV_STATE_CLOSED             # <<<<<<<<<<<<<<
 *     OFFLINE = zfs.VDEV_STATE_OFFLINE
 *     REMOVED = zfs.VDEV_STATE_REMOVED
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_state_t(VDEV_STATE_CLOSED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_CLOSED, __pyx_t_5) < 0) __PYX_ERR(1, 141, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":142
 *     UNKNOWN = zfs.VDEV_STATE_UNKNOWN
 *     CLOSED = zfs.VDEV_STATE_CLOSED
 *     OFFLINE = zfs.VDEV_STATE_OFFLINE             # <<<<<<<<<<<<<<
 *     REMOVED = zfs.VDEV_STATE_REMOVED
 *     CANT_OPEN = zfs.VDEV_STATE_CANT_OPEN
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_state_t(VDEV_STATE_OFFLINE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_OFFLINE, __pyx_t_5) < 0) __PYX_ERR(1, 142, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":143
 *     CLOSED = zfs.VDEV_STATE_CLOSED
 *     OFFLINE = zfs.VDEV_STATE_OFFLINE
 *     REMOVED = zfs.VDEV_STATE_REMOVED             # <<<<<<<<<<<<<<
 *     CANT_OPEN = zfs.VDEV_STATE_CANT_OPEN
 *     FAULTED = zfs.VDEV_STATE_FAULTED
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_state_t(VDEV_STATE_REMOVED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_REMOVED, __pyx_t_5) < 0) __PYX_ERR(1, 143, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":144
 *     OFFLINE = zfs.VDEV_STATE_OFFLINE
 *     REMOVED = zfs.VDEV_STATE_REMOVED
 *     CANT_OPEN = zfs.VDEV_STATE_CANT_OPEN             # <<<<<<<<<<<<<<
 *     FAULTED = zfs.VDEV_STATE_FAULTED
 *     DEGRADED = zfs.VDEV_STATE_DEGRADED
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_state_t(VDEV_STATE_CANT_OPEN); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_CANT_OPEN, __pyx_t_5) < 0) __PYX_ERR(1, 144, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":145
 *     REMOVED = zfs.VDEV_STATE_REMOVED
 *     CANT_OPEN = zfs.VDEV_STATE_CANT_OPEN
 *     FAULTED = zfs.VDEV_STATE_FAULTED             # <<<<<<<<<<<<<<
 *     DEGRADED = zfs.VDEV_STATE_DEGRADED
 *     HEALTHY = zfs.VDEV_STATE_HEALTHY
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_state_t(VDEV_STATE_FAULTED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_FAULTED, __pyx_t_5) < 0) __PYX_ERR(1, 145, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":146
 *     CANT_OPEN = zfs.VDEV_STATE_CANT_OPEN
 *     FAULTED = zfs.VDEV_STATE_FAULTED
 *     DEGRADED = zfs.VDEV_STATE_DEGRADED             # <<<<<<<<<<<<<<
 *     HEALTHY = zfs.VDEV_STATE_HEALTHY
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_state_t(VDEV_STATE_DEGRADED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_DEGRADED, __pyx_t_5) < 0) __PYX_ERR(1, 146, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":147
 *     FAULTED = zfs.VDEV_STATE_FAULTED
 *     DEGRADED = zfs.VDEV_STATE_DEGRADED
 *     HEALTHY = zfs.VDEV_STATE_HEALTHY             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_state_t(VDEV_STATE_HEALTHY); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_HEALTHY, __pyx_t_5) < 0) __PYX_ERR(1, 147, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":139
 * 
 * 
 * class VDevState(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     UNKNOWN = zfs.VDEV_STATE_UNKNOWN
 *     CLOSED = zfs.VDEV_STATE_CLOSED
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_VDevState, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_VDevState, __pyx_t_5) < 0) __PYX_ERR(1, 139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":150
 * 
 * 
 * class VDevAuxState(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     NONE = zfs.VDEV_AUX_NONE
 *     OPEN_FAILED = zfs.VDEV_AUX_OPEN_FAILED
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_VDevAuxState, __pyx_n_s_VDevAuxState, (PyObject *) NULL, __pyx_n_s_libzfs, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "libzfs.pyx":151
 * 
 * class VDevAuxState(enum.IntEnum):
 *     NONE = zfs.VDEV_AUX_NONE             # <<<<<<<<<<<<<<
 *     OPEN_FAILED = zfs.VDEV_AUX_OPEN_FAILED
 *     CORRUPT_DATA = zfs.VDEV_AUX_CORRUPT_DATA
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_aux_t(VDEV_AUX_NONE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_NONE, __pyx_t_5) < 0) __PYX_ERR(1, 151, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":152
 * class VDevAuxState(enum.IntEnum):
 *     NONE = zfs.VDEV_AUX_NONE
 *     OPEN_FAILED = zfs.VDEV_AUX_OPEN_FAILED             # <<<<<<<<<<<<<<
 *     CORRUPT_DATA = zfs.VDEV_AUX_CORRUPT_DATA
 *     NO_REPLICAS = zfs.VDEV_AUX_NO_REPLICAS
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_aux_t(VDEV_AUX_OPEN_FAILED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_OPEN_FAILED, __pyx_t_5) < 0) __PYX_ERR(1, 152, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":153
 *     NONE = zfs.VDEV_AUX_NONE
 *     OPEN_FAILED = zfs.VDEV_AUX_OPEN_FAILED
 *     CORRUPT_DATA = zfs.VDEV_AUX_CORRUPT_DATA             # <<<<<<<<<<<<<<
 *     NO_REPLICAS = zfs.VDEV_AUX_NO_REPLICAS
 *     BAD_GUID_SUM = zfs.VDEV_AUX_BAD_GUID_SUM
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_aux_t(VDEV_AUX_CORRUPT_DATA); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_CORRUPT_DATA, __pyx_t_5) < 0) __PYX_ERR(1, 153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":154
 *     OPEN_FAILED = zfs.VDEV_AUX_OPEN_FAILED
 *     CORRUPT_DATA = zfs.VDEV_AUX_CORRUPT_DATA
 *     NO_REPLICAS = zfs.VDEV_AUX_NO_REPLICAS             # <<<<<<<<<<<<<<
 *     BAD_GUID_SUM = zfs.VDEV_AUX_BAD_GUID_SUM
 *     TOO_SMALL = zfs.VDEV_AUX_TOO_SMALL
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_aux_t(VDEV_AUX_NO_REPLICAS); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_NO_REPLICAS, __pyx_t_5) < 0) __PYX_ERR(1, 154, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":155
 *     CORRUPT_DATA = zfs.VDEV_AUX_CORRUPT_DATA
 *     NO_REPLICAS = zfs.VDEV_AUX_NO_REPLICAS
 *     BAD_GUID_SUM = zfs.VDEV_AUX_BAD_GUID_SUM             # <<<<<<<<<<<<<<
 *     TOO_SMALL = zfs.VDEV_AUX_TOO_SMALL
 *     BAD_LABEL = zfs.VDEV_AUX_BAD_LABEL
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_aux_t(VDEV_AUX_BAD_GUID_SUM); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_BAD_GUID_SUM, __pyx_t_5) < 0) __PYX_ERR(1, 155, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":156
 *     NO_REPLICAS = zfs.VDEV_AUX_NO_REPLICAS
 *     BAD_GUID_SUM = zfs.VDEV_AUX_BAD_GUID_SUM
 *     TOO_SMALL = zfs.VDEV_AUX_TOO_SMALL             # <<<<<<<<<<<<<<
 *     BAD_LABEL = zfs.VDEV_AUX_BAD_LABEL
 *     VERSION_NEWER = zfs.VDEV_AUX_VERSION_NEWER
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_aux_t(VDEV_AUX_TOO_SMALL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_TOO_SMALL, __pyx_t_5) < 0) __PYX_ERR(1, 156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":157
 *     BAD_GUID_SUM = zfs.VDEV_AUX_BAD_GUID_SUM
 *     TOO_SMALL = zfs.VDEV_AUX_TOO_SMALL
 *     BAD_LABEL = zfs.VDEV_AUX_BAD_LABEL             # <<<<<<<<<<<<<<
 *     VERSION_NEWER = zfs.VDEV_AUX_VERSION_NEWER
 *     VERSION_OLDER = zfs.VDEV_AUX_VERSION_OLDER
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_aux_t(VDEV_AUX_BAD_LABEL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_BAD_LABEL, __pyx_t_5) < 0) __PYX_ERR(1, 157, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":158
 *     TOO_SMALL = zfs.VDEV_AUX_TOO_SMALL
 *     BAD_LABEL = zfs.VDEV_AUX_BAD_LABEL
 *     VERSION_NEWER = zfs.VDEV_AUX_VERSION_NEWER             # <<<<<<<<<<<<<<
 *     VERSION_OLDER = zfs.VDEV_AUX_VERSION_OLDER
 *     UNSUP_FEAT = zfs.VDEV_AUX_UNSUP_FEAT
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_aux_t(VDEV_AUX_VERSION_NEWER); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_VERSION_NEWER, __pyx_t_5) < 0) __PYX_ERR(1, 158, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":159
 *     BAD_LABEL = zfs.VDEV_AUX_BAD_LABEL
 *     VERSION_NEWER = zfs.VDEV_AUX_VERSION_NEWER
 *     VERSION_OLDER = zfs.VDEV_AUX_VERSION_OLDER             # <<<<<<<<<<<<<<
 *     UNSUP_FEAT = zfs.VDEV_AUX_UNSUP_FEAT
 *     SPARED = zfs.VDEV_AUX_SPARED
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_aux_t(VDEV_AUX_VERSION_OLDER); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_VERSION_OLDER, __pyx_t_5) < 0) __PYX_ERR(1, 159, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":160
 *     VERSION_NEWER = zfs.VDEV_AUX_VERSION_NEWER
 *     VERSION_OLDER = zfs.VDEV_AUX_VERSION_OLDER
 *     UNSUP_FEAT = zfs.VDEV_AUX_UNSUP_FEAT             # <<<<<<<<<<<<<<
 *     SPARED = zfs.VDEV_AUX_SPARED
 *     ERR_EXCEEDED = zfs.VDEV_AUX_ERR_EXCEEDED
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_aux_t(VDEV_AUX_UNSUP_FEAT); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_UNSUP_FEAT, __pyx_t_5) < 0) __PYX_ERR(1, 160, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":161
 *     VERSION_OLDER = zfs.VDEV_AUX_VERSION_OLDER
 *     UNSUP_FEAT = zfs.VDEV_AUX_UNSUP_FEAT
 *     SPARED = zfs.VDEV_AUX_SPARED             # <<<<<<<<<<<<<<
 *     ERR_EXCEEDED = zfs.VDEV_AUX_ERR_EXCEEDED
 *     IO_FAILURE = zfs.VDEV_AUX_IO_FAILURE
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_aux_t(VDEV_AUX_SPARED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_SPARED, __pyx_t_5) < 0) __PYX_ERR(1, 161, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":162
 *     UNSUP_FEAT = zfs.VDEV_AUX_UNSUP_FEAT
 *     SPARED = zfs.VDEV_AUX_SPARED
 *     ERR_EXCEEDED = zfs.VDEV_AUX_ERR_EXCEEDED             # <<<<<<<<<<<<<<
 *     IO_FAILURE = zfs.VDEV_AUX_IO_FAILURE
 *     BAD_LOG = zfs.VDEV_AUX_BAD_LOG
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_aux_t(VDEV_AUX_ERR_EXCEEDED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_ERR_EXCEEDED, __pyx_t_5) < 0) __PYX_ERR(1, 162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":163
 *     SPARED = zfs.VDEV_AUX_SPARED
 *     ERR_EXCEEDED = zfs.VDEV_AUX_ERR_EXCEEDED
 *     IO_FAILURE = zfs.VDEV_AUX_IO_FAILURE             # <<<<<<<<<<<<<<
 *     BAD_LOG = zfs.VDEV_AUX_BAD_LOG
 *     EXTERNAL = zfs.VDEV_AUX_EXTERNAL
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_aux_t(VDEV_AUX_IO_FAILURE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_IO_FAILURE, __pyx_t_5) < 0) __PYX_ERR(1, 163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":164
 *     ERR_EXCEEDED = zfs.VDEV_AUX_ERR_EXCEEDED
 *     IO_FAILURE = zfs.VDEV_AUX_IO_FAILURE
 *     BAD_LOG = zfs.VDEV_AUX_BAD_LOG             # <<<<<<<<<<<<<<
 *     EXTERNAL = zfs.VDEV_AUX_EXTERNAL
 *     SPLIT_POOL = zfs.VDEV_AUX_SPLIT_POOL
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_aux_t(VDEV_AUX_BAD_LOG); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_BAD_LOG, __pyx_t_5) < 0) __PYX_ERR(1, 164, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":165
 *     IO_FAILURE = zfs.VDEV_AUX_IO_FAILURE
 *     BAD_LOG = zfs.VDEV_AUX_BAD_LOG
 *     EXTERNAL = zfs.VDEV_AUX_EXTERNAL             # <<<<<<<<<<<<<<
 *     SPLIT_POOL = zfs.VDEV_AUX_SPLIT_POOL
 *     ASHIFT_TOO_BIG = zfs.VDEV_AUX_ASHIFT_TOO_BIG
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_aux_t(VDEV_AUX_EXTERNAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_EXTERNAL, __pyx_t_5) < 0) __PYX_ERR(1, 165, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":166
 *     BAD_LOG = zfs.VDEV_AUX_BAD_LOG
 *     EXTERNAL = zfs.VDEV_AUX_EXTERNAL
 *     SPLIT_POOL = zfs.VDEV_AUX_SPLIT_POOL             # <<<<<<<<<<<<<<
 *     ASHIFT_TOO_BIG = zfs.VDEV_AUX_ASHIFT_TOO_BIG
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_aux_t(VDEV_AUX_SPLIT_POOL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_SPLIT_POOL, __pyx_t_5) < 0) __PYX_ERR(1, 166, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":167
 *     EXTERNAL = zfs.VDEV_AUX_EXTERNAL
 *     SPLIT_POOL = zfs.VDEV_AUX_SPLIT_POOL
 *     ASHIFT_TOO_BIG = zfs.VDEV_AUX_ASHIFT_TOO_BIG             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_vdev_aux_t(VDEV_AUX_ASHIFT_TOO_BIG); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_ASHIFT_TOO_BIG, __pyx_t_5) < 0) __PYX_ERR(1, 167, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":150
 * 
 * 
 * class VDevAuxState(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     NONE = zfs.VDEV_AUX_NONE
 *     OPEN_FAILED = zfs.VDEV_AUX_OPEN_FAILED
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_VDevAuxState, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_VDevAuxState, __pyx_t_5) < 0) __PYX_ERR(1, 150, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":170
 * 
 * 
 * class PoolState(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     ACTIVE = zfs.POOL_STATE_ACTIVE
 *     EXPORTED = zfs.POOL_STATE_EXPORTED
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_PoolState, __pyx_n_s_PoolState, (PyObject *) NULL, __pyx_n_s_libzfs, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "libzfs.pyx":171
 * 
 * class PoolState(enum.IntEnum):
 *     ACTIVE = zfs.POOL_STATE_ACTIVE             # <<<<<<<<<<<<<<
 *     EXPORTED = zfs.POOL_STATE_EXPORTED
 *     DESTROYED = zfs.POOL_STATE_DESTROYED
 */
  __pyx_t_5 = __Pyx_PyInt_From_pool_state_t(POOL_STATE_ACTIVE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_ACTIVE, __pyx_t_5) < 0) __PYX_ERR(1, 171, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":172
 * class PoolState(enum.IntEnum):
 *     ACTIVE = zfs.POOL_STATE_ACTIVE
 *     EXPORTED = zfs.POOL_STATE_EXPORTED             # <<<<<<<<<<<<<<
 *     DESTROYED = zfs.POOL_STATE_DESTROYED
 *     SPARE = zfs.POOL_STATE_SPARE
 */
  __pyx_t_5 = __Pyx_PyInt_From_pool_state_t(POOL_STATE_EXPORTED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_EXPORTED, __pyx_t_5) < 0) __PYX_ERR(1, 172, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":173
 *     ACTIVE = zfs.POOL_STATE_ACTIVE
 *     EXPORTED = zfs.POOL_STATE_EXPORTED
 *     DESTROYED = zfs.POOL_STATE_DESTROYED             # <<<<<<<<<<<<<<
 *     SPARE = zfs.POOL_STATE_SPARE
 *     L2CACHE = zfs.POOL_STATE_L2CACHE
 */
  __pyx_t_5 = __Pyx_PyInt_From_pool_state_t(POOL_STATE_DESTROYED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_DESTROYED, __pyx_t_5) < 0) __PYX_ERR(1, 173, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":174
 *     EXPORTED = zfs.POOL_STATE_EXPORTED
 *     DESTROYED = zfs.POOL_STATE_DESTROYED
 *     SPARE = zfs.POOL_STATE_SPARE             # <<<<<<<<<<<<<<
 *     L2CACHE = zfs.POOL_STATE_L2CACHE
 *     UNINITIALIZED = zfs.POOL_STATE_UNINITIALIZED
 */
  __pyx_t_5 = __Pyx_PyInt_From_pool_state_t(POOL_STATE_SPARE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_SPARE, __pyx_t_5) < 0) __PYX_ERR(1, 174, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":175
 *     DESTROYED = zfs.POOL_STATE_DESTROYED
 *     SPARE = zfs.POOL_STATE_SPARE
 *     L2CACHE = zfs.POOL_STATE_L2CACHE             # <<<<<<<<<<<<<<
 *     UNINITIALIZED = zfs.POOL_STATE_UNINITIALIZED
 *     UNAVAIL = zfs.POOL_STATE_UNAVAIL
 */
  __pyx_t_5 = __Pyx_PyInt_From_pool_state_t(POOL_STATE_L2CACHE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_L2CACHE, __pyx_t_5) < 0) __PYX_ERR(1, 175, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":176
 *     SPARE = zfs.POOL_STATE_SPARE
 *     L2CACHE = zfs.POOL_STATE_L2CACHE
 *     UNINITIALIZED = zfs.POOL_STATE_UNINITIALIZED             # <<<<<<<<<<<<<<
 *     UNAVAIL = zfs.POOL_STATE_UNAVAIL
 *     POTENTIALLY_ACTIVE = zfs.POOL_STATE_POTENTIALLY_ACTIVE
 */
  __pyx_t_5 = __Pyx_PyInt_From_pool_state_t(POOL_STATE_UNINITIALIZED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_UNINITIALIZED, __pyx_t_5) < 0) __PYX_ERR(1, 176, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":177
 *     L2CACHE = zfs.POOL_STATE_L2CACHE
 *     UNINITIALIZED = zfs.POOL_STATE_UNINITIALIZED
 *     UNAVAIL = zfs.POOL_STATE_UNAVAIL             # <<<<<<<<<<<<<<
 *     POTENTIALLY_ACTIVE = zfs.POOL_STATE_POTENTIALLY_ACTIVE
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_pool_state_t(POOL_STATE_UNAVAIL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_UNAVAIL, __pyx_t_5) < 0) __PYX_ERR(1, 177, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":178
 *     UNINITIALIZED = zfs.POOL_STATE_UNINITIALIZED
 *     UNAVAIL = zfs.POOL_STATE_UNAVAIL
 *     POTENTIALLY_ACTIVE = zfs.POOL_STATE_POTENTIALLY_ACTIVE             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_pool_state_t(POOL_STATE_POTENTIALLY_ACTIVE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_POTENTIALLY_ACTIVE, __pyx_t_5) < 0) __PYX_ERR(1, 178, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":170
 * 
 * 
 * class PoolState(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     ACTIVE = zfs.POOL_STATE_ACTIVE
 *     EXPORTED = zfs.POOL_STATE_EXPORTED
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_PoolState, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PoolState, __pyx_t_5) < 0) __PYX_ERR(1, 170, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":181
 * 
 * 
 * class ScanFunction(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     NONE = zfs.POOL_SCAN_NONE
 *     SCRUB = zfs.POOL_SCAN_SCRUB
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_ScanFunction, __pyx_n_s_ScanFunction, (PyObject *) NULL, __pyx_n_s_libzfs, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "libzfs.pyx":182
 * 
 * class ScanFunction(enum.IntEnum):
 *     NONE = zfs.POOL_SCAN_NONE             # <<<<<<<<<<<<<<
 *     SCRUB = zfs.POOL_SCAN_SCRUB
 *     RESILVER = zfs.POOL_SCAN_RESILVER
 */
  __pyx_t_5 = __Pyx_PyInt_From_pool_scan_func_t(POOL_SCAN_NONE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_NONE, __pyx_t_5) < 0) __PYX_ERR(1, 182, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":183
 * class ScanFunction(enum.IntEnum):
 *     NONE = zfs.POOL_SCAN_NONE
 *     SCRUB = zfs.POOL_SCAN_SCRUB             # <<<<<<<<<<<<<<
 *     RESILVER = zfs.POOL_SCAN_RESILVER
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_pool_scan_func_t(POOL_SCAN_SCRUB); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_SCRUB, __pyx_t_5) < 0) __PYX_ERR(1, 183, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":184
 *     NONE = zfs.POOL_SCAN_NONE
 *     SCRUB = zfs.POOL_SCAN_SCRUB
 *     RESILVER = zfs.POOL_SCAN_RESILVER             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_pool_scan_func_t(POOL_SCAN_RESILVER); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_RESILVER, __pyx_t_5) < 0) __PYX_ERR(1, 184, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":181
 * 
 * 
 * class ScanFunction(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     NONE = zfs.POOL_SCAN_NONE
 *     SCRUB = zfs.POOL_SCAN_SCRUB
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_ScanFunction, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ScanFunction, __pyx_t_5) < 0) __PYX_ERR(1, 181, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":187
 * 
 * 
 * class PoolStatus(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     CORRUPT_CACHE = libzfs.ZPOOL_STATUS_CORRUPT_CACHE
 *     MISSING_DEV_R = libzfs.ZPOOL_STATUS_MISSING_DEV_R
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_PoolStatus, __pyx_n_s_PoolStatus, (PyObject *) NULL, __pyx_n_s_libzfs, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "libzfs.pyx":188
 * 
 * class PoolStatus(enum.IntEnum):
 *     CORRUPT_CACHE = libzfs.ZPOOL_STATUS_CORRUPT_CACHE             # <<<<<<<<<<<<<<
 *     MISSING_DEV_R = libzfs.ZPOOL_STATUS_MISSING_DEV_R
 *     MISSING_DEV_NR = libzfs.ZPOOL_STATUS_MISSING_DEV_NR
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_CORRUPT_CACHE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_CORRUPT_CACHE, __pyx_t_5) < 0) __PYX_ERR(1, 188, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":189
 * class PoolStatus(enum.IntEnum):
 *     CORRUPT_CACHE = libzfs.ZPOOL_STATUS_CORRUPT_CACHE
 *     MISSING_DEV_R = libzfs.ZPOOL_STATUS_MISSING_DEV_R             # <<<<<<<<<<<<<<
 *     MISSING_DEV_NR = libzfs.ZPOOL_STATUS_MISSING_DEV_NR
 *     CORRUPT_LABEL_R = libzfs.ZPOOL_STATUS_CORRUPT_LABEL_R
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_MISSING_DEV_R); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_MISSING_DEV_R, __pyx_t_5) < 0) __PYX_ERR(1, 189, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":190
 *     CORRUPT_CACHE = libzfs.ZPOOL_STATUS_CORRUPT_CACHE
 *     MISSING_DEV_R = libzfs.ZPOOL_STATUS_MISSING_DEV_R
 *     MISSING_DEV_NR = libzfs.ZPOOL_STATUS_MISSING_DEV_NR             # <<<<<<<<<<<<<<
 *     CORRUPT_LABEL_R = libzfs.ZPOOL_STATUS_CORRUPT_LABEL_R
 *     CORRUPT_LABEL_NR = libzfs.ZPOOL_STATUS_CORRUPT_LABEL_NR
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_MISSING_DEV_NR); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_MISSING_DEV_NR, __pyx_t_5) < 0) __PYX_ERR(1, 190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":191
 *     MISSING_DEV_R = libzfs.ZPOOL_STATUS_MISSING_DEV_R
 *     MISSING_DEV_NR = libzfs.ZPOOL_STATUS_MISSING_DEV_NR
 *     CORRUPT_LABEL_R = libzfs.ZPOOL_STATUS_CORRUPT_LABEL_R             # <<<<<<<<<<<<<<
 *     CORRUPT_LABEL_NR = libzfs.ZPOOL_STATUS_CORRUPT_LABEL_NR
 *     BAD_GUID_SUM = libzfs.ZPOOL_STATUS_BAD_GUID_SUM
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_CORRUPT_LABEL_R); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_CORRUPT_LABEL_R, __pyx_t_5) < 0) __PYX_ERR(1, 191, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":192
 *     MISSING_DEV_NR = libzfs.ZPOOL_STATUS_MISSING_DEV_NR
 *     CORRUPT_LABEL_R = libzfs.ZPOOL_STATUS_CORRUPT_LABEL_R
 *     CORRUPT_LABEL_NR = libzfs.ZPOOL_STATUS_CORRUPT_LABEL_NR             # <<<<<<<<<<<<<<
 *     BAD_GUID_SUM = libzfs.ZPOOL_STATUS_BAD_GUID_SUM
 *     CORRUPT_POOL = libzfs.ZPOOL_STATUS_CORRUPT_POOL
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_CORRUPT_LABEL_NR); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_CORRUPT_LABEL_NR, __pyx_t_5) < 0) __PYX_ERR(1, 192, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":193
 *     CORRUPT_LABEL_R = libzfs.ZPOOL_STATUS_CORRUPT_LABEL_R
 *     CORRUPT_LABEL_NR = libzfs.ZPOOL_STATUS_CORRUPT_LABEL_NR
 *     BAD_GUID_SUM = libzfs.ZPOOL_STATUS_BAD_GUID_SUM             # <<<<<<<<<<<<<<
 *     CORRUPT_POOL = libzfs.ZPOOL_STATUS_CORRUPT_POOL
 *     CORRUPT_DATA = libzfs.ZPOOL_STATUS_CORRUPT_DATA
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_BAD_GUID_SUM); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_BAD_GUID_SUM, __pyx_t_5) < 0) __PYX_ERR(1, 193, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":194
 *     CORRUPT_LABEL_NR = libzfs.ZPOOL_STATUS_CORRUPT_LABEL_NR
 *     BAD_GUID_SUM = libzfs.ZPOOL_STATUS_BAD_GUID_SUM
 *     CORRUPT_POOL = libzfs.ZPOOL_STATUS_CORRUPT_POOL             # <<<<<<<<<<<<<<
 *     CORRUPT_DATA = libzfs.ZPOOL_STATUS_CORRUPT_DATA
 *     FAILING_DEV = libzfs.ZPOOL_STATUS_FAILING_DEV
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_CORRUPT_POOL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_CORRUPT_POOL, __pyx_t_5) < 0) __PYX_ERR(1, 194, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":195
 *     BAD_GUID_SUM = libzfs.ZPOOL_STATUS_BAD_GUID_SUM
 *     CORRUPT_POOL = libzfs.ZPOOL_STATUS_CORRUPT_POOL
 *     CORRUPT_DATA = libzfs.ZPOOL_STATUS_CORRUPT_DATA             # <<<<<<<<<<<<<<
 *     FAILING_DEV = libzfs.ZPOOL_STATUS_FAILING_DEV
 *     VERSION_NEWER = libzfs.ZPOOL_STATUS_VERSION_NEWER
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_CORRUPT_DATA); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_CORRUPT_DATA, __pyx_t_5) < 0) __PYX_ERR(1, 195, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":196
 *     CORRUPT_POOL = libzfs.ZPOOL_STATUS_CORRUPT_POOL
 *     CORRUPT_DATA = libzfs.ZPOOL_STATUS_CORRUPT_DATA
 *     FAILING_DEV = libzfs.ZPOOL_STATUS_FAILING_DEV             # <<<<<<<<<<<<<<
 *     VERSION_NEWER = libzfs.ZPOOL_STATUS_VERSION_NEWER
 *     HOSTID_MISMATCH = libzfs.ZPOOL_STATUS_HOSTID_MISMATCH
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_FAILING_DEV); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_FAILING_DEV, __pyx_t_5) < 0) __PYX_ERR(1, 196, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":197
 *     CORRUPT_DATA = libzfs.ZPOOL_STATUS_CORRUPT_DATA
 *     FAILING_DEV = libzfs.ZPOOL_STATUS_FAILING_DEV
 *     VERSION_NEWER = libzfs.ZPOOL_STATUS_VERSION_NEWER             # <<<<<<<<<<<<<<
 *     HOSTID_MISMATCH = libzfs.ZPOOL_STATUS_HOSTID_MISMATCH
 *     IO_FAILURE_WAIT = libzfs.ZPOOL_STATUS_IO_FAILURE_WAIT
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_VERSION_NEWER); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_VERSION_NEWER, __pyx_t_5) < 0) __PYX_ERR(1, 197, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":198
 *     FAILING_DEV = libzfs.ZPOOL_STATUS_FAILING_DEV
 *     VERSION_NEWER = libzfs.ZPOOL_STATUS_VERSION_NEWER
 *     HOSTID_MISMATCH = libzfs.ZPOOL_STATUS_HOSTID_MISMATCH             # <<<<<<<<<<<<<<
 *     IO_FAILURE_WAIT = libzfs.ZPOOL_STATUS_IO_FAILURE_WAIT
 *     IO_FAILURE_CONTINUE = libzfs.ZPOOL_STATUS_IO_FAILURE_CONTINUE
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_HOSTID_MISMATCH); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_HOSTID_MISMATCH, __pyx_t_5) < 0) __PYX_ERR(1, 198, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":199
 *     VERSION_NEWER = libzfs.ZPOOL_STATUS_VERSION_NEWER
 *     HOSTID_MISMATCH = libzfs.ZPOOL_STATUS_HOSTID_MISMATCH
 *     IO_FAILURE_WAIT = libzfs.ZPOOL_STATUS_IO_FAILURE_WAIT             # <<<<<<<<<<<<<<
 *     IO_FAILURE_CONTINUE = libzfs.ZPOOL_STATUS_IO_FAILURE_CONTINUE
 *     BAD_LOG = libzfs.ZPOOL_STATUS_BAD_LOG
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_IO_FAILURE_WAIT); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_IO_FAILURE_WAIT, __pyx_t_5) < 0) __PYX_ERR(1, 199, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":200
 *     HOSTID_MISMATCH = libzfs.ZPOOL_STATUS_HOSTID_MISMATCH
 *     IO_FAILURE_WAIT = libzfs.ZPOOL_STATUS_IO_FAILURE_WAIT
 *     IO_FAILURE_CONTINUE = libzfs.ZPOOL_STATUS_IO_FAILURE_CONTINUE             # <<<<<<<<<<<<<<
 *     BAD_LOG = libzfs.ZPOOL_STATUS_BAD_LOG
 *     UNSUP_FEAT_READ = libzfs.ZPOOL_STATUS_UNSUP_FEAT_READ
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_IO_FAILURE_CONTINUE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_IO_FAILURE_CONTINUE, __pyx_t_5) < 0) __PYX_ERR(1, 200, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":201
 *     IO_FAILURE_WAIT = libzfs.ZPOOL_STATUS_IO_FAILURE_WAIT
 *     IO_FAILURE_CONTINUE = libzfs.ZPOOL_STATUS_IO_FAILURE_CONTINUE
 *     BAD_LOG = libzfs.ZPOOL_STATUS_BAD_LOG             # <<<<<<<<<<<<<<
 *     UNSUP_FEAT_READ = libzfs.ZPOOL_STATUS_UNSUP_FEAT_READ
 *     UNSUP_FEAT_WRITE = libzfs.ZPOOL_STATUS_UNSUP_FEAT_WRITE
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_BAD_LOG); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_BAD_LOG, __pyx_t_5) < 0) __PYX_ERR(1, 201, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":202
 *     IO_FAILURE_CONTINUE = libzfs.ZPOOL_STATUS_IO_FAILURE_CONTINUE
 *     BAD_LOG = libzfs.ZPOOL_STATUS_BAD_LOG
 *     UNSUP_FEAT_READ = libzfs.ZPOOL_STATUS_UNSUP_FEAT_READ             # <<<<<<<<<<<<<<
 *     UNSUP_FEAT_WRITE = libzfs.ZPOOL_STATUS_UNSUP_FEAT_WRITE
 *     FAULTED_DEV_R = libzfs.ZPOOL_STATUS_FAULTED_DEV_R
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_UNSUP_FEAT_READ); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_UNSUP_FEAT_READ, __pyx_t_5) < 0) __PYX_ERR(1, 202, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":203
 *     BAD_LOG = libzfs.ZPOOL_STATUS_BAD_LOG
 *     UNSUP_FEAT_READ = libzfs.ZPOOL_STATUS_UNSUP_FEAT_READ
 *     UNSUP_FEAT_WRITE = libzfs.ZPOOL_STATUS_UNSUP_FEAT_WRITE             # <<<<<<<<<<<<<<
 *     FAULTED_DEV_R = libzfs.ZPOOL_STATUS_FAULTED_DEV_R
 *     FAULTED_DEV_NR = libzfs.ZPOOL_STATUS_FAULTED_DEV_NR
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_UNSUP_FEAT_WRITE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_UNSUP_FEAT_WRITE, __pyx_t_5) < 0) __PYX_ERR(1, 203, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":204
 *     UNSUP_FEAT_READ = libzfs.ZPOOL_STATUS_UNSUP_FEAT_READ
 *     UNSUP_FEAT_WRITE = libzfs.ZPOOL_STATUS_UNSUP_FEAT_WRITE
 *     FAULTED_DEV_R = libzfs.ZPOOL_STATUS_FAULTED_DEV_R             # <<<<<<<<<<<<<<
 *     FAULTED_DEV_NR = libzfs.ZPOOL_STATUS_FAULTED_DEV_NR
 *     VERSION_OLDER = libzfs.ZPOOL_STATUS_VERSION_OLDER
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_FAULTED_DEV_R); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_FAULTED_DEV_R, __pyx_t_5) < 0) __PYX_ERR(1, 204, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":205
 *     UNSUP_FEAT_WRITE = libzfs.ZPOOL_STATUS_UNSUP_FEAT_WRITE
 *     FAULTED_DEV_R = libzfs.ZPOOL_STATUS_FAULTED_DEV_R
 *     FAULTED_DEV_NR = libzfs.ZPOOL_STATUS_FAULTED_DEV_NR             # <<<<<<<<<<<<<<
 *     VERSION_OLDER = libzfs.ZPOOL_STATUS_VERSION_OLDER
 *     FEAT_DISABLED = libzfs.ZPOOL_STATUS_FEAT_DISABLED
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_FAULTED_DEV_NR); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_FAULTED_DEV_NR, __pyx_t_5) < 0) __PYX_ERR(1, 205, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":206
 *     FAULTED_DEV_R = libzfs.ZPOOL_STATUS_FAULTED_DEV_R
 *     FAULTED_DEV_NR = libzfs.ZPOOL_STATUS_FAULTED_DEV_NR
 *     VERSION_OLDER = libzfs.ZPOOL_STATUS_VERSION_OLDER             # <<<<<<<<<<<<<<
 *     FEAT_DISABLED = libzfs.ZPOOL_STATUS_FEAT_DISABLED
 *     RESILVERING = libzfs.ZPOOL_STATUS_RESILVERING
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_VERSION_OLDER); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_VERSION_OLDER, __pyx_t_5) < 0) __PYX_ERR(1, 206, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":207
 *     FAULTED_DEV_NR = libzfs.ZPOOL_STATUS_FAULTED_DEV_NR
 *     VERSION_OLDER = libzfs.ZPOOL_STATUS_VERSION_OLDER
 *     FEAT_DISABLED = libzfs.ZPOOL_STATUS_FEAT_DISABLED             # <<<<<<<<<<<<<<
 *     RESILVERING = libzfs.ZPOOL_STATUS_RESILVERING
 *     OFFLINE_DEV = libzfs.ZPOOL_STATUS_OFFLINE_DEV
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_FEAT_DISABLED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_FEAT_DISABLED, __pyx_t_5) < 0) __PYX_ERR(1, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":208
 *     VERSION_OLDER = libzfs.ZPOOL_STATUS_VERSION_OLDER
 *     FEAT_DISABLED = libzfs.ZPOOL_STATUS_FEAT_DISABLED
 *     RESILVERING = libzfs.ZPOOL_STATUS_RESILVERING             # <<<<<<<<<<<<<<
 *     OFFLINE_DEV = libzfs.ZPOOL_STATUS_OFFLINE_DEV
 *     REMOVED_DEV = libzfs.ZPOOL_STATUS_REMOVED_DEV
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_RESILVERING); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_RESILVERING, __pyx_t_5) < 0) __PYX_ERR(1, 208, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":209
 *     FEAT_DISABLED = libzfs.ZPOOL_STATUS_FEAT_DISABLED
 *     RESILVERING = libzfs.ZPOOL_STATUS_RESILVERING
 *     OFFLINE_DEV = libzfs.ZPOOL_STATUS_OFFLINE_DEV             # <<<<<<<<<<<<<<
 *     REMOVED_DEV = libzfs.ZPOOL_STATUS_REMOVED_DEV
 *     NON_NATIVE_ASHIFT = libzfs.ZPOOL_STATUS_NON_NATIVE_ASHIFT
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_OFFLINE_DEV); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_OFFLINE_DEV, __pyx_t_5) < 0) __PYX_ERR(1, 209, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":210
 *     RESILVERING = libzfs.ZPOOL_STATUS_RESILVERING
 *     OFFLINE_DEV = libzfs.ZPOOL_STATUS_OFFLINE_DEV
 *     REMOVED_DEV = libzfs.ZPOOL_STATUS_REMOVED_DEV             # <<<<<<<<<<<<<<
 *     NON_NATIVE_ASHIFT = libzfs.ZPOOL_STATUS_NON_NATIVE_ASHIFT
 *     OK = libzfs.ZPOOL_STATUS_OK
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_REMOVED_DEV); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_REMOVED_DEV, __pyx_t_5) < 0) __PYX_ERR(1, 210, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":211
 *     OFFLINE_DEV = libzfs.ZPOOL_STATUS_OFFLINE_DEV
 *     REMOVED_DEV = libzfs.ZPOOL_STATUS_REMOVED_DEV
 *     NON_NATIVE_ASHIFT = libzfs.ZPOOL_STATUS_NON_NATIVE_ASHIFT             # <<<<<<<<<<<<<<
 *     OK = libzfs.ZPOOL_STATUS_OK
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_NON_NATIVE_ASHIFT); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_NON_NATIVE_ASHIFT, __pyx_t_5) < 0) __PYX_ERR(1, 211, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":212
 *     REMOVED_DEV = libzfs.ZPOOL_STATUS_REMOVED_DEV
 *     NON_NATIVE_ASHIFT = libzfs.ZPOOL_STATUS_NON_NATIVE_ASHIFT
 *     OK = libzfs.ZPOOL_STATUS_OK             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_zpool_status_t(ZPOOL_STATUS_OK); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_OK, __pyx_t_5) < 0) __PYX_ERR(1, 212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":187
 * 
 * 
 * class PoolStatus(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     CORRUPT_CACHE = libzfs.ZPOOL_STATUS_CORRUPT_CACHE
 *     MISSING_DEV_R = libzfs.ZPOOL_STATUS_MISSING_DEV_R
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_PoolStatus, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PoolStatus, __pyx_t_5) < 0) __PYX_ERR(1, 187, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":215
 * 
 * 
 * class ScanState(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     NONE = zfs.DSS_NONE
 *     SCANNING = zfs.DSS_SCANNING
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_ScanState, __pyx_n_s_ScanState, (PyObject *) NULL, __pyx_n_s_libzfs, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "libzfs.pyx":216
 * 
 * class ScanState(enum.IntEnum):
 *     NONE = zfs.DSS_NONE             # <<<<<<<<<<<<<<
 *     SCANNING = zfs.DSS_SCANNING
 *     FINISHED = zfs.DSS_FINISHED
 */
  __pyx_t_5 = __Pyx_PyInt_From_dsl_scan_state_t(DSS_NONE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_NONE, __pyx_t_5) < 0) __PYX_ERR(1, 216, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":217
 * class ScanState(enum.IntEnum):
 *     NONE = zfs.DSS_NONE
 *     SCANNING = zfs.DSS_SCANNING             # <<<<<<<<<<<<<<
 *     FINISHED = zfs.DSS_FINISHED
 *     CANCELED = zfs.DSS_CANCELED
 */
  __pyx_t_5 = __Pyx_PyInt_From_dsl_scan_state_t(DSS_SCANNING); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_SCANNING, __pyx_t_5) < 0) __PYX_ERR(1, 217, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":218
 *     NONE = zfs.DSS_NONE
 *     SCANNING = zfs.DSS_SCANNING
 *     FINISHED = zfs.DSS_FINISHED             # <<<<<<<<<<<<<<
 *     CANCELED = zfs.DSS_CANCELED
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_dsl_scan_state_t(DSS_FINISHED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_FINISHED, __pyx_t_5) < 0) __PYX_ERR(1, 218, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":219
 *     SCANNING = zfs.DSS_SCANNING
 *     FINISHED = zfs.DSS_FINISHED
 *     CANCELED = zfs.DSS_CANCELED             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_dsl_scan_state_t(DSS_CANCELED); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_CANCELED, __pyx_t_5) < 0) __PYX_ERR(1, 219, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":215
 * 
 * 
 * class ScanState(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     NONE = zfs.DSS_NONE
 *     SCANNING = zfs.DSS_SCANNING
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_ScanState, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ScanState, __pyx_t_5) < 0) __PYX_ERR(1, 215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":222
 * 
 * 
 * class ZIOType(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     NONE = zfs.ZIO_TYPE_NULL
 *     READ = zfs.ZIO_TYPE_READ
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_ZIOType, __pyx_n_s_ZIOType, (PyObject *) NULL, __pyx_n_s_libzfs, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "libzfs.pyx":223
 * 
 * class ZIOType(enum.IntEnum):
 *     NONE = zfs.ZIO_TYPE_NULL             # <<<<<<<<<<<<<<
 *     READ = zfs.ZIO_TYPE_READ
 *     WRITE = zfs.ZIO_TYPE_WRITE
 */
  __pyx_t_5 = __Pyx_PyInt_From_zio_type_t(ZIO_TYPE_NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_NONE, __pyx_t_5) < 0) __PYX_ERR(1, 223, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":224
 * class ZIOType(enum.IntEnum):
 *     NONE = zfs.ZIO_TYPE_NULL
 *     READ = zfs.ZIO_TYPE_READ             # <<<<<<<<<<<<<<
 *     WRITE = zfs.ZIO_TYPE_WRITE
 *     FREE = zfs.ZIO_TYPE_FREE
 */
  __pyx_t_5 = __Pyx_PyInt_From_zio_type_t(ZIO_TYPE_READ); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_READ, __pyx_t_5) < 0) __PYX_ERR(1, 224, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":225
 *     NONE = zfs.ZIO_TYPE_NULL
 *     READ = zfs.ZIO_TYPE_READ
 *     WRITE = zfs.ZIO_TYPE_WRITE             # <<<<<<<<<<<<<<
 *     FREE = zfs.ZIO_TYPE_FREE
 *     CLAIM = zfs.ZIO_TYPE_CLAIM
 */
  __pyx_t_5 = __Pyx_PyInt_From_zio_type_t(ZIO_TYPE_WRITE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_WRITE, __pyx_t_5) < 0) __PYX_ERR(1, 225, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":226
 *     READ = zfs.ZIO_TYPE_READ
 *     WRITE = zfs.ZIO_TYPE_WRITE
 *     FREE = zfs.ZIO_TYPE_FREE             # <<<<<<<<<<<<<<
 *     CLAIM = zfs.ZIO_TYPE_CLAIM
 *     IOCTL = zfs.ZIO_TYPE_IOCTL
 */
  __pyx_t_5 = __Pyx_PyInt_From_zio_type_t(ZIO_TYPE_FREE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_FREE, __pyx_t_5) < 0) __PYX_ERR(1, 226, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":227
 *     WRITE = zfs.ZIO_TYPE_WRITE
 *     FREE = zfs.ZIO_TYPE_FREE
 *     CLAIM = zfs.ZIO_TYPE_CLAIM             # <<<<<<<<<<<<<<
 *     IOCTL = zfs.ZIO_TYPE_IOCTL
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_zio_type_t(ZIO_TYPE_CLAIM); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_CLAIM, __pyx_t_5) < 0) __PYX_ERR(1, 227, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":228
 *     FREE = zfs.ZIO_TYPE_FREE
 *     CLAIM = zfs.ZIO_TYPE_CLAIM
 *     IOCTL = zfs.ZIO_TYPE_IOCTL             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_zio_type_t(ZIO_TYPE_IOCTL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_IOCTL, __pyx_t_5) < 0) __PYX_ERR(1, 228, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":222
 * 
 * 
 * class ZIOType(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     NONE = zfs.ZIO_TYPE_NULL
 *     READ = zfs.ZIO_TYPE_READ
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_ZIOType, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ZIOType, __pyx_t_5) < 0) __PYX_ERR(1, 222, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":231
 * 
 * 
 * class FeatureState(enum.Enum):             # <<<<<<<<<<<<<<
 *     DISABLED = 0
 *     ENABLED = 1
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_FeatureState, __pyx_n_s_FeatureState, (PyObject *) NULL, __pyx_n_s_libzfs, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "libzfs.pyx":232
 * 
 * class FeatureState(enum.Enum):
 *     DISABLED = 0             # <<<<<<<<<<<<<<
 *     ENABLED = 1
 *     ACTIVE = 2
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_DISABLED, __pyx_int_0) < 0) __PYX_ERR(1, 232, __pyx_L1_error)

  /* "libzfs.pyx":233
 * class FeatureState(enum.Enum):
 *     DISABLED = 0
 *     ENABLED = 1             # <<<<<<<<<<<<<<
 *     ACTIVE = 2
 * 
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_ENABLED, __pyx_int_1) < 0) __PYX_ERR(1, 233, __pyx_L1_error)

  /* "libzfs.pyx":234
 *     DISABLED = 0
 *     ENABLED = 1
 *     ACTIVE = 2             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_ACTIVE, __pyx_int_2) < 0) __PYX_ERR(1, 234, __pyx_L1_error)

  /* "libzfs.pyx":231
 * 
 * 
 * class FeatureState(enum.Enum):             # <<<<<<<<<<<<<<
 *     DISABLED = 0
 *     ENABLED = 1
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_FeatureState, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FeatureState, __pyx_t_5) < 0) __PYX_ERR(1, 231, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":237
 * 
 * 
 * class SendFlag(enum.Enum):             # <<<<<<<<<<<<<<
 *     VERBOSE = 0
 *     REPLICATE = 1
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_SendFlag, __pyx_n_s_SendFlag, (PyObject *) NULL, __pyx_n_s_libzfs, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "libzfs.pyx":238
 * 
 * class SendFlag(enum.Enum):
 *     VERBOSE = 0             # <<<<<<<<<<<<<<
 *     REPLICATE = 1
 *     DOALL = 2
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_VERBOSE, __pyx_int_0) < 0) __PYX_ERR(1, 238, __pyx_L1_error)

  /* "libzfs.pyx":239
 * class SendFlag(enum.Enum):
 *     VERBOSE = 0
 *     REPLICATE = 1             # <<<<<<<<<<<<<<
 *     DOALL = 2
 *     FROMORIGIN = 3
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_REPLICATE, __pyx_int_1) < 0) __PYX_ERR(1, 239, __pyx_L1_error)

  /* "libzfs.pyx":240
 *     VERBOSE = 0
 *     REPLICATE = 1
 *     DOALL = 2             # <<<<<<<<<<<<<<
 *     FROMORIGIN = 3
 *     DEDUP = 3
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_DOALL, __pyx_int_2) < 0) __PYX_ERR(1, 240, __pyx_L1_error)

  /* "libzfs.pyx":241
 *     REPLICATE = 1
 *     DOALL = 2
 *     FROMORIGIN = 3             # <<<<<<<<<<<<<<
 *     DEDUP = 3
 *     PROPS = 4
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_FROMORIGIN, __pyx_int_3) < 0) __PYX_ERR(1, 241, __pyx_L1_error)

  /* "libzfs.pyx":242
 *     DOALL = 2
 *     FROMORIGIN = 3
 *     DEDUP = 3             # <<<<<<<<<<<<<<
 *     PROPS = 4
 *     DRYRUN = 5
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_DEDUP, __pyx_int_3) < 0) __PYX_ERR(1, 242, __pyx_L1_error)

  /* "libzfs.pyx":243
 *     FROMORIGIN = 3
 *     DEDUP = 3
 *     PROPS = 4             # <<<<<<<<<<<<<<
 *     DRYRUN = 5
 *     PARSABLE = 6
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_PROPS, __pyx_int_4) < 0) __PYX_ERR(1, 243, __pyx_L1_error)

  /* "libzfs.pyx":244
 *     DEDUP = 3
 *     PROPS = 4
 *     DRYRUN = 5             # <<<<<<<<<<<<<<
 *     PARSABLE = 6
 *     PROGRESS = 7
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_DRYRUN, __pyx_int_5) < 0) __PYX_ERR(1, 244, __pyx_L1_error)

  /* "libzfs.pyx":245
 *     PROPS = 4
 *     DRYRUN = 5
 *     PARSABLE = 6             # <<<<<<<<<<<<<<
 *     PROGRESS = 7
 *     LARGEBLOCK = 8
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_PARSABLE, __pyx_int_6) < 0) __PYX_ERR(1, 245, __pyx_L1_error)

  /* "libzfs.pyx":246
 *     DRYRUN = 5
 *     PARSABLE = 6
 *     PROGRESS = 7             # <<<<<<<<<<<<<<
 *     LARGEBLOCK = 8
 *     EMBED_DATA = 9
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_PROGRESS, __pyx_int_7) < 0) __PYX_ERR(1, 246, __pyx_L1_error)

  /* "libzfs.pyx":247
 *     PARSABLE = 6
 *     PROGRESS = 7
 *     LARGEBLOCK = 8             # <<<<<<<<<<<<<<
 *     EMBED_DATA = 9
 * 
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_LARGEBLOCK, __pyx_int_8) < 0) __PYX_ERR(1, 247, __pyx_L1_error)

  /* "libzfs.pyx":248
 *     PROGRESS = 7
 *     LARGEBLOCK = 8
 *     EMBED_DATA = 9             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_EMBED_DATA, __pyx_int_9) < 0) __PYX_ERR(1, 248, __pyx_L1_error)

  /* "libzfs.pyx":237
 * 
 * 
 * class SendFlag(enum.Enum):             # <<<<<<<<<<<<<<
 *     VERBOSE = 0
 *     REPLICATE = 1
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_SendFlag, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SendFlag, __pyx_t_5) < 0) __PYX_ERR(1, 237, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":251
 * 
 * 
 * class DiffRecordType(enum.Enum):             # <<<<<<<<<<<<<<
 *     ADD = '+'
 *     REMOVE = '-'
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_DiffRecordType, __pyx_n_s_DiffRecordType, (PyObject *) NULL, __pyx_n_s_libzfs, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "libzfs.pyx":252
 * 
 * class DiffRecordType(enum.Enum):
 *     ADD = '+'             # <<<<<<<<<<<<<<
 *     REMOVE = '-'
 *     MODIFY = 'M'
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_ADD, __pyx_kp_s__80) < 0) __PYX_ERR(1, 252, __pyx_L1_error)

  /* "libzfs.pyx":253
 * class DiffRecordType(enum.Enum):
 *     ADD = '+'
 *     REMOVE = '-'             # <<<<<<<<<<<<<<
 *     MODIFY = 'M'
 *     RENAME = 'R'
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_REMOVE, __pyx_kp_s__3) < 0) __PYX_ERR(1, 253, __pyx_L1_error)

  /* "libzfs.pyx":254
 *     ADD = '+'
 *     REMOVE = '-'
 *     MODIFY = 'M'             # <<<<<<<<<<<<<<
 *     RENAME = 'R'
 * 
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_MODIFY, __pyx_n_s_M) < 0) __PYX_ERR(1, 254, __pyx_L1_error)

  /* "libzfs.pyx":255
 *     REMOVE = '-'
 *     MODIFY = 'M'
 *     RENAME = 'R'             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_RENAME, __pyx_n_s_R) < 0) __PYX_ERR(1, 255, __pyx_L1_error)

  /* "libzfs.pyx":251
 * 
 * 
 * class DiffRecordType(enum.Enum):             # <<<<<<<<<<<<<<
 *     ADD = '+'
 *     REMOVE = '-'
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_DiffRecordType, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DiffRecordType, __pyx_t_5) < 0) __PYX_ERR(1, 251, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":258
 * 
 * 
 * class DiffFileType(enum.Enum):             # <<<<<<<<<<<<<<
 *     BLOCK = 'B'
 *     CHAR = 'C'
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_DiffFileType, __pyx_n_s_DiffFileType, (PyObject *) NULL, __pyx_n_s_libzfs, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "libzfs.pyx":259
 * 
 * class DiffFileType(enum.Enum):
 *     BLOCK = 'B'             # <<<<<<<<<<<<<<
 *     CHAR = 'C'
 *     FILE = 'F'
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_BLOCK, __pyx_n_s_B) < 0) __PYX_ERR(1, 259, __pyx_L1_error)

  /* "libzfs.pyx":260
 * class DiffFileType(enum.Enum):
 *     BLOCK = 'B'
 *     CHAR = 'C'             # <<<<<<<<<<<<<<
 *     FILE = 'F'
 *     DIRECTORY = '/'
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_CHAR, __pyx_n_s_C) < 0) __PYX_ERR(1, 260, __pyx_L1_error)

  /* "libzfs.pyx":261
 *     BLOCK = 'B'
 *     CHAR = 'C'
 *     FILE = 'F'             # <<<<<<<<<<<<<<
 *     DIRECTORY = '/'
 *     SYMLINK = '@'
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_FILE, __pyx_n_s_F) < 0) __PYX_ERR(1, 261, __pyx_L1_error)

  /* "libzfs.pyx":262
 *     CHAR = 'C'
 *     FILE = 'F'
 *     DIRECTORY = '/'             # <<<<<<<<<<<<<<
 *     SYMLINK = '@'
 *     SOCKET = '='
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_DIRECTORY, __pyx_kp_s__81) < 0) __PYX_ERR(1, 262, __pyx_L1_error)

  /* "libzfs.pyx":263
 *     FILE = 'F'
 *     DIRECTORY = '/'
 *     SYMLINK = '@'             # <<<<<<<<<<<<<<
 *     SOCKET = '='
 * 
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_SYMLINK, __pyx_kp_s__59) < 0) __PYX_ERR(1, 263, __pyx_L1_error)

  /* "libzfs.pyx":264
 *     DIRECTORY = '/'
 *     SYMLINK = '@'
 *     SOCKET = '='             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_SOCKET, __pyx_kp_s__14) < 0) __PYX_ERR(1, 264, __pyx_L1_error)

  /* "libzfs.pyx":258
 * 
 * 
 * class DiffFileType(enum.Enum):             # <<<<<<<<<<<<<<
 *     BLOCK = 'B'
 *     CHAR = 'C'
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_DiffFileType, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DiffFileType, __pyx_t_5) < 0) __PYX_ERR(1, 258, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":275
 * 
 * 
 * class DiffRecord(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, raw):
 *         timestamp, cmd, typ, rest = raw.split(maxsplit=3)
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_DiffRecord, __pyx_n_s_DiffRecord, (PyObject *) NULL, __pyx_n_s_libzfs, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "libzfs.pyx":276
 * 
 * class DiffRecord(object):
 *     def __init__(self, raw):             # <<<<<<<<<<<<<<
 *         timestamp, cmd, typ, rest = raw.split(maxsplit=3)
 *         paths = rest.split('->', maxsplit=2)
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6libzfs_10DiffRecord_1__init__, 0, __pyx_n_s_DiffRecord___init, NULL, __pyx_n_s_libzfs, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(1, 276, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":288
 *             self.oldpath = paths[1].strip()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.raw
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6libzfs_10DiffRecord_3__str__, 0, __pyx_n_s_DiffRecord___str, NULL, __pyx_n_s_libzfs, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_str, __pyx_t_5) < 0) __PYX_ERR(1, 288, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":291
 *         return self.raw
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6libzfs_10DiffRecord_5__repr__, 0, __pyx_n_s_DiffRecord___repr, NULL, __pyx_n_s_libzfs, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_repr, __pyx_t_5) < 0) __PYX_ERR(1, 291, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":294
 *         return str(self)
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return {
 *             'timestamp': self.timestamp,
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6libzfs_10DiffRecord_7__getstate__, 0, __pyx_n_s_DiffRecord___getstate, NULL, __pyx_n_s_libzfs, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_getstate, __pyx_t_5) < 0) __PYX_ERR(1, 294, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":275
 * 
 * 
 * class DiffRecord(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, raw):
 *         timestamp, cmd, typ, rest = raw.split(maxsplit=3)
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_DiffRecord, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DiffRecord, __pyx_t_5) < 0) __PYX_ERR(1, 275, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":306
 * 
 * IF FREEBSD_VERSION >= 1000000:
 *     class SendFlags(enum.IntEnum):             # <<<<<<<<<<<<<<
 *         EMBED_DATA = libzfs.LZC_SEND_FLAG_EMBED_DATA
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_SendFlags, __pyx_n_s_SendFlags, (PyObject *) NULL, __pyx_n_s_libzfs, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "libzfs.pyx":307
 * IF FREEBSD_VERSION >= 1000000:
 *     class SendFlags(enum.IntEnum):
 *         EMBED_DATA = libzfs.LZC_SEND_FLAG_EMBED_DATA             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_enum__lzc_send_flags(LZC_SEND_FLAG_EMBED_DATA); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_EMBED_DATA, __pyx_t_5) < 0) __PYX_ERR(1, 307, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":306
 * 
 * IF FREEBSD_VERSION >= 1000000:
 *     class SendFlags(enum.IntEnum):             # <<<<<<<<<<<<<<
 *         EMBED_DATA = libzfs.LZC_SEND_FLAG_EMBED_DATA
 * 
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_SendFlags, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SendFlags, __pyx_t_5) < 0) __PYX_ERR(1, 306, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":310
 * 
 * 
 * class ZFSException(RuntimeError):             # <<<<<<<<<<<<<<
 *     def __init__(self, code, message):
 *         super(ZFSException, self).__init__(message)
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_RuntimeError);
  __Pyx_GIVEREF(__pyx_builtin_RuntimeError);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_RuntimeError);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_ZFSException, __pyx_n_s_ZFSException, (PyObject *) NULL, __pyx_n_s_libzfs, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "libzfs.pyx":311
 * 
 * class ZFSException(RuntimeError):
 *     def __init__(self, code, message):             # <<<<<<<<<<<<<<
 *         super(ZFSException, self).__init__(message)
 *         self.code = code
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6libzfs_12ZFSException_1__init__, 0, __pyx_n_s_ZFSException___init, NULL, __pyx_n_s_libzfs, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(1, 311, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "libzfs.pyx":310
 * 
 * 
 * class ZFSException(RuntimeError):             # <<<<<<<<<<<<<<
 *     def __init__(self, code, message):
 *         super(ZFSException, self).__init__(message)
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_ZFSException, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ZFSException, __pyx_t_5) < 0) __PYX_ERR(1, 310, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "libzfs.pyx":1729
 *         return NVList(nvl)
 * 
 *     def create(self, name, fsopts, fstype=DatasetType.FILESYSTEM, sparse_vol=False):             # <<<<<<<<<<<<<<
 *         cdef NVList cfsopts = NVList(otherdict=fsopts)
 *         cdef uint64_t vol_reservation
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DatasetType); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_FILESYSTEM); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_k__46 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "libzfs.pyx":2605
 * 
 * 
 * def nicestrtonum(ZFS zfs, value):             # <<<<<<<<<<<<<<
 *     cdef uint64_t result
 * 
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6libzfs_9nicestrtonum, NULL, __pyx_n_s_libzfs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nicestrtonum, __pyx_t_4) < 0) __PYX_ERR(1, 2605, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "libzfs.pyx":2614
 * 
 * 
 * def vdev_label_offset(psize, l, offset):             # <<<<<<<<<<<<<<
 *     return offset + l * sizeof(zfs.vdev_label_t) + 0 \
 *         if l < zfs.VDEV_LABELS / 2 \
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6libzfs_11vdev_label_offset, NULL, __pyx_n_s_libzfs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_vdev_label_offset, __pyx_t_4) < 0) __PYX_ERR(1, 2614, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "libzfs.pyx":2620
 * 
 * 
 * def read_label(device):             # <<<<<<<<<<<<<<
 *     cdef nvpair.nvlist_t *handle
 *     cdef NVList nvlist
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6libzfs_13read_label, NULL, __pyx_n_s_libzfs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_read_label, __pyx_t_4) < 0) __PYX_ERR(1, 2620, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "libzfs.pyx":2646
 * 
 * 
 * def clear_label(device):             # <<<<<<<<<<<<<<
 *     cdef int fd
 *     cdef int err
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6libzfs_15clear_label, NULL, __pyx_n_s_libzfs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clear_label, __pyx_t_4) < 0) __PYX_ERR(1, 2646, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "libzfs.pyx":1
 * # cython: c_string_type=unicode, c_string_encoding=ascii             # <<<<<<<<<<<<<<
 * #-
 * # Copyright (c) 2014 iXsystems, Inc.
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /*--- 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);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init libzfs", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init libzfs");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #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((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

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

/* 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_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* 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);
}

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

/* 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) {
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* PyObjectCallNoArg */
  #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* 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_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(exc_type == PyExc_StopIteration) || 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;
}

/* PyErrFetchRestore */
    #if CYTHON_COMPILING_IN_CPYTHON
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

/* 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 PY_VERSION_HEX >= 0x03030000
    if (cause) {
#else
    if (cause && cause != Py_None) {
#endif
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = PyThreadState_GET();
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* unicode_iter */
      static CYTHON_INLINE int __Pyx_init_unicode_iteration(
    PyObject* ustring, Py_ssize_t *length, void** data, int *kind) {
#if CYTHON_PEP393_ENABLED
    if (unlikely(__Pyx_PyUnicode_READY(ustring) < 0)) return -1;
    *kind   = PyUnicode_KIND(ustring);
    *length = PyUnicode_GET_LENGTH(ustring);
    *data   = PyUnicode_DATA(ustring);
#else
    *kind   = 0;
    *length = PyUnicode_GET_SIZE(ustring);
    *data   = (void*)PyUnicode_AS_UNICODE(ustring);
#endif
    return 0;
}

/* GetModuleGlobalName */
      static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON
    result = PyDict_GetItem(__pyx_d, name);
    if (likely(result)) {
        Py_INCREF(result);
    } else {
#else
    result = PyObject_GetItem(__pyx_d, name);
    if (!result) {
        PyErr_Clear();
#endif
        result = __Pyx_GetBuiltinName(name);
    }
    return result;
}

/* PyIntBinop */
        #if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #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 && PY_MAJOR_VERSION >= 3
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
        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;
                    } 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;
                    }
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    } 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;
                    }
                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;
                    } 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;
                    }
                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;
                    } 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;
                    }
                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;
                    } 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;
                    }
                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;
                    } 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;
                    }
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
    }
    #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

/* GetItemInt */
        static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        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));
}

/* SaveResetException */
        #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    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;
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* PyErrExceptionMatches */
        #if CYTHON_COMPILING_IN_CPYTHON
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;
    return PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* GetException */
        #if CYTHON_COMPILING_IN_CPYTHON
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_COMPILING_IN_CPYTHON
    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_COMPILING_IN_CPYTHON
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* GetAttr */
          static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_COMPILING_IN_CPYTHON
#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 CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = __Pyx_GetAttr(o, n);
    if (unlikely(!r)) {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
            goto bad;
        PyErr_Clear();
        r = d;
        Py_INCREF(d);
    }
    return r;
bad:
    return NULL;
}

/* PyObjectCallMethod1 */
          static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method, *result = NULL;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) goto bad;
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyMethod_Check(method))) {
        PyObject *self = PyMethod_GET_SELF(method);
        if (likely(self)) {
            PyObject *args;
            PyObject *function = PyMethod_GET_FUNCTION(method);
            args = PyTuple_New(2);
            if (unlikely(!args)) goto bad;
            Py_INCREF(self);
            PyTuple_SET_ITEM(args, 0, self);
            Py_INCREF(arg);
            PyTuple_SET_ITEM(args, 1, arg);
            Py_INCREF(function);
            Py_DECREF(method); method = NULL;
            result = __Pyx_PyObject_Call(function, args, NULL);
            Py_DECREF(args);
            Py_DECREF(function);
            return result;
        }
    }
#endif
    result = __Pyx_PyObject_CallOneArg(method, arg);
bad:
    Py_XDECREF(method);
    return result;
}

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

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

/* 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(PyObject_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

/* 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 = 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;
        }
        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_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
}

/* ArgTypeTest */
          static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) {
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
}
static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (none_allowed && obj == Py_None) return 1;
    else if (exact) {
        if (likely(Py_TYPE(obj) == type)) return 1;
        #if PY_MAJOR_VERSION == 2
        else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(PyObject_TypeCheck(obj, type))) return 1;
    }
    __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
    return 0;
}

/* KeywordStringCheck */
          static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

/* None */
          static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

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

/* CythonFunction */
          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)
{
    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)
{
    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)
{
    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)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = 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)
{
    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)
{
    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)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
{
    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_COMPILING_IN_CPYTHON
    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) {
    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) {
    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) {
    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) {
    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) {
    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) {
    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(__pyx_CyFunctionObject, func.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_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (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 = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    PyObject_GC_Track(op);
    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)
{
    PyObject_GC_UnTrack(m);
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(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)
{
    __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;
    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
}
#if CYTHON_COMPILING_IN_PYPY
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    PyObject *self = f->m_self;
    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)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 = PySequence_ITEM(arg, 0);
                if (unlikely(!arg0)) return NULL;
                result = (*meth)(self, arg0);
                Py_DECREF(arg0);
                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;
}
#else
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
	return PyCFunction_Call(func, arg, kw);
}
#endif
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_Call,
    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
};
static int __pyx_CyFunction_init(void) {
#if !CYTHON_COMPILING_IN_PYPY
    __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
#endif
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (__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 (!m->defaults)
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    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);
}

/* PyIntBinop */
              #if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int 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 && PY_MAJOR_VERSION >= 3
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a;
        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;
                    }
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                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;
                    }
                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;
                    }
                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;
                    }
                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;
                    }
                #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15
                default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ);
                #else
                default: Py_RETURN_FALSE;
                #endif
            }
        }
            if (a == b) {
                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);
}
#endif

/* 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);
#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);
    } else {
        if (default_value == Py_None)
            default_value = NULL;
        value = PyObject_CallMethodObjArgs(
            d, __pyx_n_s_get, key, default_value, NULL);
    }
#endif
    return value;
}

/* 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_COMPILING_IN_CPYTHON
    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_COMPILING_IN_CPYTHON
        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;
}

/* IterNext */
              static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* defval) {
    PyObject* next;
    iternextfunc iternext = Py_TYPE(iterator)->tp_iternext;
#if CYTHON_COMPILING_IN_CPYTHON
    if (unlikely(!iternext)) {
#else
    if (unlikely(!iternext) || unlikely(!PyIter_Check(iterator))) {
#endif
        PyErr_Format(PyExc_TypeError,
            "%.200s object is not an iterator", Py_TYPE(iterator)->tp_name);
        return NULL;
    }
    next = iternext(iterator);
    if (likely(next))
        return next;
#if CYTHON_COMPILING_IN_CPYTHON
#if PY_VERSION_HEX >= 0x02070000
    if (unlikely(iternext == &_PyObject_NextNotImplemented))
        return NULL;
#endif
#endif
    if (defval) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
            if (unlikely(exc_type != PyExc_StopIteration) &&
                    !PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))
                return NULL;
            PyErr_Clear();
        }
        Py_INCREF(defval);
        return defval;
    }
    if (!PyErr_Occurred())
        PyErr_SetNone(PyExc_StopIteration);
    return NULL;
}

/* StringJoin */
                #if !CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
    return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL);
}
#endif

/* None */
                static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
    long q = a / b;
    long r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

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

/* 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_VERSION_HEX < 0x03030000
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import_2);
    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 (strchr(__Pyx_MODULE_NAME, '.')) {
                #if PY_VERSION_HEX < 0x03030000
                PyObject *py_level = PyInt_FromLong(1);
                if (!py_level)
                    goto bad;
                module = PyObject_CallFunctionObjArgs(py_import,
                    name, global_dict, empty_dict, list, py_level, NULL);
                Py_DECREF(py_level);
                #else
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                #endif
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_VERSION_HEX < 0x03030000
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_VERSION_HEX < 0x03030000
    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;
}

/* 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, 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;
}

/* 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;
    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        __pyx_d,      /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = py_line;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* 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_zfs_type_t(zfs_type_t value) {
    const zfs_type_t neg_one = (zfs_type_t) -1, const_zero = (zfs_type_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(zfs_type_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(zfs_type_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(zfs_type_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(zfs_type_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(zfs_type_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(zfs_type_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
                static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
    const int neg_one = (int) -1, const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
                static CYTHON_INLINE PyObject* __Pyx_PyInt_From_zprop_source_t(zprop_source_t value) {
    const zprop_source_t neg_one = (zprop_source_t) -1, const_zero = (zprop_source_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(zprop_source_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(zprop_source_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(zprop_source_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(zprop_source_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(zprop_source_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(zprop_source_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
                static CYTHON_INLINE PyObject* __Pyx_PyInt_From_vdev_state_t(vdev_state_t value) {
    const vdev_state_t neg_one = (vdev_state_t) -1, const_zero = (vdev_state_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(vdev_state_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(vdev_state_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(vdev_state_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(vdev_state_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(vdev_state_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(vdev_state_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
                static CYTHON_INLINE PyObject* __Pyx_PyInt_From_vdev_aux_t(vdev_aux_t value) {
    const vdev_aux_t neg_one = (vdev_aux_t) -1, const_zero = (vdev_aux_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(vdev_aux_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(vdev_aux_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(vdev_aux_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(vdev_aux_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(vdev_aux_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(vdev_aux_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
                static CYTHON_INLINE PyObject* __Pyx_PyInt_From_pool_state_t(pool_state_t value) {
    const pool_state_t neg_one = (pool_state_t) -1, const_zero = (pool_state_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(pool_state_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(pool_state_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(pool_state_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(pool_state_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(pool_state_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(pool_state_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
                static CYTHON_INLINE PyObject* __Pyx_PyInt_From_pool_scan_func_t(pool_scan_func_t value) {
    const pool_scan_func_t neg_one = (pool_scan_func_t) -1, const_zero = (pool_scan_func_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(pool_scan_func_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(pool_scan_func_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(pool_scan_func_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(pool_scan_func_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(pool_scan_func_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(pool_scan_func_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
                static CYTHON_INLINE PyObject* __Pyx_PyInt_From_zpool_status_t(zpool_status_t value) {
    const zpool_status_t neg_one = (zpool_status_t) -1, const_zero = (zpool_status_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(zpool_status_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(zpool_status_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(zpool_status_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(zpool_status_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(zpool_status_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(zpool_status_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
                static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dsl_scan_state_t(dsl_scan_state_t value) {
    const dsl_scan_state_t neg_one = (dsl_scan_state_t) -1, const_zero = (dsl_scan_state_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(dsl_scan_state_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(dsl_scan_state_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(dsl_scan_state_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(dsl_scan_state_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(dsl_scan_state_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(dsl_scan_state_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
                static CYTHON_INLINE PyObject* __Pyx_PyInt_From_zio_type_t(zio_type_t value) {
    const zio_type_t neg_one = (zio_type_t) -1, const_zero = (zio_type_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(zio_type_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(zio_type_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(zio_type_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(zio_type_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(zio_type_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(zio_type_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
                static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__lzc_send_flags(enum lzc_send_flags value) {
    const enum lzc_send_flags neg_one = (enum lzc_send_flags) -1, const_zero = (enum lzc_send_flags) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum lzc_send_flags) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum lzc_send_flags) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(enum lzc_send_flags) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(enum lzc_send_flags) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum lzc_send_flags) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(enum lzc_send_flags),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
                static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value) {
    const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int32_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(int32_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int32_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
                static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) {
    const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint64_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(uint64_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
                static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int16_t(int16_t value) {
    const int16_t neg_one = (int16_t) -1, const_zero = (int16_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int16_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int16_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(int16_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(int16_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int16_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int16_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
                static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint16_t(uint16_t value) {
    const uint16_t neg_one = (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);
        } else if (sizeof(uint16_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(uint16_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint16_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(uint16_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
                static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value) {
    const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint32_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(uint32_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(uint32_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
                static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) {
    const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int64_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(int64_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int64_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
                static CYTHON_INLINE PyObject* __Pyx_PyInt_From_data_type_t(data_type_t value) {
    const data_type_t neg_one = (data_type_t) -1, const_zero = (data_type_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(data_type_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(data_type_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(data_type_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(data_type_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(data_type_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(data_type_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
                static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) -1, const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
                static CYTHON_INLINE PyObject* __Pyx_PyInt_From_spa_feature_t(spa_feature_t value) {
    const spa_feature_t neg_one = (spa_feature_t) -1, const_zero = (spa_feature_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(spa_feature_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(spa_feature_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(spa_feature_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(spa_feature_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(spa_feature_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(spa_feature_t),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
                static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
    const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(size_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (size_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (size_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) {
                            return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) {
                            return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) {
                            return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (size_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(size_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (size_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(size_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                            return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                            return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
                            return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(size_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
            } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            size_t val;
            PyObject *v = __Pyx_PyNumber_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 data_type_t __Pyx_PyInt_As_data_type_t(PyObject *x) {
    const data_type_t neg_one = (data_type_t) -1, const_zero = (data_type_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(data_type_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(data_type_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (data_type_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 (data_type_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(data_type_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(data_type_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(data_type_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(data_type_t) >= 2 * PyLong_SHIFT) {
                            return (data_type_t) (((((data_type_t)digits[1]) << PyLong_SHIFT) | (data_type_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(data_type_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(data_type_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(data_type_t) >= 3 * PyLong_SHIFT) {
                            return (data_type_t) (((((((data_type_t)digits[2]) << PyLong_SHIFT) | (data_type_t)digits[1]) << PyLong_SHIFT) | (data_type_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(data_type_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(data_type_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(data_type_t) >= 4 * PyLong_SHIFT) {
                            return (data_type_t) (((((((((data_type_t)digits[3]) << PyLong_SHIFT) | (data_type_t)digits[2]) << PyLong_SHIFT) | (data_type_t)digits[1]) << PyLong_SHIFT) | (data_type_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 (data_type_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(data_type_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(data_type_t, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(data_type_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(data_type_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (data_type_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(data_type_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(data_type_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(data_type_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(data_type_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(data_type_t) - 1 > 2 * PyLong_SHIFT) {
                            return (data_type_t) (((data_type_t)-1)*(((((data_type_t)digits[1]) << PyLong_SHIFT) | (data_type_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(data_type_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(data_type_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(data_type_t) - 1 > 2 * PyLong_SHIFT) {
                            return (data_type_t) ((((((data_type_t)digits[1]) << PyLong_SHIFT) | (data_type_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(data_type_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(data_type_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(data_type_t) - 1 > 3 * PyLong_SHIFT) {
                            return (data_type_t) (((data_type_t)-1)*(((((((data_type_t)digits[2]) << PyLong_SHIFT) | (data_type_t)digits[1]) << PyLong_SHIFT) | (data_type_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(data_type_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(data_type_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(data_type_t) - 1 > 3 * PyLong_SHIFT) {
                            return (data_type_t) ((((((((data_type_t)digits[2]) << PyLong_SHIFT) | (data_type_t)digits[1]) << PyLong_SHIFT) | (data_type_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(data_type_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(data_type_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(data_type_t) - 1 > 4 * PyLong_SHIFT) {
                            return (data_type_t) (((data_type_t)-1)*(((((((((data_type_t)digits[3]) << PyLong_SHIFT) | (data_type_t)digits[2]) << PyLong_SHIFT) | (data_type_t)digits[1]) << PyLong_SHIFT) | (data_type_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(data_type_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(data_type_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(data_type_t) - 1 > 4 * PyLong_SHIFT) {
                            return (data_type_t) ((((((((((data_type_t)digits[3]) << PyLong_SHIFT) | (data_type_t)digits[2]) << PyLong_SHIFT) | (data_type_t)digits[1]) << PyLong_SHIFT) | (data_type_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(data_type_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(data_type_t, long, PyLong_AsLong(x))
            } else if (sizeof(data_type_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(data_type_t, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            data_type_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 (data_type_t) -1;
        }
    } else {
        data_type_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (data_type_t) -1;
        val = __Pyx_PyInt_As_data_type_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to data_type_t");
    return (data_type_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to data_type_t");
    return (data_type_t) -1;
}

/* CIntFromPy */
                static CYTHON_INLINE boolean_t __Pyx_PyInt_As_boolean_t(PyObject *x) {
    const boolean_t neg_one = (boolean_t) -1, const_zero = (boolean_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(boolean_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(boolean_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (boolean_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 (boolean_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(boolean_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(boolean_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(boolean_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(boolean_t) >= 2 * PyLong_SHIFT) {
                            return (boolean_t) (((((boolean_t)digits[1]) << PyLong_SHIFT) | (boolean_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(boolean_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(boolean_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(boolean_t) >= 3 * PyLong_SHIFT) {
                            return (boolean_t) (((((((boolean_t)digits[2]) << PyLong_SHIFT) | (boolean_t)digits[1]) << PyLong_SHIFT) | (boolean_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(boolean_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(boolean_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(boolean_t) >= 4 * PyLong_SHIFT) {
                            return (boolean_t) (((((((((boolean_t)digits[3]) << PyLong_SHIFT) | (boolean_t)digits[2]) << PyLong_SHIFT) | (boolean_t)digits[1]) << PyLong_SHIFT) | (boolean_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 (boolean_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(boolean_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(boolean_t, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(boolean_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(boolean_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (boolean_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(boolean_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(boolean_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(boolean_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(boolean_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(boolean_t) - 1 > 2 * PyLong_SHIFT) {
                            return (boolean_t) (((boolean_t)-1)*(((((boolean_t)digits[1]) << PyLong_SHIFT) | (boolean_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(boolean_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(boolean_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(boolean_t) - 1 > 2 * PyLong_SHIFT) {
                            return (boolean_t) ((((((boolean_t)digits[1]) << PyLong_SHIFT) | (boolean_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(boolean_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(boolean_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(boolean_t) - 1 > 3 * PyLong_SHIFT) {
                            return (boolean_t) (((boolean_t)-1)*(((((((boolean_t)digits[2]) << PyLong_SHIFT) | (boolean_t)digits[1]) << PyLong_SHIFT) | (boolean_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(boolean_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(boolean_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(boolean_t) - 1 > 3 * PyLong_SHIFT) {
                            return (boolean_t) ((((((((boolean_t)digits[2]) << PyLong_SHIFT) | (boolean_t)digits[1]) << PyLong_SHIFT) | (boolean_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(boolean_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(boolean_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(boolean_t) - 1 > 4 * PyLong_SHIFT) {
                            return (boolean_t) (((boolean_t)-1)*(((((((((boolean_t)digits[3]) << PyLong_SHIFT) | (boolean_t)digits[2]) << PyLong_SHIFT) | (boolean_t)digits[1]) << PyLong_SHIFT) | (boolean_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(boolean_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(boolean_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(boolean_t) - 1 > 4 * PyLong_SHIFT) {
                            return (boolean_t) ((((((((((boolean_t)digits[3]) << PyLong_SHIFT) | (boolean_t)digits[2]) << PyLong_SHIFT) | (boolean_t)digits[1]) << PyLong_SHIFT) | (boolean_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(boolean_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(boolean_t, long, PyLong_AsLong(x))
            } else if (sizeof(boolean_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(boolean_t, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            boolean_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 (boolean_t) -1;
        }
    } else {
        boolean_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (boolean_t) -1;
        val = __Pyx_PyInt_As_boolean_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to boolean_t");
    return (boolean_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to boolean_t");
    return (boolean_t) -1;
}

/* CIntFromPy */
                static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
    const char neg_one = (char) -1, const_zero = (char) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(char) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (char) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (char) 0;
                case  1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])
                case 2:
                    if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) {
                            return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) {
                            return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) {
                            return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (char) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(char) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (char) 0;
                case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(char,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                            return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                            return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
                            return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(char) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
            } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            char val;
            PyObject *v = __Pyx_PyNumber_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 (char) -1;
        }
    } else {
        char val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (char) -1;
        val = __Pyx_PyInt_As_char(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to char");
    return (char) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to char");
    return (char) -1;
}

/* CIntFromPy */
                static CYTHON_INLINE uint8_t __Pyx_PyInt_As_uint8_t(PyObject *x) {
    const uint8_t neg_one = (uint8_t) -1, const_zero = (uint8_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(uint8_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(uint8_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (uint8_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 (uint8_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(uint8_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(uint8_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) >= 2 * PyLong_SHIFT) {
                            return (uint8_t) (((((uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint8_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) >= 3 * PyLong_SHIFT) {
                            return (uint8_t) (((((((uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint8_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_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(uint8_t) >= 4 * PyLong_SHIFT) {
                            return (uint8_t) (((((((((uint8_t)digits[3]) << PyLong_SHIFT) | (uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_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 (uint8_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(uint8_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint8_t, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(uint8_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint8_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint8_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(uint8_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(uint8_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(uint8_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint8_t) (((uint8_t)-1)*(((((uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(uint8_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint8_t) ((((((uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(uint8_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint8_t) (((uint8_t)-1)*(((((((uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint8_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint8_t) ((((((((uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(uint8_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_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(uint8_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint8_t) (((uint8_t)-1)*(((((((((uint8_t)digits[3]) << PyLong_SHIFT) | (uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint8_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_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(uint8_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint8_t) ((((((((((uint8_t)digits[3]) << PyLong_SHIFT) | (uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(uint8_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint8_t, long, PyLong_AsLong(x))
            } else if (sizeof(uint8_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint8_t, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            uint8_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 (uint8_t) -1;
        }
    } else {
        uint8_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (uint8_t) -1;
        val = __Pyx_PyInt_As_uint8_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint8_t");
    return (uint8_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint8_t");
    return (uint8_t) -1;
}

/* CIntFromPy */
                static CYTHON_INLINE int8_t __Pyx_PyInt_As_int8_t(PyObject *x) {
    const int8_t neg_one = (int8_t) -1, const_zero = (int8_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int8_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int8_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int8_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 (int8_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int8_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(int8_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int8_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int8_t) >= 2 * PyLong_SHIFT) {
                            return (int8_t) (((((int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int8_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int8_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int8_t) >= 3 * PyLong_SHIFT) {
                            return (int8_t) (((((((int8_t)digits[2]) << PyLong_SHIFT) | (int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int8_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int8_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(int8_t) >= 4 * PyLong_SHIFT) {
                            return (int8_t) (((((((((int8_t)digits[3]) << PyLong_SHIFT) | (int8_t)digits[2]) << PyLong_SHIFT) | (int8_t)digits[1]) << PyLong_SHIFT) | (int8_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 (int8_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int8_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int8_t, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(int8_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int8_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int8_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int8_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int8_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int8_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int8_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int8_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int8_t) (((int8_t)-1)*(((((int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int8_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int8_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int8_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int8_t) ((((((int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int8_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int8_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int8_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int8_t) (((int8_t)-1)*(((((((int8_t)digits[2]) << PyLong_SHIFT) | (int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int8_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int8_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int8_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int8_t) ((((((((int8_t)digits[2]) << PyLong_SHIFT) | (int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int8_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int8_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(int8_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int8_t) (((int8_t)-1)*(((((((((int8_t)digits[3]) << PyLong_SHIFT) | (int8_t)digits[2]) << PyLong_SHIFT) | (int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int8_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int8_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(int8_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int8_t) ((((((((((int8_t)digits[3]) << PyLong_SHIFT) | (int8_t)digits[2]) << PyLong_SHIFT) | (int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int8_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int8_t, long, PyLong_AsLong(x))
            } else if (sizeof(int8_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int8_t, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int8_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 (int8_t) -1;
        }
    } else {
        int8_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int8_t) -1;
        val = __Pyx_PyInt_As_int8_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int8_t");
    return (int8_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int8_t");
    return (int8_t) -1;
}

/* CIntFromPy */
                static CYTHON_INLINE uint16_t __Pyx_PyInt_As_uint16_t(PyObject *x) {
    const uint16_t neg_one = (uint16_t) -1, const_zero = (uint16_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(uint16_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(uint16_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (uint16_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 (uint16_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(uint16_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(uint16_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint16_t) >= 2 * PyLong_SHIFT) {
                            return (uint16_t) (((((uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint16_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint16_t) >= 3 * PyLong_SHIFT) {
                            return (uint16_t) (((((((uint16_t)digits[2]) << PyLong_SHIFT) | (uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint16_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint16_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(uint16_t) >= 4 * PyLong_SHIFT) {
                            return (uint16_t) (((((((((uint16_t)digits[3]) << PyLong_SHIFT) | (uint16_t)digits[2]) << PyLong_SHIFT) | (uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_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 (uint16_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(uint16_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint16_t, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(uint16_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint16_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint16_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(uint16_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(uint16_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(uint16_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint16_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint16_t) (((uint16_t)-1)*(((((uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(uint16_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint16_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint16_t) ((((((uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(uint16_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint16_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint16_t) (((uint16_t)-1)*(((((((uint16_t)digits[2]) << PyLong_SHIFT) | (uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint16_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint16_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint16_t) ((((((((uint16_t)digits[2]) << PyLong_SHIFT) | (uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(uint16_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint16_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(uint16_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint16_t) (((uint16_t)-1)*(((((((((uint16_t)digits[3]) << PyLong_SHIFT) | (uint16_t)digits[2]) << PyLong_SHIFT) | (uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint16_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint16_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(uint16_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint16_t) ((((((((((uint16_t)digits[3]) << PyLong_SHIFT) | (uint16_t)digits[2]) << PyLong_SHIFT) | (uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(uint16_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint16_t, long, PyLong_AsLong(x))
            } else if (sizeof(uint16_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint16_t, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            uint16_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 (uint16_t) -1;
        }
    } else {
        uint16_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (uint16_t) -1;
        val = __Pyx_PyInt_As_uint16_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint16_t");
    return (uint16_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint16_t");
    return (uint16_t) -1;
}

/* CIntFromPy */
                static CYTHON_INLINE int16_t __Pyx_PyInt_As_int16_t(PyObject *x) {
    const int16_t neg_one = (int16_t) -1, const_zero = (int16_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int16_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int16_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int16_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 (int16_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int16_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(int16_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int16_t) >= 2 * PyLong_SHIFT) {
                            return (int16_t) (((((int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int16_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int16_t) >= 3 * PyLong_SHIFT) {
                            return (int16_t) (((((((int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int16_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int16_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(int16_t) >= 4 * PyLong_SHIFT) {
                            return (int16_t) (((((((((int16_t)digits[3]) << PyLong_SHIFT) | (int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_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 (int16_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int16_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int16_t, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(int16_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int16_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int16_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int16_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int16_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int16_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int16_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int16_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int16_t) (((int16_t)-1)*(((((int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int16_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int16_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int16_t) ((((((int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int16_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int16_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int16_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int16_t) (((int16_t)-1)*(((((((int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int16_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int16_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int16_t) ((((((((int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int16_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int16_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(int16_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int16_t) (((int16_t)-1)*(((((((((int16_t)digits[3]) << PyLong_SHIFT) | (int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int16_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int16_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(int16_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int16_t) ((((((((((int16_t)digits[3]) << PyLong_SHIFT) | (int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int16_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int16_t, long, PyLong_AsLong(x))
            } else if (sizeof(int16_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int16_t, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int16_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 (int16_t) -1;
        }
    } else {
        int16_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int16_t) -1;
        val = __Pyx_PyInt_As_int16_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int16_t");
    return (int16_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int16_t");
    return (int16_t) -1;
}

/* CIntFromPy */
                static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *x) {
    const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(uint32_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(uint32_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (uint32_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint32_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(uint32_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(uint32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) >= 2 * PyLong_SHIFT) {
                            return (uint32_t) (((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) >= 3 * PyLong_SHIFT) {
                            return (uint32_t) (((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) >= 4 * PyLong_SHIFT) {
                            return (uint32_t) (((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (uint32_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(uint32_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint32_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(uint32_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(uint32_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(uint32_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint32_t) (((uint32_t)-1)*(((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(uint32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint32_t) ((((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint32_t) (((uint32_t)-1)*(((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint32_t) ((((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint32_t) (((uint32_t)-1)*(((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint32_t) ((((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(uint32_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, long, PyLong_AsLong(x))
            } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            uint32_t val;
            PyObject *v = __Pyx_PyNumber_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 (uint32_t) -1;
        }
    } else {
        uint32_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (uint32_t) -1;
        val = __Pyx_PyInt_As_uint32_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint32_t");
    return (uint32_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint32_t");
    return (uint32_t) -1;
}

/* CIntFromPy */
                static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *x) {
    const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int32_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int32_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int32_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int32_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int32_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(int32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) >= 2 * PyLong_SHIFT) {
                            return (int32_t) (((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) >= 3 * PyLong_SHIFT) {
                            return (int32_t) (((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) >= 4 * PyLong_SHIFT) {
                            return (int32_t) (((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int32_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int32_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int32_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int32_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int32_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int32_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int32_t) (((int32_t)-1)*(((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int32_t) ((((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int32_t) (((int32_t)-1)*(((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int32_t) ((((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int32_t) (((int32_t)-1)*(((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int32_t) ((((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int32_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, long, PyLong_AsLong(x))
            } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int32_t val;
            PyObject *v = __Pyx_PyNumber_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 (int32_t) -1;
        }
    } else {
        int32_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int32_t) -1;
        val = __Pyx_PyInt_As_int32_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int32_t");
    return (int32_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int32_t");
    return (int32_t) -1;
}

/* CIntFromPy */
                static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) {
    const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(uint64_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(uint64_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (uint64_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint64_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(uint64_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) >= 2 * PyLong_SHIFT) {
                            return (uint64_t) (((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) >= 3 * PyLong_SHIFT) {
                            return (uint64_t) (((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) >= 4 * PyLong_SHIFT) {
                            return (uint64_t) (((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (uint64_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(uint64_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint64_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(uint64_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(uint64_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(uint64_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint64_t) (((uint64_t)-1)*(((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint64_t) ((((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint64_t) (((uint64_t)-1)*(((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint64_t) ((((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint64_t) (((uint64_t)-1)*(((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint64_t) ((((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(uint64_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, long, PyLong_AsLong(x))
            } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            uint64_t val;
            PyObject *v = __Pyx_PyNumber_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) -1, const_zero = (int64_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int64_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int64_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int64_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int64_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int64_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(int64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) >= 2 * PyLong_SHIFT) {
                            return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) >= 3 * PyLong_SHIFT) {
                            return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) >= 4 * PyLong_SHIFT) {
                            return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int64_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int64_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int64_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int64_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int64_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int64_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x))
            } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int64_t val;
            PyObject *v = __Pyx_PyNumber_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) -1, const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_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 vdev_aux_t __Pyx_PyInt_As_vdev_aux_t(PyObject *x) {
    const vdev_aux_t neg_one = (vdev_aux_t) -1, const_zero = (vdev_aux_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(vdev_aux_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(vdev_aux_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (vdev_aux_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 (vdev_aux_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(vdev_aux_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(vdev_aux_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(vdev_aux_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(vdev_aux_t) >= 2 * PyLong_SHIFT) {
                            return (vdev_aux_t) (((((vdev_aux_t)digits[1]) << PyLong_SHIFT) | (vdev_aux_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(vdev_aux_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(vdev_aux_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(vdev_aux_t) >= 3 * PyLong_SHIFT) {
                            return (vdev_aux_t) (((((((vdev_aux_t)digits[2]) << PyLong_SHIFT) | (vdev_aux_t)digits[1]) << PyLong_SHIFT) | (vdev_aux_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(vdev_aux_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(vdev_aux_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(vdev_aux_t) >= 4 * PyLong_SHIFT) {
                            return (vdev_aux_t) (((((((((vdev_aux_t)digits[3]) << PyLong_SHIFT) | (vdev_aux_t)digits[2]) << PyLong_SHIFT) | (vdev_aux_t)digits[1]) << PyLong_SHIFT) | (vdev_aux_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 (vdev_aux_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(vdev_aux_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(vdev_aux_t, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(vdev_aux_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(vdev_aux_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (vdev_aux_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(vdev_aux_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(vdev_aux_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(vdev_aux_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(vdev_aux_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(vdev_aux_t) - 1 > 2 * PyLong_SHIFT) {
                            return (vdev_aux_t) (((vdev_aux_t)-1)*(((((vdev_aux_t)digits[1]) << PyLong_SHIFT) | (vdev_aux_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(vdev_aux_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(vdev_aux_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(vdev_aux_t) - 1 > 2 * PyLong_SHIFT) {
                            return (vdev_aux_t) ((((((vdev_aux_t)digits[1]) << PyLong_SHIFT) | (vdev_aux_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(vdev_aux_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(vdev_aux_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(vdev_aux_t) - 1 > 3 * PyLong_SHIFT) {
                            return (vdev_aux_t) (((vdev_aux_t)-1)*(((((((vdev_aux_t)digits[2]) << PyLong_SHIFT) | (vdev_aux_t)digits[1]) << PyLong_SHIFT) | (vdev_aux_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(vdev_aux_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(vdev_aux_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(vdev_aux_t) - 1 > 3 * PyLong_SHIFT) {
                            return (vdev_aux_t) ((((((((vdev_aux_t)digits[2]) << PyLong_SHIFT) | (vdev_aux_t)digits[1]) << PyLong_SHIFT) | (vdev_aux_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(vdev_aux_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(vdev_aux_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(vdev_aux_t) - 1 > 4 * PyLong_SHIFT) {
                            return (vdev_aux_t) (((vdev_aux_t)-1)*(((((((((vdev_aux_t)digits[3]) << PyLong_SHIFT) | (vdev_aux_t)digits[2]) << PyLong_SHIFT) | (vdev_aux_t)digits[1]) << PyLong_SHIFT) | (vdev_aux_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(vdev_aux_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(vdev_aux_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(vdev_aux_t) - 1 > 4 * PyLong_SHIFT) {
                            return (vdev_aux_t) ((((((((((vdev_aux_t)digits[3]) << PyLong_SHIFT) | (vdev_aux_t)digits[2]) << PyLong_SHIFT) | (vdev_aux_t)digits[1]) << PyLong_SHIFT) | (vdev_aux_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(vdev_aux_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(vdev_aux_t, long, PyLong_AsLong(x))
            } else if (sizeof(vdev_aux_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(vdev_aux_t, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            vdev_aux_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 (vdev_aux_t) -1;
        }
    } else {
        vdev_aux_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (vdev_aux_t) -1;
        val = __Pyx_PyInt_As_vdev_aux_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to vdev_aux_t");
    return (vdev_aux_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to vdev_aux_t");
    return (vdev_aux_t) -1;
}

/* CIntFromPy */
                static CYTHON_INLINE vdev_state_t __Pyx_PyInt_As_vdev_state_t(PyObject *x) {
    const vdev_state_t neg_one = (vdev_state_t) -1, const_zero = (vdev_state_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(vdev_state_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(vdev_state_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (vdev_state_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 (vdev_state_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(vdev_state_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(vdev_state_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(vdev_state_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(vdev_state_t) >= 2 * PyLong_SHIFT) {
                            return (vdev_state_t) (((((vdev_state_t)digits[1]) << PyLong_SHIFT) | (vdev_state_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(vdev_state_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(vdev_state_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(vdev_state_t) >= 3 * PyLong_SHIFT) {
                            return (vdev_state_t) (((((((vdev_state_t)digits[2]) << PyLong_SHIFT) | (vdev_state_t)digits[1]) << PyLong_SHIFT) | (vdev_state_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(vdev_state_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(vdev_state_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(vdev_state_t) >= 4 * PyLong_SHIFT) {
                            return (vdev_state_t) (((((((((vdev_state_t)digits[3]) << PyLong_SHIFT) | (vdev_state_t)digits[2]) << PyLong_SHIFT) | (vdev_state_t)digits[1]) << PyLong_SHIFT) | (vdev_state_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 (vdev_state_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(vdev_state_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(vdev_state_t, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(vdev_state_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(vdev_state_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (vdev_state_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(vdev_state_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(vdev_state_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(vdev_state_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(vdev_state_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(vdev_state_t) - 1 > 2 * PyLong_SHIFT) {
                            return (vdev_state_t) (((vdev_state_t)-1)*(((((vdev_state_t)digits[1]) << PyLong_SHIFT) | (vdev_state_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(vdev_state_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(vdev_state_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(vdev_state_t) - 1 > 2 * PyLong_SHIFT) {
                            return (vdev_state_t) ((((((vdev_state_t)digits[1]) << PyLong_SHIFT) | (vdev_state_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(vdev_state_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(vdev_state_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(vdev_state_t) - 1 > 3 * PyLong_SHIFT) {
                            return (vdev_state_t) (((vdev_state_t)-1)*(((((((vdev_state_t)digits[2]) << PyLong_SHIFT) | (vdev_state_t)digits[1]) << PyLong_SHIFT) | (vdev_state_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(vdev_state_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(vdev_state_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(vdev_state_t) - 1 > 3 * PyLong_SHIFT) {
                            return (vdev_state_t) ((((((((vdev_state_t)digits[2]) << PyLong_SHIFT) | (vdev_state_t)digits[1]) << PyLong_SHIFT) | (vdev_state_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(vdev_state_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(vdev_state_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(vdev_state_t) - 1 > 4 * PyLong_SHIFT) {
                            return (vdev_state_t) (((vdev_state_t)-1)*(((((((((vdev_state_t)digits[3]) << PyLong_SHIFT) | (vdev_state_t)digits[2]) << PyLong_SHIFT) | (vdev_state_t)digits[1]) << PyLong_SHIFT) | (vdev_state_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(vdev_state_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(vdev_state_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(vdev_state_t) - 1 > 4 * PyLong_SHIFT) {
                            return (vdev_state_t) ((((((((((vdev_state_t)digits[3]) << PyLong_SHIFT) | (vdev_state_t)digits[2]) << PyLong_SHIFT) | (vdev_state_t)digits[1]) << PyLong_SHIFT) | (vdev_state_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(vdev_state_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(vdev_state_t, long, PyLong_AsLong(x))
            } else if (sizeof(vdev_state_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(vdev_state_t, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            vdev_state_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 (vdev_state_t) -1;
        }
    } else {
        vdev_state_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (vdev_state_t) -1;
        val = __Pyx_PyInt_As_vdev_state_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to vdev_state_t");
    return (vdev_state_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to vdev_state_t");
    return (vdev_state_t) -1;
}

/* CIntFromPy */
                static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) -1, const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_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 zfs_type_t __Pyx_PyInt_As_zfs_type_t(PyObject *x) {
    const zfs_type_t neg_one = (zfs_type_t) -1, const_zero = (zfs_type_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(zfs_type_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(zfs_type_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (zfs_type_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 (zfs_type_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(zfs_type_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(zfs_type_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(zfs_type_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(zfs_type_t) >= 2 * PyLong_SHIFT) {
                            return (zfs_type_t) (((((zfs_type_t)digits[1]) << PyLong_SHIFT) | (zfs_type_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(zfs_type_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(zfs_type_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(zfs_type_t) >= 3 * PyLong_SHIFT) {
                            return (zfs_type_t) (((((((zfs_type_t)digits[2]) << PyLong_SHIFT) | (zfs_type_t)digits[1]) << PyLong_SHIFT) | (zfs_type_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(zfs_type_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(zfs_type_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(zfs_type_t) >= 4 * PyLong_SHIFT) {
                            return (zfs_type_t) (((((((((zfs_type_t)digits[3]) << PyLong_SHIFT) | (zfs_type_t)digits[2]) << PyLong_SHIFT) | (zfs_type_t)digits[1]) << PyLong_SHIFT) | (zfs_type_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 (zfs_type_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(zfs_type_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(zfs_type_t, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(zfs_type_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(zfs_type_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (zfs_type_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(zfs_type_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(zfs_type_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(zfs_type_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(zfs_type_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(zfs_type_t) - 1 > 2 * PyLong_SHIFT) {
                            return (zfs_type_t) (((zfs_type_t)-1)*(((((zfs_type_t)digits[1]) << PyLong_SHIFT) | (zfs_type_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(zfs_type_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(zfs_type_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(zfs_type_t) - 1 > 2 * PyLong_SHIFT) {
                            return (zfs_type_t) ((((((zfs_type_t)digits[1]) << PyLong_SHIFT) | (zfs_type_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(zfs_type_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(zfs_type_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(zfs_type_t) - 1 > 3 * PyLong_SHIFT) {
                            return (zfs_type_t) (((zfs_type_t)-1)*(((((((zfs_type_t)digits[2]) << PyLong_SHIFT) | (zfs_type_t)digits[1]) << PyLong_SHIFT) | (zfs_type_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(zfs_type_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(zfs_type_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(zfs_type_t) - 1 > 3 * PyLong_SHIFT) {
                            return (zfs_type_t) ((((((((zfs_type_t)digits[2]) << PyLong_SHIFT) | (zfs_type_t)digits[1]) << PyLong_SHIFT) | (zfs_type_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(zfs_type_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(zfs_type_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(zfs_type_t) - 1 > 4 * PyLong_SHIFT) {
                            return (zfs_type_t) (((zfs_type_t)-1)*(((((((((zfs_type_t)digits[3]) << PyLong_SHIFT) | (zfs_type_t)digits[2]) << PyLong_SHIFT) | (zfs_type_t)digits[1]) << PyLong_SHIFT) | (zfs_type_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(zfs_type_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(zfs_type_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(zfs_type_t) - 1 > 4 * PyLong_SHIFT) {
                            return (zfs_type_t) ((((((((((zfs_type_t)digits[3]) << PyLong_SHIFT) | (zfs_type_t)digits[2]) << PyLong_SHIFT) | (zfs_type_t)digits[1]) << PyLong_SHIFT) | (zfs_type_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(zfs_type_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(zfs_type_t, long, PyLong_AsLong(x))
            } else if (sizeof(zfs_type_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(zfs_type_t, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            zfs_type_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 (zfs_type_t) -1;
        }
    } else {
        zfs_type_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (zfs_type_t) -1;
        val = __Pyx_PyInt_As_zfs_type_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to zfs_type_t");
    return (zfs_type_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to zfs_type_t");
    return (zfs_type_t) -1;
}

/* SwapException */
                #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    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;
    *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>
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
static PyObject *__Pyx_Coroutine_Close(PyObject *self);
static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
#if 1 || PY_VERSION_HEX < 0x030300B0
static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (likely(et == PyExc_StopIteration)) {
#if PY_VERSION_HEX >= 0x030300A0
        if (ev && Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
            value = ((PyStopIterationObject *)ev)->value;
            Py_INCREF(value);
            Py_DECREF(ev);
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = value;
            return 0;
        }
#endif
        if (!ev || !PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
            if (!ev) {
                Py_INCREF(Py_None);
                ev = Py_None;
            } else if (PyTuple_Check(ev)) {
                if (PyTuple_GET_SIZE(ev) >= 1) {
                    PyObject *value;
#if CYTHON_COMPILING_IN_CPYTHON
                    value = PySequence_ITEM(ev, 0);
#else
                    value = PyTuple_GET_ITEM(ev, 0);
                    Py_INCREF(value);
#endif
                    Py_DECREF(ev);
                    ev = value;
                } else {
                    Py_INCREF(Py_None);
                    Py_DECREF(ev);
                    ev = Py_None;
                }
            }
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = ev;
            return 0;
        }
    } else if (!PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    Py_XDECREF(tb);
    Py_DECREF(et);
#if PY_VERSION_HEX >= 0x030300A0
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
    Py_DECREF(ev);
#else
    {
        PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
        Py_DECREF(ev);
        if (likely(args)) {
            value = PySequence_GetItem(args, 0);
            Py_DECREF(args);
        }
        if (unlikely(!value)) {
            __Pyx_ErrRestore(NULL, NULL, NULL);
            Py_INCREF(Py_None);
            value = Py_None;
        }
    }
#endif
    *pvalue = value;
    return 0;
}
#endif
static CYTHON_INLINE
void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *self) {
    PyObject *exc_type = self->exc_type;
    PyObject *exc_value = self->exc_value;
    PyObject *exc_traceback = self->exc_traceback;
    self->exc_type = NULL;
    self->exc_value = NULL;
    self->exc_traceback = NULL;
    Py_XDECREF(exc_type);
    Py_XDECREF(exc_value);
    Py_XDECREF(exc_traceback);
}
static CYTHON_INLINE
int __Pyx_Coroutine_CheckRunning(__pyx_CoroutineObject *gen) {
    if (unlikely(gen->is_running)) {
        PyErr_SetString(PyExc_ValueError,
                        "generator already executing");
        return 1;
    }
    return 0;
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value) {
    PyObject *retval;
    __Pyx_PyThreadState_declare
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            PyErr_SetString(PyExc_TypeError,
                            "can't send non-None value to a "
                            "just-started generator");
            return NULL;
        }
    }
    if (unlikely(self->resume_label == -1)) {
        PyErr_SetNone(PyExc_StopIteration);
        return NULL;
    }
    __Pyx_PyThreadState_assign
    if (value) {
#if CYTHON_COMPILING_IN_PYPY
#else
        if (self->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_XINCREF(__pyx_tstate->frame);
            assert(f->f_back == NULL);
            f->f_back = __pyx_tstate->frame;
        }
#endif
        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
                            &self->exc_traceback);
    } else {
        __Pyx_Coroutine_ExceptionClear(self);
    }
    self->is_running = 1;
    retval = self->body((PyObject *) self, value);
    self->is_running = 0;
    if (retval) {
        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
                            &self->exc_traceback);
#if CYTHON_COMPILING_IN_PYPY
#else
        if (self->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_CLEAR(f->f_back);
        }
#endif
    } else {
        __Pyx_Coroutine_ExceptionClear(self);
    }
    return retval;
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_MethodReturn(PyObject *retval) {
    if (unlikely(!retval && !PyErr_Occurred())) {
        PyErr_SetNone(PyExc_StopIteration);
    }
    return retval;
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Coroutine_Undelegate(gen);
    __Pyx_PyGen_FetchStopIterationValue(&val);
    ret = __Pyx_Coroutine_SendEx(gen, val);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
    PyObject *retval;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        {
            if (value == Py_None)
                ret = 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);
    }
    return __Pyx_Coroutine_MethodReturn(retval);
}
static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    #ifdef __Pyx_Generator_USED
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_Coroutine_USED
    if (__Pyx_Coroutine_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    {
        PyObject *meth;
        gen->is_running = 1;
        meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
        if (unlikely(!meth)) {
            if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                PyErr_WriteUnraisable(yf);
            }
            PyErr_Clear();
        } else {
            retval = PyObject_CallFunction(meth, NULL);
            Py_DECREF(meth);
            if (!retval)
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        ret = Py_TYPE(yf)->tp_iternext(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Coroutine_FinishDelegation(gen);
    }
    return __Pyx_Coroutine_SendEx(gen, Py_None);
}
static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
        return NULL;
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Coroutine_CloseIter(gen, yf);
        __Pyx_Coroutine_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
        PyErr_SetNone(PyExc_GeneratorExit);
    retval = __Pyx_Coroutine_SendEx(gen, NULL);
    if (retval) {
        Py_DECREF(retval);
        PyErr_SetString(PyExc_RuntimeError,
                        "generator ignored GeneratorExit");
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (!raised_exception
        || raised_exception == PyExc_StopIteration
        || raised_exception == PyExc_GeneratorExit
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit)
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
    {
        if (raised_exception) PyErr_Clear();
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *typ;
    PyObject *tb = NULL;
    PyObject *val = NULL;
    PyObject *yf = gen->yieldfrom;
    if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
        return NULL;
    if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
        if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) {
            int err = __Pyx_Coroutine_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Coroutine_Undelegate(gen);
            if (err < 0)
                return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL));
            goto throw_here;
        }
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Throw(yf, args);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Throw(yf, args);
        } else
        #endif
        {
            PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                    gen->is_running = 0;
                    return NULL;
                }
                PyErr_Clear();
                __Pyx_Coroutine_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            ret = PyObject_CallObject(meth, args);
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Coroutine_FinishDelegation(gen);
        }
        return __Pyx_Coroutine_MethodReturn(ret);
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL));
}
static int __Pyx_Coroutine_traverse(PyObject *self, visitproc visit, void *arg) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    Py_VISIT(gen->exc_type);
    Py_VISIT(gen->exc_value);
    Py_VISIT(gen->exc_traceback);
    return 0;
}
static int __Pyx_Coroutine_clear(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    Py_CLEAR(gen->yieldfrom);
    Py_CLEAR(gen->exc_type);
    Py_CLEAR(gen->exc_value);
    Py_CLEAR(gen->exc_traceback);
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    return 0;
}
static void __Pyx_Coroutine_dealloc(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject_GC_UnTrack(gen);
    if (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    if (gen->resume_label > 0) {
        PyObject_GC_Track(self);
#if PY_VERSION_HEX >= 0x030400a1
        if (PyObject_CallFinalizerFromDealloc(self))
#else
        Py_TYPE(gen)->tp_del(self);
        if (self->ob_refcnt > 0)
#endif
        {
            return;
        }
        PyObject_GC_UnTrack(self);
    }
    __Pyx_Coroutine_clear(self);
    PyObject_GC_Del(gen);
}
static void __Pyx_Coroutine_del(PyObject *self) {
    PyObject *res;
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    __Pyx_PyThreadState_declare
    if (gen->resume_label <= 0)
        return ;
#if PY_VERSION_HEX < 0x030400a1
    assert(self->ob_refcnt == 0);
    self->ob_refcnt = 1;
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
    res = __Pyx_Coroutine_Close(self);
    if (res == NULL)
        PyErr_WriteUnraisable(self);
    else
        Py_DECREF(res);
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
#if PY_VERSION_HEX < 0x030400a1
    assert(self->ob_refcnt > 0);
    if (--self->ob_refcnt == 0) {
        return;
    }
    {
        Py_ssize_t refcnt = self->ob_refcnt;
        _Py_NewReference(self);
        self->ob_refcnt = refcnt;
    }
#if CYTHON_COMPILING_IN_CPYTHON
    assert(PyType_IS_GC(self->ob_type) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    _Py_DEC_REFTOTAL;
#endif
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
#endif
}
static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self)
{
    Py_INCREF(self->gi_name);
    return self->gi_name;
}
static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_name;
    Py_INCREF(value);
    self->gi_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self)
{
    Py_INCREF(self->gi_qualname);
    return self->gi_qualname;
}
static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_qualname;
    Py_INCREF(value);
    self->gi_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static __pyx_CoroutineObject *__Pyx__Coroutine_New(PyTypeObject* type, __pyx_coroutine_body_t body,
                                                   PyObject *closure, PyObject *name, PyObject *qualname) {
    __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
    if (gen == NULL)
        return NULL;
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    gen->exc_type = NULL;
    gen->exc_value = NULL;
    gen->exc_traceback = NULL;
    gen->gi_weakreflist = NULL;
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    PyObject_GC_Track(gen);
    return gen;
}

/* 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 */
                    #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
static PyObject* __Pyx_patch_abc_module(PyObject *module);
static PyObject* __Pyx_patch_abc_module(PyObject *module) {
    module = __Pyx_Coroutine_patch_module(
        module, ""
"if _cython_generator_type is not None:\n"
"    try: Generator = _module.Generator\n"
"    except AttributeError: pass\n"
"    else: Generator.register(_cython_generator_type)\n"
"if _cython_coroutine_type is not None:\n"
"    try: Coroutine = _module.Coroutine\n"
"    except AttributeError: pass\n"
"    else: Coroutine.register(_cython_coroutine_type)\n"
    );
    return module;
}
#endif
static int __Pyx_patch_abc(void) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    static int abc_patched = 0;
    if (!abc_patched) {
        PyObject *module;
        module = PyImport_ImportModule((PY_VERSION_HEX >= 0x03030000) ? "collections.abc" : "collections");
        if (!module) {
            PyErr_WriteUnraisable(NULL);
            if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
                    ((PY_VERSION_HEX >= 0x03030000) ?
                        "Cython module failed to register with collections.abc module" :
                        "Cython module failed to register with collections module"), 1) < 0)) {
                return -1;
            }
        } else {
            module = __Pyx_patch_abc_module(module);
            abc_patched = 1;
            if (unlikely(!module))
                return -1;
            Py_DECREF(module);
        }
        module = PyImport_ImportModule("backports_abc");
        if (module) {
            module = __Pyx_patch_abc_module(module);
            Py_XDECREF(module);
        }
        if (!module) {
            PyErr_Clear();
        }
    }
#else
    if (0) __Pyx_Coroutine_patch_module(NULL, NULL);
#endif
    return 0;
}

/* 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, METH_NOARGS,
     (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
    {0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
    {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
     (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
    {0, 0, 0, 0, 0}
};
static PyGetSetDef __pyx_Generator_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
     (char*) PyDoc_STR("name of the generator"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
     (char*) PyDoc_STR("qualified name of the generator"), 0},
    {0, 0, 0, 0, 0}
};
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    (destructor) __Pyx_Coroutine_dealloc,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    0,
    (traverseproc) __Pyx_Coroutine_traverse,
    0,
    0,
    offsetof(__pyx_CoroutineObject, gi_weakreflist),
    0,
    (iternextfunc) __Pyx_Generator_Next,
    __pyx_Generator_methods,
    __pyx_Generator_memberlist,
    __pyx_Generator_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#else
    __Pyx_Coroutine_del,
#endif
    0,
#if PY_VERSION_HEX >= 0x030400a1
    __Pyx_Coroutine_del,
#endif
};
static int __pyx_Generator_init(void) {
    __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
    if (unlikely(!__pyx_GeneratorType)) {
        return -1;
    }
    return 0;
}

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

/* 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;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
#if PY_VERSION_HEX < 0x03030000
        char* defenc_c;
        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
        if (!defenc) return NULL;
        defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        {
            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
            char* c;
            for (c = defenc_c; c < end; c++) {
                if ((unsigned char) (*c) >= 128) {
                    PyUnicode_AsASCIIString(o);
                    return NULL;
                }
            }
        }
#endif
        *length = PyBytes_GET_SIZE(defenc);
        return defenc_c;
#else
        if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        if (PyUnicode_IS_ASCII(o)) {
            *length = PyUnicode_GET_LENGTH(o);
            return PyUnicode_AsUTF8(o);
        } else {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
#else
        return PyUnicode_AsUTF8AndSize(o, length);
#endif
#endif
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
  PyNumberMethods *m;
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (PyInt_Check(x) || PyLong_Check(x))
#else
  if (PyLong_Check(x))
#endif
    return __Pyx_NewRef(x);
  m = Py_TYPE(x)->tp_as_number;
#if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = PyNumber_Long(x);
  }
#else
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Long(x);
  }
#endif
  if (res) {
#if PY_MAJOR_VERSION < 3
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%.4s__ returned non-%.4s (type %.200s)",
                   name, name, Py_TYPE(res)->tp_name);
      Py_DECREF(res);
      return NULL;
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(x);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
