Generated by Cython 0.24

Yellow lines hint at Python interaction.
Click on a line that starts with a "`+`" to see the C code that Cython generated for it.

Raw output: nvpair.pxi

     001: # cython: c_string_type=unicode, c_string_encoding=ascii

     002: #-

     003: # Copyright (c) 2014 iXsystems, Inc.

     004: # All rights reserved.

     005: #

     006: # Redistribution and use in source and binary forms, with or without

     007: # modification, are permitted provided that the following conditions

     008: # are met:

     009: # 1. Redistributions of source code must retain the above copyright

     010: #    notice, this list of conditions and the following disclaimer.

     011: # 2. Redistributions in binary form must reproduce the above copyright

     012: #    notice, this list of conditions and the following disclaimer in the

     013: #    documentation and/or other materials provided with the distribution.

     014: #

     015: # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND

     016: # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

     017: # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

     018: # ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE

     019: # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

     020: # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS

     021: # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)

     022: # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT

     023: # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY

     024: # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF

     025: # SUCH DAMAGE.

     026: #

     027:

     028: cimport nvpair

    +029: import collections

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

    +030: import numbers

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

     031: import cython

     032: from types cimport *

     033: from libc.stdint cimport uintptr_t

     034: from libc.stdlib cimport malloc, free

     035:

     036:

     037: @cython.internal

    +038: cdef class NVList(object):

    struct __pyx_obj_6libzfs_NVList {
      PyObject_HEAD
      struct __pyx_vtabstruct_6libzfs_NVList *__pyx_vtab;
      nvlist_t *handle;
      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;

     039:     cdef nvpair.nvlist_t* handle

     040:     cdef int foreign

     041:

    +042:     def __init__(self, uintptr_t nvlist=0, otherdict=None):

    /* 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
      __Pyx_RefNannySetupContext("__init__", 0);
    /* … */
      /* 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;
    }

    +043:         if nvlist:

      __pyx_t_1 = (__pyx_v_nvlist != 0);
      if (__pyx_t_1) {
    /* … */
        goto __pyx_L3;
      }

    +044:             self.foreign = True

        __pyx_v_self->foreign = 1;

    +045:             self.handle = <nvpair.nvlist_t*>nvlist

        __pyx_v_self->handle = ((nvlist_t *)__pyx_v_nvlist);

     046:         else:

    +047:             self.foreign = False

      /*else*/ {
        __pyx_v_self->foreign = 0;

    +048:             nvpair.nvlist_alloc(&self.handle, nvpair.NV_UNIQUE_NAME, 0)

        nvlist_alloc((&__pyx_v_self->handle), NV_UNIQUE_NAME, 0);
      }
      __pyx_L3:;

     049:

    +050:         if otherdict:

      __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) {
    /* … */
      }

    +051:             for k, v in otherdict.items():

        __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;
    /* … */
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +052:                 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)

     053:

     054:

    +055:     def __dealloc__(self):

    /* 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
      __Pyx_RefNannySetupContext("__dealloc__", 0);
    /* … */
      /* function exit code */
      __Pyx_RefNannyFinishContext();
    }

    +056:         if not self.foreign:

      __pyx_t_1 = ((!(__pyx_v_self->foreign != 0)) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +057:             nvpair.nvlist_free(self.handle)

        nvlist_free(__pyx_v_self->handle);

    +058:             self.handle = NULL

        __pyx_v_self->handle = NULL;

     059:

    +060:     cdef object get_raw(self, key):

    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
      __Pyx_RefNannySetupContext("get_raw", 0);
    /* … */
      /* 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;
    }

    +061:         cdef nvpair.nvpair_t* pair = self.__get_pair(key)

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

    +062:         return self.__get_value(pair, False)

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

     063:

    +064:     cdef nvpair.nvpair_t* __get_pair(self, key) except NULL:

    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
      __Pyx_RefNannySetupContext("__get_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;
    }

     065:         cdef nvpair.nvpair_t* pair

    +066:         if nvpair.nvlist_lookup_nvpair(self.handle, key, &pair) != 0:

      __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) {
    /* … */
      }

    +067:             raise ValueError('Key {0} not found'.format(key))

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

     068:

    +069:         return pair

      __pyx_r = __pyx_v_pair;
      goto __pyx_L0;

     070:

    +071:     cdef object __get_value(self, nvpair.nvpair_t* pair, wrap_dict=True):

    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
      __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;
        }
      }
    /* … */
      /* 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;
    }
    /* … */
    struct __pyx_opt_args_6libzfs_6NVList___get_value {
      int __pyx_n;
      PyObject *wrap_dict;
    };

     072:         cdef nvpair.nvlist_t *nested

     073:         cdef char *cstr

     074:         cdef void *carray

     075:         cdef uint_t carraylen

     076:         cdef bint boolean

     077:         cdef int32_t cint

     078:         cdef uint64_t clong

     079:         cdef int datatype

     080:

    +081:         datatype = nvpair.nvpair_type(pair)

      __pyx_v_datatype = nvpair_type(__pyx_v_pair);

     082:

    +083:         if datatype == nvpair.DATA_TYPE_STRING:

      __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_STRING) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +084:             nvpair.nvpair_value_string(pair, &cstr)

        nvpair_value_string(__pyx_v_pair, (&__pyx_v_cstr));

    +085:             return cstr

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

     086:

    +087:         if datatype == nvpair.DATA_TYPE_BOOLEAN:

      __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_BOOLEAN) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +088:             nvpair.nvpair_value_boolean_value(pair, <boolean_t*>&boolean)

        nvpair_value_boolean_value(__pyx_v_pair, ((boolean_t *)(&__pyx_v_boolean)));

    +089:             return boolean

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

     090:

    +091:         if datatype == nvpair.DATA_TYPE_BYTE:

      __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_BYTE) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +092:             nvpair.nvpair_value_byte(pair, <uchar_t*>&cint)

        nvpair_value_byte(__pyx_v_pair, ((uchar_t *)(&__pyx_v_cint)));

    +093:             return cint

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

     094:

    +095:         if datatype == nvpair.DATA_TYPE_INT8:

      __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_INT8) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +096:             nvpair.nvpair_value_int8(pair, <int8_t*>&cint)

        nvpair_value_int8(__pyx_v_pair, ((int8_t *)(&__pyx_v_cint)));

    +097:             return cint

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

     098:

    +099:         if datatype == nvpair.DATA_TYPE_UINT8:

      __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_UINT8) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +100:             nvpair.nvpair_value_uint8(pair, <uint8_t*>&cint)

        nvpair_value_uint8(__pyx_v_pair, ((uint8_t *)(&__pyx_v_cint)));

    +101:             return cint

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

     102:

    +103:         if datatype == nvpair.DATA_TYPE_INT16:

      __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_INT16) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +104:             nvpair.nvpair_value_int16(pair, <int16_t*>&cint)

        nvpair_value_int16(__pyx_v_pair, ((int16_t *)(&__pyx_v_cint)));

    +105:             return cint

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

     106:

    +107:         if datatype == nvpair.DATA_TYPE_UINT16:

      __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_UINT16) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +108:             nvpair.nvpair_value_uint16(pair, <uint16_t*>&cint)

        nvpair_value_uint16(__pyx_v_pair, ((uint16_t *)(&__pyx_v_cint)));

    +109:             return cint

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

     110:

    +111:         if datatype == nvpair.DATA_TYPE_INT32:

      __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_INT32) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +112:             nvpair.nvpair_value_int32(pair, <int32_t*>&cint)

        nvpair_value_int32(__pyx_v_pair, ((int32_t *)(&__pyx_v_cint)));

    +113:             return cint

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

     114:

    +115:         if datatype == nvpair.DATA_TYPE_UINT32:

      __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_UINT32) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +116:             nvpair.nvpair_value_uint32(pair, <uint32_t*>&clong)

        nvpair_value_uint32(__pyx_v_pair, ((uint32_t *)(&__pyx_v_clong)));

    +117:             return clong

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

     118:

    +119:         if datatype == nvpair.DATA_TYPE_INT64:

      __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_INT64) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +120:             nvpair.nvpair_value_int64(pair, <int64_t*>&clong)

        nvpair_value_int64(__pyx_v_pair, ((int64_t *)(&__pyx_v_clong)));

    +121:             return clong

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

     122:

    +123:         if datatype == nvpair.DATA_TYPE_UINT64:

      __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_UINT64) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +124:             nvpair.nvpair_value_uint64(pair, <uint64_t*>&clong)

        nvpair_value_uint64(__pyx_v_pair, ((uint64_t *)(&__pyx_v_clong)));

    +125:             return clong

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

     126:

    +127:         if datatype == nvpair.DATA_TYPE_BYTE_ARRAY:

      __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_BYTE_ARRAY) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +128:             nvpair.nvpair_value_byte_array(pair, <uchar_t**>&carray, &carraylen)

        nvpair_value_byte_array(__pyx_v_pair, ((uchar_t **)(&__pyx_v_carray)), (&__pyx_v_carraylen));

    +129:             return [x for x in (<uchar_t *>carray)[:carraylen]]

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

     130:

    +131:         if datatype == nvpair.DATA_TYPE_INT8_ARRAY:

      __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_INT8_ARRAY) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +132:             nvpair.nvpair_value_int8_array(pair, <int8_t**>&carray, &carraylen)

        nvpair_value_int8_array(__pyx_v_pair, ((int8_t **)(&__pyx_v_carray)), (&__pyx_v_carraylen));

    +133:             return [x for x in (<uint8_t *>carray)[:carraylen]]

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

     134:

    +135:         if datatype == nvpair.DATA_TYPE_UINT8_ARRAY:

      __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_UINT8_ARRAY) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +136:             nvpair.nvpair_value_uint8_array(pair, <uint8_t**>&carray, &carraylen)

        nvpair_value_uint8_array(__pyx_v_pair, ((uint8_t **)(&__pyx_v_carray)), (&__pyx_v_carraylen));

    +137:             return [x for x in (<uint8_t *>carray)[:carraylen]]

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

     138:

    +139:         if datatype == nvpair.DATA_TYPE_INT16_ARRAY:

      __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_INT16_ARRAY) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +140:             nvpair.nvpair_value_int16_array(pair, <int16_t**>&carray, &carraylen)

        nvpair_value_int16_array(__pyx_v_pair, ((int16_t **)(&__pyx_v_carray)), (&__pyx_v_carraylen));

    +141:             return [x for x in (<int16_t *>carray)[:carraylen]]

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

     142:

    +143:         if datatype == nvpair.DATA_TYPE_UINT16_ARRAY:

      __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_UINT16_ARRAY) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +144:             nvpair.nvpair_value_uint16_array(pair, <uint16_t**>&carray, &carraylen)

        nvpair_value_uint16_array(__pyx_v_pair, ((uint16_t **)(&__pyx_v_carray)), (&__pyx_v_carraylen));

    +145:             return [x for x in (<uint16_t *>carray)[:carraylen]]

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

     146:

    +147:         if datatype == nvpair.DATA_TYPE_INT32_ARRAY:

      __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_INT32_ARRAY) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +148:             nvpair.nvpair_value_int32_array(pair, <int32_t**>&carray, &carraylen)

        nvpair_value_int32_array(__pyx_v_pair, ((int32_t **)(&__pyx_v_carray)), (&__pyx_v_carraylen));

    +149:             return [x for x in (<int32_t *>carray)[:carraylen]]

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

     150:

    +151:         if datatype == nvpair.DATA_TYPE_UINT32_ARRAY:

      __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_UINT32_ARRAY) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +152:             nvpair.nvpair_value_uint32_array(pair, <uint32_t**>&carray, &carraylen)

        nvpair_value_uint32_array(__pyx_v_pair, ((uint32_t **)(&__pyx_v_carray)), (&__pyx_v_carraylen));

    +153:             return [x for x in (<uint32_t *>carray)[:carraylen]]

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

     154:

    +155:         if datatype == nvpair.DATA_TYPE_INT64_ARRAY:

      __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_INT64_ARRAY) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +156:             nvpair.nvpair_value_int64_array(pair, <int64_t**>&carray, &carraylen)

        nvpair_value_int64_array(__pyx_v_pair, ((int64_t **)(&__pyx_v_carray)), (&__pyx_v_carraylen));

    +157:             return [x for x in (<int64_t *>carray)[:carraylen]]

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

     158:

    +159:         if datatype == nvpair.DATA_TYPE_UINT64_ARRAY:

      __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_UINT64_ARRAY) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +160:             nvpair.nvpair_value_uint64_array(pair, <uint64_t**>&carray, &carraylen)

        nvpair_value_uint64_array(__pyx_v_pair, ((uint64_t **)(&__pyx_v_carray)), (&__pyx_v_carraylen));

    +161:             return [x for x in (<uint64_t *>carray)[:carraylen]]

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

     162:

    +163:         if datatype == nvpair.DATA_TYPE_STRING_ARRAY:

      __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_STRING_ARRAY) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +164:             nvpair.nvpair_value_string_array(pair, <char***>&carray, &carraylen)

        nvpair_value_string_array(__pyx_v_pair, ((char ***)(&__pyx_v_carray)), (&__pyx_v_carraylen));

    +165:             return [x for x in (<char**>carray)[:carraylen]]

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

     166:

    +167:         if datatype == nvpair.DATA_TYPE_NVLIST:

      __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_NVLIST) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +168:             nvpair.nvpair_value_nvlist(pair, &nested)

        nvpair_value_nvlist(__pyx_v_pair, (&__pyx_v_nested));

    +169:             return dict(NVList(<uintptr_t>nested)) if wrap_dict else NVList(<uintptr_t>nested)

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

     170:

    +171:         if datatype == nvpair.DATA_TYPE_NVLIST_ARRAY:

      __pyx_t_1 = ((__pyx_v_datatype == DATA_TYPE_NVLIST_ARRAY) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +172:             nvpair.nvpair_value_nvlist_array(pair, <nvpair.nvlist_t***>&carray, &carraylen)

        nvpair_value_nvlist_array(__pyx_v_pair, ((nvlist_t ***)(&__pyx_v_carray)), (&__pyx_v_carraylen));

    +173:             return [dict(NVList(x)) if wrap_dict else NVList(x) for x in (<uintptr_t *>carray)[:carraylen]]

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

     174:

    +175:     def __contains__(self, 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
      __Pyx_RefNannySetupContext("__contains__", 0);
    /* … */
      /* 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;
    }

    +176:         return nvpair.nvlist_exists(self.handle, 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;

     177:

    +178:     def __delitem__(self, 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
      __Pyx_RefNannySetupContext("__delitem__", 0);
    /* … */
      /* 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 */

    +179:         nvpair.nvlist_remove(self.handle, key, self.type(key))

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

     180:

    +181:     def __iter__(self):

    /* 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 */
    {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("None", 0);
      __pyx_L3_first_run:;
      if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 181, __pyx_L1_error)
    /* … */
      /* 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;
    }
    /* … */
    struct __pyx_obj_6libzfs___pyx_scope_struct____iter__ {
      PyObject_HEAD
      nvpair_t *__pyx_v_pair;
      struct __pyx_obj_6libzfs_NVList *__pyx_v_self;
    };

    +182:         cdef nvpair.nvpair_t *pair = NULL

      __pyx_cur_scope->__pyx_v_pair = NULL;

    +183:         while True:

      while (1) {

    +184:             pair = nvpair.nvlist_next_nvpair(self.handle, pair)

        __pyx_cur_scope->__pyx_v_pair = nvlist_next_nvpair(__pyx_cur_scope->__pyx_v_self->handle, __pyx_cur_scope->__pyx_v_pair);

    +185:             if pair is NULL:

        __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_pair == NULL) != 0);
        if (__pyx_t_1) {
    /* … */
        }

    +186:                 return

          __Pyx_XDECREF(__pyx_r);
          __pyx_r = NULL;
          goto __pyx_L0;

     187:

    +188:             yield nvpair.nvpair_name(pair)

        __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)
      }

     189:

    +190:     def get(self, key, object default=None):

    /* 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
      __Pyx_RefNannySetupContext("get", 0);
    /* … */
      /* 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;
    }

    +191:         if not key in self:

      __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) {
    /* … */
      }

    +192:             return default

        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_default);
        __pyx_r = __pyx_v_default;
        goto __pyx_L0;

     193:

    +194:         return 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;

     195:

    +196:     def type(self, key):

    /* 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
      __Pyx_RefNannySetupContext("type", 0);
    /* … */
      /* 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;
    }

    +197:         cdef nvpair.nvpair_t *pair = self.__get_pair(key)

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

    +198:         return nvpair.nvpair_type(pair)

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

     199:

    +200:     def set(self, key, value, typeid):

    /* 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
      __Pyx_RefNannySetupContext("set", 0);
    /* … */
      /* 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;
    }

     201:         cdef NVList cnvlist

    +202:         cdef void* carray = NULL

      __pyx_v_carray = NULL;

     203:         cdef uintptr_t cptr

     204:

     205:         # Oh god, this is tedious...

     206:

    +207:         if isinstance(value, (str, unicode)):

      __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) {
    /* … */
      }

    +208:             if typeid == nvpair.DATA_TYPE_STRING:

        __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) {
    /* … */
        }

    +209:                 nvpair.nvlist_add_string(self.handle, key, value)

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

    +210:                 return

          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          goto __pyx_L0;

     211:

    +212:         if isinstance(value, type(None)):

      __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) {
    /* … */
      }

    +213:             if typeid == nvpair.DATA_TYPE_BOOLEAN:

        __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) {
    /* … */
        }

    +214:                 nvpair.nvlist_add_boolean(self.handle, key)

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

    +215:                 return

          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          goto __pyx_L0;

     216:

    +217:         if isinstance(value, bool):

      __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) {
    /* … */
      }

    +218:             if typeid == nvpair.DATA_TYPE_BOOLEAN:

        __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) {
    /* … */
        }

    +219:                 nvpair.nvlist_add_boolean_value(self.handle, key, <boolean_t>value)

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

    +220:                 return

          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          goto __pyx_L0;

     221:

    +222:         if isinstance(value, numbers.Number):

      __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) {
    /* … */
      }

    +223:             if typeid == nvpair.DATA_TYPE_BYTE:

        __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) {
    /* … */
        }

    +224:                 nvpair.nvlist_add_byte(self.handle, key, <char>value)

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

    +225:                 return

          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          goto __pyx_L0;

     226:

    +227:             if typeid == nvpair.DATA_TYPE_UINT8:

        __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) {
    /* … */
        }

    +228:                 nvpair.nvlist_add_uint8(self.handle, key, <uint8_t>value)

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

    +229:                 return

          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          goto __pyx_L0;

     230:

    +231:             if typeid == nvpair.DATA_TYPE_INT8:

        __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) {
    /* … */
        }

    +232:                 nvpair.nvlist_add_int8(self.handle, key, <int8_t>value)

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

    +233:                 return

          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          goto __pyx_L0;

     234:

    +235:             if typeid == nvpair.DATA_TYPE_UINT16:

        __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) {
    /* … */
        }

    +236:                 nvpair.nvlist_add_uint16(self.handle, key, <uint16_t>value)

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

    +237:                 return

          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          goto __pyx_L0;

     238:

    +239:             if typeid == nvpair.DATA_TYPE_INT16:

        __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) {
    /* … */
        }

    +240:                 nvpair.nvlist_add_int16(self.handle, key, <int16_t>value)

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

    +241:                 return

          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          goto __pyx_L0;

     242:

    +243:             if typeid == nvpair.DATA_TYPE_UINT32:

        __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) {
    /* … */
        }

    +244:                 nvpair.nvlist_add_uint32(self.handle, key, <uint32_t>value)

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

    +245:                 return

          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          goto __pyx_L0;

     246:

    +247:             if typeid == nvpair.DATA_TYPE_INT32:

        __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) {
    /* … */
        }

    +248:                 nvpair.nvlist_add_int32(self.handle, key, <int32_t>value)

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

    +249:                 return

          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          goto __pyx_L0;

     250:

    +251:             if typeid == nvpair.DATA_TYPE_UINT64:

        __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) {
    /* … */
        }

    +252:                 nvpair.nvlist_add_uint64(self.handle, key, <uint64_t>value)

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

    +253:                 return

          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          goto __pyx_L0;

     254:

    +255:             if typeid == nvpair.DATA_TYPE_INT64:

        __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) {
    /* … */
        }

    +256:                 nvpair.nvlist_add_int64(self.handle, key, <int64_t>value)

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

    +257:                 return

          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          goto __pyx_L0;

     258:

    +259:         if isinstance(value, NVList):

      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_6libzfs_NVList);
      __pyx_t_2 = (__pyx_t_1 != 0);
      if (__pyx_t_2) {
    /* … */
      }

    +260:             if typeid == nvpair.DATA_TYPE_NVLIST:

        __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) {
    /* … */
        }

    +261:                 cnvlist = <NVList>value

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

    +262:                 nvpair.nvlist_add_nvlist(self.handle, key, cnvlist.handle)

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

    +263:                 return

          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          goto __pyx_L0;

     264:

    +265:         if isinstance(value, dict):

      __pyx_t_2 = PyDict_Check(__pyx_v_value);
      __pyx_t_1 = (__pyx_t_2 != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +266:             if typeid == nvpair.DATA_TYPE_NVLIST:

        __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) {
    /* … */
        }

    +267:                 cnvlist = NVList(otherdict=value)

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

    +268:                 nvpair.nvlist_add_nvlist(self.handle, key, cnvlist.handle)

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

    +269:                 return

          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          goto __pyx_L0;

     270:

    +271:         if isinstance(value, collections.Sequence):

      __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) {
    /* … */
      }

    +272:             if typeid == nvpair.DATA_TYPE_STRING_ARRAY:

        __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) {
    /* … */
        }

    +273:                 carray = malloc(len(value) * sizeof(char*))

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

    +274:                 for idx, i in enumerate(value):

          __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;
    /* … */
          }
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +275:                     (<char**>carray)[idx] = i

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

     276:

    +277:                 nvpair.nvlist_add_string_array(self.handle, key, <char**>carray, len(value))

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

     278:

    +279:             if typeid == nvpair.DATA_TYPE_BOOLEAN_ARRAY:

        __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) {
    /* … */
        }

    +280:                 carray = malloc(len(value) * sizeof(char*))

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

    +281:                 for idx, i in enumerate(value):

          __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;
    /* … */
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    +282:                     (<boolean_t*>carray)[idx] = i

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

     283:

    +284:                 nvpair.nvlist_add_boolean_array(self.handle, key, <boolean_t*>carray, len(value))

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

     285:

    +286:             if typeid == nvpair.DATA_TYPE_BYTE_ARRAY:

        __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) {
    /* … */
        }

    +287:                 carray = malloc(len(value) * sizeof(char))

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

    +288:                 for idx, i in enumerate(value):

          __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;
    /* … */
          }
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +289:                     (<char*>carray)[idx] = i

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

     290:

    +291:                 nvpair.nvlist_add_byte_array(self.handle, key, <uchar_t*>carray, len(value))

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

     292:

    +293:             if typeid == nvpair.DATA_TYPE_UINT8_ARRAY:

        __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) {
    /* … */
        }

    +294:                 carray = malloc(len(value) * sizeof(uint8_t))

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

    +295:                 for idx, i in enumerate(value):

          __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;
    /* … */
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    +296:                     (<uint8_t*>carray)[idx] = i

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

     297:

    +298:                 nvpair.nvlist_add_uint8_array(self.handle, key, <uint8_t*>carray, len(value))

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

     299:

    +300:             if typeid == nvpair.DATA_TYPE_INT8_ARRAY:

        __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) {
    /* … */
        }

    +301:                 carray = malloc(len(value) * sizeof(int8_t))

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

    +302:                 for idx, i in enumerate(value):

          __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;
    /* … */
          }
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +303:                     (<int8_t*>carray)[idx] = i

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

     304:

    +305:                 nvpair.nvlist_add_int8_array(self.handle, key, <int8_t*>carray, len(value))

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

     306:

    +307:             if typeid == nvpair.DATA_TYPE_UINT16_ARRAY:

        __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) {
    /* … */
        }

    +308:                 carray = malloc(len(value) * sizeof(uint16_t))

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

    +309:                 for idx, i in enumerate(value):

          __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;
    /* … */
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    +310:                     (<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, 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;

     311:

    +312:                 nvpair.nvlist_add_uint16_array(self.handle, key, <uint16_t*>carray, len(value))

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

     313:

    +314:             if typeid == nvpair.DATA_TYPE_INT16_ARRAY:

        __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) {
    /* … */
        }

    +315:                 carray = malloc(len(value) * sizeof(int16_t))

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

    +316:                 for idx, i in enumerate(value):

          __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;
    /* … */
          }
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +317:                     (<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;

     318:

     319:

    +320:                 nvpair.nvlist_add_int16_array(self.handle, key, <int16_t*>carray, len(value))

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

     321:

    +322:             if typeid == nvpair.DATA_TYPE_UINT32_ARRAY:

        __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) {
    /* … */
        }

    +323:                 carray = malloc(len(value) * sizeof(uint32_t))

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

    +324:                 for idx, i in enumerate(value):

          __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;
    /* … */
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    +325:                     (<uint32_t*>carray)[idx] = i

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

     326:

    +327:                 nvpair.nvlist_add_uint32_array(self.handle, key, <uint32_t*>carray, len(value))

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

     328:

    +329:             if typeid == nvpair.DATA_TYPE_INT32_ARRAY:

        __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) {
    /* … */
        }

    +330:                 carray = malloc(len(value) * sizeof(int32_t))

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

    +331:                 for idx, i in enumerate(value):

          __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;
    /* … */
          }
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +332:                     (<int32_t*>carray)[idx] = i

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

     333:

    +334:                 nvpair.nvlist_add_int32_array(self.handle, key, <int32_t*>carray, len(value))

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

     335:

    +336:             if typeid == nvpair.DATA_TYPE_UINT64_ARRAY:

        __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) {
    /* … */
        }

    +337:                 carray = malloc(len(value) * sizeof(uint64_t))

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

    +338:                 for idx, i in enumerate(value):

          __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;
    /* … */
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    +339:                     (<uint64_t*>carray)[idx] = i

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

     340:

    +341:                 nvpair.nvlist_add_uint64_array(self.handle, key, <uint64_t*>carray, len(value))

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

     342:

    +343:             if typeid == nvpair.DATA_TYPE_INT64_ARRAY:

        __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) {
    /* … */
        }

    +344:                 carray = malloc(len(value) * sizeof(int64_t))

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

    +345:                 for idx, i in enumerate(value):

          __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;
    /* … */
          }
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +346:                     (<int64_t*>carray)[idx] = i

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

     347:

    +348:                 nvpair.nvlist_add_int64_array(self.handle, key, <int64_t*>carray, len(value))

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

     349:

    +350:             if typeid == nvpair.DATA_TYPE_NVLIST_ARRAY:

        __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) {
    /* … */
        }

    +351:                 carray = malloc(len(value) * sizeof(nvpair.nvlist_t*))

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

    +352:                 for idx, i in enumerate(value):

          __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;
    /* … */
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    +353:                     cnvlist = <NVList>i

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

    +354:                     (<uintptr_t*>carray)[idx] = <uintptr_t>cnvlist.handle

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

     355:

    +356:                 nvpair.nvlist_add_nvlist_array(self.handle, key, <nvpair.nvlist_t**>carray, len(value))

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

     357:

    +358:             if carray != NULL:

        __pyx_t_2 = ((__pyx_v_carray != NULL) != 0);
        if (__pyx_t_2) {
    /* … */
        }

    +359:                 free(carray)

          free(__pyx_v_carray);

     360:

    +361:             return

        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

     362:

    +363:         raise ValueError('Value not compatible with type specified: {0}'.format(type(value).__name__))

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

     364:

    +365:     def __getitem__(self, key):

    /* 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
      __Pyx_RefNannySetupContext("__getitem__", 0);
    /* … */
      /* 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;
    }

     366:         cdef nvpair.nvpair_t *pair

     367:

    +368:         pair = self.__get_pair(key)

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

    +369:         return self.__get_value(pair)

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

     370:

    +371:     def __setitem__(self, key, value):

    /* 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
      __Pyx_RefNannySetupContext("__setitem__", 0);
      __Pyx_INCREF(__pyx_v_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;
    }

    +372:         if type(key) is unicode:

      __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_key)) == ((PyObject *)(&PyUnicode_Type)));
      __pyx_t_2 = (__pyx_t_1 != 0);
      if (__pyx_t_2) {
    /* … */
      }

    +373:             key = str(key)

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

     374:

    +375:         if type(value) is bool or value is None:

      __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) {
    /* … */
      }

    +376:             self.set(key, value, nvpair.DATA_TYPE_BOOLEAN)

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

     377:

    +378:         if type(value) is int:

      __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_value)) == ((PyObject *)(&PyInt_Type)));
      __pyx_t_1 = (__pyx_t_2 != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +379:             self.set(key, value, nvpair.DATA_TYPE_UINT64)

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

     380:

    +381:         if type(value) is str or type(value) is unicode:

      __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) {
    /* … */
      }

    +382:             self.set(key, str(value), nvpair.DATA_TYPE_STRING)

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

     383:

    +384:         if type(value) is 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) {
    /* … */
      }

    +385:             self.set(key, value, nvpair.DATA_TYPE_NVLIST)

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

     386:

    +387:         if type(value) is list:

      __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_value)) == ((PyObject *)(&PyList_Type)));
      __pyx_t_1 = (__pyx_t_2 != 0);
      if (__pyx_t_1) {
    /* … */
      }

     388:             # We need some heuristics here...

    +389:             if len(value) == 0:

        __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) {
    /* … */
        }

     390:                 # don't know what to do!

    +391:                 return

          __pyx_r = 0;
          goto __pyx_L0;

     392:

    +393:             if type(value[0]) is NVList:

        __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) {
    /* … */
        }

    +394:                 self.set(key, value, nvpair.DATA_TYPE_NVLIST_ARRAY)

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

     395:

    +396:             if type(value[0]) is int:

        __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) {
    /* … */
        }

    +397:                 self.set(key, value, nvpair.DATA_TYPE_INT32_ARRAY)

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

     398:

    +399:             if type(value[0]) is long:

        __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) {
    /* … */
        }

    +400:                 self.set(key, value, nvpair.DATA_TYPE_INT64_ARRAY)

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

     401:

    +402:             if type(value[0]) is str or type(value) is unicode:

        __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) {
    /* … */
        }

    +403:                 self.set(key, value, nvpair.DATA_TYPE_STRING_ARRAY)

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

     404:

    +405:         if type(value) is dict:

      __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_value)) == ((PyObject *)(&PyDict_Type)));
      __pyx_t_1 = (__pyx_t_2 != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +406:             self.set(key, value, nvpair.DATA_TYPE_NVLIST)

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

     407:

    +408:     def get_type(self, key):

    /* 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
      __Pyx_RefNannySetupContext("get_type", 0);
    /* … */
      /* 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;
    }

    +409:         pair = self.__get_pair(key)

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

    +410:         return nvpair.nvpair_type(pair)

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

     411:

    +412:     def keys(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
      __Pyx_RefNannySetupContext("keys", 0);
    /* … */
      /* 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;
    }

    +413:         return list(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;

     414:

    +415:     def values(self):

    /* 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
      __Pyx_RefNannySetupContext("values", 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_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 */

    +416:         return [v for k, v in self.items()]

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

     417:

    +418:     def items(self, raw=False):

    /* 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 */
    {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("None", 0);
      __pyx_L3_first_run:;
      if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 418, __pyx_L1_error)
    /* … */
      /* 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;
    }
    /* … */
    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;
    };

    +419:         cdef nvpair.nvpair_t *pair = NULL

      __pyx_cur_scope->__pyx_v_pair = NULL;

    +420:         while True:

      while (1) {

    +421:             pair = nvpair.nvlist_next_nvpair(self.handle, pair)

        __pyx_cur_scope->__pyx_v_pair = nvlist_next_nvpair(__pyx_cur_scope->__pyx_v_self->handle, __pyx_cur_scope->__pyx_v_pair);

    +422:             if pair is NULL:

        __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_pair == NULL) != 0);
        if (__pyx_t_1) {
    /* … */
        }

    +423:                 return

          __Pyx_XDECREF(__pyx_r);
          __pyx_r = NULL;
          goto __pyx_L0;

     424:

    +425:             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)
      }