/* Generated by Cython 3.2.5 */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
/* InitLimitedAPI */
#if defined(Py_LIMITED_API)
  #if !defined(CYTHON_LIMITED_API)
  #define CYTHON_LIMITED_API 1
  #endif
#elif defined(CYTHON_LIMITED_API)
  #ifdef _MSC_VER
  #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.")
  #else
  #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.
  #endif
#endif

#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x03080000
    #error Cython requires Python 3.8+.
#else
#define __PYX_ABI_VERSION "3_2_5"
#define CYTHON_HEX_VERSION 0x030205F0
#define CYTHON_FUTURE_DIVISION 1
/* CModulePreamble */
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
#if defined(GRAALVM_PYTHON)
  /* For very preliminary testing purposes. Most variables are set the same as PyPy.
     The existence of this section does not imply that anything works or is even tested */
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 1
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_ASSUME_SAFE_SIZE
  #define CYTHON_ASSUME_SAFE_SIZE 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_AM_SEND
  #define CYTHON_USE_AM_SEND 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 1
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#elif defined(PYPY_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 1
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #ifndef CYTHON_ASSUME_SAFE_SIZE
    #define CYTHON_ASSUME_SAFE_SIZE 1
  #endif
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #if PY_VERSION_HEX < 0x03090000
    #undef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00)
  #endif
  #undef CYTHON_USE_AM_SEND
  #define CYTHON_USE_AM_SEND 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100)
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#elif defined(CYTHON_LIMITED_API)
  #ifdef Py_LIMITED_API
    #undef __PYX_LIMITED_VERSION_HEX
    #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
  #endif
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 1
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 1
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #endif
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #endif
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_ASSUME_SAFE_SIZE
  #define CYTHON_ASSUME_SAFE_SIZE 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #endif
  #ifndef CYTHON_USE_AM_SEND
    #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000)
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #ifndef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 1
  #endif
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #ifdef Py_GIL_DISABLED
    #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1
  #else
    #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #endif
  #if PY_VERSION_HEX < 0x030A0000
    #undef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #elif !defined(CYTHON_USE_TYPE_SLOTS)
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #ifndef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLIST_INTERNALS)
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
  #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_ASSUME_SAFE_SIZE
    #define CYTHON_ASSUME_SAFE_SIZE 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_FAST_GIL
    #define CYTHON_FAST_GIL 0
  #elif !defined(CYTHON_FAST_GIL)
    #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6)
  #endif
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #ifndef CYTHON_USE_SYS_MONITORING
    #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #ifndef CYTHON_USE_AM_SEND
    #define CYTHON_USE_AM_SEND 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS 0
  #elif !defined(CYTHON_USE_DICT_VERSIONS)
    #define CYTHON_USE_DICT_VERSIONS  (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE)
  #endif
  #ifndef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 1
  #endif
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
  #ifndef CYTHON_USE_FREELISTS
    #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
  #endif
  #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000
    #undef CYTHON_IMMORTAL_CONSTANTS
    #define CYTHON_IMMORTAL_CONSTANTS 0  // definitely won't work
  #elif !defined(CYTHON_IMMORTAL_CONSTANTS)
    #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
  #endif
#endif
#ifndef CYTHON_COMPRESS_STRINGS
  #define CYTHON_COMPRESS_STRINGS 1
#endif
#ifndef CYTHON_FAST_PYCCALL
#define CYTHON_FAST_PYCCALL  CYTHON_FAST_PYCALL
#endif
#ifndef CYTHON_VECTORCALL
#if CYTHON_COMPILING_IN_LIMITED_API
#define CYTHON_VECTORCALL  (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
#else
#define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL)
#endif
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(maybe_unused)
        #define CYTHON_UNUSED [[maybe_unused]]
      #endif
    #endif
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
  #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_USE_CPP_STD_MOVE
  #if defined(__cplusplus) && (\
    __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
    #define CYTHON_USE_CPP_STD_MOVE 1
  #else
    #define CYTHON_USE_CPP_STD_MOVE 0
  #endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#include <stdint.h>
typedef uintptr_t  __pyx_uintptr_t;
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(fallthrough)
        #define CYTHON_FALLTHROUGH [[fallthrough]]
      #endif
    #endif
    #ifndef CYTHON_FALLTHROUGH
      #if __has_cpp_attribute(clang::fallthrough)
        #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
      #elif __has_cpp_attribute(gnu::fallthrough)
        #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
      #endif
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif
#ifndef Py_UNREACHABLE
  #define Py_UNREACHABLE()  assert(0); abort()
#endif
#ifdef __cplusplus
  template <typename T>
  struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
  #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
#else
  #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
#endif
#if CYTHON_COMPILING_IN_PYPY == 1
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX < 0x030A0000)
#else
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX < 0x03090000)
#endif
#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))

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

/* PythonCompatibility */
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
#define __Pyx_DefaultClassType PyType_Type
#if CYTHON_COMPILING_IN_LIMITED_API
    #ifndef CO_OPTIMIZED
    static int CO_OPTIMIZED;
    #endif
    #ifndef CO_NEWLOCALS
    static int CO_NEWLOCALS;
    #endif
    #ifndef CO_VARARGS
    static int CO_VARARGS;
    #endif
    #ifndef CO_VARKEYWORDS
    static int CO_VARKEYWORDS;
    #endif
    #ifndef CO_ASYNC_GENERATOR
    static int CO_ASYNC_GENERATOR;
    #endif
    #ifndef CO_GENERATOR
    static int CO_GENERATOR;
    #endif
    #ifndef CO_COROUTINE
    static int CO_COROUTINE;
    #endif
#else
    #ifndef CO_COROUTINE
      #define CO_COROUTINE 0x80
    #endif
    #ifndef CO_ASYNC_GENERATOR
      #define CO_ASYNC_GENERATOR 0x200
    #endif
#endif
static int __Pyx_init_co_variables(void);
#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
  #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
#else
  #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
  #define __Pyx_Py_Is(x, y)  Py_Is(x, y)
#else
  #define __Pyx_Py_Is(x, y) ((x) == (y))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
  #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
#else
  #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
  #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
#else
  #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
  #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
#else
  #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
#endif
#define __Pyx_NoneAsNull(obj)  (__Pyx_Py_IsNone(obj) ? NULL : (obj))
#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
#else
  #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef Py_TPFLAGS_SEQUENCE
  #define Py_TPFLAGS_SEQUENCE 0
#endif
#ifndef Py_TPFLAGS_MAPPING
  #define Py_TPFLAGS_MAPPING 0
#endif
#ifndef Py_TPFLAGS_IMMUTABLETYPE
  #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8)
#endif
#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION
  #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7)
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#ifndef METH_FASTCALL
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #if PY_VERSION_HEX >= 0x030d00A4
  #  define __Pyx_PyCFunctionFast PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
  #else
  #  define __Pyx_PyCFunctionFast _PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
  #endif
#endif
#if CYTHON_METH_FASTCALL
  #define __Pyx_METH_FASTCALL METH_FASTCALL
  #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
  #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
#else
  #define __Pyx_METH_FASTCALL METH_VARARGS
  #define __Pyx_PyCFunction_FastCall PyCFunction
  #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
#endif
#if CYTHON_VECTORCALL
  #define __pyx_vectorcallfunc vectorcallfunc
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  PY_VECTORCALL_ARGUMENTS_OFFSET
  #define __Pyx_PyVectorcall_NARGS(n)  PyVectorcall_NARGS((size_t)(n))
#else
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  0
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(n))
#endif
#if PY_VERSION_HEX >= 0x030900B1
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_CheckExact(func)
#else
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_Check(func)
#endif
#define __Pyx_CyOrPyCFunction_Check(func)  PyCFunction_Check(func)
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  (((PyCFunctionObject*)(func))->m_ml->ml_meth)
#elif !CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  PyCFunction_GET_FUNCTION(func)
#endif
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FLAGS(func)  (((PyCFunctionObject*)(func))->m_ml->ml_flags)
static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
    return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
}
#endif
static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) {
#if CYTHON_COMPILING_IN_LIMITED_API
    return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
#else
    return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
#endif
}
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCFunction(func, cfunc)
#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  ((void)m, PyType_FromSpecWithBases(s, b))
  typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
#else
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  PyType_FromModuleAndSpec(m, s, b)
  #define __Pyx_PyCMethod  PyCMethod
#endif
#ifndef METH_METHOD
  #define METH_METHOD 0x200
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno))
#elif CYTHON_COMPILING_IN_GRAAL
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno))
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyThreadState_Current PyThreadState_Get()
#elif !CYTHON_FAST_THREAD_STATE
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x030d00A1
  #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#endif
#if CYTHON_USE_MODULE_STATE
static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op)
{
    void *result;
    result = PyModule_GetState(op);
    if (!result)
        Py_FatalError("Couldn't find the module state");
    return result;
}
#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o)
#else
#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global)
#endif
#define __Pyx_PyObject_GetSlot(obj, name, func_ctype)  __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype)
#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype)
#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((type)->name)
  #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype)
  #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL)
  #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype)
#else
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((func_ctype) PyType_GetSlot((type), Py_##name))
  #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\
    ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\
     (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\
     __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL)
  #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype)
  #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype)
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
#define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStrWithError(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
    PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
    if (res == NULL) PyErr_Clear();
    return res;
}
#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000
#define __Pyx_PyDict_GetItemStrWithError  PyDict_GetItemWithError
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#else
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
#if CYTHON_COMPILING_IN_PYPY
    return PyDict_GetItem(dict, name);
#else
    PyDictEntry *ep;
    PyDictObject *mp = (PyDictObject*) dict;
    long hash = ((PyStringObject *) name)->ob_shash;
    assert(hash != -1);
    ep = (mp->ma_lookup)(mp, name, hash);
    if (ep == NULL) {
        return NULL;
    }
    return ep->me_value;
#endif
}
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#endif
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetFlags(tp)   (((PyTypeObject *)tp)->tp_flags)
  #define __Pyx_PyType_HasFeature(type, feature)  ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
#else
  #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
  #define __Pyx_PyType_HasFeature(type, feature)  PyType_HasFeature(type, feature)
#endif
#define __Pyx_PyObject_GetIterNextFunc(iterator)  __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc)
#if CYTHON_USE_TYPE_SPECS
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  {\
    PyTypeObject *type = Py_TYPE((PyObject*)obj);\
    assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
    PyObject_GC_Del(obj);\
    Py_DECREF(type);\
}
#else
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  PyObject_GC_Del(obj)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((void)u, 1114111U)
  #define __Pyx_PyUnicode_KIND(u)         ((void)u, (0))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)u)
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GetLength(u))
#else
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_READY(op)       (0)
  #else
    #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                                0 : _PyUnicode_Ready((PyObject *)(op)))
  #endif
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         ((int)PyUnicode_KIND(u))
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #else
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
    #else
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
    #endif
  #endif
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #if !defined(PyUnicode_DecodeUnicodeEscape)
    #define PyUnicode_DecodeUnicodeEscape(s, size, errors)  PyUnicode_Decode(s, size, "unicode_escape", errors)
  #endif
  #if !defined(PyUnicode_Contains)
    #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
  #endif
  #if !defined(PyByteArray_Check)
    #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
  #endif
  #if !defined(PyObject_Format)
    #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
  #endif
#endif
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#elif CYTHON_COMPILING_IN_CPYTHON
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#else
  #define __Pyx_PySequence_ListKeepNew(obj)  PySequence_List(obj)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        __Pyx_IS_TYPE(obj, &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
enum __Pyx_ReferenceSharing {
  __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check
  __Pyx_ReferenceSharing_OwnStrongReference,
  __Pyx_ReferenceSharing_FunctionArgument,
  __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar
};
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\
    (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\
      (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\
      (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0)))
#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1)
#else
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0)
#endif
#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
  #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
  #else
    #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i)
  #endif
#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
  #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
  #else
    #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i))
  #endif
#else
  #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i))
#endif
#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\
    __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i))
#else
  #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i)
#endif
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result)
#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
  *result = PyObject_GetItem(dict, key);
  if (*result == NULL) {
    if (PyErr_ExceptionMatches(PyExc_KeyError)) {
      PyErr_Clear();
      return 0;
    }
    return -1;
  }
  return 1;
}
#else
static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
  *result = PyDict_GetItemWithError(dict, key);
  if (*result == NULL) {
    return PyErr_Occurred() ? -1 : 0;
  }
  Py_INCREF(*result);
  return 1;
}
#endif
#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST
  #define __Pyx_VISIT_CONST(obj)  Py_VISIT(obj)
#else
  #define __Pyx_VISIT_CONST(obj)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i)
  #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i)
#else
  #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
  #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i)
  #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
  #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i)
#endif
#if CYTHON_ASSUME_SAFE_SIZE
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
  #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o)
#else
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
  #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString)
  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
#endif
#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t
#define __Pyx_PyLong_AsHash_t   __Pyx_PyIndex_AsSsize_t
#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000
    #define __Pyx_PySendResult PySendResult
#else
    typedef enum {
        PYGEN_RETURN = 0,
        PYGEN_ERROR = -1,
        PYGEN_NEXT = 1,
    } __Pyx_PySendResult;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3
  typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result);
#else
  #define __Pyx_pyiter_sendfunc sendfunc
#endif
#if !CYTHON_USE_AM_SEND
#define __PYX_HAS_PY_AM_SEND 0
#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000
#define __PYX_HAS_PY_AM_SEND 1
#else
#define __PYX_HAS_PY_AM_SEND 2  // our own backported implementation
#endif
#if __PYX_HAS_PY_AM_SEND < 2
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
#else
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
        __Pyx_pyiter_sendfunc am_send;
    } __Pyx_PyAsyncMethodsStruct;
    #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s))
#endif
#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0
    #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21)
#else
    #define __Pyx_TPFLAGS_HAVE_AM_SEND (0)
#endif
#if PY_VERSION_HEX >= 0x03090000
#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get()
#else
#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp
#endif
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000
#ifdef __cplusplus
extern "C"
#endif
PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize);
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) {
    int value;
    PyObject *py_value = PyObject_GetAttrString(inspect, name);
    if (!py_value) return 0;
    value = (int) PyLong_AsLong(py_value);
    Py_DECREF(py_value);
    *write_to = value;
    return value != -1 || !PyErr_Occurred();
}
static int __Pyx_init_co_variables(void) {
    PyObject *inspect;
    int result;
    inspect = PyImport_ImportModule("inspect");
    result =
#if !defined(CO_OPTIMIZED)
        __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) &&
#endif
#if !defined(CO_NEWLOCALS)
        __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) &&
#endif
#if !defined(CO_VARARGS)
        __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) &&
#endif
#if !defined(CO_VARKEYWORDS)
        __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) &&
#endif
#if !defined(CO_ASYNC_GENERATOR)
        __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) &&
#endif
#if !defined(CO_GENERATOR)
        __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) &&
#endif
#if !defined(CO_COROUTINE)
        __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) &&
#endif
        1;
    Py_DECREF(inspect);
    return result ? 0 : -1;
}
#else
static int __Pyx_init_co_variables(void) {
    return 0;  // It's a limited API-only feature
}
#endif

/* MathInitCode */
#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
  #ifndef _USE_MATH_DEFINES
    #define _USE_MATH_DEFINES
  #endif
#endif
#include <math.h>
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0
#endif
#ifndef CYTHON_CLINE_IN_TRACEBACK
#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#endif
#if CYTHON_CLINE_IN_TRACEBACK
#define __PYX_MARK_ERR_POS(f_index, lineno)  { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; }
#else
#define __PYX_MARK_ERR_POS(f_index, lineno)  { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; }
#endif
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

#ifdef CYTHON_EXTERN_C
    #undef __PYX_EXTERN_C
    #define __PYX_EXTERN_C CYTHON_EXTERN_C
#elif defined(__PYX_EXTERN_C)
    #ifdef _MSC_VER
    #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
    #else
    #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
    #endif
#else
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__brlapi
#define __PYX_HAVE_API__brlapi
/* Early includes */
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include "sys/types.h"
#include "Programs/brlapi_protocol.h"
#include "Programs/brlapi.h"
#include "bindings.h"
#include "stdlib.h"
#include "string.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

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

#ifdef CYTHON_FREETHREADING_COMPATIBLE
#if CYTHON_FREETHREADING_COMPATIBLE
#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED
#else
#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
#endif
#else
#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
#endif
#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s)
#else
    #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AsString(s))
    #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s)
#endif
#define __Pyx_PyObject_AsWritableString(s)    ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#define __Pyx_PyUnicode_FromOrdinal(o)       PyUnicode_FromOrdinal((int)o)
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef)
    return Py_NewRef(obj);
#else
    Py_INCREF(obj);
    return obj;
#endif
}
static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef)
    return Py_XNewRef(obj);
#else
    Py_XINCREF(obj);
    return obj;
#endif
}
static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b);
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x)
#else
#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x)
#endif
#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x))
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_VERSION_HEX >= 0x030C00A7
  #ifndef _PyLong_SIGN_MASK
    #define _PyLong_SIGN_MASK 3
  #endif
  #ifndef _PyLong_NON_SIZE_BITS
    #define _PyLong_NON_SIZE_BITS 3
  #endif
  #define __Pyx_PyLong_Sign(x)  (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
  #define __Pyx_PyLong_IsNeg(x)  ((__Pyx_PyLong_Sign(x) & 2) != 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (!__Pyx_PyLong_IsNeg(x))
  #define __Pyx_PyLong_IsZero(x)  (__Pyx_PyLong_Sign(x) & 1)
  #define __Pyx_PyLong_IsPos(x)  (__Pyx_PyLong_Sign(x) == 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  (__Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
  #define __Pyx_PyLong_SignedDigitCount(x)\
        ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
  #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
    #define __Pyx_PyLong_IsCompact(x)     PyUnstable_Long_IsCompact((PyLongObject*) x)
    #define __Pyx_PyLong_CompactValue(x)  PyUnstable_Long_CompactValue((PyLongObject*) x)
  #else
    #define __Pyx_PyLong_IsCompact(x)     (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
    #define __Pyx_PyLong_CompactValue(x)  ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
  #endif
  typedef Py_ssize_t  __Pyx_compact_pylong;
  typedef size_t  __Pyx_compact_upylong;
  #else
  #define __Pyx_PyLong_IsNeg(x)  (Py_SIZE(x) < 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (Py_SIZE(x) >= 0)
  #define __Pyx_PyLong_IsZero(x)  (Py_SIZE(x) == 0)
  #define __Pyx_PyLong_IsPos(x)  (Py_SIZE(x) > 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  __Pyx_sst_abs(Py_SIZE(x))
  #define __Pyx_PyLong_SignedDigitCount(x)  Py_SIZE(x)
  #define __Pyx_PyLong_IsCompact(x)  (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
  #define __Pyx_PyLong_CompactValue(x)\
        ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
  typedef sdigit  __Pyx_compact_pylong;
  typedef digit  __Pyx_compact_upylong;
  #endif
  #if PY_VERSION_HEX >= 0x030C00A5
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->long_value.ob_digit)
  #else
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->ob_digit)
  #endif
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL)
#else
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
/* PretendToInitialize */
#ifdef __cplusplus
#if __cplusplus > 201103L
#include <type_traits>
#endif
template <typename T>
static void __Pyx_pretend_to_initialize(T* ptr) {
#if __cplusplus > 201103L
    if ((std::is_trivially_default_constructible<T>::value))
#endif
        *ptr = T();
    (void)ptr;
}
#else
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
#endif


#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_m = NULL;
#endif
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * const __pyx_cfilenm = __FILE__;
static const char *__pyx_filename;

/* #### Code section: filename_table ### */

static const char* const __pyx_f[] = {
  "brlapi.pyx",
  "(tree fragment)",
  "cpython/type.pxd",
  "constants.auto.pyx",
};
/* #### Code section: utility_code_proto_before_types ### */
/* NoFastGil.proto */
#define __Pyx_PyGILState_Ensure PyGILState_Ensure
#define __Pyx_PyGILState_Release PyGILState_Release
#define __Pyx_FastGIL_Remember()
#define __Pyx_FastGIL_Forget()
#define __Pyx_FastGilFuncInit()

/* Atomics.proto (used by UnpackUnboundCMethod) */
#include <pythread.h>
#ifndef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 1
#endif
#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __pyx_atomic_int_type int
#define __pyx_nonatomic_int_type int
#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
                        (__STDC_VERSION__ >= 201112L) &&\
                        !defined(__STDC_NO_ATOMICS__))
    #include <stdatomic.h>
#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
                    (__cplusplus >= 201103L) ||\
                    (defined(_MSC_VER) && _MSC_VER >= 1700)))
    #include <atomic>
#endif
#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
                        (__STDC_VERSION__ >= 201112L) &&\
                        !defined(__STDC_NO_ATOMICS__) &&\
                       ATOMIC_INT_LOCK_FREE == 2)
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type atomic_int
    #define __pyx_atomic_ptr_type atomic_uintptr_t
    #define __pyx_nonatomic_ptr_type uintptr_t
    #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed)
    #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel)
    #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel)
    #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg)
    #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
    #define __pyx_atomic_load(value) atomic_load(value)
    #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed)
    #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire)
    #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
    #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
    #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
        #pragma message ("Using standard C atomics")
    #elif defined(__PYX_DEBUG_ATOMICS)
        #warning "Using standard C atomics"
    #endif
#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
                    (__cplusplus >= 201103L) ||\
\
                    (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\
                    ATOMIC_INT_LOCK_FREE == 2)
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type std::atomic_int
    #define __pyx_atomic_ptr_type std::atomic_uintptr_t
    #define __pyx_nonatomic_ptr_type uintptr_t
    #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed)
    #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel)
    #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel)
    #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg)
    #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
    #define __pyx_atomic_load(value) std::atomic_load(value)
    #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed)
    #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire)
    #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
    #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
    #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
        #pragma message ("Using standard C++ atomics")
    #elif defined(__PYX_DEBUG_ATOMICS)
        #warning "Using standard C++ atomics"
    #endif
#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
                    (__GNUC_MINOR__ > 1 ||\
                    (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
    #define __pyx_atomic_ptr_type void*
    #define __pyx_nonatomic_ptr_type void*
    #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1)
    #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1)
    #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1)
    #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg)
    static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
        __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value)
    static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
        __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Using GNU atomics"
    #endif
#elif CYTHON_ATOMICS && defined(_MSC_VER)
    #include <intrin.h>
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type long
    #define __pyx_atomic_ptr_type void*
    #undef __pyx_nonatomic_int_type
    #define __pyx_nonatomic_int_type long
    #define __pyx_nonatomic_ptr_type void*
    #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer)
    #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1)
    #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1)
    #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1)
    #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg)
    static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
        __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0)
    #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value
    #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0)
    #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value)
    static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
        __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #ifdef __PYX_DEBUG_ATOMICS
        #pragma message ("Using MSVC atomics")
    #endif
#else
    #undef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 0
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Not using atomics"
    #endif
#endif

/* CriticalSectionsDefinition.proto (used by CriticalSections) */
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyCriticalSection void*
#define __Pyx_PyCriticalSection2 void*
#define __Pyx_PyCriticalSection_End(cs)
#define __Pyx_PyCriticalSection2_End(cs)
#else
#define __Pyx_PyCriticalSection PyCriticalSection
#define __Pyx_PyCriticalSection2 PyCriticalSection2
#define __Pyx_PyCriticalSection_End PyCriticalSection_End
#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End
#endif

/* CriticalSections.proto (used by ParseKeywordsImpl) */
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs)
#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs)
#else
#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin
#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin
#endif
#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_BEGIN_CRITICAL_SECTION(o) {
#define __Pyx_END_CRITICAL_SECTION() }
#else
#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION
#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION
#endif

/* IncludeStructmemberH.proto (used by FixUpExtensionType) */
#include <structmember.h>

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

/* #### Code section: numeric_typedefs ### */
/* #### Code section: complex_type_declarations ### */
/* #### Code section: type_declarations ### */

/*--- Type declarations ---*/
struct __pyx_obj_6brlapi_WriteStruct;
struct __pyx_obj_6brlapi_Connection;
struct __pyx_obj_6brlapi___pyx_scope_struct__watchParameter;

/* "brlapi.pyx":294
 * 		return self.settings.auth
 * 
 * cdef class WriteStruct:             # <<<<<<<<<<<<<<
 * 	"""Structure containing arguments to be given to Connection.write()
 * 	See brlapi_writeArguments_t(3).
*/
struct __pyx_obj_6brlapi_WriteStruct {
  PyObject_HEAD
  brlapi_writeArguments_t props;
};


/* "brlapi.pyx":432
 * 				self.props.orMask = NULL
 * 
 * cdef class Connection:             # <<<<<<<<<<<<<<
 * 	"""Class which manages the bridge between your program and BrlAPI"""
 * 
*/
struct __pyx_obj_6brlapi_Connection {
  PyObject_HEAD
  brlapi_handle_t *h;
  brlapi_connectionSettings_t settings;
  int fd;
};


/* "brlapi.pyx":1066
 * 		c_brlapi.free(c_value)
 * 
 * 	def watchParameter(self, param, subparam, flags, func):             # <<<<<<<<<<<<<<
 * 		"""Set a parameter change callback.
 * 		See brlapi_watchParameter(3).
*/
struct __pyx_obj_6brlapi___pyx_scope_struct__watchParameter {
  PyObject_HEAD
  PyObject *__pyx_v_func;
};

/* #### Code section: utility_code_proto ### */

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, Py_ssize_t);
    void (*DECREF)(void*, PyObject*, Py_ssize_t);
    void (*GOTREF)(void*, PyObject*, Py_ssize_t);
    void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
    void* (*SetupContext)(const char*, Py_ssize_t, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
          }
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_XINCREF(r)  do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContextNogil()
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_Py_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; Py_XDECREF(tmp);\
    } while (0)
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* TupleAndListFromArray.proto (used by fastcall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
#endif
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
#endif

/* IncludeStringH.proto (used by BytesEquals) */
#include <string.h>

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

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

/* fastcall.proto */
#if CYTHON_AVOID_BORROWED_REFS
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i)
#elif CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i))
#else
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i))
#endif
#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
#define __Pyx_KwValues_VARARGS(args, nargs) NULL
#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
#if CYTHON_METH_FASTCALL
    #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i])
    #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds)
    #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
    static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
    CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
  #else
    #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
  #endif
#else
    #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS
    #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
    #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
    #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
    #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
#endif
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start)
#else
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
#endif

/* py_dict_items.proto (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);

/* CallCFunction.proto (used by CallUnboundCMethod0) */
#define __Pyx_CallCFunction(cfunc, self, args)\
    ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args)
#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\
    ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs)
#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\
    ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs)
#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\
    ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames)

/* PyObjectCall.proto (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

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

/* PyObjectFastCall.proto (used by PyObjectCallOneArg) */
#define __Pyx_PyObject_FastCall(func, args, nargs)  __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs);

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

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

/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */
typedef struct {
    PyObject *type;
    PyObject **method_name;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS
    __pyx_atomic_int_type initialized;
#endif
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) {
#if !CYTHON_ATOMICS
    return 1;
#else
    __pyx_nonatomic_int_type expected = 0;
    if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) {
        return 0;
    }
    return expected;
#endif
}
static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) {
#if CYTHON_ATOMICS
    __pyx_atomic_store(&cfunc->initialized, 2);
#endif
}
#else
#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2
#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc)
#endif

/* CallUnboundCMethod0.proto */
CYTHON_UNUSED
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#else
#define __Pyx_CallUnboundCMethod0(cfunc, self)  __Pyx__CallUnboundCMethod0(cfunc, self)
#endif

/* py_dict_values.proto (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);

/* OwnedDictNext.proto (used by ParseKeywordsImpl) */
#if CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue);
#else
CYTHON_INLINE
static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue);
#endif

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

/* ParseKeywordsImpl.export */
static int __Pyx_ParseKeywordsTuple(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs
);
static int __Pyx_ParseKeywordDictToDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name
);
static int __Pyx_ParseKeywordDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs
);

/* CallUnboundCMethod2.proto */
CYTHON_UNUSED
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
#else
#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2)  __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
#endif

/* ParseKeywords.proto */
static CYTHON_INLINE int __Pyx_ParseKeywords(
    PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[],
    PyObject *kwds2, PyObject *values[],
    Py_ssize_t num_pos_args, Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs
);

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

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

/* PyThreadStateGet.proto (used by PyErrFetchRestore) */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#if PY_VERSION_HEX >= 0x030C00A6
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->current_exception != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
#else
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->curexc_type != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->curexc_type)
#endif
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  (PyErr_Occurred() != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  PyErr_Occurred()
#endif

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

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

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

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

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

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

/* decode_c_string_utf16.proto (used by decode_c_bytes) */
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 0;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = -1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}

/* decode_c_bytes.proto (used by decode_bytes) */
static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
         const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));

/* decode_bytes.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_bytes(
         PyObject* string, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    char* as_c_string;
    Py_ssize_t size;
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
    as_c_string = PyBytes_AS_STRING(string);
    size = PyBytes_GET_SIZE(string);
#else
    if (PyBytes_AsStringAndSize(string, &as_c_string, &size) < 0) {
        return NULL;
    }
#endif
    return __Pyx_decode_c_bytes(
        as_c_string, size,
        start, stop, encoding, errors, decode_func);
}

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

/* PyValueError_Check.proto */
#define __Pyx_PyExc_ValueError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_ValueError)

/* PyObjectDelAttr.proto (used by PyObjectSetAttrStr) */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
#define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL)
#else
#define __Pyx_PyObject_DelAttr(o, n) PyObject_DelAttr(o, n)
#endif

/* PyObjectSetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   __Pyx_PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

/* PyObjectVectorCallKwBuilder.proto (used by PyObjectVectorCallMethodKwBuilder) */
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n);
#if CYTHON_VECTORCALL
#if PY_VERSION_HEX >= 0x03090000
#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall
#else
#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall
#endif
#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n)
static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n);
static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n);
#else
#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict
#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n)
#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value)
#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value)
#endif

/* PyObjectVectorCallMethodKwBuilder.proto */
#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000
#define __Pyx_Object_VectorcallMethod_CallFromBuilder PyObject_VectorcallMethod
#else
static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames);
#endif

/* PyObjectFormatAndDecref.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f);
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f);

/* JoinPyUnicode.export */
static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char);

/* RejectKeywords.export */
static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds);

/* PyObjectFastCallMethod.proto */
#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000
#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL)
#else
static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf);
#endif

/* PyTypeError_Check.proto */
#define __Pyx_PyExc_TypeError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_TypeError)

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

/* ArgTypeTestFunc.export */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))

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

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

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

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

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

/* GetTopmostException.proto (used by SaveResetException) */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

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

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

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

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

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

/* dict_setdefault.proto (used by FetchCommonType) */
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value);

/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp);
#endif

/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */
static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v);
#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v)

/* FixUpExtensionType.proto (used by FetchCommonType) */
static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);

/* AddModuleRef.proto (used by FetchSharedCythonModule) */
#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\
     __PYX_LIMITED_VERSION_HEX < 0x030d0000)
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name);
#else
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#endif

/* FetchSharedCythonModule.proto (used by FetchCommonType) */
static PyObject *__Pyx_FetchSharedCythonABIModule(void);

/* FetchCommonType.proto (used by CommonTypesMetaclass) */
static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases);

/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */
static int __pyx_CommonTypesMetaclass_init(PyObject *module);
#define __Pyx_CommonTypesMetaclass_USED

/* CallTypeTraverse.proto (used by CythonFunctionShared) */
#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0
#else
static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg);
#endif

/* PyMethodNew.proto (used by CythonFunctionShared) */
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ);

/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
#endif

/* CythonFunctionShared.proto (used by CythonFunction) */
#define __Pyx_CyFunction_USED
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CYFUNCTION_COROUTINE     0x08
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_CyFunction_GetClassObj(f)\
      (((__pyx_CyFunctionObject *) (f))->func_classobj)
#else
  #define __Pyx_CyFunction_GetClassObj(f)\
      ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
#endif
#define __Pyx_CyFunction_SetClassObj(f, classobj)\
    __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
#define __Pyx_CyFunction_Defaults(type, f)\
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject_HEAD
    PyObject *func;
#elif PY_VERSION_HEX < 0x030900B1
    PyCFunctionObject func;
#else
    PyCMethodObject func;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL
    __pyx_vectorcallfunc func_vectorcall;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_weakreflist;
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_dict;
#endif
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_classobj;
#endif
    PyObject *defaults;
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
    PyObject *func_is_coroutine;
} __pyx_CyFunctionObject;
#undef __Pyx_CyOrPyCFunction_Check
#define __Pyx_CyFunction_Check(obj)  __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType)
#define __Pyx_CyOrPyCFunction_Check(obj)  __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type)
#define __Pyx_CyFunction_CheckExact(obj)  __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType)
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void));
#undef __Pyx_IsSameCFunction
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCyOrCFunction(func, cfunc)
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func,
                                                         PyTypeObject *defaults_type);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(PyObject *module);
#if CYTHON_METH_FASTCALL
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
#if CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
#else
#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
#endif
#endif

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

/* AllocateExtensionType.proto */
static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final);

/* CheckTypeForFreelists.proto */
#if CYTHON_USE_FREELISTS
#if CYTHON_USE_TYPE_SPECS
#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t) == (expected_tp)))
#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS  Py_TPFLAGS_IS_ABSTRACT
#else
#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t)->tp_basicsize == (expected_size)))
#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS  (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)
#endif
#define __PYX_CHECK_TYPE_FOR_FREELISTS(t, expected_tp, expected_size)\
    (__PYX_CHECK_FINAL_TYPE_FOR_FREELISTS((t), (expected_tp), (expected_size)) &\
     (int) (!__Pyx_PyType_HasFeature((t), __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS)))
#endif

/* PyObjectCallNoArg.proto (used by PyObjectCallMethod0) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);

/* PyObjectGetMethod.proto (used by PyObjectCallMethod0) */
#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
#endif

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

/* ValidateBasesTuple.proto (used by PyType_Ready) */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
#endif

/* PyType_Ready.proto */
CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);

/* DelItemOnTypeDict.proto (used by SetupReduce) */
static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k);
#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k)

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

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto_3_2_5
#define __PYX_HAVE_RT_ImportType_proto_3_2_5
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
#include <stdalign.h>
#endif
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
#define __PYX_GET_STRUCT_ALIGNMENT_3_2_5(s) alignof(s)
#else
#define __PYX_GET_STRUCT_ALIGNMENT_3_2_5(s) sizeof(void*)
#endif
enum __Pyx_ImportType_CheckSize_3_2_5 {
   __Pyx_ImportType_CheckSize_Error_3_2_5 = 0,
   __Pyx_ImportType_CheckSize_Warn_3_2_5 = 1,
   __Pyx_ImportType_CheckSize_Ignore_3_2_5 = 2
};
static PyTypeObject *__Pyx_ImportType_3_2_5(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_5 check_size);
#endif

/* HasAttr.proto (used by ImportImpl) */
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_HasAttr(o, n)  PyObject_HasAttrWithError(o, n)
#else
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
#endif

/* ImportImpl.export */
static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level);

/* Import.proto */
static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level);

/* Py3UpdateBases.proto */
static PyObject* __Pyx_PEP560_update_bases(PyObject *bases);

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

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

/* PyObjectCall2Args.proto (used by Py3ClassCreate) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* PyObjectLookupSpecial.proto (used by Py3ClassCreate) */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name)  __Pyx__PyObject_LookupSpecial(obj, attr_name, 0)
#define __Pyx_PyObject_LookupSpecial(obj, attr_name)  __Pyx__PyObject_LookupSpecial(obj, attr_name, 1)
static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error);
#else
#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n)
#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
#endif

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

/* CLineInTraceback.proto (used by AddTraceback) */
#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#else
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#endif

/* CodeObjectCache.proto (used by AddTraceback) */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject __Pyx_CachedCodeObjectType;
#else
typedef PyCodeObject __Pyx_CachedCodeObjectType;
#endif
typedef struct {
    __Pyx_CachedCodeObjectType* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_int_type accessor_count;
  #endif
};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object);

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

/* GCCDiagnostics.proto */
#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_brlapi_keyCode_t(brlapi_keyCode_t value);

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

/* CIntFromPy.proto */
static CYTHON_INLINE brlapi_keyCode_t __Pyx_PyLong_As_brlapi_keyCode_t(PyObject *);

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

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_brlapi_param_type_t(brlapi_param_type_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint8_t(uint8_t value);

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

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

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

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

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

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

/* CIntFromPy.proto */
static CYTHON_INLINE brlapi_rangeType_t __Pyx_PyLong_As_brlapi_rangeType_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE brlapi_param_t __Pyx_PyLong_As_brlapi_param_t(PyObject *);

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

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

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

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_brlapi_param_t(brlapi_param_t value);

/* FormatTypeName.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%U"
#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName
#else
static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp);
#endif
#else  // !LIMITED_API
typedef const char *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%.200s"
#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name)
#define __Pyx_DECREF_TypeName(obj)
#endif

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

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) {
    return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2);
}
#endif
#define __Pyx_PyErr_ExceptionMatches2(err1, err2)  __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
#ifdef PyExceptionInstance_Check
  #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj)
#else
  #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException)
#endif

/* GetRuntimeVersion.proto */
#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
static unsigned long __Pyx_cached_runtime_version = 0;
static void __Pyx_init_runtime_version(void);
#else
#define __Pyx_init_runtime_version()
#endif
static unsigned long __Pyx_get_runtime_version(void);

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);

/* DecompressString.proto */
static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo);

/* MultiPhaseInitModuleState.proto */
#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
static PyObject *__Pyx_State_FindModule(void*);
static int __Pyx_State_AddModule(PyObject* module, void*);
static int __Pyx_State_RemoveModule(void*);
#elif CYTHON_USE_MODULE_STATE
#define __Pyx_State_FindModule PyState_FindModule
#define __Pyx_State_AddModule PyState_AddModule
#define __Pyx_State_RemoveModule PyState_RemoveModule
#endif

/* #### Code section: module_declarations ### */
/* CythonABIVersion.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
    #if CYTHON_METH_FASTCALL
        #define __PYX_FASTCALL_ABI_SUFFIX  "_fastcall"
    #else
        #define __PYX_FASTCALL_ABI_SUFFIX
    #endif
    #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
#else
    #define __PYX_LIMITED_ABI_SUFFIX
#endif
#if __PYX_HAS_PY_AM_SEND == 1
    #define __PYX_AM_SEND_ABI_SUFFIX
#elif __PYX_HAS_PY_AM_SEND == 2
    #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport"
#else
    #define __PYX_AM_SEND_ABI_SUFFIX "noamsend"
#endif
#ifndef __PYX_MONITORING_ABI_SUFFIX
    #define __PYX_MONITORING_ABI_SUFFIX
#endif
#if CYTHON_USE_TP_FINALIZE
    #define __PYX_TP_FINALIZE_ABI_SUFFIX
#else
    #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize"
#endif
#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED)
    #define __PYX_FREELISTS_ABI_SUFFIX
#else
    #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists"
#endif
#define CYTHON_ABI  __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."


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

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

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

/* Module declarations from "__builtin__" */

/* Module declarations from "cpython.type" */

/* Module declarations from "cpython" */

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

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

/* Module declarations from "c_brlapi" */

/* Module declarations from "brlapi" */
static PyObject *__pyx_f_6brlapi__parameterToPython(brlapi_param_t, void const *, size_t); /*proto*/
/* #### Code section: typeinfo ### */
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "brlapi"
extern int __pyx_module_is_main_brlapi;
int __pyx_module_is_main_brlapi = 0;

/* Implementation of "brlapi" */
/* #### Code section: global_var ### */
/* #### Code section: string_decls ### */
static const char __pyx_k_This_module_implements_a_set_of[] = "\nThis module implements a set of bindings for BrlAPI, a braille bridge for applications.\n\nThe reference C API documentation is available online http://brltty.app/doc/BrlAPIref, as well as in manual pages.\n\nThis documentation is only a python helper, you should also read C manual pages.\n\nA general introduction guide is available online https://brltty.app/doc/Manual-BrlAPI/English/BrlAPI.html\n\nExample : \nimport brlapi\nimport errno\nimport Xlib.keysymdef.miscellany\ntry:\n  b = brlapi.Connection()\n  print(\"Server version \" + str(b.getParameter(brlapi.PARAM_SERVER_VERSION, 0, brlapi.PARAMF_GLOBAL)))\n  print(\"Display size \" + str(b.getParameter(brlapi.PARAM_DISPLAY_SIZE, 0, brlapi.PARAMF_GLOBAL)))\n  print(\"Driver \" + b.getParameter(brlapi.PARAM_DRIVER_NAME, 0, brlapi.PARAMF_GLOBAL))\n  print(\"Model \" + b.getParameter(brlapi.PARAM_DEVICE_MODEL, 0, brlapi.PARAMF_GLOBAL))\n\n  for cmd in b.getParameter(brlapi.PARAM_BOUND_COMMAND_KEYCODES, 0, brlapi.PARAMF_GLOBAL):\n    print(\"Command %x short name: %s\" % (cmd, b.getParameter(brlapi.PARAM_COMMAND_KEYCODE_NAME, cmd, brlapi.PARAMF_GLOBAL)))\n\n  for key in b.getParameter(brlapi.PARAM_DEFINED_DRIVER_KEYCODES, 0, brlapi.PARAMF_GLOBAL):\n    print(\"Key %x short name: %s\" % (key, b.getParameter(brlapi.PARAM_DRIVER_KEYCODE_NAME, key, brlapi.PARAMF_GLOBAL)))\n\n  # Make our output more prioritized\n  b.setParameter(brlapi.PARAM_CLIENT_PRIORITY, 0, False, 70)\n\n  def update_callback(param, subparam, flags, value):\n    s = \"\"\n    for i in value:\n      s += unichr(0x2800 + ord(i))\n    print(\"Got output update %s\" % s)\n\n  p = b.watchParameter(brlapi.PARAM_RENDERED_CELLS, 0, False, update_callback)\n\n  b.enterTtyMode()\n  b.ignoreKeys(brlapi.rangeType_all,[0])\n\n  # Accept the home, window up and window down braille commands\n  b.acceptKeys(brlapi.rangeType_command,[brlapi.KEY_TYPE_CMD|brlapi.KEY_CMD_HOME, brlapi.KEY_TYPE_CMD|brlapi.KEY_CMD_WINUP, brlapi.KEY_TYPE_CMD|brlapi.KEY_CMD_WINDN])\n\n  # Ac""cept the tab key\n  b.acceptKeys(brlapi.rangeType_key,[brlapi.KEY_TYPE_SYM|Xlib.keysymdef.miscellany.XK_Tab])\n\n  b.writeText(\"Trying to get a key within one second\")\n  key = b.readKeyWithTimeout(1000)\n  print(\"got \" + str(key))\n\n  b.writeText(\"Press home, winup/dn or tab to continue ... \302\244\")\n  key = b.readKey()\n\n  k = brlapi.expandKeyCode(key)\n  b.writeText(\"Key %ld (%x %x %x %x) !\" % (key, k[\"type\"], k[\"command\"], k[\"argument\"], k[\"flags\"]))\n  b.writeText(None,1)\n  b.acceptAllKeys()\n  b.readKey()\n\n  underline = chr(brlapi.DOT7 + brlapi.DOT8)\n  # Note: center() can take two arguments only starting from python 2.4\n  b.write(\n      regionBegin = 1,\n      regionSize = 40,\n      text = \"Press any key to continue               \",\n      orMask = 25*underline + 15*chr(0))\n  b.readKey()\n\n  b.acceptAllKeys()\n  b.writeText(\"Press any key\")\n  k = b.readKey()\n  k = brlapi.expandKeyCode(key)\n  b.writeText(\"Key %ld (%x %x %x %x) !\" % (key, k[\"type\"], k[\"command\"], k[\"argument\"], k[\"flags\"]))\n  b.readKey()\n\n  b.ignoreAllKeys()\n  b.acceptKeyRanges([(brlapi.KEY_TYPE_CMD, brlapi.KEY_TYPE_CMD|brlapi.KEY_CODE_MASK)])\n  b.ignoreKeyRanges([(brlapi.KEY_TYPE_CMD|brlapi.KEY_CMD_PASSDOTS, brlapi.KEY_TYPE_CMD|brlapi.KEY_CMD_PASSDOTS|brlapi.KEY_CMD_ARG_MASK)])\n  b.writeText(\"Press any command key (and not dots)\")\n  k = b.readKey()\n  k = brlapi.expandKeyCode(key)\n  b.writeText(\"Key %ld (%x %x %x %x) !\" % (key, k[\"type\"], k[\"command\"], k[\"argument\"], k[\"flags\"]))\n  b.readKey()\n\n  b.ignoreAllKeys()\n  b.acceptKeyRanges([(brlapi.KEY_TYPE_CMD|brlapi.KEY_CMD_PASSDOTS, brlapi.KEY_TYPE_CMD|brlapi.KEY_CMD_PASSDOTS|brlapi.KEY_CMD_ARG_MASK)])\n  b.writeText(\"Press a dot key\")\n  key = b.readKey()\n  k = brlapi.expandKeyCode(key)\n  b.writeText(\"Key %ld (%x %x %x %x) !\" % (key, k[\"type\"], k[\"command\"], k[\"argument\"], k[\"flags\"]))\n  b.acceptAllKeys()\n  b.readKey()\n\n  b.unwatchParameter(p)\n  b.leaveTtyMo""de()\n  b.closeConnection()\n\nexcept brlapi.ConnectionError as e:\n  if e.brlerrno == brlapi.ERROR_CONNREFUSED:\n    print(\"Connection to %s refused. BRLTTY is too busy...\" % e.host)\n  elif e.brlerrno == brlapi.ERROR_AUTHENTICATION:\n    print(\"Authentication with %s failed. Please check the permissions of %s\" % (e.host,e.auth))\n  elif e.brlerrno == brlapi.ERROR_LIBCERR and (e.libcerrno == errno.ECONNREFUSED or e.libcerrno == errno.ENOENT):\n    print(\"Connection to %s failed. Is BRLTTY really running?\" % (e.host))\n  else:\n    print(\"Connection to BRLTTY at %s failed: \" % (e.host))\n  print(e)\n  print(e.brlerrno)\n  print(e.libcerrno)\n";
/* #### Code section: decls ### */
static PyObject *__pyx_pf_6brlapi_getLibraryVersion(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6brlapi_2expandKeyCode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_code); /* proto */
static PyObject *__pyx_pf_6brlapi_4describeKeyCode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_code); /* proto */
static PyObject *__pyx_pf_6brlapi_14OperationError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6brlapi_14OperationError_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6brlapi_15ConnectionError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_auth); /* proto */
static PyObject *__pyx_pf_6brlapi_15ConnectionError_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6brlapi_15ConnectionError_4host(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6brlapi_15ConnectionError_6auth(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static int __pyx_pf_6brlapi_11WriteStruct___init__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6brlapi_11WriteStruct_13displayNumber___get__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self); /* proto */
static int __pyx_pf_6brlapi_11WriteStruct_13displayNumber_2__set__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_6brlapi_11WriteStruct_11regionBegin___get__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self); /* proto */
static int __pyx_pf_6brlapi_11WriteStruct_11regionBegin_2__set__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_6brlapi_11WriteStruct_10regionSize___get__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self); /* proto */
static int __pyx_pf_6brlapi_11WriteStruct_10regionSize_2__set__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_6brlapi_11WriteStruct_4text___get__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self); /* proto */
static int __pyx_pf_6brlapi_11WriteStruct_4text_2__set__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_6brlapi_11WriteStruct_6cursor___get__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self); /* proto */
static int __pyx_pf_6brlapi_11WriteStruct_6cursor_2__set__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_6brlapi_11WriteStruct_7charset___get__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self); /* proto */
static int __pyx_pf_6brlapi_11WriteStruct_7charset_2__set__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_6brlapi_11WriteStruct_7attrAnd___get__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self); /* proto */
static int __pyx_pf_6brlapi_11WriteStruct_7attrAnd_2__set__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_6brlapi_11WriteStruct_6attrOr___get__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self); /* proto */
static int __pyx_pf_6brlapi_11WriteStruct_6attrOr_2__set__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_6brlapi_11WriteStruct_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6brlapi_11WriteStruct_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6brlapi_10Connection___init__(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_auth); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_2closeConnection(struct __pyx_obj_6brlapi_Connection *__pyx_v_self); /* proto */
static void __pyx_pf_6brlapi_10Connection_4__del__(struct __pyx_obj_6brlapi_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_4host___get__(struct __pyx_obj_6brlapi_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_4auth___get__(struct __pyx_obj_6brlapi_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_14fileDescriptor___get__(struct __pyx_obj_6brlapi_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_11displaySize___get__(struct __pyx_obj_6brlapi_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_10driverName___get__(struct __pyx_obj_6brlapi_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_15modelIdentifier___get__(struct __pyx_obj_6brlapi_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_6enterTtyMode(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_tty, PyObject *__pyx_v_driver); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_8enterTtyModeWithPath(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_driver); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_10leaveTtyMode(struct __pyx_obj_6brlapi_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_12setFocus(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_tty); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_14write(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_writeArguments, PyObject *__pyx_v_displayNumber, PyObject *__pyx_v_regionBegin, PyObject *__pyx_v_regionSize, PyObject *__pyx_v_text, PyObject *__pyx_v_andMask, PyObject *__pyx_v_orMask, PyObject *__pyx_v_cursor, PyObject *__pyx_v_charset); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_16writeDots(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_dots); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_18writeText(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_text, PyObject *__pyx_v_cursor); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_20readKey(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_wait); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_22readKeyWithTimeout(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_timeout_ms); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_24expandKeyCode(CYTHON_UNUSED struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_code); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_26ignoreKeys(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_key_type, PyObject *__pyx_v_set); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_28acceptKeys(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_key_type, PyObject *__pyx_v_set); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_30ignoreAllKeys(struct __pyx_obj_6brlapi_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_32acceptAllKeys(struct __pyx_obj_6brlapi_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_34ignoreKeyRanges(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_keys); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_36acceptKeyRanges(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_keys); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_38enterRawMode(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_driver); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_40leaveRawMode(struct __pyx_obj_6brlapi_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_42getParameter(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_param, PyObject *__pyx_v_subparam, PyObject *__pyx_v_flags); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_44setParameter(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_param, PyObject *__pyx_v_subparam, PyObject *__pyx_v_flags, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_14watchParameter_cfunc(PyObject *__pyx_self, PyObject *__pyx_v_param); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_46watchParameter(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_param, PyObject *__pyx_v_subparam, PyObject *__pyx_v_flags, PyObject *__pyx_v_func); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_48unwatchParameter(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_entry); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_50pause(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_timeout_ms); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_52sync(struct __pyx_obj_6brlapi_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_54__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6brlapi_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6brlapi_10Connection_56__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6brlapi_Connection *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_6brlapi_WriteStruct(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6brlapi_Connection(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6brlapi___pyx_scope_struct__watchParameter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
/* #### Code section: late_includes ### */
/* #### Code section: module_state ### */
/* SmallCodeConfig */
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

typedef struct {
  PyObject *__pyx_d;
  PyObject *__pyx_b;
  PyObject *__pyx_cython_runtime;
  PyObject *__pyx_empty_tuple;
  PyObject *__pyx_empty_bytes;
  PyObject *__pyx_empty_unicode;
  PyTypeObject *__pyx_ptype_7cpython_4type_type;
  PyObject *__pyx_type_6brlapi_WriteStruct;
  PyObject *__pyx_type_6brlapi_Connection;
  PyObject *__pyx_type_6brlapi___pyx_scope_struct__watchParameter;
  PyTypeObject *__pyx_ptype_6brlapi_WriteStruct;
  PyTypeObject *__pyx_ptype_6brlapi_Connection;
  PyTypeObject *__pyx_ptype_6brlapi___pyx_scope_struct__watchParameter;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values;
  PyObject *__pyx_k__4;
  PyObject *__pyx_k__5;
  PyObject *__pyx_k__7;
  PyObject *__pyx_tuple[4];
  PyObject *__pyx_codeobj_tab[39];
  PyObject *__pyx_string_tab[636];
  PyObject *__pyx_number_tab[226];
/* #### Code section: module_state_contents ### */
/* CommonTypesMetaclass.module_state_decls */
PyTypeObject *__pyx_CommonTypesMetaclassType;

/* CachedMethodType.module_state_decls */
#if CYTHON_COMPILING_IN_LIMITED_API
PyObject *__Pyx_CachedMethodType;
#endif

/* CythonFunctionShared.module_state_decls */
PyTypeObject *__pyx_CyFunctionType;


#if CYTHON_USE_FREELISTS
struct __pyx_obj_6brlapi___pyx_scope_struct__watchParameter *__pyx_freelist_6brlapi___pyx_scope_struct__watchParameter[8];
int __pyx_freecount_6brlapi___pyx_scope_struct__watchParameter;
#endif
/* CodeObjectCache.module_state_decls */
struct __Pyx_CodeObjectCache __pyx_code_cache;

/* #### Code section: module_state_end ### */
} __pyx_mstatetype;

#if CYTHON_USE_MODULE_STATE
#ifdef __cplusplus
namespace {
extern struct PyModuleDef __pyx_moduledef;
} /* anonymous namespace */
#else
static struct PyModuleDef __pyx_moduledef;
#endif

#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef)))

#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef))
#else
static __pyx_mstatetype __pyx_mstate_global_static =
#ifdef __cplusplus
    {};
#else
    {0};
#endif
static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static;
#endif
/* #### Code section: constant_name_defines ### */
#define __pyx_kp_u_ __pyx_string_tab[0]
#define __pyx_kp_u_Authentication_failed_Please_ch __pyx_string_tab[1]
#define __pyx_kp_u_BRLTTY_is_too_busy __pyx_string_tab[2]
#define __pyx_kp_u_Boolean_value_expected __pyx_string_tab[3]
#define __pyx_kp_u_Boolean_values_expected __pyx_string_tab[4]
#define __pyx_kp_u_Error_while_connecting_to_BrlTTY __pyx_string_tab[5]
#define __pyx_kp_u_Error_while_performing_some_oper __pyx_string_tab[6]
#define __pyx_kp_u_Integer_value_expected __pyx_string_tab[7]
#define __pyx_kp_u_Integer_values_expected __pyx_string_tab[8]
#define __pyx_kp_u_Is_BRLTTY_really_running __pyx_string_tab[9]
#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[10]
#define __pyx_kp_u_Pickling_of_struct_members_such __pyx_string_tab[11]
#define __pyx_kp_u_String_value_expected __pyx_string_tab[12]
#define __pyx_kp_u_UTF_8 __pyx_string_tab[13]
#define __pyx_kp_u_Unsupported_parameter_type __pyx_string_tab[14]
#define __pyx_kp_u__2 __pyx_string_tab[15]
#define __pyx_kp_u__3 __pyx_string_tab[16]
#define __pyx_kp_u__8 __pyx_string_tab[17]
#define __pyx_kp_u_add_note __pyx_string_tab[18]
#define __pyx_kp_u_brlapi_pyx __pyx_string_tab[19]
#define __pyx_kp_u_brlerrno_2 __pyx_string_tab[20]
#define __pyx_kp_u_couldn_t_connect_to __pyx_string_tab[21]
#define __pyx_kp_u_disable __pyx_string_tab[22]
#define __pyx_kp_u_enable __pyx_string_tab[23]
#define __pyx_kp_u_gaierrno_2 __pyx_string_tab[24]
#define __pyx_kp_u_gc __pyx_string_tab[25]
#define __pyx_kp_u_isenabled __pyx_string_tab[26]
#define __pyx_kp_u_libcerrno_2 __pyx_string_tab[27]
#define __pyx_kp_u_self_h_cannot_be_converted_to_a __pyx_string_tab[28]
#define __pyx_kp_u_tree_fragment __pyx_string_tab[29]
#define __pyx_kp_u_with_key __pyx_string_tab[30]
#define __pyx_n_u_ASCII __pyx_string_tab[31]
#define __pyx_n_u_CURSOR_LEAVE __pyx_string_tab[32]
#define __pyx_n_u_CURSOR_OFF __pyx_string_tab[33]
#define __pyx_n_u_Connection __pyx_string_tab[34]
#define __pyx_n_u_ConnectionError __pyx_string_tab[35]
#define __pyx_n_u_ConnectionError___init __pyx_string_tab[36]
#define __pyx_n_u_ConnectionError___str __pyx_string_tab[37]
#define __pyx_n_u_ConnectionError_auth __pyx_string_tab[38]
#define __pyx_n_u_ConnectionError_host __pyx_string_tab[39]
#define __pyx_n_u_Connection___reduce_cython __pyx_string_tab[40]
#define __pyx_n_u_Connection___setstate_cython __pyx_string_tab[41]
#define __pyx_n_u_Connection_acceptAllKeys __pyx_string_tab[42]
#define __pyx_n_u_Connection_acceptKeyRanges __pyx_string_tab[43]
#define __pyx_n_u_Connection_acceptKeys __pyx_string_tab[44]
#define __pyx_n_u_Connection_closeConnection __pyx_string_tab[45]
#define __pyx_n_u_Connection_enterRawMode __pyx_string_tab[46]
#define __pyx_n_u_Connection_enterTtyMode __pyx_string_tab[47]
#define __pyx_n_u_Connection_enterTtyModeWithPath __pyx_string_tab[48]
#define __pyx_n_u_Connection_expandKeyCode __pyx_string_tab[49]
#define __pyx_n_u_Connection_getParameter __pyx_string_tab[50]
#define __pyx_n_u_Connection_ignoreAllKeys __pyx_string_tab[51]
#define __pyx_n_u_Connection_ignoreKeyRanges __pyx_string_tab[52]
#define __pyx_n_u_Connection_ignoreKeys __pyx_string_tab[53]
#define __pyx_n_u_Connection_leaveRawMode __pyx_string_tab[54]
#define __pyx_n_u_Connection_leaveTtyMode __pyx_string_tab[55]
#define __pyx_n_u_Connection_pause __pyx_string_tab[56]
#define __pyx_n_u_Connection_readKey __pyx_string_tab[57]
#define __pyx_n_u_Connection_readKeyWithTimeout __pyx_string_tab[58]
#define __pyx_n_u_Connection_setFocus __pyx_string_tab[59]
#define __pyx_n_u_Connection_setParameter __pyx_string_tab[60]
#define __pyx_n_u_Connection_sync __pyx_string_tab[61]
#define __pyx_n_u_Connection_unwatchParameter __pyx_string_tab[62]
#define __pyx_n_u_Connection_watchParameter __pyx_string_tab[63]
#define __pyx_n_u_Connection_write __pyx_string_tab[64]
#define __pyx_n_u_Connection_writeDots __pyx_string_tab[65]
#define __pyx_n_u_Connection_writeText __pyx_string_tab[66]
#define __pyx_n_u_DISPLAY_DEFAULT __pyx_string_tab[67]
#define __pyx_n_u_DOT1 __pyx_string_tab[68]
#define __pyx_n_u_DOT2 __pyx_string_tab[69]
#define __pyx_n_u_DOT3 __pyx_string_tab[70]
#define __pyx_n_u_DOT4 __pyx_string_tab[71]
#define __pyx_n_u_DOT5 __pyx_string_tab[72]
#define __pyx_n_u_DOT6 __pyx_string_tab[73]
#define __pyx_n_u_DOT7 __pyx_string_tab[74]
#define __pyx_n_u_DOT8 __pyx_string_tab[75]
#define __pyx_n_u_DOTC __pyx_string_tab[76]
#define __pyx_n_u_ECONNREFUSED __pyx_string_tab[77]
#define __pyx_n_u_EINTR __pyx_string_tab[78]
#define __pyx_n_u_ENOENT __pyx_string_tab[79]
#define __pyx_n_u_ERROR_AUTHENTICATION __pyx_string_tab[80]
#define __pyx_n_u_ERROR_CONNREFUSED __pyx_string_tab[81]
#define __pyx_n_u_ERROR_DEVICEBUSY __pyx_string_tab[82]
#define __pyx_n_u_ERROR_DRIVERERROR __pyx_string_tab[83]
#define __pyx_n_u_ERROR_EMPTYKEY __pyx_string_tab[84]
#define __pyx_n_u_ERROR_EOF __pyx_string_tab[85]
#define __pyx_n_u_ERROR_GAIERR __pyx_string_tab[86]
#define __pyx_n_u_ERROR_ILLEGAL_INSTRUCTION __pyx_string_tab[87]
#define __pyx_n_u_ERROR_INVALID_PACKET __pyx_string_tab[88]
#define __pyx_n_u_ERROR_INVALID_PARAMETER __pyx_string_tab[89]
#define __pyx_n_u_ERROR_LIBCERR __pyx_string_tab[90]
#define __pyx_n_u_ERROR_NOMEM __pyx_string_tab[91]
#define __pyx_n_u_ERROR_OPNOTSUPP __pyx_string_tab[92]
#define __pyx_n_u_ERROR_PROTOCOL_VERSION __pyx_string_tab[93]
#define __pyx_n_u_ERROR_READONLY_PARAMETER __pyx_string_tab[94]
#define __pyx_n_u_ERROR_SUCCESS __pyx_string_tab[95]
#define __pyx_n_u_ERROR_TTYBUSY __pyx_string_tab[96]
#define __pyx_n_u_ERROR_UNKNOWNTTY __pyx_string_tab[97]
#define __pyx_n_u_ERROR_UNKNOWN_INSTRUCTION __pyx_string_tab[98]
#define __pyx_n_u_KEY_CMD_ALERT __pyx_string_tab[99]
#define __pyx_n_u_KEY_CMD_ALTGR __pyx_string_tab[100]
#define __pyx_n_u_KEY_CMD_APNDCHARS __pyx_string_tab[101]
#define __pyx_n_u_KEY_CMD_ARG_MASK __pyx_string_tab[102]
#define __pyx_n_u_KEY_CMD_ARG_SHIFT __pyx_string_tab[103]
#define __pyx_n_u_KEY_CMD_ASPK_CMP_WORDS __pyx_string_tab[104]
#define __pyx_n_u_KEY_CMD_ASPK_DEL_CHARS __pyx_string_tab[105]
#define __pyx_n_u_KEY_CMD_ASPK_EMP_LINE __pyx_string_tab[106]
#define __pyx_n_u_KEY_CMD_ASPK_INDENT __pyx_string_tab[107]
#define __pyx_n_u_KEY_CMD_ASPK_INS_CHARS __pyx_string_tab[108]
#define __pyx_n_u_KEY_CMD_ASPK_REP_CHARS __pyx_string_tab[109]
#define __pyx_n_u_KEY_CMD_ASPK_SEL_CHAR __pyx_string_tab[110]
#define __pyx_n_u_KEY_CMD_ASPK_SEL_LINE __pyx_string_tab[111]
#define __pyx_n_u_KEY_CMD_ATTRBLINK __pyx_string_tab[112]
#define __pyx_n_u_KEY_CMD_ATTRDN __pyx_string_tab[113]
#define __pyx_n_u_KEY_CMD_ATTRUP __pyx_string_tab[114]
#define __pyx_n_u_KEY_CMD_ATTRVIS __pyx_string_tab[115]
#define __pyx_n_u_KEY_CMD_AUTOREPEAT __pyx_string_tab[116]
#define __pyx_n_u_KEY_CMD_AUTOSPEAK __pyx_string_tab[117]
#define __pyx_n_u_KEY_CMD_BACK __pyx_string_tab[118]
#define __pyx_n_u_KEY_CMD_BLK_MASK __pyx_string_tab[119]
#define __pyx_n_u_KEY_CMD_BLK_SHIFT __pyx_string_tab[120]
#define __pyx_n_u_KEY_CMD_BOT __pyx_string_tab[121]
#define __pyx_n_u_KEY_CMD_BOT_LEFT __pyx_string_tab[122]
#define __pyx_n_u_KEY_CMD_BRLKBD __pyx_string_tab[123]
#define __pyx_n_u_KEY_CMD_BRLUCDOTS __pyx_string_tab[124]
#define __pyx_n_u_KEY_CMD_BRL_START __pyx_string_tab[125]
#define __pyx_n_u_KEY_CMD_BRL_STOP __pyx_string_tab[126]
#define __pyx_n_u_KEY_CMD_CAPBLINK __pyx_string_tab[127]
#define __pyx_n_u_KEY_CMD_CHRLT __pyx_string_tab[128]
#define __pyx_n_u_KEY_CMD_CHRRT __pyx_string_tab[129]
#define __pyx_n_u_KEY_CMD_CLIP_ADD __pyx_string_tab[130]
#define __pyx_n_u_KEY_CMD_CLIP_APPEND __pyx_string_tab[131]
#define __pyx_n_u_KEY_CMD_CLIP_CLEAR __pyx_string_tab[132]
#define __pyx_n_u_KEY_CMD_CLIP_COPY __pyx_string_tab[133]
#define __pyx_n_u_KEY_CMD_CLIP_NEW __pyx_string_tab[134]
#define __pyx_n_u_KEY_CMD_CLIP_RESTORE __pyx_string_tab[135]
#define __pyx_n_u_KEY_CMD_CLIP_SAVE __pyx_string_tab[136]
#define __pyx_n_u_KEY_CMD_CLIP_SHOW __pyx_string_tab[137]
#define __pyx_n_u_KEY_CMD_COLOR __pyx_string_tab[138]
#define __pyx_n_u_KEY_CMD_COMPBRL6 __pyx_string_tab[139]
#define __pyx_n_u_KEY_CMD_CONTEXT __pyx_string_tab[140]
#define __pyx_n_u_KEY_CMD_CONTRACTED __pyx_string_tab[141]
#define __pyx_n_u_KEY_CMD_CONTROL __pyx_string_tab[142]
#define __pyx_n_u_KEY_CMD_COPYCHARS __pyx_string_tab[143]
#define __pyx_n_u_KEY_CMD_COPY_LINE __pyx_string_tab[144]
#define __pyx_n_u_KEY_CMD_COPY_RECT __pyx_string_tab[145]
#define __pyx_n_u_KEY_CMD_COPY_SMART_ADD __pyx_string_tab[146]
#define __pyx_n_u_KEY_CMD_COPY_SMART_NEW __pyx_string_tab[147]
#define __pyx_n_u_KEY_CMD_CSRBLINK __pyx_string_tab[148]
#define __pyx_n_u_KEY_CMD_CSRHIDE __pyx_string_tab[149]
#define __pyx_n_u_KEY_CMD_CSRJMP_VERT __pyx_string_tab[150]
#define __pyx_n_u_KEY_CMD_CSRSIZE __pyx_string_tab[151]
#define __pyx_n_u_KEY_CMD_CSRTRK __pyx_string_tab[152]
#define __pyx_n_u_KEY_CMD_CSRVIS __pyx_string_tab[153]
#define __pyx_n_u_KEY_CMD_CUTAPPEND __pyx_string_tab[154]
#define __pyx_n_u_KEY_CMD_CUTBEGIN __pyx_string_tab[155]
#define __pyx_n_u_KEY_CMD_CUTLINE __pyx_string_tab[156]
#define __pyx_n_u_KEY_CMD_CUTRECT __pyx_string_tab[157]
#define __pyx_n_u_KEY_CMD_DESCCHAR __pyx_string_tab[158]
#define __pyx_n_u_KEY_CMD_DESC_CURR_CHAR __pyx_string_tab[159]
#define __pyx_n_u_KEY_CMD_DISPMD __pyx_string_tab[160]
#define __pyx_n_u_KEY_CMD_FREEZE __pyx_string_tab[161]
#define __pyx_n_u_KEY_CMD_FWINLT __pyx_string_tab[162]
#define __pyx_n_u_KEY_CMD_FWINLTSKIP __pyx_string_tab[163]
#define __pyx_n_u_KEY_CMD_FWINRT __pyx_string_tab[164]
#define __pyx_n_u_KEY_CMD_FWINRTSKIP __pyx_string_tab[165]
#define __pyx_n_u_KEY_CMD_GOTOLINE __pyx_string_tab[166]
#define __pyx_n_u_KEY_CMD_GOTOMARK __pyx_string_tab[167]
#define __pyx_n_u_KEY_CMD_GUI __pyx_string_tab[168]
#define __pyx_n_u_KEY_CMD_GUI_APP_ALERTS __pyx_string_tab[169]
#define __pyx_n_u_KEY_CMD_GUI_APP_LIST __pyx_string_tab[170]
#define __pyx_n_u_KEY_CMD_GUI_APP_MENU __pyx_string_tab[171]
#define __pyx_n_u_KEY_CMD_GUI_AREA_ACTV __pyx_string_tab[172]
#define __pyx_n_u_KEY_CMD_GUI_AREA_NEXT __pyx_string_tab[173]
#define __pyx_n_u_KEY_CMD_GUI_AREA_PREV __pyx_string_tab[174]
#define __pyx_n_u_KEY_CMD_GUI_BACK __pyx_string_tab[175]
#define __pyx_n_u_KEY_CMD_GUI_BRL_ACTIONS __pyx_string_tab[176]
#define __pyx_n_u_KEY_CMD_GUI_DEV_OPTIONS __pyx_string_tab[177]
#define __pyx_n_u_KEY_CMD_GUI_DEV_SETTINGS __pyx_string_tab[178]
#define __pyx_n_u_KEY_CMD_GUI_HOME __pyx_string_tab[179]
#define __pyx_n_u_KEY_CMD_GUI_ITEM_FRST __pyx_string_tab[180]
#define __pyx_n_u_KEY_CMD_GUI_ITEM_LAST __pyx_string_tab[181]
#define __pyx_n_u_KEY_CMD_GUI_ITEM_NEXT __pyx_string_tab[182]
#define __pyx_n_u_KEY_CMD_GUI_ITEM_PREV __pyx_string_tab[183]
#define __pyx_n_u_KEY_CMD_GUI_TITLE __pyx_string_tab[184]
#define __pyx_n_u_KEY_CMD_HELP __pyx_string_tab[185]
#define __pyx_n_u_KEY_CMD_HOME __pyx_string_tab[186]
#define __pyx_n_u_KEY_CMD_HOSTCMD __pyx_string_tab[187]
#define __pyx_n_u_KEY_CMD_HOST_COPY __pyx_string_tab[188]
#define __pyx_n_u_KEY_CMD_HOST_CUT __pyx_string_tab[189]
#define __pyx_n_u_KEY_CMD_HOST_PASTE __pyx_string_tab[190]
#define __pyx_n_u_KEY_CMD_HWINLT __pyx_string_tab[191]
#define __pyx_n_u_KEY_CMD_HWINRT __pyx_string_tab[192]
#define __pyx_n_u_KEY_CMD_INDICATORS __pyx_string_tab[193]
#define __pyx_n_u_KEY_CMD_INFO __pyx_string_tab[194]
#define __pyx_n_u_KEY_CMD_LEARN __pyx_string_tab[195]
#define __pyx_n_u_KEY_CMD_LNBEG __pyx_string_tab[196]
#define __pyx_n_u_KEY_CMD_LNDN __pyx_string_tab[197]
#define __pyx_n_u_KEY_CMD_LNEND __pyx_string_tab[198]
#define __pyx_n_u_KEY_CMD_LNUP __pyx_string_tab[199]
#define __pyx_n_u_KEY_CMD_MACRO __pyx_string_tab[200]
#define __pyx_n_u_KEY_CMD_MENU_FIRST_ITEM __pyx_string_tab[201]
#define __pyx_n_u_KEY_CMD_MENU_LAST_ITEM __pyx_string_tab[202]
#define __pyx_n_u_KEY_CMD_MENU_NEXT_ITEM __pyx_string_tab[203]
#define __pyx_n_u_KEY_CMD_MENU_NEXT_SETTING __pyx_string_tab[204]
#define __pyx_n_u_KEY_CMD_MENU_PREV_ITEM __pyx_string_tab[205]
#define __pyx_n_u_KEY_CMD_MENU_PREV_LEVEL __pyx_string_tab[206]
#define __pyx_n_u_KEY_CMD_MENU_PREV_SETTING __pyx_string_tab[207]
#define __pyx_n_u_KEY_CMD_META __pyx_string_tab[208]
#define __pyx_n_u_KEY_CMD_MUTE __pyx_string_tab[209]
#define __pyx_n_u_KEY_CMD_NOOP __pyx_string_tab[210]
#define __pyx_n_u_KEY_CMD_NXDIFCHAR __pyx_string_tab[211]
#define __pyx_n_u_KEY_CMD_NXDIFLN __pyx_string_tab[212]
#define __pyx_n_u_KEY_CMD_NXINDENT __pyx_string_tab[213]
#define __pyx_n_u_KEY_CMD_NXNBWIN __pyx_string_tab[214]
#define __pyx_n_u_KEY_CMD_NXPGRPH __pyx_string_tab[215]
#define __pyx_n_u_KEY_CMD_NXPROMPT __pyx_string_tab[216]
#define __pyx_n_u_KEY_CMD_NXSEARCH __pyx_string_tab[217]
#define __pyx_n_u_KEY_CMD_OFFLINE __pyx_string_tab[218]
#define __pyx_n_u_KEY_CMD_PASSAT __pyx_string_tab[219]
#define __pyx_n_u_KEY_CMD_PASSDOTS __pyx_string_tab[220]
#define __pyx_n_u_KEY_CMD_PASSPS2 __pyx_string_tab[221]
#define __pyx_n_u_KEY_CMD_PASSXT __pyx_string_tab[222]
#define __pyx_n_u_KEY_CMD_PASTE __pyx_string_tab[223]
#define __pyx_n_u_KEY_CMD_PASTE_ALTMODE __pyx_string_tab[224]
#define __pyx_n_u_KEY_CMD_PASTE_HISTORY __pyx_string_tab[225]
#define __pyx_n_u_KEY_CMD_PASTE_HISTORY_ALTMODE __pyx_string_tab[226]
#define __pyx_n_u_KEY_CMD_PRDIFCHAR __pyx_string_tab[227]
#define __pyx_n_u_KEY_CMD_PRDIFLN __pyx_string_tab[228]
#define __pyx_n_u_KEY_CMD_PREFLOAD __pyx_string_tab[229]
#define __pyx_n_u_KEY_CMD_PREFMENU __pyx_string_tab[230]
#define __pyx_n_u_KEY_CMD_PREFRESET __pyx_string_tab[231]
#define __pyx_n_u_KEY_CMD_PREFSAVE __pyx_string_tab[232]
#define __pyx_n_u_KEY_CMD_PRINDENT __pyx_string_tab[233]
#define __pyx_n_u_KEY_CMD_PRNBWIN __pyx_string_tab[234]
#define __pyx_n_u_KEY_CMD_PRPGRPH __pyx_string_tab[235]
#define __pyx_n_u_KEY_CMD_PRPROMPT __pyx_string_tab[236]
#define __pyx_n_u_KEY_CMD_PRSEARCH __pyx_string_tab[237]
#define __pyx_n_u_KEY_CMD_REFRESH __pyx_string_tab[238]
#define __pyx_n_u_KEY_CMD_REFRESH_LINE __pyx_string_tab[239]
#define __pyx_n_u_KEY_CMD_RESTARTBRL __pyx_string_tab[240]
#define __pyx_n_u_KEY_CMD_RESTARTSPEECH __pyx_string_tab[241]
#define __pyx_n_u_KEY_CMD_RETURN __pyx_string_tab[242]
#define __pyx_n_u_KEY_CMD_ROUTE __pyx_string_tab[243]
#define __pyx_n_u_KEY_CMD_ROUTE_CURR_LOCN __pyx_string_tab[244]
#define __pyx_n_u_KEY_CMD_ROUTE_LINE __pyx_string_tab[245]
#define __pyx_n_u_KEY_CMD_ROUTE_SPEECH __pyx_string_tab[246]
#define __pyx_n_u_KEY_CMD_SAY_ABOVE __pyx_string_tab[247]
#define __pyx_n_u_KEY_CMD_SAY_ALL __pyx_string_tab[248]
#define __pyx_n_u_KEY_CMD_SAY_BELOW __pyx_string_tab[249]
#define __pyx_n_u_KEY_CMD_SAY_FASTER __pyx_string_tab[250]
#define __pyx_n_u_KEY_CMD_SAY_HIGHER __pyx_string_tab[251]
#define __pyx_n_u_KEY_CMD_SAY_LINE __pyx_string_tab[252]
#define __pyx_n_u_KEY_CMD_SAY_LOUDER __pyx_string_tab[253]
#define __pyx_n_u_KEY_CMD_SAY_LOWER __pyx_string_tab[254]
#define __pyx_n_u_KEY_CMD_SAY_SLOWER __pyx_string_tab[255]
#define __pyx_n_u_KEY_CMD_SAY_SOFTER __pyx_string_tab[256]
#define __pyx_n_u_KEY_CMD_SCR_START __pyx_string_tab[257]
#define __pyx_n_u_KEY_CMD_SCR_STOP __pyx_string_tab[258]
#define __pyx_n_u_KEY_CMD_SELECTVT __pyx_string_tab[259]
#define __pyx_n_u_KEY_CMD_SELECTVT_NEXT __pyx_string_tab[260]
#define __pyx_n_u_KEY_CMD_SELECTVT_PREV __pyx_string_tab[261]
#define __pyx_n_u_KEY_CMD_SETLEFT __pyx_string_tab[262]
#define __pyx_n_u_KEY_CMD_SETMARK __pyx_string_tab[263]
#define __pyx_n_u_KEY_CMD_SET_ATTRIBUTES_TABLE __pyx_string_tab[264]
#define __pyx_n_u_KEY_CMD_SET_CONTRACTION_TABLE __pyx_string_tab[265]
#define __pyx_n_u_KEY_CMD_SET_KEYBOARD_TABLE __pyx_string_tab[266]
#define __pyx_n_u_KEY_CMD_SET_LANGUAGE_PROFILE __pyx_string_tab[267]
#define __pyx_n_u_KEY_CMD_SET_TEXT_TABLE __pyx_string_tab[268]
#define __pyx_n_u_KEY_CMD_SHIFT __pyx_string_tab[269]
#define __pyx_n_u_KEY_CMD_SHOW_CURR_LOCN __pyx_string_tab[270]
#define __pyx_n_u_KEY_CMD_SIXDOTS __pyx_string_tab[271]
#define __pyx_n_u_KEY_CMD_SKPBLNKWINS __pyx_string_tab[272]
#define __pyx_n_u_KEY_CMD_SKPIDLNS __pyx_string_tab[273]
#define __pyx_n_u_KEY_CMD_SLIDEWIN __pyx_string_tab[274]
#define __pyx_n_u_KEY_CMD_SPEAK_CURR_CHAR __pyx_string_tab[275]
#define __pyx_n_u_KEY_CMD_SPEAK_CURR_LINE __pyx_string_tab[276]
#define __pyx_n_u_KEY_CMD_SPEAK_CURR_LOCN __pyx_string_tab[277]
#define __pyx_n_u_KEY_CMD_SPEAK_CURR_PWRD __pyx_string_tab[278]
#define __pyx_n_u_KEY_CMD_SPEAK_CURR_WORD __pyx_string_tab[279]
#define __pyx_n_u_KEY_CMD_SPEAK_FRST_CHAR __pyx_string_tab[280]
#define __pyx_n_u_KEY_CMD_SPEAK_FRST_LINE __pyx_string_tab[281]
#define __pyx_n_u_KEY_CMD_SPEAK_INDENT __pyx_string_tab[282]
#define __pyx_n_u_KEY_CMD_SPEAK_LAST_CHAR __pyx_string_tab[283]
#define __pyx_n_u_KEY_CMD_SPEAK_LAST_LINE __pyx_string_tab[284]
#define __pyx_n_u_KEY_CMD_SPEAK_NEXT_CHAR __pyx_string_tab[285]
#define __pyx_n_u_KEY_CMD_SPEAK_NEXT_LINE __pyx_string_tab[286]
#define __pyx_n_u_KEY_CMD_SPEAK_NEXT_PWRD __pyx_string_tab[287]
#define __pyx_n_u_KEY_CMD_SPEAK_NEXT_WORD __pyx_string_tab[288]
#define __pyx_n_u_KEY_CMD_SPEAK_PREV_CHAR __pyx_string_tab[289]
#define __pyx_n_u_KEY_CMD_SPEAK_PREV_LINE __pyx_string_tab[290]
#define __pyx_n_u_KEY_CMD_SPEAK_PREV_PWRD __pyx_string_tab[291]
#define __pyx_n_u_KEY_CMD_SPEAK_PREV_WORD __pyx_string_tab[292]
#define __pyx_n_u_KEY_CMD_SPELL_CURR_LINE __pyx_string_tab[293]
#define __pyx_n_u_KEY_CMD_SPELL_CURR_PWRD __pyx_string_tab[294]
#define __pyx_n_u_KEY_CMD_SPELL_CURR_WORD __pyx_string_tab[295]
#define __pyx_n_u_KEY_CMD_SPKHOME __pyx_string_tab[296]
#define __pyx_n_u_KEY_CMD_SPK_PUNCT_LEVEL __pyx_string_tab[297]
#define __pyx_n_u_KEY_CMD_SPK_START __pyx_string_tab[298]
#define __pyx_n_u_KEY_CMD_SPK_STOP __pyx_string_tab[299]
#define __pyx_n_u_KEY_CMD_SWITCHVT __pyx_string_tab[300]
#define __pyx_n_u_KEY_CMD_SWITCHVT_NEXT __pyx_string_tab[301]
#define __pyx_n_u_KEY_CMD_SWITCHVT_PREV __pyx_string_tab[302]
#define __pyx_n_u_KEY_CMD_TIME __pyx_string_tab[303]
#define __pyx_n_u_KEY_CMD_TOP __pyx_string_tab[304]
#define __pyx_n_u_KEY_CMD_TOP_LEFT __pyx_string_tab[305]
#define __pyx_n_u_KEY_CMD_TOUCH_AT __pyx_string_tab[306]
#define __pyx_n_u_KEY_CMD_TOUCH_NAV __pyx_string_tab[307]
#define __pyx_n_u_KEY_CMD_TUNES __pyx_string_tab[308]
#define __pyx_n_u_KEY_CMD_TXTSEL_ALL __pyx_string_tab[309]
#define __pyx_n_u_KEY_CMD_TXTSEL_CLEAR __pyx_string_tab[310]
#define __pyx_n_u_KEY_CMD_TXTSEL_SET __pyx_string_tab[311]
#define __pyx_n_u_KEY_CMD_TXTSEL_START __pyx_string_tab[312]
#define __pyx_n_u_KEY_CMD_UNSTICK __pyx_string_tab[313]
#define __pyx_n_u_KEY_CMD_UPPER __pyx_string_tab[314]
#define __pyx_n_u_KEY_CMD_WINDN __pyx_string_tab[315]
#define __pyx_n_u_KEY_CMD_WINUP __pyx_string_tab[316]
#define __pyx_n_u_KEY_CODE_MASK __pyx_string_tab[317]
#define __pyx_n_u_KEY_CODE_SHIFT __pyx_string_tab[318]
#define __pyx_n_u_KEY_FLAGS_MASK __pyx_string_tab[319]
#define __pyx_n_u_KEY_FLAGS_SHIFT __pyx_string_tab[320]
#define __pyx_n_u_KEY_FLG_INPUT_ALTGR __pyx_string_tab[321]
#define __pyx_n_u_KEY_FLG_INPUT_CAPSLOCK __pyx_string_tab[322]
#define __pyx_n_u_KEY_FLG_INPUT_CONTROL __pyx_string_tab[323]
#define __pyx_n_u_KEY_FLG_INPUT_ESCAPED __pyx_string_tab[324]
#define __pyx_n_u_KEY_FLG_INPUT_GUI __pyx_string_tab[325]
#define __pyx_n_u_KEY_FLG_INPUT_META __pyx_string_tab[326]
#define __pyx_n_u_KEY_FLG_INPUT_SHIFT __pyx_string_tab[327]
#define __pyx_n_u_KEY_FLG_INPUT_UPPER __pyx_string_tab[328]
#define __pyx_n_u_KEY_FLG_KBD_EMUL0 __pyx_string_tab[329]
#define __pyx_n_u_KEY_FLG_KBD_EMUL1 __pyx_string_tab[330]
#define __pyx_n_u_KEY_FLG_KBD_RELEASE __pyx_string_tab[331]
#define __pyx_n_u_KEY_FLG_MOTION_ROUTE __pyx_string_tab[332]
#define __pyx_n_u_KEY_FLG_MOTION_SCALED __pyx_string_tab[333]
#define __pyx_n_u_KEY_FLG_MOTION_TOLEFT __pyx_string_tab[334]
#define __pyx_n_u_KEY_FLG_TOGGLE_MASK __pyx_string_tab[335]
#define __pyx_n_u_KEY_FLG_TOGGLE_OFF __pyx_string_tab[336]
#define __pyx_n_u_KEY_FLG_TOGGLE_ON __pyx_string_tab[337]
#define __pyx_n_u_KEY_MAX __pyx_string_tab[338]
#define __pyx_n_u_KEY_SYM_BACKSPACE __pyx_string_tab[339]
#define __pyx_n_u_KEY_SYM_DELETE __pyx_string_tab[340]
#define __pyx_n_u_KEY_SYM_DOWN __pyx_string_tab[341]
#define __pyx_n_u_KEY_SYM_END __pyx_string_tab[342]
#define __pyx_n_u_KEY_SYM_ESCAPE __pyx_string_tab[343]
#define __pyx_n_u_KEY_SYM_F1 __pyx_string_tab[344]
#define __pyx_n_u_KEY_SYM_F10 __pyx_string_tab[345]
#define __pyx_n_u_KEY_SYM_F11 __pyx_string_tab[346]
#define __pyx_n_u_KEY_SYM_F12 __pyx_string_tab[347]
#define __pyx_n_u_KEY_SYM_F13 __pyx_string_tab[348]
#define __pyx_n_u_KEY_SYM_F14 __pyx_string_tab[349]
#define __pyx_n_u_KEY_SYM_F15 __pyx_string_tab[350]
#define __pyx_n_u_KEY_SYM_F16 __pyx_string_tab[351]
#define __pyx_n_u_KEY_SYM_F17 __pyx_string_tab[352]
#define __pyx_n_u_KEY_SYM_F18 __pyx_string_tab[353]
#define __pyx_n_u_KEY_SYM_F19 __pyx_string_tab[354]
#define __pyx_n_u_KEY_SYM_F2 __pyx_string_tab[355]
#define __pyx_n_u_KEY_SYM_F20 __pyx_string_tab[356]
#define __pyx_n_u_KEY_SYM_F21 __pyx_string_tab[357]
#define __pyx_n_u_KEY_SYM_F22 __pyx_string_tab[358]
#define __pyx_n_u_KEY_SYM_F23 __pyx_string_tab[359]
#define __pyx_n_u_KEY_SYM_F24 __pyx_string_tab[360]
#define __pyx_n_u_KEY_SYM_F25 __pyx_string_tab[361]
#define __pyx_n_u_KEY_SYM_F26 __pyx_string_tab[362]
#define __pyx_n_u_KEY_SYM_F27 __pyx_string_tab[363]
#define __pyx_n_u_KEY_SYM_F28 __pyx_string_tab[364]
#define __pyx_n_u_KEY_SYM_F29 __pyx_string_tab[365]
#define __pyx_n_u_KEY_SYM_F3 __pyx_string_tab[366]
#define __pyx_n_u_KEY_SYM_F30 __pyx_string_tab[367]
#define __pyx_n_u_KEY_SYM_F31 __pyx_string_tab[368]
#define __pyx_n_u_KEY_SYM_F32 __pyx_string_tab[369]
#define __pyx_n_u_KEY_SYM_F33 __pyx_string_tab[370]
#define __pyx_n_u_KEY_SYM_F34 __pyx_string_tab[371]
#define __pyx_n_u_KEY_SYM_F35 __pyx_string_tab[372]
#define __pyx_n_u_KEY_SYM_F4 __pyx_string_tab[373]
#define __pyx_n_u_KEY_SYM_F5 __pyx_string_tab[374]
#define __pyx_n_u_KEY_SYM_F6 __pyx_string_tab[375]
#define __pyx_n_u_KEY_SYM_F7 __pyx_string_tab[376]
#define __pyx_n_u_KEY_SYM_F8 __pyx_string_tab[377]
#define __pyx_n_u_KEY_SYM_F9 __pyx_string_tab[378]
#define __pyx_n_u_KEY_SYM_HOME __pyx_string_tab[379]
#define __pyx_n_u_KEY_SYM_INSERT __pyx_string_tab[380]
#define __pyx_n_u_KEY_SYM_LEFT __pyx_string_tab[381]
#define __pyx_n_u_KEY_SYM_LINEFEED __pyx_string_tab[382]
#define __pyx_n_u_KEY_SYM_PAGE_DOWN __pyx_string_tab[383]
#define __pyx_n_u_KEY_SYM_PAGE_UP __pyx_string_tab[384]
#define __pyx_n_u_KEY_SYM_RIGHT __pyx_string_tab[385]
#define __pyx_n_u_KEY_SYM_TAB __pyx_string_tab[386]
#define __pyx_n_u_KEY_SYM_UNICODE __pyx_string_tab[387]
#define __pyx_n_u_KEY_SYM_UP __pyx_string_tab[388]
#define __pyx_n_u_KEY_TYPE_CMD __pyx_string_tab[389]
#define __pyx_n_u_KEY_TYPE_MASK __pyx_string_tab[390]
#define __pyx_n_u_KEY_TYPE_SHIFT __pyx_string_tab[391]
#define __pyx_n_u_KEY_TYPE_SYM __pyx_string_tab[392]
#define __pyx_n_u_OperationError __pyx_string_tab[393]
#define __pyx_n_u_OperationError___init __pyx_string_tab[394]
#define __pyx_n_u_OperationError___str __pyx_string_tab[395]
#define __pyx_n_u_PARAMF_GLOBAL __pyx_string_tab[396]
#define __pyx_n_u_PARAMF_LOCAL __pyx_string_tab[397]
#define __pyx_n_u_PARAMF_SELF __pyx_string_tab[398]
#define __pyx_n_u_PARAM_AUDIBLE_ALERTS __pyx_string_tab[399]
#define __pyx_n_u_PARAM_BOUND_COMMAND_KEYCODES __pyx_string_tab[400]
#define __pyx_n_u_PARAM_CLIENT_PRIORITY __pyx_string_tab[401]
#define __pyx_n_u_PARAM_CLIPBOARD_CONTENT __pyx_string_tab[402]
#define __pyx_n_u_PARAM_COMMAND_KEYCODE_NAME __pyx_string_tab[403]
#define __pyx_n_u_PARAM_COMMAND_KEYCODE_SUMMARY __pyx_string_tab[404]
#define __pyx_n_u_PARAM_COMPUTER_BRAILLE_CELL_SIZE __pyx_string_tab[405]
#define __pyx_n_u_PARAM_COMPUTER_BRAILLE_ROWS_MASK __pyx_string_tab[406]
#define __pyx_n_u_PARAM_COMPUTER_BRAILLE_ROW_CELLS __pyx_string_tab[407]
#define __pyx_n_u_PARAM_COMPUTER_BRAILLE_TABLE __pyx_string_tab[408]
#define __pyx_n_u_PARAM_COUNT __pyx_string_tab[409]
#define __pyx_n_u_PARAM_CURSOR_BLINK_PERCENTAGE __pyx_string_tab[410]
#define __pyx_n_u_PARAM_CURSOR_BLINK_PERIOD __pyx_string_tab[411]
#define __pyx_n_u_PARAM_CURSOR_DOTS __pyx_string_tab[412]
#define __pyx_n_u_PARAM_DEFINED_DRIVER_KEYCODES __pyx_string_tab[413]
#define __pyx_n_u_PARAM_DEVICE_CELL_SIZE __pyx_string_tab[414]
#define __pyx_n_u_PARAM_DEVICE_IDENTIFIER __pyx_string_tab[415]
#define __pyx_n_u_PARAM_DEVICE_MODEL __pyx_string_tab[416]
#define __pyx_n_u_PARAM_DEVICE_ONLINE __pyx_string_tab[417]
#define __pyx_n_u_PARAM_DEVICE_SPEED __pyx_string_tab[418]
#define __pyx_n_u_PARAM_DISPLAY_SIZE __pyx_string_tab[419]
#define __pyx_n_u_PARAM_DRIVER_CODE __pyx_string_tab[420]
#define __pyx_n_u_PARAM_DRIVER_KEYCODE_NAME __pyx_string_tab[421]
#define __pyx_n_u_PARAM_DRIVER_KEYCODE_SUMMARY __pyx_string_tab[422]
#define __pyx_n_u_PARAM_DRIVER_NAME __pyx_string_tab[423]
#define __pyx_n_u_PARAM_DRIVER_PROPERTY_VALUE __pyx_string_tab[424]
#define __pyx_n_u_PARAM_DRIVER_VERSION __pyx_string_tab[425]
#define __pyx_n_u_PARAM_LITERARY_BRAILLE __pyx_string_tab[426]
#define __pyx_n_u_PARAM_LITERARY_BRAILLE_TABLE __pyx_string_tab[427]
#define __pyx_n_u_PARAM_MESSAGE_LOCALE __pyx_string_tab[428]
#define __pyx_n_u_PARAM_RENDERED_CELLS __pyx_string_tab[429]
#define __pyx_n_u_PARAM_RETAIN_DOTS __pyx_string_tab[430]
#define __pyx_n_u_PARAM_SERVER_VERSION __pyx_string_tab[431]
#define __pyx_n_u_PARAM_SKIP_IDENTICAL_LINES __pyx_string_tab[432]
#define __pyx_n_u_PARAM_TYPE_BOOLEAN __pyx_string_tab[433]
#define __pyx_n_u_PARAM_TYPE_KEYCODE __pyx_string_tab[434]
#define __pyx_n_u_PARAM_TYPE_STRING __pyx_string_tab[435]
#define __pyx_n_u_PARAM_TYPE_UINT16 __pyx_string_tab[436]
#define __pyx_n_u_PARAM_TYPE_UINT32 __pyx_string_tab[437]
#define __pyx_n_u_PARAM_TYPE_UINT64 __pyx_string_tab[438]
#define __pyx_n_u_PARAM_TYPE_UINT8 __pyx_string_tab[439]
#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[440]
#define __pyx_n_u_TTY_DEFAULT __pyx_string_tab[441]
#define __pyx_n_u_WriteStruct __pyx_string_tab[442]
#define __pyx_n_u_WriteStruct___reduce_cython __pyx_string_tab[443]
#define __pyx_n_u_WriteStruct___setstate_cython __pyx_string_tab[444]
#define __pyx_n_u_acceptAllKeys __pyx_string_tab[445]
#define __pyx_n_u_acceptKeyRanges __pyx_string_tab[446]
#define __pyx_n_u_acceptKeys __pyx_string_tab[447]
#define __pyx_n_u_andMask __pyx_string_tab[448]
#define __pyx_n_u_argument __pyx_string_tab[449]
#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[450]
#define __pyx_n_u_attrAnd __pyx_string_tab[451]
#define __pyx_n_u_attrOr __pyx_string_tab[452]
#define __pyx_n_u_auth __pyx_string_tab[453]
#define __pyx_n_u_brlapi __pyx_string_tab[454]
#define __pyx_n_u_brlerrno __pyx_string_tab[455]
#define __pyx_n_u_buf __pyx_string_tab[456]
#define __pyx_n_u_c_dots __pyx_string_tab[457]
#define __pyx_n_u_c_driver __pyx_string_tab[458]
#define __pyx_n_u_c_flags __pyx_string_tab[459]
#define __pyx_n_u_c_keys __pyx_string_tab[460]
#define __pyx_n_u_c_n __pyx_string_tab[461]
#define __pyx_n_u_c_nttys __pyx_string_tab[462]
#define __pyx_n_u_c_param __pyx_string_tab[463]
#define __pyx_n_u_c_set __pyx_string_tab[464]
#define __pyx_n_u_c_subparam __pyx_string_tab[465]
#define __pyx_n_u_c_timeout_ms __pyx_string_tab[466]
#define __pyx_n_u_c_tty __pyx_string_tab[467]
#define __pyx_n_u_c_ttys __pyx_string_tab[468]
#define __pyx_n_u_c_type __pyx_string_tab[469]
#define __pyx_n_u_c_udots __pyx_string_tab[470]
#define __pyx_n_u_c_value __pyx_string_tab[471]
#define __pyx_n_u_c_wait __pyx_string_tab[472]
#define __pyx_n_u_callbackData __pyx_string_tab[473]
#define __pyx_n_u_center __pyx_string_tab[474]
#define __pyx_n_u_cfunc __pyx_string_tab[475]
#define __pyx_n_u_charset __pyx_string_tab[476]
#define __pyx_n_u_class_getitem __pyx_string_tab[477]
#define __pyx_n_u_cline_in_traceback __pyx_string_tab[478]
#define __pyx_n_u_closeConnection __pyx_string_tab[479]
#define __pyx_n_u_code __pyx_string_tab[480]
#define __pyx_n_u_command __pyx_string_tab[481]
#define __pyx_n_u_cursor __pyx_string_tab[482]
#define __pyx_n_u_d __pyx_string_tab[483]
#define __pyx_n_u_data __pyx_string_tab[484]
#define __pyx_n_u_decode __pyx_string_tab[485]
#define __pyx_n_u_descr __pyx_string_tab[486]
#define __pyx_n_u_describeKeyCode __pyx_string_tab[487]
#define __pyx_n_u_dispSize __pyx_string_tab[488]
#define __pyx_n_u_displayNumber __pyx_string_tab[489]
#define __pyx_n_u_displaySize __pyx_string_tab[490]
#define __pyx_n_u_dkc __pyx_string_tab[491]
#define __pyx_n_u_doc __pyx_string_tab[492]
#define __pyx_n_u_dots __pyx_string_tab[493]
#define __pyx_n_u_driver __pyx_string_tab[494]
#define __pyx_n_u_e __pyx_string_tab[495]
#define __pyx_n_u_ekc __pyx_string_tab[496]
#define __pyx_n_u_encode __pyx_string_tab[497]
#define __pyx_n_u_enterRawMode __pyx_string_tab[498]
#define __pyx_n_u_enterTtyMode __pyx_string_tab[499]
#define __pyx_n_u_enterTtyModeWithPath __pyx_string_tab[500]
#define __pyx_n_u_entry __pyx_string_tab[501]
#define __pyx_n_u_errfun __pyx_string_tab[502]
#define __pyx_n_u_errno __pyx_string_tab[503]
#define __pyx_n_u_error __pyx_string_tab[504]
#define __pyx_n_u_errors __pyx_string_tab[505]
#define __pyx_n_u_exception __pyx_string_tab[506]
#define __pyx_n_u_expandKeyCode __pyx_string_tab[507]
#define __pyx_n_u_flag __pyx_string_tab[508]
#define __pyx_n_u_flags __pyx_string_tab[509]
#define __pyx_n_u_func __pyx_string_tab[510]
#define __pyx_n_u_func_2 __pyx_string_tab[511]
#define __pyx_n_u_gaierrno __pyx_string_tab[512]
#define __pyx_n_u_getLibraryVersion __pyx_string_tab[513]
#define __pyx_n_u_getParameter __pyx_string_tab[514]
#define __pyx_n_u_getstate __pyx_string_tab[515]
#define __pyx_n_u_host __pyx_string_tab[516]
#define __pyx_n_u_i __pyx_string_tab[517]
#define __pyx_n_u_ignoreAllKeys __pyx_string_tab[518]
#define __pyx_n_u_ignoreKeyRanges __pyx_string_tab[519]
#define __pyx_n_u_ignoreKeys __pyx_string_tab[520]
#define __pyx_n_u_init __pyx_string_tab[521]
#define __pyx_n_u_is_coroutine __pyx_string_tab[522]
#define __pyx_n_u_items __pyx_string_tab[523]
#define __pyx_n_u_key_type __pyx_string_tab[524]
#define __pyx_n_u_keys __pyx_string_tab[525]
#define __pyx_n_u_latin1 __pyx_string_tab[526]
#define __pyx_n_u_leaveRawMode __pyx_string_tab[527]
#define __pyx_n_u_leaveTtyMode __pyx_string_tab[528]
#define __pyx_n_u_libcerrno __pyx_string_tab[529]
#define __pyx_n_u_main __pyx_string_tab[530]
#define __pyx_n_u_major __pyx_string_tab[531]
#define __pyx_n_u_metaclass __pyx_string_tab[532]
#define __pyx_n_u_minor __pyx_string_tab[533]
#define __pyx_n_u_module __pyx_string_tab[534]
#define __pyx_n_u_mro_entries __pyx_string_tab[535]
#define __pyx_n_u_msg __pyx_string_tab[536]
#define __pyx_n_u_name __pyx_string_tab[537]
#define __pyx_n_u_orMask __pyx_string_tab[538]
#define __pyx_n_u_param __pyx_string_tab[539]
#define __pyx_n_u_parameter __pyx_string_tab[540]
#define __pyx_n_u_path __pyx_string_tab[541]
#define __pyx_n_u_pause __pyx_string_tab[542]
#define __pyx_n_u_pop __pyx_string_tab[543]
#define __pyx_n_u_prepare __pyx_string_tab[544]
#define __pyx_n_u_props __pyx_string_tab[545]
#define __pyx_n_u_pyx_state __pyx_string_tab[546]
#define __pyx_n_u_qualname __pyx_string_tab[547]
#define __pyx_n_u_rangeType_all __pyx_string_tab[548]
#define __pyx_n_u_rangeType_code __pyx_string_tab[549]
#define __pyx_n_u_rangeType_command __pyx_string_tab[550]
#define __pyx_n_u_rangeType_key __pyx_string_tab[551]
#define __pyx_n_u_rangeType_type __pyx_string_tab[552]
#define __pyx_n_u_readKey __pyx_string_tab[553]
#define __pyx_n_u_readKeyWithTimeout __pyx_string_tab[554]
#define __pyx_n_u_reduce __pyx_string_tab[555]
#define __pyx_n_u_reduce_cython __pyx_string_tab[556]
#define __pyx_n_u_reduce_ex __pyx_string_tab[557]
#define __pyx_n_u_regionBegin __pyx_string_tab[558]
#define __pyx_n_u_regionSize __pyx_string_tab[559]
#define __pyx_n_u_replace __pyx_string_tab[560]
#define __pyx_n_u_ret __pyx_string_tab[561]
#define __pyx_n_u_retval __pyx_string_tab[562]
#define __pyx_n_u_revision __pyx_string_tab[563]
#define __pyx_n_u_self __pyx_string_tab[564]
#define __pyx_n_u_set __pyx_string_tab[565]
#define __pyx_n_u_setFocus __pyx_string_tab[566]
#define __pyx_n_u_setParameter __pyx_string_tab[567]
#define __pyx_n_u_set_name __pyx_string_tab[568]
#define __pyx_n_u_setdefault __pyx_string_tab[569]
#define __pyx_n_u_setstate __pyx_string_tab[570]
#define __pyx_n_u_setstate_cython __pyx_string_tab[571]
#define __pyx_n_u_settings __pyx_string_tab[572]
#define __pyx_n_u_size __pyx_string_tab[573]
#define __pyx_n_u_str __pyx_string_tab[574]
#define __pyx_n_u_str_2 __pyx_string_tab[575]
#define __pyx_n_u_string __pyx_string_tab[576]
#define __pyx_n_u_subparam __pyx_string_tab[577]
#define __pyx_n_u_sync __pyx_string_tab[578]
#define __pyx_n_u_test __pyx_string_tab[579]
#define __pyx_n_u_text __pyx_string_tab[580]
#define __pyx_n_u_timeout_ms __pyx_string_tab[581]
#define __pyx_n_u_tty __pyx_string_tab[582]
#define __pyx_n_u_type __pyx_string_tab[583]
#define __pyx_n_u_unwatchParameter __pyx_string_tab[584]
#define __pyx_n_u_value __pyx_string_tab[585]
#define __pyx_n_u_values __pyx_string_tab[586]
#define __pyx_n_u_values16 __pyx_string_tab[587]
#define __pyx_n_u_values32 __pyx_string_tab[588]
#define __pyx_n_u_values64 __pyx_string_tab[589]
#define __pyx_n_u_values8 __pyx_string_tab[590]
#define __pyx_n_u_w __pyx_string_tab[591]
#define __pyx_n_u_wait __pyx_string_tab[592]
#define __pyx_n_u_watchParameter __pyx_string_tab[593]
#define __pyx_n_u_watchParameter_locals_cfunc __pyx_string_tab[594]
#define __pyx_n_u_write __pyx_string_tab[595]
#define __pyx_n_u_writeArguments __pyx_string_tab[596]
#define __pyx_n_u_writeDots __pyx_string_tab[597]
#define __pyx_n_u_writeText __pyx_string_tab[598]
#define __pyx_n_u_x __pyx_string_tab[599]
#define __pyx_n_u_y __pyx_string_tab[600]
#define __pyx_kp_b_ __pyx_string_tab[601]
#define __pyx_kp_b_UTF_8 __pyx_string_tab[602]
#define __pyx_kp_b__6 __pyx_string_tab[603]
#define __pyx_kp_b_iso88591_1AWAWAQ_q __pyx_string_tab[604]
#define __pyx_kp_b_iso88591_1A_WAT_1_gYa_IT_AQ_HD_1A_AT_XQ __pyx_string_tab[605]
#define __pyx_kp_b_iso88591_1_1A_gQd_A_gYa_c_q_D_q_q_WD_q __pyx_string_tab[606]
#define __pyx_kp_b_iso88591_1_D_d_V____B_d_TQ_aab_T_3a_Rq_S __pyx_string_tab[607]
#define __pyx_kp_b_iso88591_1_Qd_h6RRSST_gT_4_M_3nLXeeppssx __pyx_string_tab[608]
#define __pyx_kp_b_iso88591_4A_T_a_t1HCq_V7_1_a_d_WD_q __pyx_string_tab[609]
#define __pyx_kp_b_iso88591_4q_WD_q __pyx_string_tab[610]
#define __pyx_kp_b_iso88591_4q_WD_q_2 __pyx_string_tab[611]
#define __pyx_kp_b_iso88591_A_0_T_Gccdde_gT_4_M_3nLXeeppssx __pyx_string_tab[612]
#define __pyx_kp_b_iso88591_A_T_A_Q_S_N_A_wiq_5_AQ_T_a_t1HC __pyx_string_tab[613]
#define __pyx_kp_b_iso88591_A_k_Q_U_uD_b_s_6_1_5_G1IRs_1_O1 __pyx_string_tab[614]
#define __pyx_kp_b_iso88591_A_q_A_1_V3a_q_U_1_d_7_XT_QgS_AQ __pyx_string_tab[615]
#define __pyx_kp_b_iso88591_A_q_A_q_D_YVW_A __pyx_string_tab[616]
#define __pyx_kp_b_iso88591_G4q_a_he1Cq_S_Qa_3a_c_s_A __pyx_string_tab[617]
#define __pyx_kp_b_iso88591_M_a_WD_q __pyx_string_tab[618]
#define __pyx_kp_b_iso88591_Q __pyx_string_tab[619]
#define __pyx_kp_b_iso88591_Q_A_q_A_q_D_YVWWX_XS_q_1IYa_a_q __pyx_string_tab[620]
#define __pyx_kp_b_iso88591_Qd_a_WD_q __pyx_string_tab[621]
#define __pyx_kp_b_iso88591_T __pyx_string_tab[622]
#define __pyx_kp_b_iso88591_T_T_1D_wa __pyx_string_tab[623]
#define __pyx_kp_b_iso88591_T_a_4q_D_4q_A_z_1AWF_wat1A_AQgU __pyx_string_tab[624]
#define __pyx_kp_b_iso88591_Ya __pyx_string_tab[625]
#define __pyx_kp_b_iso88591_a_T_Kq_3a_A_1_q_Q_Q_A_Q_1_WCq_1 __pyx_string_tab[626]
#define __pyx_kp_b_iso88591_a_WD_q __pyx_string_tab[627]
#define __pyx_kp_b_iso88591_aq __pyx_string_tab[628]
#define __pyx_kp_b_iso88591_d2ffg __pyx_string_tab[629]
#define __pyx_kp_b_iso88591_d_83a_F_Q_d_WD_q __pyx_string_tab[630]
#define __pyx_kp_b_iso88591_e4q_Rr_d_6_A_gQa_c_r_G1IRs_7_1 __pyx_string_tab[631]
#define __pyx_kp_b_iso88591_ha_ha __pyx_string_tab[632]
#define __pyx_kp_b_iso88591_q_1_l_q_A_TU_q_WA __pyx_string_tab[633]
#define __pyx_kp_b_iso88591_q_a_A_A_M_A_q __pyx_string_tab[634]
#define __pyx_kp_b_iso88591_q_aq_G4q_a_3a_c_s_Cq __pyx_string_tab[635]
#define __pyx_int_0 __pyx_number_tab[0]
#define __pyx_int_neg_1 __pyx_number_tab[1]
#define __pyx_int_1 __pyx_number_tab[2]
#define __pyx_int_2 __pyx_number_tab[3]
#define __pyx_int_3 __pyx_number_tab[4]
#define __pyx_int_4 __pyx_number_tab[5]
#define __pyx_int_5 __pyx_number_tab[6]
#define __pyx_int_6 __pyx_number_tab[7]
#define __pyx_int_7 __pyx_number_tab[8]
#define __pyx_int_8 __pyx_number_tab[9]
#define __pyx_int_9 __pyx_number_tab[10]
#define __pyx_int_10 __pyx_number_tab[11]
#define __pyx_int_11 __pyx_number_tab[12]
#define __pyx_int_12 __pyx_number_tab[13]
#define __pyx_int_13 __pyx_number_tab[14]
#define __pyx_int_14 __pyx_number_tab[15]
#define __pyx_int_15 __pyx_number_tab[16]
#define __pyx_int_16 __pyx_number_tab[17]
#define __pyx_int_17 __pyx_number_tab[18]
#define __pyx_int_18 __pyx_number_tab[19]
#define __pyx_int_19 __pyx_number_tab[20]
#define __pyx_int_20 __pyx_number_tab[21]
#define __pyx_int_21 __pyx_number_tab[22]
#define __pyx_int_22 __pyx_number_tab[23]
#define __pyx_int_23 __pyx_number_tab[24]
#define __pyx_int_24 __pyx_number_tab[25]
#define __pyx_int_25 __pyx_number_tab[26]
#define __pyx_int_26 __pyx_number_tab[27]
#define __pyx_int_27 __pyx_number_tab[28]
#define __pyx_int_28 __pyx_number_tab[29]
#define __pyx_int_29 __pyx_number_tab[30]
#define __pyx_int_30 __pyx_number_tab[31]
#define __pyx_int_31 __pyx_number_tab[32]
#define __pyx_int_32 __pyx_number_tab[33]
#define __pyx_int_33 __pyx_number_tab[34]
#define __pyx_int_34 __pyx_number_tab[35]
#define __pyx_int_35 __pyx_number_tab[36]
#define __pyx_int_36 __pyx_number_tab[37]
#define __pyx_int_37 __pyx_number_tab[38]
#define __pyx_int_38 __pyx_number_tab[39]
#define __pyx_int_39 __pyx_number_tab[40]
#define __pyx_int_40 __pyx_number_tab[41]
#define __pyx_int_41 __pyx_number_tab[42]
#define __pyx_int_42 __pyx_number_tab[43]
#define __pyx_int_43 __pyx_number_tab[44]
#define __pyx_int_44 __pyx_number_tab[45]
#define __pyx_int_45 __pyx_number_tab[46]
#define __pyx_int_46 __pyx_number_tab[47]
#define __pyx_int_47 __pyx_number_tab[48]
#define __pyx_int_48 __pyx_number_tab[49]
#define __pyx_int_49 __pyx_number_tab[50]
#define __pyx_int_50 __pyx_number_tab[51]
#define __pyx_int_51 __pyx_number_tab[52]
#define __pyx_int_52 __pyx_number_tab[53]
#define __pyx_int_53 __pyx_number_tab[54]
#define __pyx_int_54 __pyx_number_tab[55]
#define __pyx_int_55 __pyx_number_tab[56]
#define __pyx_int_56 __pyx_number_tab[57]
#define __pyx_int_57 __pyx_number_tab[58]
#define __pyx_int_58 __pyx_number_tab[59]
#define __pyx_int_59 __pyx_number_tab[60]
#define __pyx_int_60 __pyx_number_tab[61]
#define __pyx_int_61 __pyx_number_tab[62]
#define __pyx_int_62 __pyx_number_tab[63]
#define __pyx_int_63 __pyx_number_tab[64]
#define __pyx_int_64 __pyx_number_tab[65]
#define __pyx_int_65 __pyx_number_tab[66]
#define __pyx_int_66 __pyx_number_tab[67]
#define __pyx_int_67 __pyx_number_tab[68]
#define __pyx_int_68 __pyx_number_tab[69]
#define __pyx_int_69 __pyx_number_tab[70]
#define __pyx_int_70 __pyx_number_tab[71]
#define __pyx_int_71 __pyx_number_tab[72]
#define __pyx_int_72 __pyx_number_tab[73]
#define __pyx_int_73 __pyx_number_tab[74]
#define __pyx_int_74 __pyx_number_tab[75]
#define __pyx_int_75 __pyx_number_tab[76]
#define __pyx_int_76 __pyx_number_tab[77]
#define __pyx_int_77 __pyx_number_tab[78]
#define __pyx_int_78 __pyx_number_tab[79]
#define __pyx_int_79 __pyx_number_tab[80]
#define __pyx_int_80 __pyx_number_tab[81]
#define __pyx_int_81 __pyx_number_tab[82]
#define __pyx_int_82 __pyx_number_tab[83]
#define __pyx_int_83 __pyx_number_tab[84]
#define __pyx_int_84 __pyx_number_tab[85]
#define __pyx_int_85 __pyx_number_tab[86]
#define __pyx_int_86 __pyx_number_tab[87]
#define __pyx_int_87 __pyx_number_tab[88]
#define __pyx_int_88 __pyx_number_tab[89]
#define __pyx_int_89 __pyx_number_tab[90]
#define __pyx_int_90 __pyx_number_tab[91]
#define __pyx_int_91 __pyx_number_tab[92]
#define __pyx_int_92 __pyx_number_tab[93]
#define __pyx_int_93 __pyx_number_tab[94]
#define __pyx_int_94 __pyx_number_tab[95]
#define __pyx_int_95 __pyx_number_tab[96]
#define __pyx_int_96 __pyx_number_tab[97]
#define __pyx_int_97 __pyx_number_tab[98]
#define __pyx_int_98 __pyx_number_tab[99]
#define __pyx_int_99 __pyx_number_tab[100]
#define __pyx_int_100 __pyx_number_tab[101]
#define __pyx_int_101 __pyx_number_tab[102]
#define __pyx_int_102 __pyx_number_tab[103]
#define __pyx_int_103 __pyx_number_tab[104]
#define __pyx_int_104 __pyx_number_tab[105]
#define __pyx_int_105 __pyx_number_tab[106]
#define __pyx_int_106 __pyx_number_tab[107]
#define __pyx_int_107 __pyx_number_tab[108]
#define __pyx_int_108 __pyx_number_tab[109]
#define __pyx_int_109 __pyx_number_tab[110]
#define __pyx_int_110 __pyx_number_tab[111]
#define __pyx_int_111 __pyx_number_tab[112]
#define __pyx_int_112 __pyx_number_tab[113]
#define __pyx_int_113 __pyx_number_tab[114]
#define __pyx_int_114 __pyx_number_tab[115]
#define __pyx_int_115 __pyx_number_tab[116]
#define __pyx_int_116 __pyx_number_tab[117]
#define __pyx_int_117 __pyx_number_tab[118]
#define __pyx_int_118 __pyx_number_tab[119]
#define __pyx_int_119 __pyx_number_tab[120]
#define __pyx_int_120 __pyx_number_tab[121]
#define __pyx_int_121 __pyx_number_tab[122]
#define __pyx_int_122 __pyx_number_tab[123]
#define __pyx_int_123 __pyx_number_tab[124]
#define __pyx_int_124 __pyx_number_tab[125]
#define __pyx_int_125 __pyx_number_tab[126]
#define __pyx_int_126 __pyx_number_tab[127]
#define __pyx_int_127 __pyx_number_tab[128]
#define __pyx_int_128 __pyx_number_tab[129]
#define __pyx_int_129 __pyx_number_tab[130]
#define __pyx_int_130 __pyx_number_tab[131]
#define __pyx_int_131 __pyx_number_tab[132]
#define __pyx_int_132 __pyx_number_tab[133]
#define __pyx_int_133 __pyx_number_tab[134]
#define __pyx_int_134 __pyx_number_tab[135]
#define __pyx_int_135 __pyx_number_tab[136]
#define __pyx_int_136 __pyx_number_tab[137]
#define __pyx_int_137 __pyx_number_tab[138]
#define __pyx_int_138 __pyx_number_tab[139]
#define __pyx_int_139 __pyx_number_tab[140]
#define __pyx_int_140 __pyx_number_tab[141]
#define __pyx_int_141 __pyx_number_tab[142]
#define __pyx_int_142 __pyx_number_tab[143]
#define __pyx_int_143 __pyx_number_tab[144]
#define __pyx_int_144 __pyx_number_tab[145]
#define __pyx_int_145 __pyx_number_tab[146]
#define __pyx_int_146 __pyx_number_tab[147]
#define __pyx_int_147 __pyx_number_tab[148]
#define __pyx_int_148 __pyx_number_tab[149]
#define __pyx_int_149 __pyx_number_tab[150]
#define __pyx_int_150 __pyx_number_tab[151]
#define __pyx_int_151 __pyx_number_tab[152]
#define __pyx_int_152 __pyx_number_tab[153]
#define __pyx_int_153 __pyx_number_tab[154]
#define __pyx_int_154 __pyx_number_tab[155]
#define __pyx_int_155 __pyx_number_tab[156]
#define __pyx_int_156 __pyx_number_tab[157]
#define __pyx_int_157 __pyx_number_tab[158]
#define __pyx_int_158 __pyx_number_tab[159]
#define __pyx_int_159 __pyx_number_tab[160]
#define __pyx_int_160 __pyx_number_tab[161]
#define __pyx_int_161 __pyx_number_tab[162]
#define __pyx_int_162 __pyx_number_tab[163]
#define __pyx_int_163 __pyx_number_tab[164]
#define __pyx_int_164 __pyx_number_tab[165]
#define __pyx_int_165 __pyx_number_tab[166]
#define __pyx_int_256 __pyx_number_tab[167]
#define __pyx_int_512 __pyx_number_tab[168]
#define __pyx_int_1024 __pyx_number_tab[169]
#define __pyx_int_2048 __pyx_number_tab[170]
#define __pyx_int_4096 __pyx_number_tab[171]
#define __pyx_int_8192 __pyx_number_tab[172]
#define __pyx_int_16384 __pyx_number_tab[173]
#define __pyx_int_32768 __pyx_number_tab[174]
#define __pyx_int_65288 __pyx_number_tab[175]
#define __pyx_int_65289 __pyx_number_tab[176]
#define __pyx_int_65293 __pyx_number_tab[177]
#define __pyx_int_65307 __pyx_number_tab[178]
#define __pyx_int_65360 __pyx_number_tab[179]
#define __pyx_int_65361 __pyx_number_tab[180]
#define __pyx_int_65362 __pyx_number_tab[181]
#define __pyx_int_65363 __pyx_number_tab[182]
#define __pyx_int_65364 __pyx_number_tab[183]
#define __pyx_int_65365 __pyx_number_tab[184]
#define __pyx_int_65366 __pyx_number_tab[185]
#define __pyx_int_65367 __pyx_number_tab[186]
#define __pyx_int_65379 __pyx_number_tab[187]
#define __pyx_int_65470 __pyx_number_tab[188]
#define __pyx_int_65471 __pyx_number_tab[189]
#define __pyx_int_65472 __pyx_number_tab[190]
#define __pyx_int_65473 __pyx_number_tab[191]
#define __pyx_int_65474 __pyx_number_tab[192]
#define __pyx_int_65475 __pyx_number_tab[193]
#define __pyx_int_65476 __pyx_number_tab[194]
#define __pyx_int_65477 __pyx_number_tab[195]
#define __pyx_int_65478 __pyx_number_tab[196]
#define __pyx_int_65479 __pyx_number_tab[197]
#define __pyx_int_65480 __pyx_number_tab[198]
#define __pyx_int_65481 __pyx_number_tab[199]
#define __pyx_int_65482 __pyx_number_tab[200]
#define __pyx_int_65483 __pyx_number_tab[201]
#define __pyx_int_65484 __pyx_number_tab[202]
#define __pyx_int_65485 __pyx_number_tab[203]
#define __pyx_int_65486 __pyx_number_tab[204]
#define __pyx_int_65487 __pyx_number_tab[205]
#define __pyx_int_65488 __pyx_number_tab[206]
#define __pyx_int_65489 __pyx_number_tab[207]
#define __pyx_int_65490 __pyx_number_tab[208]
#define __pyx_int_65491 __pyx_number_tab[209]
#define __pyx_int_65492 __pyx_number_tab[210]
#define __pyx_int_65493 __pyx_number_tab[211]
#define __pyx_int_65494 __pyx_number_tab[212]
#define __pyx_int_65495 __pyx_number_tab[213]
#define __pyx_int_65496 __pyx_number_tab[214]
#define __pyx_int_65497 __pyx_number_tab[215]
#define __pyx_int_65498 __pyx_number_tab[216]
#define __pyx_int_65499 __pyx_number_tab[217]
#define __pyx_int_65500 __pyx_number_tab[218]
#define __pyx_int_65501 __pyx_number_tab[219]
#define __pyx_int_65502 __pyx_number_tab[220]
#define __pyx_int_65503 __pyx_number_tab[221]
#define __pyx_int_65504 __pyx_number_tab[222]
#define __pyx_int_65535 __pyx_number_tab[223]
#define __pyx_int_16777216 __pyx_number_tab[224]
#define __pyx_int_536870912 __pyx_number_tab[225]
/* #### Code section: module_state_clear ### */
#if CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) {
  __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m);
  if (!clear_module_state) return 0;
  Py_CLEAR(clear_module_state->__pyx_d);
  Py_CLEAR(clear_module_state->__pyx_b);
  Py_CLEAR(clear_module_state->__pyx_cython_runtime);
  Py_CLEAR(clear_module_state->__pyx_empty_tuple);
  Py_CLEAR(clear_module_state->__pyx_empty_bytes);
  Py_CLEAR(clear_module_state->__pyx_empty_unicode);
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __Pyx_State_RemoveModule(NULL);
  #endif
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
  Py_CLEAR(clear_module_state->__pyx_ptype_6brlapi_WriteStruct);
  Py_CLEAR(clear_module_state->__pyx_type_6brlapi_WriteStruct);
  Py_CLEAR(clear_module_state->__pyx_ptype_6brlapi_Connection);
  Py_CLEAR(clear_module_state->__pyx_type_6brlapi_Connection);
  Py_CLEAR(clear_module_state->__pyx_ptype_6brlapi___pyx_scope_struct__watchParameter);
  Py_CLEAR(clear_module_state->__pyx_type_6brlapi___pyx_scope_struct__watchParameter);
  Py_CLEAR(clear_module_state->__pyx_k__4);
  Py_CLEAR(clear_module_state->__pyx_k__5);
  Py_CLEAR(clear_module_state->__pyx_k__7);
  for (int i=0; i<4; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); }
  for (int i=0; i<39; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<636; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<226; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); }
/* #### Code section: module_state_clear_contents ### */
/* CommonTypesMetaclass.module_state_clear */
Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType);

/* CythonFunctionShared.module_state_clear */
Py_CLEAR(clear_module_state->__pyx_CyFunctionType);

/* #### Code section: module_state_clear_end ### */
return 0;
}
#endif
/* #### Code section: module_state_traverse ### */
#if CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
  __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m);
  if (!traverse_module_state) return 0;
  Py_VISIT(traverse_module_state->__pyx_d);
  Py_VISIT(traverse_module_state->__pyx_b);
  Py_VISIT(traverse_module_state->__pyx_cython_runtime);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
  Py_VISIT(traverse_module_state->__pyx_ptype_6brlapi_WriteStruct);
  Py_VISIT(traverse_module_state->__pyx_type_6brlapi_WriteStruct);
  Py_VISIT(traverse_module_state->__pyx_ptype_6brlapi_Connection);
  Py_VISIT(traverse_module_state->__pyx_type_6brlapi_Connection);
  Py_VISIT(traverse_module_state->__pyx_ptype_6brlapi___pyx_scope_struct__watchParameter);
  Py_VISIT(traverse_module_state->__pyx_type_6brlapi___pyx_scope_struct__watchParameter);
  Py_VISIT(traverse_module_state->__pyx_k__4);
  Py_VISIT(traverse_module_state->__pyx_k__5);
  Py_VISIT(traverse_module_state->__pyx_k__7);
  for (int i=0; i<4; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); }
  for (int i=0; i<39; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<636; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<226; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); }
/* #### Code section: module_state_traverse_contents ### */
/* CommonTypesMetaclass.module_state_traverse */
Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType);

/* CythonFunctionShared.module_state_traverse */
Py_VISIT(traverse_module_state->__pyx_CyFunctionType);

/* #### Code section: module_state_traverse_end ### */
return 0;
}
#endif
/* #### Code section: module_code ### */

/* "brlapi.pyx":137
 * include "constants.auto.pyx"
 * 
 * def getLibraryVersion():             # <<<<<<<<<<<<<<
 * 	"""Get the BrlAPI version as a three-element list (major, minor, revision).
 * 	See brlapi_getLibraryVersion(3)."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_1getLibraryVersion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_getLibraryVersion, "getLibraryVersion()\n\nGet the BrlAPI version as a three-element list (major, minor, revision).\nSee brlapi_getLibraryVersion(3).");
static PyMethodDef __pyx_mdef_6brlapi_1getLibraryVersion = {"getLibraryVersion", (PyCFunction)__pyx_pw_6brlapi_1getLibraryVersion, METH_NOARGS, __pyx_doc_6brlapi_getLibraryVersion};
static PyObject *__pyx_pw_6brlapi_1getLibraryVersion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getLibraryVersion (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6brlapi_getLibraryVersion(__pyx_self);

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

static PyObject *__pyx_pf_6brlapi_getLibraryVersion(CYTHON_UNUSED PyObject *__pyx_self) {
  int __pyx_v_major;
  int __pyx_v_minor;
  int __pyx_v_revision;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getLibraryVersion", 0);

  /* "brlapi.pyx":143
 * 	cdef int minor
 * 	cdef int revision
 * 	with nogil:             # <<<<<<<<<<<<<<
 * 		c_brlapi.brlapi_getLibraryVersion(&major, &minor, &revision)
 * 	return (major, minor, revision)
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":144
 * 	cdef int revision
 * 	with nogil:
 * 		c_brlapi.brlapi_getLibraryVersion(&major, &minor, &revision)             # <<<<<<<<<<<<<<
 * 	return (major, minor, revision)
 * 
*/
        brlapi_getLibraryVersion((&__pyx_v_major), (&__pyx_v_minor), (&__pyx_v_revision));
      }

      /* "brlapi.pyx":143
 * 	cdef int minor
 * 	cdef int revision
 * 	with nogil:             # <<<<<<<<<<<<<<
 * 		c_brlapi.brlapi_getLibraryVersion(&major, &minor, &revision)
 * 	return (major, minor, revision)
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "brlapi.pyx":145
 * 	with nogil:
 * 		c_brlapi.brlapi_getLibraryVersion(&major, &minor, &revision)
 * 	return (major, minor, revision)             # <<<<<<<<<<<<<<
 * 
 * def expandKeyCode(code):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_major); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_minor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_revision); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 145, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 145, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 145, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "brlapi.pyx":137
 * include "constants.auto.pyx"
 * 
 * def getLibraryVersion():             # <<<<<<<<<<<<<<
 * 	"""Get the BrlAPI version as a three-element list (major, minor, revision).
 * 	See brlapi_getLibraryVersion(3)."""
*/

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

/* "brlapi.pyx":147
 * 	return (major, minor, revision)
 * 
 * def expandKeyCode(code):             # <<<<<<<<<<<<<<
 * 	"""Expand a keycode into its individual components.
 * 	See brlapi_expandKeyCode(3)."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_3expandKeyCode(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_2expandKeyCode, "expandKeyCode(code)\n\nExpand a keycode into its individual components.\nSee brlapi_expandKeyCode(3).");
static PyMethodDef __pyx_mdef_6brlapi_3expandKeyCode = {"expandKeyCode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_3expandKeyCode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_2expandKeyCode};
static PyObject *__pyx_pw_6brlapi_3expandKeyCode(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_code = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("expandKeyCode (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_code,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 147, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 147, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "expandKeyCode", 0) < (0)) __PYX_ERR(0, 147, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("expandKeyCode", 1, 1, 1, i); __PYX_ERR(0, 147, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 147, __pyx_L3_error)
    }
    __pyx_v_code = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("expandKeyCode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 147, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.expandKeyCode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_2expandKeyCode(__pyx_self, __pyx_v_code);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_2expandKeyCode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_code) {
  brlapi_expandedKeyCode_t __pyx_v_ekc;
  int __pyx_v_retval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  brlapi_keyCode_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("expandKeyCode", 0);

  /* "brlapi.pyx":152
 * 	cdef c_brlapi.brlapi_expandedKeyCode_t ekc
 * 	cdef int retval
 * 	retval = c_brlapi.brlapi_expandKeyCode(code, &ekc)             # <<<<<<<<<<<<<<
 * 	if retval == -1:
 * 		raise OperationError()
*/
  __pyx_t_1 = __Pyx_PyLong_As_brlapi_keyCode_t(__pyx_v_code); if (unlikely((__pyx_t_1 == ((brlapi_keyCode_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 152, __pyx_L1_error)
  __pyx_v_retval = brlapi_expandKeyCode(__pyx_t_1, (&__pyx_v_ekc));

  /* "brlapi.pyx":153
 * 	cdef int retval
 * 	retval = c_brlapi.brlapi_expandKeyCode(code, &ekc)
 * 	if retval == -1:             # <<<<<<<<<<<<<<
 * 		raise OperationError()
 * 	else:
*/
  __pyx_t_2 = (__pyx_v_retval == -1L);
  if (unlikely(__pyx_t_2)) {

    /* "brlapi.pyx":154
 * 	retval = c_brlapi.brlapi_expandKeyCode(code, &ekc)
 * 	if retval == -1:
 * 		raise OperationError()             # <<<<<<<<<<<<<<
 * 	else:
 * 		return {
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 154, __pyx_L1_error)

    /* "brlapi.pyx":153
 * 	cdef int retval
 * 	retval = c_brlapi.brlapi_expandKeyCode(code, &ekc)
 * 	if retval == -1:             # <<<<<<<<<<<<<<
 * 		raise OperationError()
 * 	else:
*/
  }

  /* "brlapi.pyx":156
 * 		raise OperationError()
 * 	else:
 * 		return {             # <<<<<<<<<<<<<<
 * 			"type": ekc.type,
 * 			"command": ekc.command,
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);

    /* "brlapi.pyx":157
 * 	else:
 * 		return {
 * 			"type": ekc.type,             # <<<<<<<<<<<<<<
 * 			"command": ekc.command,
 * 			"argument": ekc.argument,
*/
    __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyLong_From_unsigned_int(__pyx_v_ekc.type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_type, __pyx_t_5) < (0)) __PYX_ERR(0, 157, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "brlapi.pyx":158
 * 		return {
 * 			"type": ekc.type,
 * 			"command": ekc.command,             # <<<<<<<<<<<<<<
 * 			"argument": ekc.argument,
 * 			"flags": ekc.flags
*/
    __pyx_t_5 = __Pyx_PyLong_From_unsigned_int(__pyx_v_ekc.command); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_command, __pyx_t_5) < (0)) __PYX_ERR(0, 157, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "brlapi.pyx":159
 * 			"type": ekc.type,
 * 			"command": ekc.command,
 * 			"argument": ekc.argument,             # <<<<<<<<<<<<<<
 * 			"flags": ekc.flags
 * 		}
*/
    __pyx_t_5 = __Pyx_PyLong_From_unsigned_int(__pyx_v_ekc.argument); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_argument, __pyx_t_5) < (0)) __PYX_ERR(0, 157, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "brlapi.pyx":160
 * 			"command": ekc.command,
 * 			"argument": ekc.argument,
 * 			"flags": ekc.flags             # <<<<<<<<<<<<<<
 * 		}
 * 
*/
    __pyx_t_5 = __Pyx_PyLong_From_unsigned_int(__pyx_v_ekc.flags); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_flags, __pyx_t_5) < (0)) __PYX_ERR(0, 157, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "brlapi.pyx":147
 * 	return (major, minor, revision)
 * 
 * def expandKeyCode(code):             # <<<<<<<<<<<<<<
 * 	"""Expand a keycode into its individual components.
 * 	See brlapi_expandKeyCode(3)."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("brlapi.expandKeyCode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":163
 * 		}
 * 
 * def describeKeyCode(code):             # <<<<<<<<<<<<<<
 * 	"""Describe the individual components of a keycode symbolically.
 * 	See brlapi_describeKeyCode(3)."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_5describeKeyCode(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_4describeKeyCode, "describeKeyCode(code)\n\nDescribe the individual components of a keycode symbolically.\nSee brlapi_describeKeyCode(3).");
static PyMethodDef __pyx_mdef_6brlapi_5describeKeyCode = {"describeKeyCode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_5describeKeyCode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_4describeKeyCode};
static PyObject *__pyx_pw_6brlapi_5describeKeyCode(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_code = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("describeKeyCode (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_code,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 163, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 163, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "describeKeyCode", 0) < (0)) __PYX_ERR(0, 163, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("describeKeyCode", 1, 1, 1, i); __PYX_ERR(0, 163, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 163, __pyx_L3_error)
    }
    __pyx_v_code = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("describeKeyCode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 163, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.describeKeyCode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_4describeKeyCode(__pyx_self, __pyx_v_code);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_4describeKeyCode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_code) {
  brlapi_describedKeyCode_t __pyx_v_dkc;
  int __pyx_v_retval;
  PyObject *__pyx_v_flags = NULL;
  unsigned int __pyx_v_flag;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  brlapi_keyCode_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  unsigned int __pyx_t_7;
  unsigned int __pyx_t_8;
  unsigned int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("describeKeyCode", 0);

  /* "brlapi.pyx":168
 * 	cdef c_brlapi.brlapi_describedKeyCode_t dkc
 * 	cdef int retval
 * 	retval = c_brlapi.brlapi_describeKeyCode(code, &dkc)             # <<<<<<<<<<<<<<
 * 	if retval == -1:
 * 		raise OperationError()
*/
  __pyx_t_1 = __Pyx_PyLong_As_brlapi_keyCode_t(__pyx_v_code); if (unlikely((__pyx_t_1 == ((brlapi_keyCode_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 168, __pyx_L1_error)
  __pyx_v_retval = brlapi_describeKeyCode(__pyx_t_1, (&__pyx_v_dkc));

  /* "brlapi.pyx":169
 * 	cdef int retval
 * 	retval = c_brlapi.brlapi_describeKeyCode(code, &dkc)
 * 	if retval == -1:             # <<<<<<<<<<<<<<
 * 		raise OperationError()
 * 	else:
*/
  __pyx_t_2 = (__pyx_v_retval == -1L);
  if (unlikely(__pyx_t_2)) {

    /* "brlapi.pyx":170
 * 	retval = c_brlapi.brlapi_describeKeyCode(code, &dkc)
 * 	if retval == -1:
 * 		raise OperationError()             # <<<<<<<<<<<<<<
 * 	else:
 * 		flags = ()
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 170, __pyx_L1_error)

    /* "brlapi.pyx":169
 * 	cdef int retval
 * 	retval = c_brlapi.brlapi_describeKeyCode(code, &dkc)
 * 	if retval == -1:             # <<<<<<<<<<<<<<
 * 		raise OperationError()
 * 	else:
*/
  }

  /* "brlapi.pyx":172
 * 		raise OperationError()
 * 	else:
 * 		flags = ()             # <<<<<<<<<<<<<<
 * 		for flag in range(dkc.flags):
 * 			flags += (dkc.flag[flag], )
*/
  /*else*/ {
    __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple);
    __pyx_v_flags = __pyx_mstate_global->__pyx_empty_tuple;

    /* "brlapi.pyx":173
 * 	else:
 * 		flags = ()
 * 		for flag in range(dkc.flags):             # <<<<<<<<<<<<<<
 * 			flags += (dkc.flag[flag], )
 * 		return {
*/
    __pyx_t_7 = __pyx_v_dkc.flags;
    __pyx_t_8 = __pyx_t_7;
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
      __pyx_v_flag = __pyx_t_9;

      /* "brlapi.pyx":174
 * 		flags = ()
 * 		for flag in range(dkc.flags):
 * 			flags += (dkc.flag[flag], )             # <<<<<<<<<<<<<<
 * 		return {
 * 			"type": dkc.type,
*/
      __pyx_t_3 = __Pyx_PyBytes_FromString((__pyx_v_dkc.flag[__pyx_v_flag])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 174, __pyx_L1_error);
      __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_flags, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_flags, __pyx_t_3);
      __pyx_t_3 = 0;
    }

    /* "brlapi.pyx":175
 * 		for flag in range(dkc.flags):
 * 			flags += (dkc.flag[flag], )
 * 		return {             # <<<<<<<<<<<<<<
 * 			"type": dkc.type,
 * 			"command": dkc.command,
*/
    __Pyx_XDECREF(__pyx_r);

    /* "brlapi.pyx":176
 * 			flags += (dkc.flag[flag], )
 * 		return {
 * 			"type": dkc.type,             # <<<<<<<<<<<<<<
 * 			"command": dkc.command,
 * 			"argument": dkc.argument,
*/
    __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_dkc.type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_type, __pyx_t_5) < (0)) __PYX_ERR(0, 176, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "brlapi.pyx":177
 * 		return {
 * 			"type": dkc.type,
 * 			"command": dkc.command,             # <<<<<<<<<<<<<<
 * 			"argument": dkc.argument,
 * 			"flags": flags
*/
    __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_dkc.command); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_command, __pyx_t_5) < (0)) __PYX_ERR(0, 176, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "brlapi.pyx":178
 * 			"type": dkc.type,
 * 			"command": dkc.command,
 * 			"argument": dkc.argument,             # <<<<<<<<<<<<<<
 * 			"flags": flags
 * 		}
*/
    __pyx_t_5 = __Pyx_PyLong_From_unsigned_int(__pyx_v_dkc.argument); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_argument, __pyx_t_5) < (0)) __PYX_ERR(0, 176, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "brlapi.pyx":179
 * 			"command": dkc.command,
 * 			"argument": dkc.argument,
 * 			"flags": flags             # <<<<<<<<<<<<<<
 * 		}
 * 
*/
    if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_flags, __pyx_v_flags) < (0)) __PYX_ERR(0, 176, __pyx_L1_error)
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "brlapi.pyx":163
 * 		}
 * 
 * def describeKeyCode(code):             # <<<<<<<<<<<<<<
 * 	"""Describe the individual components of a keycode symbolically.
 * 	See brlapi_describeKeyCode(3)."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("brlapi.describeKeyCode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_flags);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":182
 * 		}
 * 
 * cdef object _parameterToPython(c_brlapi.brlapi_param_t c_param, const void *c_value, size_t size):             # <<<<<<<<<<<<<<
 * 	cdef const c_brlapi.brlapi_param_properties_t *props
 * 
*/

static PyObject *__pyx_f_6brlapi__parameterToPython(brlapi_param_t __pyx_v_c_param, void const *__pyx_v_c_value, size_t __pyx_v_size) {
  brlapi_param_properties_t const *__pyx_v_props;
  char *__pyx_v_string;
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_v_ret = NULL;
  uint8_t *__pyx_v_values8;
  uint16_t *__pyx_v_values16;
  uint32_t *__pyx_v_values32;
  uint64_t *__pyx_v_values64;
  size_t __pyx_7genexpr__pyx_v_i;
  size_t __pyx_8genexpr1__pyx_v_i;
  size_t __pyx_8genexpr2__pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  size_t __pyx_t_6;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_parameterToPython", 0);

  /* "brlapi.pyx":185
 * 	cdef const c_brlapi.brlapi_param_properties_t *props
 * 
 * 	with nogil:             # <<<<<<<<<<<<<<
 * 		props = c_brlapi.brlapi_getParameterProperties(c_param)
 * 
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":186
 * 
 * 	with nogil:
 * 		props = c_brlapi.brlapi_getParameterProperties(c_param)             # <<<<<<<<<<<<<<
 * 
 * 	if props == NULL:
*/
        __pyx_v_props = brlapi_getParameterProperties(__pyx_v_c_param);
      }

      /* "brlapi.pyx":185
 * 	cdef const c_brlapi.brlapi_param_properties_t *props
 * 
 * 	with nogil:             # <<<<<<<<<<<<<<
 * 		props = c_brlapi.brlapi_getParameterProperties(c_param)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "brlapi.pyx":188
 * 		props = c_brlapi.brlapi_getParameterProperties(c_param)
 * 
 * 	if props == NULL:             # <<<<<<<<<<<<<<
 * 		raise OperationError()
 * 
*/
  __pyx_t_1 = (__pyx_v_props == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "brlapi.pyx":189
 * 
 * 	if props == NULL:
 * 		raise OperationError()             # <<<<<<<<<<<<<<
 * 
 * 	if props.type == PARAM_TYPE_STRING:
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 189, __pyx_L1_error)

    /* "brlapi.pyx":188
 * 		props = c_brlapi.brlapi_getParameterProperties(c_param)
 * 
 * 	if props == NULL:             # <<<<<<<<<<<<<<
 * 		raise OperationError()
 * 
*/
  }

  /* "brlapi.pyx":191
 * 		raise OperationError()
 * 
 * 	if props.type == PARAM_TYPE_STRING:             # <<<<<<<<<<<<<<
 * 		string = <char *>c_value
 * 		s = string[:size]
*/
  __pyx_t_2 = __Pyx_PyLong_From_brlapi_param_type_t(__pyx_v_props->type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_STRING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 191, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 191, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {

    /* "brlapi.pyx":192
 * 
 * 	if props.type == PARAM_TYPE_STRING:
 * 		string = <char *>c_value             # <<<<<<<<<<<<<<
 * 		s = string[:size]
 * 		ret = s.decode("UTF-8")
*/
    __pyx_v_string = ((char *)__pyx_v_c_value);

    /* "brlapi.pyx":193
 * 	if props.type == PARAM_TYPE_STRING:
 * 		string = <char *>c_value
 * 		s = string[:size]             # <<<<<<<<<<<<<<
 * 		ret = s.decode("UTF-8")
 * 	elif props.type == PARAM_TYPE_BOOLEAN:
*/
    __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_string + 0, __pyx_v_size - 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_s = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "brlapi.pyx":194
 * 		string = <char *>c_value
 * 		s = string[:size]
 * 		ret = s.decode("UTF-8")             # <<<<<<<<<<<<<<
 * 	elif props.type == PARAM_TYPE_BOOLEAN:
 * 		values8 = <uint8_t *>c_value
*/
    __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_s, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_ret = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "brlapi.pyx":191
 * 		raise OperationError()
 * 
 * 	if props.type == PARAM_TYPE_STRING:             # <<<<<<<<<<<<<<
 * 		string = <char *>c_value
 * 		s = string[:size]
*/
    goto __pyx_L7;
  }

  /* "brlapi.pyx":195
 * 		s = string[:size]
 * 		ret = s.decode("UTF-8")
 * 	elif props.type == PARAM_TYPE_BOOLEAN:             # <<<<<<<<<<<<<<
 * 		values8 = <uint8_t *>c_value
 * 		ret = values8[0] != 0
*/
  __pyx_t_3 = __Pyx_PyLong_From_brlapi_param_type_t(__pyx_v_props->type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_BOOLEAN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 195, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "brlapi.pyx":196
 * 		ret = s.decode("UTF-8")
 * 	elif props.type == PARAM_TYPE_BOOLEAN:
 * 		values8 = <uint8_t *>c_value             # <<<<<<<<<<<<<<
 * 		ret = values8[0] != 0
 * 	elif props.type == PARAM_TYPE_UINT8:
*/
    __pyx_v_values8 = ((uint8_t *)__pyx_v_c_value);

    /* "brlapi.pyx":197
 * 	elif props.type == PARAM_TYPE_BOOLEAN:
 * 		values8 = <uint8_t *>c_value
 * 		ret = values8[0] != 0             # <<<<<<<<<<<<<<
 * 	elif props.type == PARAM_TYPE_UINT8:
 * 		if props.isArray:
*/
    __pyx_t_2 = __Pyx_PyBool_FromLong(((__pyx_v_values8[0]) != 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_ret = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "brlapi.pyx":195
 * 		s = string[:size]
 * 		ret = s.decode("UTF-8")
 * 	elif props.type == PARAM_TYPE_BOOLEAN:             # <<<<<<<<<<<<<<
 * 		values8 = <uint8_t *>c_value
 * 		ret = values8[0] != 0
*/
    goto __pyx_L7;
  }

  /* "brlapi.pyx":198
 * 		values8 = <uint8_t *>c_value
 * 		ret = values8[0] != 0
 * 	elif props.type == PARAM_TYPE_UINT8:             # <<<<<<<<<<<<<<
 * 		if props.isArray:
 * 			values8 = <uint8_t *>c_value
*/
  __pyx_t_2 = __Pyx_PyLong_From_brlapi_param_type_t(__pyx_v_props->type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_UINT8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 198, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 198, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {

    /* "brlapi.pyx":199
 * 		ret = values8[0] != 0
 * 	elif props.type == PARAM_TYPE_UINT8:
 * 		if props.isArray:             # <<<<<<<<<<<<<<
 * 			values8 = <uint8_t *>c_value
 * 			ret = values8[:size]
*/
    __pyx_t_1 = (__pyx_v_props->isArray != 0);
    if (__pyx_t_1) {

      /* "brlapi.pyx":200
 * 	elif props.type == PARAM_TYPE_UINT8:
 * 		if props.isArray:
 * 			values8 = <uint8_t *>c_value             # <<<<<<<<<<<<<<
 * 			ret = values8[:size]
 * 		else:
*/
      __pyx_v_values8 = ((uint8_t *)__pyx_v_c_value);

      /* "brlapi.pyx":201
 * 		if props.isArray:
 * 			values8 = <uint8_t *>c_value
 * 			ret = values8[:size]             # <<<<<<<<<<<<<<
 * 		else:
 * 			values8 = <uint8_t *>c_value
*/
      __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(((char const *)__pyx_v_values8) + 0, __pyx_v_size - 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_ret = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "brlapi.pyx":199
 * 		ret = values8[0] != 0
 * 	elif props.type == PARAM_TYPE_UINT8:
 * 		if props.isArray:             # <<<<<<<<<<<<<<
 * 			values8 = <uint8_t *>c_value
 * 			ret = values8[:size]
*/
      goto __pyx_L8;
    }

    /* "brlapi.pyx":203
 * 			ret = values8[:size]
 * 		else:
 * 			values8 = <uint8_t *>c_value             # <<<<<<<<<<<<<<
 * 			ret = values8[0]
 * 	elif props.type == PARAM_TYPE_UINT16:
*/
    /*else*/ {
      __pyx_v_values8 = ((uint8_t *)__pyx_v_c_value);

      /* "brlapi.pyx":204
 * 		else:
 * 			values8 = <uint8_t *>c_value
 * 			ret = values8[0]             # <<<<<<<<<<<<<<
 * 	elif props.type == PARAM_TYPE_UINT16:
 * 		if props.isArray:
*/
      __pyx_t_3 = __Pyx_PyLong_From_uint8_t((__pyx_v_values8[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_ret = __pyx_t_3;
      __pyx_t_3 = 0;
    }
    __pyx_L8:;

    /* "brlapi.pyx":198
 * 		values8 = <uint8_t *>c_value
 * 		ret = values8[0] != 0
 * 	elif props.type == PARAM_TYPE_UINT8:             # <<<<<<<<<<<<<<
 * 		if props.isArray:
 * 			values8 = <uint8_t *>c_value
*/
    goto __pyx_L7;
  }

  /* "brlapi.pyx":205
 * 			values8 = <uint8_t *>c_value
 * 			ret = values8[0]
 * 	elif props.type == PARAM_TYPE_UINT16:             # <<<<<<<<<<<<<<
 * 		if props.isArray:
 * 			values16 = <uint16_t *>c_value
*/
  __pyx_t_3 = __Pyx_PyLong_From_brlapi_param_type_t(__pyx_v_props->type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_UINT16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "brlapi.pyx":206
 * 			ret = values8[0]
 * 	elif props.type == PARAM_TYPE_UINT16:
 * 		if props.isArray:             # <<<<<<<<<<<<<<
 * 			values16 = <uint16_t *>c_value
 * 			ret = [values16[i] for i in range(size//2)]
*/
    __pyx_t_1 = (__pyx_v_props->isArray != 0);
    if (__pyx_t_1) {

      /* "brlapi.pyx":207
 * 	elif props.type == PARAM_TYPE_UINT16:
 * 		if props.isArray:
 * 			values16 = <uint16_t *>c_value             # <<<<<<<<<<<<<<
 * 			ret = [values16[i] for i in range(size//2)]
 * 		else:
*/
      __pyx_v_values16 = ((uint16_t *)__pyx_v_c_value);

      /* "brlapi.pyx":208
 * 		if props.isArray:
 * 			values16 = <uint16_t *>c_value
 * 			ret = [values16[i] for i in range(size//2)]             # <<<<<<<<<<<<<<
 * 		else:
 * 			values16 = <uint16_t *>c_value
*/
      { /* enter inner scope */
        __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = (__pyx_v_size / 2);
        __pyx_t_6 = __pyx_t_5;
        for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
          __pyx_7genexpr__pyx_v_i = __pyx_t_7;
          __pyx_t_4 = __Pyx_PyLong_From_uint16_t((__pyx_v_values16[__pyx_7genexpr__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 208, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 208, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
      } /* exit inner scope */
      __pyx_v_ret = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "brlapi.pyx":206
 * 			ret = values8[0]
 * 	elif props.type == PARAM_TYPE_UINT16:
 * 		if props.isArray:             # <<<<<<<<<<<<<<
 * 			values16 = <uint16_t *>c_value
 * 			ret = [values16[i] for i in range(size//2)]
*/
      goto __pyx_L9;
    }

    /* "brlapi.pyx":210
 * 			ret = [values16[i] for i in range(size//2)]
 * 		else:
 * 			values16 = <uint16_t *>c_value             # <<<<<<<<<<<<<<
 * 			ret = values16[0]
 * 	elif props.type == PARAM_TYPE_UINT32:
*/
    /*else*/ {
      __pyx_v_values16 = ((uint16_t *)__pyx_v_c_value);

      /* "brlapi.pyx":211
 * 		else:
 * 			values16 = <uint16_t *>c_value
 * 			ret = values16[0]             # <<<<<<<<<<<<<<
 * 	elif props.type == PARAM_TYPE_UINT32:
 * 		if props.isArray:
*/
      __pyx_t_2 = __Pyx_PyLong_From_uint16_t((__pyx_v_values16[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_ret = __pyx_t_2;
      __pyx_t_2 = 0;
    }
    __pyx_L9:;

    /* "brlapi.pyx":205
 * 			values8 = <uint8_t *>c_value
 * 			ret = values8[0]
 * 	elif props.type == PARAM_TYPE_UINT16:             # <<<<<<<<<<<<<<
 * 		if props.isArray:
 * 			values16 = <uint16_t *>c_value
*/
    goto __pyx_L7;
  }

  /* "brlapi.pyx":212
 * 			values16 = <uint16_t *>c_value
 * 			ret = values16[0]
 * 	elif props.type == PARAM_TYPE_UINT32:             # <<<<<<<<<<<<<<
 * 		if props.isArray:
 * 			values32 = <uint32_t *>c_value
*/
  __pyx_t_2 = __Pyx_PyLong_From_brlapi_param_type_t(__pyx_v_props->type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_UINT32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {

    /* "brlapi.pyx":213
 * 			ret = values16[0]
 * 	elif props.type == PARAM_TYPE_UINT32:
 * 		if props.isArray:             # <<<<<<<<<<<<<<
 * 			values32 = <uint32_t *>c_value
 * 			ret = [values32[i] for i in range(size//4)]
*/
    __pyx_t_1 = (__pyx_v_props->isArray != 0);
    if (__pyx_t_1) {

      /* "brlapi.pyx":214
 * 	elif props.type == PARAM_TYPE_UINT32:
 * 		if props.isArray:
 * 			values32 = <uint32_t *>c_value             # <<<<<<<<<<<<<<
 * 			ret = [values32[i] for i in range(size//4)]
 * 		else:
*/
      __pyx_v_values32 = ((uint32_t *)__pyx_v_c_value);

      /* "brlapi.pyx":215
 * 		if props.isArray:
 * 			values32 = <uint32_t *>c_value
 * 			ret = [values32[i] for i in range(size//4)]             # <<<<<<<<<<<<<<
 * 		else:
 * 			values32 = <uint32_t *>c_value
*/
      { /* enter inner scope */
        __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 215, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = (__pyx_v_size / 4);
        __pyx_t_6 = __pyx_t_5;
        for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
          __pyx_8genexpr1__pyx_v_i = __pyx_t_7;
          __pyx_t_4 = __Pyx_PyLong_From_uint32_t((__pyx_v_values32[__pyx_8genexpr1__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 215, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 215, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
      } /* exit inner scope */
      __pyx_v_ret = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "brlapi.pyx":213
 * 			ret = values16[0]
 * 	elif props.type == PARAM_TYPE_UINT32:
 * 		if props.isArray:             # <<<<<<<<<<<<<<
 * 			values32 = <uint32_t *>c_value
 * 			ret = [values32[i] for i in range(size//4)]
*/
      goto __pyx_L12;
    }

    /* "brlapi.pyx":217
 * 			ret = [values32[i] for i in range(size//4)]
 * 		else:
 * 			values32 = <uint32_t *>c_value             # <<<<<<<<<<<<<<
 * 			ret = values32[0]
 * 	elif props.type == PARAM_TYPE_UINT64:
*/
    /*else*/ {
      __pyx_v_values32 = ((uint32_t *)__pyx_v_c_value);

      /* "brlapi.pyx":218
 * 		else:
 * 			values32 = <uint32_t *>c_value
 * 			ret = values32[0]             # <<<<<<<<<<<<<<
 * 	elif props.type == PARAM_TYPE_UINT64:
 * 		if props.isArray:
*/
      __pyx_t_3 = __Pyx_PyLong_From_uint32_t((__pyx_v_values32[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 218, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_ret = __pyx_t_3;
      __pyx_t_3 = 0;
    }
    __pyx_L12:;

    /* "brlapi.pyx":212
 * 			values16 = <uint16_t *>c_value
 * 			ret = values16[0]
 * 	elif props.type == PARAM_TYPE_UINT32:             # <<<<<<<<<<<<<<
 * 		if props.isArray:
 * 			values32 = <uint32_t *>c_value
*/
    goto __pyx_L7;
  }

  /* "brlapi.pyx":219
 * 			values32 = <uint32_t *>c_value
 * 			ret = values32[0]
 * 	elif props.type == PARAM_TYPE_UINT64:             # <<<<<<<<<<<<<<
 * 		if props.isArray:
 * 			values64 = <uint64_t *>c_value
*/
  __pyx_t_3 = __Pyx_PyLong_From_brlapi_param_type_t(__pyx_v_props->type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_UINT64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(__pyx_t_1)) {

    /* "brlapi.pyx":220
 * 			ret = values32[0]
 * 	elif props.type == PARAM_TYPE_UINT64:
 * 		if props.isArray:             # <<<<<<<<<<<<<<
 * 			values64 = <uint64_t *>c_value
 * 			ret = [values64[i] for i in range(size//8)]
*/
    __pyx_t_1 = (__pyx_v_props->isArray != 0);
    if (__pyx_t_1) {

      /* "brlapi.pyx":221
 * 	elif props.type == PARAM_TYPE_UINT64:
 * 		if props.isArray:
 * 			values64 = <uint64_t *>c_value             # <<<<<<<<<<<<<<
 * 			ret = [values64[i] for i in range(size//8)]
 * 		else:
*/
      __pyx_v_values64 = ((uint64_t *)__pyx_v_c_value);

      /* "brlapi.pyx":222
 * 		if props.isArray:
 * 			values64 = <uint64_t *>c_value
 * 			ret = [values64[i] for i in range(size//8)]             # <<<<<<<<<<<<<<
 * 		else:
 * 			values64 = <uint64_t *>c_value
*/
      { /* enter inner scope */
        __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = (__pyx_v_size / 8);
        __pyx_t_6 = __pyx_t_5;
        for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
          __pyx_8genexpr2__pyx_v_i = __pyx_t_7;
          __pyx_t_4 = __Pyx_PyLong_From_uint64_t((__pyx_v_values64[__pyx_8genexpr2__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 222, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 222, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
      } /* exit inner scope */
      __pyx_v_ret = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "brlapi.pyx":220
 * 			ret = values32[0]
 * 	elif props.type == PARAM_TYPE_UINT64:
 * 		if props.isArray:             # <<<<<<<<<<<<<<
 * 			values64 = <uint64_t *>c_value
 * 			ret = [values64[i] for i in range(size//8)]
*/
      goto __pyx_L15;
    }

    /* "brlapi.pyx":224
 * 			ret = [values64[i] for i in range(size//8)]
 * 		else:
 * 			values64 = <uint64_t *>c_value             # <<<<<<<<<<<<<<
 * 			ret = values64[0]
 * 	else:
*/
    /*else*/ {
      __pyx_v_values64 = ((uint64_t *)__pyx_v_c_value);

      /* "brlapi.pyx":225
 * 		else:
 * 			values64 = <uint64_t *>c_value
 * 			ret = values64[0]             # <<<<<<<<<<<<<<
 * 	else:
 * 		raise ValueError("Unsupported parameter type")
*/
      __pyx_t_2 = __Pyx_PyLong_From_uint64_t((__pyx_v_values64[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_ret = __pyx_t_2;
      __pyx_t_2 = 0;
    }
    __pyx_L15:;

    /* "brlapi.pyx":219
 * 			values32 = <uint32_t *>c_value
 * 			ret = values32[0]
 * 	elif props.type == PARAM_TYPE_UINT64:             # <<<<<<<<<<<<<<
 * 		if props.isArray:
 * 			values64 = <uint64_t *>c_value
*/
    goto __pyx_L7;
  }

  /* "brlapi.pyx":227
 * 			ret = values64[0]
 * 	else:
 * 		raise ValueError("Unsupported parameter type")             # <<<<<<<<<<<<<<
 * 
 * 	return ret
*/
  /*else*/ {
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Unsupported_parameter_type};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 227, __pyx_L1_error)
  }
  __pyx_L7:;

  /* "brlapi.pyx":229
 * 		raise ValueError("Unsupported parameter type")
 * 
 * 	return ret             # <<<<<<<<<<<<<<
 * 
 * class OperationError(Exception):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "brlapi.pyx":182
 * 		}
 * 
 * cdef object _parameterToPython(c_brlapi.brlapi_param_t c_param, const void *c_value, size_t size):             # <<<<<<<<<<<<<<
 * 	cdef const c_brlapi.brlapi_param_properties_t *props
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("brlapi._parameterToPython", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":233
 * class OperationError(Exception):
 * 	"""Error while performing some operation"""
 * 	def __init__(self):             # <<<<<<<<<<<<<<
 * 		cdef char *exception
 * 		exception = c_brlapi.brlapi_protocolException()
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_14OperationError_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_14OperationError___init__, "OperationError.__init__(self)");
static PyMethodDef __pyx_mdef_6brlapi_14OperationError_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_14OperationError_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_14OperationError___init__};
static PyObject *__pyx_pw_6brlapi_14OperationError_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 233, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 233, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 233, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(0, 233, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 233, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 233, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.OperationError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_14OperationError___init__(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "brlapi.pyx":235
 * 	def __init__(self):
 * 		cdef char *exception
 * 		exception = c_brlapi.brlapi_protocolException()             # <<<<<<<<<<<<<<
 * 		if (exception):
 * 			self.exception = exception
*/
  __pyx_v_exception = brlapi_protocolException();

  /* "brlapi.pyx":236
 * 		cdef char *exception
 * 		exception = c_brlapi.brlapi_protocolException()
 * 		if (exception):             # <<<<<<<<<<<<<<
 * 			self.exception = exception
 * 			c_brlapi.free(exception)
*/
  __pyx_t_1 = (__pyx_v_exception != 0);
  if (__pyx_t_1) {

    /* "brlapi.pyx":237
 * 		exception = c_brlapi.brlapi_protocolException()
 * 		if (exception):
 * 			self.exception = exception             # <<<<<<<<<<<<<<
 * 			c_brlapi.free(exception)
 * 		else:
*/
    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exception, __pyx_t_2) < (0)) __PYX_ERR(0, 237, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "brlapi.pyx":238
 * 		if (exception):
 * 			self.exception = exception
 * 			c_brlapi.free(exception)             # <<<<<<<<<<<<<<
 * 		else:
 * 			self.exception = None
*/
    free(__pyx_v_exception);

    /* "brlapi.pyx":236
 * 		cdef char *exception
 * 		exception = c_brlapi.brlapi_protocolException()
 * 		if (exception):             # <<<<<<<<<<<<<<
 * 			self.exception = exception
 * 			c_brlapi.free(exception)
*/
    goto __pyx_L3;
  }

  /* "brlapi.pyx":240
 * 			c_brlapi.free(exception)
 * 		else:
 * 			self.exception = None             # <<<<<<<<<<<<<<
 * 			self.brlerrno = c_brlapi.brlapi_error.brlerrno
 * 			self.libcerrno = c_brlapi.brlapi_error.libcerrno
*/
  /*else*/ {
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exception, Py_None) < (0)) __PYX_ERR(0, 240, __pyx_L1_error)

    /* "brlapi.pyx":241
 * 		else:
 * 			self.exception = None
 * 			self.brlerrno = c_brlapi.brlapi_error.brlerrno             # <<<<<<<<<<<<<<
 * 			self.libcerrno = c_brlapi.brlapi_error.libcerrno
 * 			self.gaierrno = c_brlapi.brlapi_error.gaierrno
*/
    __pyx_t_2 = __Pyx_PyLong_From_int(brlapi_error.brlerrno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_brlerrno, __pyx_t_2) < (0)) __PYX_ERR(0, 241, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "brlapi.pyx":242
 * 			self.exception = None
 * 			self.brlerrno = c_brlapi.brlapi_error.brlerrno
 * 			self.libcerrno = c_brlapi.brlapi_error.libcerrno             # <<<<<<<<<<<<<<
 * 			self.gaierrno = c_brlapi.brlapi_error.gaierrno
 * 			if (c_brlapi.brlapi_error.errfun):
*/
    __pyx_t_2 = __Pyx_PyLong_From_int(brlapi_error.libcerrno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_libcerrno, __pyx_t_2) < (0)) __PYX_ERR(0, 242, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "brlapi.pyx":243
 * 			self.brlerrno = c_brlapi.brlapi_error.brlerrno
 * 			self.libcerrno = c_brlapi.brlapi_error.libcerrno
 * 			self.gaierrno = c_brlapi.brlapi_error.gaierrno             # <<<<<<<<<<<<<<
 * 			if (c_brlapi.brlapi_error.errfun):
 * 				self.errfun = c_brlapi.brlapi_error.errfun
*/
    __pyx_t_2 = __Pyx_PyLong_From_int(brlapi_error.gaierrno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_gaierrno, __pyx_t_2) < (0)) __PYX_ERR(0, 243, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "brlapi.pyx":244
 * 			self.libcerrno = c_brlapi.brlapi_error.libcerrno
 * 			self.gaierrno = c_brlapi.brlapi_error.gaierrno
 * 			if (c_brlapi.brlapi_error.errfun):             # <<<<<<<<<<<<<<
 * 				self.errfun = c_brlapi.brlapi_error.errfun
 * 			else:
*/
    __pyx_t_1 = (brlapi_error.errfun != 0);
    if (__pyx_t_1) {

      /* "brlapi.pyx":245
 * 			self.gaierrno = c_brlapi.brlapi_error.gaierrno
 * 			if (c_brlapi.brlapi_error.errfun):
 * 				self.errfun = c_brlapi.brlapi_error.errfun             # <<<<<<<<<<<<<<
 * 			else:
 * 				self.errfun = b""
*/
      __pyx_t_2 = __Pyx_PyBytes_FromString(brlapi_error.errfun); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_errfun, __pyx_t_2) < (0)) __PYX_ERR(0, 245, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "brlapi.pyx":244
 * 			self.libcerrno = c_brlapi.brlapi_error.libcerrno
 * 			self.gaierrno = c_brlapi.brlapi_error.gaierrno
 * 			if (c_brlapi.brlapi_error.errfun):             # <<<<<<<<<<<<<<
 * 				self.errfun = c_brlapi.brlapi_error.errfun
 * 			else:
*/
      goto __pyx_L4;
    }

    /* "brlapi.pyx":247
 * 				self.errfun = c_brlapi.brlapi_error.errfun
 * 			else:
 * 				self.errfun = b""             # <<<<<<<<<<<<<<
 * 
 * 	def __str__(self):
*/
    /*else*/ {
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_errfun, __pyx_mstate_global->__pyx_kp_b_) < (0)) __PYX_ERR(0, 247, __pyx_L1_error)
    }
    __pyx_L4:;
  }
  __pyx_L3:;

  /* "brlapi.pyx":233
 * class OperationError(Exception):
 * 	"""Error while performing some operation"""
 * 	def __init__(self):             # <<<<<<<<<<<<<<
 * 		cdef char *exception
 * 		exception = c_brlapi.brlapi_protocolException()
*/

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

/* "brlapi.pyx":249
 * 				self.errfun = b""
 * 
 * 	def __str__(self):             # <<<<<<<<<<<<<<
 * 		cdef c_brlapi.brlapi_error_t error
 * 		cdef c_brlapi.size_t size
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_14OperationError_3__str__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_14OperationError_2__str__, "OperationError.__str__(self)");
static PyMethodDef __pyx_mdef_6brlapi_14OperationError_3__str__ = {"__str__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_14OperationError_3__str__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_14OperationError_2__str__};
static PyObject *__pyx_pw_6brlapi_14OperationError_3__str__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 249, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 249, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__str__", 0) < (0)) __PYX_ERR(0, 249, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, i); __PYX_ERR(0, 249, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 249, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 249, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.OperationError.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_14OperationError_2__str__(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_14OperationError_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  brlapi_error_t __pyx_v_error;
  size_t __pyx_v_size;
  char *__pyx_v_buf;
  PyObject *__pyx_v_str = NULL;
  PyObject *__pyx_v_ret = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  char *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "brlapi.pyx":253
 * 		cdef c_brlapi.size_t size
 * 		cdef char *buf
 * 		if self.exception:             # <<<<<<<<<<<<<<
 * 			return self.exception
 * 		error.brlerrno = self.brlerrno
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exception); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "brlapi.pyx":254
 * 		cdef char *buf
 * 		if self.exception:
 * 			return self.exception             # <<<<<<<<<<<<<<
 * 		error.brlerrno = self.brlerrno
 * 		error.libcerrno = self.libcerrno
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exception); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "brlapi.pyx":253
 * 		cdef c_brlapi.size_t size
 * 		cdef char *buf
 * 		if self.exception:             # <<<<<<<<<<<<<<
 * 			return self.exception
 * 		error.brlerrno = self.brlerrno
*/
  }

  /* "brlapi.pyx":255
 * 		if self.exception:
 * 			return self.exception
 * 		error.brlerrno = self.brlerrno             # <<<<<<<<<<<<<<
 * 		error.libcerrno = self.libcerrno
 * 		error.gaierrno = self.gaierrno
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_brlerrno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 255, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_error.brlerrno = __pyx_t_3;

  /* "brlapi.pyx":256
 * 			return self.exception
 * 		error.brlerrno = self.brlerrno
 * 		error.libcerrno = self.libcerrno             # <<<<<<<<<<<<<<
 * 		error.gaierrno = self.gaierrno
 * 		str = self.errfun
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_libcerrno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_error.libcerrno = __pyx_t_3;

  /* "brlapi.pyx":257
 * 		error.brlerrno = self.brlerrno
 * 		error.libcerrno = self.libcerrno
 * 		error.gaierrno = self.gaierrno             # <<<<<<<<<<<<<<
 * 		str = self.errfun
 * 		error.errfun = str
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_gaierrno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 257, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_error.gaierrno = __pyx_t_3;

  /* "brlapi.pyx":258
 * 		error.libcerrno = self.libcerrno
 * 		error.gaierrno = self.gaierrno
 * 		str = self.errfun             # <<<<<<<<<<<<<<
 * 		error.errfun = str
 * 		size = c_brlapi.brlapi_strerror_r(&error, NULL, 0)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_errfun); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_str = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "brlapi.pyx":259
 * 		error.gaierrno = self.gaierrno
 * 		str = self.errfun
 * 		error.errfun = str             # <<<<<<<<<<<<<<
 * 		size = c_brlapi.brlapi_strerror_r(&error, NULL, 0)
 * 		buf = <char*>c_brlapi.malloc(size+1)
*/
  __pyx_t_4 = __Pyx_PyObject_AsWritableString(__pyx_v_str); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 259, __pyx_L1_error)
  __pyx_v_error.errfun = __pyx_t_4;

  /* "brlapi.pyx":260
 * 		str = self.errfun
 * 		error.errfun = str
 * 		size = c_brlapi.brlapi_strerror_r(&error, NULL, 0)             # <<<<<<<<<<<<<<
 * 		buf = <char*>c_brlapi.malloc(size+1)
 * 		c_brlapi.brlapi_strerror_r(&error, buf, size+1)
*/
  __pyx_v_size = brlapi_strerror_r((&__pyx_v_error), NULL, 0);

  /* "brlapi.pyx":261
 * 		error.errfun = str
 * 		size = c_brlapi.brlapi_strerror_r(&error, NULL, 0)
 * 		buf = <char*>c_brlapi.malloc(size+1)             # <<<<<<<<<<<<<<
 * 		c_brlapi.brlapi_strerror_r(&error, buf, size+1)
 * 		ret = buf.decode("ASCII", errors="replace")
*/
  __pyx_v_buf = ((char *)malloc((__pyx_v_size + 1)));

  /* "brlapi.pyx":262
 * 		size = c_brlapi.brlapi_strerror_r(&error, NULL, 0)
 * 		buf = <char*>c_brlapi.malloc(size+1)
 * 		c_brlapi.brlapi_strerror_r(&error, buf, size+1)             # <<<<<<<<<<<<<<
 * 		ret = buf.decode("ASCII", errors="replace")
 * 		c_brlapi.free(buf)
*/
  (void)(brlapi_strerror_r((&__pyx_v_error), __pyx_v_buf, (__pyx_v_size + 1)));

  /* "brlapi.pyx":263
 * 		buf = <char*>c_brlapi.malloc(size+1)
 * 		c_brlapi.brlapi_strerror_r(&error, buf, size+1)
 * 		ret = buf.decode("ASCII", errors="replace")             # <<<<<<<<<<<<<<
 * 		c_brlapi.free(buf)
 * 		return ret
*/
  __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_buf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __pyx_t_6;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ASCII};
    __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_errors, __pyx_mstate_global->__pyx_n_u_replace, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 263, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_decode, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_ret = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "brlapi.pyx":264
 * 		c_brlapi.brlapi_strerror_r(&error, buf, size+1)
 * 		ret = buf.decode("ASCII", errors="replace")
 * 		c_brlapi.free(buf)             # <<<<<<<<<<<<<<
 * 		return ret
 * 
*/
  free(__pyx_v_buf);

  /* "brlapi.pyx":265
 * 		ret = buf.decode("ASCII", errors="replace")
 * 		c_brlapi.free(buf)
 * 		return ret             # <<<<<<<<<<<<<<
 * 
 * class ConnectionError(OperationError):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "brlapi.pyx":249
 * 				self.errfun = b""
 * 
 * 	def __str__(self):             # <<<<<<<<<<<<<<
 * 		cdef c_brlapi.brlapi_error_t error
 * 		cdef c_brlapi.size_t size
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("brlapi.OperationError.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str);
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":270
 * 	"""Error while connecting to BrlTTY"""
 * 
 * 	def __init__(self, host, auth):             # <<<<<<<<<<<<<<
 * 		OperationError.__init__(self)
 * 		self.host = host
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_15ConnectionError_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_15ConnectionError___init__, "ConnectionError.__init__(self, host, auth)");
static PyMethodDef __pyx_mdef_6brlapi_15ConnectionError_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_15ConnectionError_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_15ConnectionError___init__};
static PyObject *__pyx_pw_6brlapi_15ConnectionError_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_host = 0;
  PyObject *__pyx_v_auth = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,&__pyx_mstate_global->__pyx_n_u_auth,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 270, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 270, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 270, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 270, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 270, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 270, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 270, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 270, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 270, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_host = values[1];
    __pyx_v_auth = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 270, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.ConnectionError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_15ConnectionError___init__(__pyx_self, __pyx_v_self, __pyx_v_host, __pyx_v_auth);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_15ConnectionError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_auth) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "brlapi.pyx":271
 * 
 * 	def __init__(self, host, auth):
 * 		OperationError.__init__(self)             # <<<<<<<<<<<<<<
 * 		self.host = host
 * 		self.auth = auth
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_self};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "brlapi.pyx":272
 * 	def __init__(self, host, auth):
 * 		OperationError.__init__(self)
 * 		self.host = host             # <<<<<<<<<<<<<<
 * 		self.auth = auth
 * 
*/
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_host, __pyx_v_host) < (0)) __PYX_ERR(0, 272, __pyx_L1_error)

  /* "brlapi.pyx":273
 * 		OperationError.__init__(self)
 * 		self.host = host
 * 		self.auth = auth             # <<<<<<<<<<<<<<
 * 
 * 	def __str__(self):
*/
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_auth, __pyx_v_auth) < (0)) __PYX_ERR(0, 273, __pyx_L1_error)

  /* "brlapi.pyx":270
 * 	"""Error while connecting to BrlTTY"""
 * 
 * 	def __init__(self, host, auth):             # <<<<<<<<<<<<<<
 * 		OperationError.__init__(self)
 * 		self.host = host
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("brlapi.ConnectionError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":275
 * 		self.auth = auth
 * 
 * 	def __str__(self):             # <<<<<<<<<<<<<<
 * 		msg = "couldn't connect to %s with key %s: %s" % (self.host,self.auth,OperationError.__str__(self))
 * 		msg = msg + "\n(brlerrno %d, libcerrno %d, gaierrno %d)" % (self.brlerrno, self.libcerrno, self.gaierrno)
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_15ConnectionError_3__str__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_15ConnectionError_2__str__, "ConnectionError.__str__(self)");
static PyMethodDef __pyx_mdef_6brlapi_15ConnectionError_3__str__ = {"__str__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_15ConnectionError_3__str__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_15ConnectionError_2__str__};
static PyObject *__pyx_pw_6brlapi_15ConnectionError_3__str__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 275, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 275, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__str__", 0) < (0)) __PYX_ERR(0, 275, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, i); __PYX_ERR(0, 275, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 275, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 275, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.ConnectionError.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_15ConnectionError_2__str__(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_15ConnectionError_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_msg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5[6];
  PyObject *__pyx_t_6[7];
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "brlapi.pyx":276
 * 
 * 	def __str__(self):
 * 		msg = "couldn't connect to %s with key %s: %s" % (self.host,self.auth,OperationError.__str__(self))             # <<<<<<<<<<<<<<
 * 		msg = msg + "\n(brlerrno %d, libcerrno %d, gaierrno %d)" % (self.brlerrno, self.libcerrno, self.gaierrno)
 * 		if self.brlerrno == ERROR_CONNREFUSED:
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_host); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_auth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5[0] = __pyx_mstate_global->__pyx_kp_u_couldn_t_connect_to;
  __pyx_t_5[1] = __pyx_t_2;
  __pyx_t_5[2] = __pyx_mstate_global->__pyx_kp_u_with_key;
  __pyx_t_5[3] = __pyx_t_3;
  __pyx_t_5[4] = __pyx_mstate_global->__pyx_kp_u__2;
  __pyx_t_5[5] = __pyx_t_4;
  __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_5, 6, 20 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 10 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_msg = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "brlapi.pyx":277
 * 	def __str__(self):
 * 		msg = "couldn't connect to %s with key %s: %s" % (self.host,self.auth,OperationError.__str__(self))
 * 		msg = msg + "\n(brlerrno %d, libcerrno %d, gaierrno %d)" % (self.brlerrno, self.libcerrno, self.gaierrno)             # <<<<<<<<<<<<<<
 * 		if self.brlerrno == ERROR_CONNREFUSED:
 * 			msg = msg + "\nBRLTTY is too busy..."
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_brlerrno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_1), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_libcerrno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_1), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_gaierrno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_1), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_brlerrno_2;
  __pyx_t_6[1] = __pyx_t_4;
  __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_libcerrno_2;
  __pyx_t_6[3] = __pyx_t_3;
  __pyx_t_6[4] = __pyx_mstate_global->__pyx_kp_u_gaierrno_2;
  __pyx_t_6[5] = __pyx_t_2;
  __pyx_t_6[6] = __pyx_mstate_global->__pyx_kp_u__3;
  __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_6, 7, 11 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2));
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_v_msg, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "brlapi.pyx":278
 * 		msg = "couldn't connect to %s with key %s: %s" % (self.host,self.auth,OperationError.__str__(self))
 * 		msg = msg + "\n(brlerrno %d, libcerrno %d, gaierrno %d)" % (self.brlerrno, self.libcerrno, self.gaierrno)
 * 		if self.brlerrno == ERROR_CONNREFUSED:             # <<<<<<<<<<<<<<
 * 			msg = msg + "\nBRLTTY is too busy..."
 * 		elif self.brlerrno == ERROR_AUTHENTICATION:
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_brlerrno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ERROR_CONNREFUSED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_7) {

    /* "brlapi.pyx":279
 * 		msg = msg + "\n(brlerrno %d, libcerrno %d, gaierrno %d)" % (self.brlerrno, self.libcerrno, self.gaierrno)
 * 		if self.brlerrno == ERROR_CONNREFUSED:
 * 			msg = msg + "\nBRLTTY is too busy..."             # <<<<<<<<<<<<<<
 * 		elif self.brlerrno == ERROR_AUTHENTICATION:
 * 			msg = msg + "\nAuthentication failed. Please check you can read %s and it is not empty." % self.auth
*/
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_v_msg, __pyx_mstate_global->__pyx_kp_u_BRLTTY_is_too_busy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "brlapi.pyx":278
 * 		msg = "couldn't connect to %s with key %s: %s" % (self.host,self.auth,OperationError.__str__(self))
 * 		msg = msg + "\n(brlerrno %d, libcerrno %d, gaierrno %d)" % (self.brlerrno, self.libcerrno, self.gaierrno)
 * 		if self.brlerrno == ERROR_CONNREFUSED:             # <<<<<<<<<<<<<<
 * 			msg = msg + "\nBRLTTY is too busy..."
 * 		elif self.brlerrno == ERROR_AUTHENTICATION:
*/
    goto __pyx_L3;
  }

  /* "brlapi.pyx":280
 * 		if self.brlerrno == ERROR_CONNREFUSED:
 * 			msg = msg + "\nBRLTTY is too busy..."
 * 		elif self.brlerrno == ERROR_AUTHENTICATION:             # <<<<<<<<<<<<<<
 * 			msg = msg + "\nAuthentication failed. Please check you can read %s and it is not empty." % self.auth
 * 		elif self.brlerrno == ERROR_LIBCERR and (self.libcerrno == errno.ECONNREFUSED or self.libcerrno == errno.ENOENT):
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_brlerrno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ERROR_AUTHENTICATION); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_7) {

    /* "brlapi.pyx":281
 * 			msg = msg + "\nBRLTTY is too busy..."
 * 		elif self.brlerrno == ERROR_AUTHENTICATION:
 * 			msg = msg + "\nAuthentication failed. Please check you can read %s and it is not empty." % self.auth             # <<<<<<<<<<<<<<
 * 		elif self.brlerrno == ERROR_LIBCERR and (self.libcerrno == errno.ECONNREFUSED or self.libcerrno == errno.ENOENT):
 * 			msg = msg + "\nIs BRLTTY really running?"
*/
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_auth); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Authentication_failed_Please_ch, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_v_msg, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "brlapi.pyx":280
 * 		if self.brlerrno == ERROR_CONNREFUSED:
 * 			msg = msg + "\nBRLTTY is too busy..."
 * 		elif self.brlerrno == ERROR_AUTHENTICATION:             # <<<<<<<<<<<<<<
 * 			msg = msg + "\nAuthentication failed. Please check you can read %s and it is not empty." % self.auth
 * 		elif self.brlerrno == ERROR_LIBCERR and (self.libcerrno == errno.ECONNREFUSED or self.libcerrno == errno.ENOENT):
*/
    goto __pyx_L3;
  }

  /* "brlapi.pyx":282
 * 		elif self.brlerrno == ERROR_AUTHENTICATION:
 * 			msg = msg + "\nAuthentication failed. Please check you can read %s and it is not empty." % self.auth
 * 		elif self.brlerrno == ERROR_LIBCERR and (self.libcerrno == errno.ECONNREFUSED or self.libcerrno == errno.ENOENT):             # <<<<<<<<<<<<<<
 * 			msg = msg + "\nIs BRLTTY really running?"
 * 		return msg
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_brlerrno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ERROR_LIBCERR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_8) {
  } else {
    __pyx_t_7 = __pyx_t_8;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_libcerrno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_errno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ECONNREFUSED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!__pyx_t_8) {
  } else {
    __pyx_t_7 = __pyx_t_8;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_libcerrno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_errno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ENOENT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __pyx_t_8;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_7) {

    /* "brlapi.pyx":283
 * 			msg = msg + "\nAuthentication failed. Please check you can read %s and it is not empty." % self.auth
 * 		elif self.brlerrno == ERROR_LIBCERR and (self.libcerrno == errno.ECONNREFUSED or self.libcerrno == errno.ENOENT):
 * 			msg = msg + "\nIs BRLTTY really running?"             # <<<<<<<<<<<<<<
 * 		return msg
 * 
*/
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_v_msg, __pyx_mstate_global->__pyx_kp_u_Is_BRLTTY_really_running); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "brlapi.pyx":282
 * 		elif self.brlerrno == ERROR_AUTHENTICATION:
 * 			msg = msg + "\nAuthentication failed. Please check you can read %s and it is not empty." % self.auth
 * 		elif self.brlerrno == ERROR_LIBCERR and (self.libcerrno == errno.ECONNREFUSED or self.libcerrno == errno.ENOENT):             # <<<<<<<<<<<<<<
 * 			msg = msg + "\nIs BRLTTY really running?"
 * 		return msg
*/
  }
  __pyx_L3:;

  /* "brlapi.pyx":284
 * 		elif self.brlerrno == ERROR_LIBCERR and (self.libcerrno == errno.ECONNREFUSED or self.libcerrno == errno.ENOENT):
 * 			msg = msg + "\nIs BRLTTY really running?"
 * 		return msg             # <<<<<<<<<<<<<<
 * 
 * 	def host(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_msg);
  __pyx_r = __pyx_v_msg;
  goto __pyx_L0;

  /* "brlapi.pyx":275
 * 		self.auth = auth
 * 
 * 	def __str__(self):             # <<<<<<<<<<<<<<
 * 		msg = "couldn't connect to %s with key %s: %s" % (self.host,self.auth,OperationError.__str__(self))
 * 		msg = msg + "\n(brlerrno %d, libcerrno %d, gaierrno %d)" % (self.brlerrno, self.libcerrno, self.gaierrno)
*/

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

/* "brlapi.pyx":286
 * 		return msg
 * 
 * 	def host(self):             # <<<<<<<<<<<<<<
 * 		"""Host of BRLTTY server"""
 * 		return self.settings.host
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_15ConnectionError_5host(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_15ConnectionError_4host, "ConnectionError.host(self)\n\nHost of BRLTTY server");
static PyMethodDef __pyx_mdef_6brlapi_15ConnectionError_5host = {"host", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_15ConnectionError_5host, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_15ConnectionError_4host};
static PyObject *__pyx_pw_6brlapi_15ConnectionError_5host(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("host (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 286, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 286, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "host", 0) < (0)) __PYX_ERR(0, 286, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("host", 1, 1, 1, i); __PYX_ERR(0, 286, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 286, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("host", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 286, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.ConnectionError.host", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_15ConnectionError_4host(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "brlapi.pyx":288
 * 	def host(self):
 * 		"""Host of BRLTTY server"""
 * 		return self.settings.host             # <<<<<<<<<<<<<<
 * 
 * 	def auth(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_settings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_host); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "brlapi.pyx":286
 * 		return msg
 * 
 * 	def host(self):             # <<<<<<<<<<<<<<
 * 		"""Host of BRLTTY server"""
 * 		return self.settings.host
*/

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

/* "brlapi.pyx":290
 * 		return self.settings.host
 * 
 * 	def auth(self):             # <<<<<<<<<<<<<<
 * 		"""Authentication method used"""
 * 		return self.settings.auth
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_15ConnectionError_7auth(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_15ConnectionError_6auth, "ConnectionError.auth(self)\n\nAuthentication method used");
static PyMethodDef __pyx_mdef_6brlapi_15ConnectionError_7auth = {"auth", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_15ConnectionError_7auth, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_15ConnectionError_6auth};
static PyObject *__pyx_pw_6brlapi_15ConnectionError_7auth(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("auth (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 290, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 290, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "auth", 0) < (0)) __PYX_ERR(0, 290, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("auth", 1, 1, 1, i); __PYX_ERR(0, 290, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 290, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("auth", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 290, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.ConnectionError.auth", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_15ConnectionError_6auth(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "brlapi.pyx":292
 * 	def auth(self):
 * 		"""Authentication method used"""
 * 		return self.settings.auth             # <<<<<<<<<<<<<<
 * 
 * cdef class WriteStruct:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_settings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_auth); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "brlapi.pyx":290
 * 		return self.settings.host
 * 
 * 	def auth(self):             # <<<<<<<<<<<<<<
 * 		"""Authentication method used"""
 * 		return self.settings.auth
*/

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

/* "brlapi.pyx":301
 * 	cdef c_brlapi.brlapi_writeArguments_t props
 * 
 * 	def __init__(self):             # <<<<<<<<<<<<<<
 * 		self.props = c_brlapi.brlapi_writeArguments_initialized
 * 
*/

/* Python wrapper */
static int __pyx_pw_6brlapi_11WriteStruct_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6brlapi_11WriteStruct_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_6brlapi_11WriteStruct___init__(((struct __pyx_obj_6brlapi_WriteStruct *)__pyx_v_self));

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

static int __pyx_pf_6brlapi_11WriteStruct___init__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self) {
  int __pyx_r;

  /* "brlapi.pyx":302
 * 
 * 	def __init__(self):
 * 		self.props = c_brlapi.brlapi_writeArguments_initialized             # <<<<<<<<<<<<<<
 * 
 * 	property displayNumber:
*/
  __pyx_v_self->props = brlapi_writeArguments_initialized;

  /* "brlapi.pyx":301
 * 	cdef c_brlapi.brlapi_writeArguments_t props
 * 
 * 	def __init__(self):             # <<<<<<<<<<<<<<
 * 		self.props = c_brlapi.brlapi_writeArguments_initialized
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* "brlapi.pyx":306
 * 	property displayNumber:
 * 		"""Display number DISPLAY_DEFAULT == unspecified"""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			return self.props.displayNumber
 * 		def __set__(self, val):
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_11WriteStruct_13displayNumber_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6brlapi_11WriteStruct_13displayNumber_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6brlapi_11WriteStruct_13displayNumber___get__(((struct __pyx_obj_6brlapi_WriteStruct *)__pyx_v_self));

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

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

  /* "brlapi.pyx":307
 * 		"""Display number DISPLAY_DEFAULT == unspecified"""
 * 		def __get__(self):
 * 			return self.props.displayNumber             # <<<<<<<<<<<<<<
 * 		def __set__(self, val):
 * 			self.props.displayNumber = val
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->props.displayNumber); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "brlapi.pyx":306
 * 	property displayNumber:
 * 		"""Display number DISPLAY_DEFAULT == unspecified"""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			return self.props.displayNumber
 * 		def __set__(self, val):
*/

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

/* "brlapi.pyx":308
 * 		def __get__(self):
 * 			return self.props.displayNumber
 * 		def __set__(self, val):             # <<<<<<<<<<<<<<
 * 			self.props.displayNumber = val
 * 
*/

/* Python wrapper */
static int __pyx_pw_6brlapi_11WriteStruct_13displayNumber_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_6brlapi_11WriteStruct_13displayNumber_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6brlapi_11WriteStruct_13displayNumber_2__set__(((struct __pyx_obj_6brlapi_WriteStruct *)__pyx_v_self), ((PyObject *)__pyx_v_val));

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

static int __pyx_pf_6brlapi_11WriteStruct_13displayNumber_2__set__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "brlapi.pyx":309
 * 			return self.props.displayNumber
 * 		def __set__(self, val):
 * 			self.props.displayNumber = val             # <<<<<<<<<<<<<<
 * 
 * 	property regionBegin:
*/
  __pyx_t_1 = __Pyx_PyLong_As_int(__pyx_v_val); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 309, __pyx_L1_error)
  __pyx_v_self->props.displayNumber = __pyx_t_1;

  /* "brlapi.pyx":308
 * 		def __get__(self):
 * 			return self.props.displayNumber
 * 		def __set__(self, val):             # <<<<<<<<<<<<<<
 * 			self.props.displayNumber = val
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("brlapi.WriteStruct.displayNumber.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "brlapi.pyx":313
 * 	property regionBegin:
 * 		"""Region of display to update, 1st character of display is 1"""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			return self.props.regionBegin
 * 		def __set__(self, val):
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_11WriteStruct_11regionBegin_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6brlapi_11WriteStruct_11regionBegin_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6brlapi_11WriteStruct_11regionBegin___get__(((struct __pyx_obj_6brlapi_WriteStruct *)__pyx_v_self));

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

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

  /* "brlapi.pyx":314
 * 		"""Region of display to update, 1st character of display is 1"""
 * 		def __get__(self):
 * 			return self.props.regionBegin             # <<<<<<<<<<<<<<
 * 		def __set__(self, val):
 * 			self.props.regionBegin = val
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->props.regionBegin); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "brlapi.pyx":313
 * 	property regionBegin:
 * 		"""Region of display to update, 1st character of display is 1"""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			return self.props.regionBegin
 * 		def __set__(self, val):
*/

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

/* "brlapi.pyx":315
 * 		def __get__(self):
 * 			return self.props.regionBegin
 * 		def __set__(self, val):             # <<<<<<<<<<<<<<
 * 			self.props.regionBegin = val
 * 
*/

/* Python wrapper */
static int __pyx_pw_6brlapi_11WriteStruct_11regionBegin_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_6brlapi_11WriteStruct_11regionBegin_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6brlapi_11WriteStruct_11regionBegin_2__set__(((struct __pyx_obj_6brlapi_WriteStruct *)__pyx_v_self), ((PyObject *)__pyx_v_val));

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

static int __pyx_pf_6brlapi_11WriteStruct_11regionBegin_2__set__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  unsigned int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "brlapi.pyx":316
 * 			return self.props.regionBegin
 * 		def __set__(self, val):
 * 			self.props.regionBegin = val             # <<<<<<<<<<<<<<
 * 
 * 	property regionSize:
*/
  __pyx_t_1 = __Pyx_PyLong_As_unsigned_int(__pyx_v_val); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 316, __pyx_L1_error)
  __pyx_v_self->props.regionBegin = __pyx_t_1;

  /* "brlapi.pyx":315
 * 		def __get__(self):
 * 			return self.props.regionBegin
 * 		def __set__(self, val):             # <<<<<<<<<<<<<<
 * 			self.props.regionBegin = val
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("brlapi.WriteStruct.regionBegin.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "brlapi.pyx":320
 * 	property regionSize:
 * 		"""Number of characters held in text, attrAnd and attrOr. For multibytes text, this is the number of multibyte characters. Combining and double-width characters count for 1"""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			return self.props.regionSize
 * 		def __set__(self, val):
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_11WriteStruct_10regionSize_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6brlapi_11WriteStruct_10regionSize_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6brlapi_11WriteStruct_10regionSize___get__(((struct __pyx_obj_6brlapi_WriteStruct *)__pyx_v_self));

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

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

  /* "brlapi.pyx":321
 * 		"""Number of characters held in text, attrAnd and attrOr. For multibytes text, this is the number of multibyte characters. Combining and double-width characters count for 1"""
 * 		def __get__(self):
 * 			return self.props.regionSize             # <<<<<<<<<<<<<<
 * 		def __set__(self, val):
 * 			self.props.regionSize = val
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->props.regionSize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "brlapi.pyx":320
 * 	property regionSize:
 * 		"""Number of characters held in text, attrAnd and attrOr. For multibytes text, this is the number of multibyte characters. Combining and double-width characters count for 1"""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			return self.props.regionSize
 * 		def __set__(self, val):
*/

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

/* "brlapi.pyx":322
 * 		def __get__(self):
 * 			return self.props.regionSize
 * 		def __set__(self, val):             # <<<<<<<<<<<<<<
 * 			self.props.regionSize = val
 * 
*/

/* Python wrapper */
static int __pyx_pw_6brlapi_11WriteStruct_10regionSize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_6brlapi_11WriteStruct_10regionSize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6brlapi_11WriteStruct_10regionSize_2__set__(((struct __pyx_obj_6brlapi_WriteStruct *)__pyx_v_self), ((PyObject *)__pyx_v_val));

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

static int __pyx_pf_6brlapi_11WriteStruct_10regionSize_2__set__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "brlapi.pyx":323
 * 			return self.props.regionSize
 * 		def __set__(self, val):
 * 			self.props.regionSize = val             # <<<<<<<<<<<<<<
 * 
 * 	property text:
*/
  __pyx_t_1 = __Pyx_PyLong_As_int(__pyx_v_val); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L1_error)
  __pyx_v_self->props.regionSize = __pyx_t_1;

  /* "brlapi.pyx":322
 * 		def __get__(self):
 * 			return self.props.regionSize
 * 		def __set__(self, val):             # <<<<<<<<<<<<<<
 * 			self.props.regionSize = val
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("brlapi.WriteStruct.regionSize.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "brlapi.pyx":327
 * 	property text:
 * 		"""Text to display"""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			if (not self.props.text):
 * 				return None
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_11WriteStruct_4text_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6brlapi_11WriteStruct_4text_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6brlapi_11WriteStruct_4text___get__(((struct __pyx_obj_6brlapi_WriteStruct *)__pyx_v_self));

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

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

  /* "brlapi.pyx":328
 * 		"""Text to display"""
 * 		def __get__(self):
 * 			if (not self.props.text):             # <<<<<<<<<<<<<<
 * 				return None
 * 			else:
*/
  __pyx_t_1 = (!(__pyx_v_self->props.text != 0));
  if (__pyx_t_1) {

    /* "brlapi.pyx":329
 * 		def __get__(self):
 * 			if (not self.props.text):
 * 				return None             # <<<<<<<<<<<<<<
 * 			else:
 * 				return self.props.text
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "brlapi.pyx":328
 * 		"""Text to display"""
 * 		def __get__(self):
 * 			if (not self.props.text):             # <<<<<<<<<<<<<<
 * 				return None
 * 			else:
*/
  }

  /* "brlapi.pyx":331
 * 				return None
 * 			else:
 * 				return self.props.text             # <<<<<<<<<<<<<<
 * 		def __set__(self, val):
 * 			cdef c_brlapi.size_t size
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->props.text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "brlapi.pyx":327
 * 	property text:
 * 		"""Text to display"""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			if (not self.props.text):
 * 				return None
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("brlapi.WriteStruct.text.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":332
 * 			else:
 * 				return self.props.text
 * 		def __set__(self, val):             # <<<<<<<<<<<<<<
 * 			cdef c_brlapi.size_t size
 * 			cdef char *c_val
*/

/* Python wrapper */
static int __pyx_pw_6brlapi_11WriteStruct_4text_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_6brlapi_11WriteStruct_4text_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6brlapi_11WriteStruct_4text_2__set__(((struct __pyx_obj_6brlapi_WriteStruct *)__pyx_v_self), ((PyObject *)__pyx_v_val));

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

static int __pyx_pf_6brlapi_11WriteStruct_4text_2__set__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self, PyObject *__pyx_v_val) {
  size_t __pyx_v_size;
  char *__pyx_v_c_val;
  char *__pyx_v_text;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  char *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_val);

  /* "brlapi.pyx":336
 * 			cdef char *c_val
 * 			cdef char *text
 * 			if (type(val) == unicode):             # <<<<<<<<<<<<<<
 * 				val = val.encode('UTF-8')
 * 				self.charset = 'UTF-8'.encode("ASCII")
*/
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_val)), ((PyObject *)(&PyUnicode_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 336, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "brlapi.pyx":337
 * 			cdef char *text
 * 			if (type(val) == unicode):
 * 				val = val.encode('UTF-8')             # <<<<<<<<<<<<<<
 * 				self.charset = 'UTF-8'.encode("ASCII")
 * 			if (self.props.text):
*/
    __pyx_t_3 = __pyx_v_val;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_UTF_8};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "brlapi.pyx":338
 * 			if (type(val) == unicode):
 * 				val = val.encode('UTF-8')
 * 				self.charset = 'UTF-8'.encode("ASCII")             # <<<<<<<<<<<<<<
 * 			if (self.props.text):
 * 				c_brlapi.free(<char*>self.props.text)
*/
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_charset, __pyx_mstate_global->__pyx_kp_b_UTF_8) < (0)) __PYX_ERR(0, 338, __pyx_L1_error)

    /* "brlapi.pyx":336
 * 			cdef char *c_val
 * 			cdef char *text
 * 			if (type(val) == unicode):             # <<<<<<<<<<<<<<
 * 				val = val.encode('UTF-8')
 * 				self.charset = 'UTF-8'.encode("ASCII")
*/
  }

  /* "brlapi.pyx":339
 * 				val = val.encode('UTF-8')
 * 				self.charset = 'UTF-8'.encode("ASCII")
 * 			if (self.props.text):             # <<<<<<<<<<<<<<
 * 				c_brlapi.free(<char*>self.props.text)
 * 			if (val):
*/
  __pyx_t_2 = (__pyx_v_self->props.text != 0);
  if (__pyx_t_2) {

    /* "brlapi.pyx":340
 * 				self.charset = 'UTF-8'.encode("ASCII")
 * 			if (self.props.text):
 * 				c_brlapi.free(<char*>self.props.text)             # <<<<<<<<<<<<<<
 * 			if (val):
 * 				size = len(val)
*/
    free(((char *)__pyx_v_self->props.text));

    /* "brlapi.pyx":339
 * 				val = val.encode('UTF-8')
 * 				self.charset = 'UTF-8'.encode("ASCII")
 * 			if (self.props.text):             # <<<<<<<<<<<<<<
 * 				c_brlapi.free(<char*>self.props.text)
 * 			if (val):
*/
  }

  /* "brlapi.pyx":341
 * 			if (self.props.text):
 * 				c_brlapi.free(<char*>self.props.text)
 * 			if (val):             # <<<<<<<<<<<<<<
 * 				size = len(val)
 * 				c_val = val
*/
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 341, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "brlapi.pyx":342
 * 				c_brlapi.free(<char*>self.props.text)
 * 			if (val):
 * 				size = len(val)             # <<<<<<<<<<<<<<
 * 				c_val = val
 * 				text = <char*>c_brlapi.malloc(size+1)
*/
    __pyx_t_5 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 342, __pyx_L1_error)
    __pyx_v_size = __pyx_t_5;

    /* "brlapi.pyx":343
 * 			if (val):
 * 				size = len(val)
 * 				c_val = val             # <<<<<<<<<<<<<<
 * 				text = <char*>c_brlapi.malloc(size+1)
 * 				c_brlapi.memcpy(<void*>text,<void*>c_val,size)
*/
    __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_val); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 343, __pyx_L1_error)
    __pyx_v_c_val = __pyx_t_6;

    /* "brlapi.pyx":344
 * 				size = len(val)
 * 				c_val = val
 * 				text = <char*>c_brlapi.malloc(size+1)             # <<<<<<<<<<<<<<
 * 				c_brlapi.memcpy(<void*>text,<void*>c_val,size)
 * 				text[size] = 0
*/
    __pyx_v_text = ((char *)malloc((__pyx_v_size + 1)));

    /* "brlapi.pyx":345
 * 				c_val = val
 * 				text = <char*>c_brlapi.malloc(size+1)
 * 				c_brlapi.memcpy(<void*>text,<void*>c_val,size)             # <<<<<<<<<<<<<<
 * 				text[size] = 0
 * 				self.props.text = text
*/
    (void)(memcpy(((void *)__pyx_v_text), ((void *)__pyx_v_c_val), __pyx_v_size));

    /* "brlapi.pyx":346
 * 				text = <char*>c_brlapi.malloc(size+1)
 * 				c_brlapi.memcpy(<void*>text,<void*>c_val,size)
 * 				text[size] = 0             # <<<<<<<<<<<<<<
 * 				self.props.text = text
 * 				self.props.textSize = size
*/
    (__pyx_v_text[__pyx_v_size]) = 0;

    /* "brlapi.pyx":347
 * 				c_brlapi.memcpy(<void*>text,<void*>c_val,size)
 * 				text[size] = 0
 * 				self.props.text = text             # <<<<<<<<<<<<<<
 * 				self.props.textSize = size
 * 			else:
*/
    __pyx_v_self->props.text = __pyx_v_text;

    /* "brlapi.pyx":348
 * 				text[size] = 0
 * 				self.props.text = text
 * 				self.props.textSize = size             # <<<<<<<<<<<<<<
 * 			else:
 * 				self.props.text = NULL
*/
    __pyx_v_self->props.textSize = __pyx_v_size;

    /* "brlapi.pyx":341
 * 			if (self.props.text):
 * 				c_brlapi.free(<char*>self.props.text)
 * 			if (val):             # <<<<<<<<<<<<<<
 * 				size = len(val)
 * 				c_val = val
*/
    goto __pyx_L5;
  }

  /* "brlapi.pyx":350
 * 				self.props.textSize = size
 * 			else:
 * 				self.props.text = NULL             # <<<<<<<<<<<<<<
 * 
 * 	property cursor:
*/
  /*else*/ {
    __pyx_v_self->props.text = NULL;
  }
  __pyx_L5:;

  /* "brlapi.pyx":332
 * 			else:
 * 				return self.props.text
 * 		def __set__(self, val):             # <<<<<<<<<<<<<<
 * 			cdef c_brlapi.size_t size
 * 			cdef char *c_val
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("brlapi.WriteStruct.text.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":354
 * 	property cursor:
 * 		"""CURSOR_LEAVE == don't touch, CURSOR_OFF == turn off, 1 = 1st char of display, ..."""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			return self.props.cursor
 * 		def __set__(self, val):
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_11WriteStruct_6cursor_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6brlapi_11WriteStruct_6cursor_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6brlapi_11WriteStruct_6cursor___get__(((struct __pyx_obj_6brlapi_WriteStruct *)__pyx_v_self));

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

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

  /* "brlapi.pyx":355
 * 		"""CURSOR_LEAVE == don't touch, CURSOR_OFF == turn off, 1 = 1st char of display, ..."""
 * 		def __get__(self):
 * 			return self.props.cursor             # <<<<<<<<<<<<<<
 * 		def __set__(self, val):
 * 			self.props.cursor = val
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->props.cursor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "brlapi.pyx":354
 * 	property cursor:
 * 		"""CURSOR_LEAVE == don't touch, CURSOR_OFF == turn off, 1 = 1st char of display, ..."""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			return self.props.cursor
 * 		def __set__(self, val):
*/

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

/* "brlapi.pyx":356
 * 		def __get__(self):
 * 			return self.props.cursor
 * 		def __set__(self, val):             # <<<<<<<<<<<<<<
 * 			self.props.cursor = val
 * 
*/

/* Python wrapper */
static int __pyx_pw_6brlapi_11WriteStruct_6cursor_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_6brlapi_11WriteStruct_6cursor_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6brlapi_11WriteStruct_6cursor_2__set__(((struct __pyx_obj_6brlapi_WriteStruct *)__pyx_v_self), ((PyObject *)__pyx_v_val));

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

static int __pyx_pf_6brlapi_11WriteStruct_6cursor_2__set__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "brlapi.pyx":357
 * 			return self.props.cursor
 * 		def __set__(self, val):
 * 			self.props.cursor = val             # <<<<<<<<<<<<<<
 * 
 * 	property charset:
*/
  __pyx_t_1 = __Pyx_PyLong_As_int(__pyx_v_val); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 357, __pyx_L1_error)
  __pyx_v_self->props.cursor = __pyx_t_1;

  /* "brlapi.pyx":356
 * 		def __get__(self):
 * 			return self.props.cursor
 * 		def __set__(self, val):             # <<<<<<<<<<<<<<
 * 			self.props.cursor = val
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("brlapi.WriteStruct.cursor.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "brlapi.pyx":361
 * 	property charset:
 * 		"""Character set of the text"""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			if (not self.props.charset):
 * 				return None
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_11WriteStruct_7charset_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6brlapi_11WriteStruct_7charset_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6brlapi_11WriteStruct_7charset___get__(((struct __pyx_obj_6brlapi_WriteStruct *)__pyx_v_self));

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

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

  /* "brlapi.pyx":362
 * 		"""Character set of the text"""
 * 		def __get__(self):
 * 			if (not self.props.charset):             # <<<<<<<<<<<<<<
 * 				return None
 * 			else:
*/
  __pyx_t_1 = (!(__pyx_v_self->props.charset != 0));
  if (__pyx_t_1) {

    /* "brlapi.pyx":363
 * 		def __get__(self):
 * 			if (not self.props.charset):
 * 				return None             # <<<<<<<<<<<<<<
 * 			else:
 * 				return self.props.charset
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "brlapi.pyx":362
 * 		"""Character set of the text"""
 * 		def __get__(self):
 * 			if (not self.props.charset):             # <<<<<<<<<<<<<<
 * 				return None
 * 			else:
*/
  }

  /* "brlapi.pyx":365
 * 				return None
 * 			else:
 * 				return self.props.charset             # <<<<<<<<<<<<<<
 * 		def __set__(self, val):
 * 			cdef c_brlapi.size_t size
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->props.charset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "brlapi.pyx":361
 * 	property charset:
 * 		"""Character set of the text"""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			if (not self.props.charset):
 * 				return None
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("brlapi.WriteStruct.charset.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":366
 * 			else:
 * 				return self.props.charset
 * 		def __set__(self, val):             # <<<<<<<<<<<<<<
 * 			cdef c_brlapi.size_t size
 * 			cdef char *c_val
*/

/* Python wrapper */
static int __pyx_pw_6brlapi_11WriteStruct_7charset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_6brlapi_11WriteStruct_7charset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6brlapi_11WriteStruct_7charset_2__set__(((struct __pyx_obj_6brlapi_WriteStruct *)__pyx_v_self), ((PyObject *)__pyx_v_val));

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

static int __pyx_pf_6brlapi_11WriteStruct_7charset_2__set__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self, PyObject *__pyx_v_val) {
  size_t __pyx_v_size;
  char *__pyx_v_c_val;
  char *__pyx_v_charset;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  char *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_val);

  /* "brlapi.pyx":370
 * 			cdef char *c_val
 * 			cdef char *charset
 * 			if (self.props.charset):             # <<<<<<<<<<<<<<
 * 				c_brlapi.free(<char*>self.props.charset)
 * 			if (val):
*/
  __pyx_t_1 = (__pyx_v_self->props.charset != 0);
  if (__pyx_t_1) {

    /* "brlapi.pyx":371
 * 			cdef char *charset
 * 			if (self.props.charset):
 * 				c_brlapi.free(<char*>self.props.charset)             # <<<<<<<<<<<<<<
 * 			if (val):
 * 				if (type(val) == unicode):
*/
    free(((char *)__pyx_v_self->props.charset));

    /* "brlapi.pyx":370
 * 			cdef char *c_val
 * 			cdef char *charset
 * 			if (self.props.charset):             # <<<<<<<<<<<<<<
 * 				c_brlapi.free(<char*>self.props.charset)
 * 			if (val):
*/
  }

  /* "brlapi.pyx":372
 * 			if (self.props.charset):
 * 				c_brlapi.free(<char*>self.props.charset)
 * 			if (val):             # <<<<<<<<<<<<<<
 * 				if (type(val) == unicode):
 * 					val = val.encode('ASCII')
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 372, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "brlapi.pyx":373
 * 				c_brlapi.free(<char*>self.props.charset)
 * 			if (val):
 * 				if (type(val) == unicode):             # <<<<<<<<<<<<<<
 * 					val = val.encode('ASCII')
 * 				size = len(val)
*/
    __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_val)), ((PyObject *)(&PyUnicode_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 373, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "brlapi.pyx":374
 * 			if (val):
 * 				if (type(val) == unicode):
 * 					val = val.encode('ASCII')             # <<<<<<<<<<<<<<
 * 				size = len(val)
 * 				c_val = val
*/
      __pyx_t_3 = __pyx_v_val;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ASCII};
        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "brlapi.pyx":373
 * 				c_brlapi.free(<char*>self.props.charset)
 * 			if (val):
 * 				if (type(val) == unicode):             # <<<<<<<<<<<<<<
 * 					val = val.encode('ASCII')
 * 				size = len(val)
*/
    }

    /* "brlapi.pyx":375
 * 				if (type(val) == unicode):
 * 					val = val.encode('ASCII')
 * 				size = len(val)             # <<<<<<<<<<<<<<
 * 				c_val = val
 * 				charset = <char*>c_brlapi.malloc(size+1)
*/
    __pyx_t_5 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 375, __pyx_L1_error)
    __pyx_v_size = __pyx_t_5;

    /* "brlapi.pyx":376
 * 					val = val.encode('ASCII')
 * 				size = len(val)
 * 				c_val = val             # <<<<<<<<<<<<<<
 * 				charset = <char*>c_brlapi.malloc(size+1)
 * 				c_brlapi.memcpy(<void*>charset,<void*>c_val,size)
*/
    __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_val); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 376, __pyx_L1_error)
    __pyx_v_c_val = __pyx_t_6;

    /* "brlapi.pyx":377
 * 				size = len(val)
 * 				c_val = val
 * 				charset = <char*>c_brlapi.malloc(size+1)             # <<<<<<<<<<<<<<
 * 				c_brlapi.memcpy(<void*>charset,<void*>c_val,size)
 * 				charset[size] = 0
*/
    __pyx_v_charset = ((char *)malloc((__pyx_v_size + 1)));

    /* "brlapi.pyx":378
 * 				c_val = val
 * 				charset = <char*>c_brlapi.malloc(size+1)
 * 				c_brlapi.memcpy(<void*>charset,<void*>c_val,size)             # <<<<<<<<<<<<<<
 * 				charset[size] = 0
 * 				self.props.charset = charset
*/
    (void)(memcpy(((void *)__pyx_v_charset), ((void *)__pyx_v_c_val), __pyx_v_size));

    /* "brlapi.pyx":379
 * 				charset = <char*>c_brlapi.malloc(size+1)
 * 				c_brlapi.memcpy(<void*>charset,<void*>c_val,size)
 * 				charset[size] = 0             # <<<<<<<<<<<<<<
 * 				self.props.charset = charset
 * 			else:
*/
    (__pyx_v_charset[__pyx_v_size]) = 0;

    /* "brlapi.pyx":380
 * 				c_brlapi.memcpy(<void*>charset,<void*>c_val,size)
 * 				charset[size] = 0
 * 				self.props.charset = charset             # <<<<<<<<<<<<<<
 * 			else:
 * 				self.props.charset = NULL
*/
    __pyx_v_self->props.charset = __pyx_v_charset;

    /* "brlapi.pyx":372
 * 			if (self.props.charset):
 * 				c_brlapi.free(<char*>self.props.charset)
 * 			if (val):             # <<<<<<<<<<<<<<
 * 				if (type(val) == unicode):
 * 					val = val.encode('ASCII')
*/
    goto __pyx_L4;
  }

  /* "brlapi.pyx":382
 * 				self.props.charset = charset
 * 			else:
 * 				self.props.charset = NULL             # <<<<<<<<<<<<<<
 * 
 * 	property attrAnd:
*/
  /*else*/ {
    __pyx_v_self->props.charset = NULL;
  }
  __pyx_L4:;

  /* "brlapi.pyx":366
 * 			else:
 * 				return self.props.charset
 * 		def __set__(self, val):             # <<<<<<<<<<<<<<
 * 			cdef c_brlapi.size_t size
 * 			cdef char *c_val
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("brlapi.WriteStruct.charset.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":386
 * 	property attrAnd:
 * 		"""And attributes; applied first"""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			cdef char *c_val
 * 			if (not self.props.andMask):
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_11WriteStruct_7attrAnd_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6brlapi_11WriteStruct_7attrAnd_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6brlapi_11WriteStruct_7attrAnd___get__(((struct __pyx_obj_6brlapi_WriteStruct *)__pyx_v_self));

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

static PyObject *__pyx_pf_6brlapi_11WriteStruct_7attrAnd___get__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self) {
  char *__pyx_v_c_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "brlapi.pyx":388
 * 		def __get__(self):
 * 			cdef char *c_val
 * 			if (not self.props.andMask):             # <<<<<<<<<<<<<<
 * 				return None
 * 			else:
*/
  __pyx_t_1 = (!(__pyx_v_self->props.andMask != 0));
  if (__pyx_t_1) {

    /* "brlapi.pyx":389
 * 			cdef char *c_val
 * 			if (not self.props.andMask):
 * 				return None             # <<<<<<<<<<<<<<
 * 			else:
 * 				c_val = <char*>self.props.andMask
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "brlapi.pyx":388
 * 		def __get__(self):
 * 			cdef char *c_val
 * 			if (not self.props.andMask):             # <<<<<<<<<<<<<<
 * 				return None
 * 			else:
*/
  }

  /* "brlapi.pyx":391
 * 				return None
 * 			else:
 * 				c_val = <char*>self.props.andMask             # <<<<<<<<<<<<<<
 * 				return c_val[:self.regionSize]
 * 		def __set__(self, val):
*/
  /*else*/ {
    __pyx_v_c_val = ((char *)__pyx_v_self->props.andMask);

    /* "brlapi.pyx":392
 * 			else:
 * 				c_val = <char*>self.props.andMask
 * 				return c_val[:self.regionSize]             # <<<<<<<<<<<<<<
 * 		def __set__(self, val):
 * 			cdef c_brlapi.size_t size
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_regionSize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = (__pyx_t_2 == Py_None);
    if (__pyx_t_1) {
      __pyx_t_3 = PY_SSIZE_T_MAX;
    } else {
      __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 392, __pyx_L1_error)
      __pyx_t_3 = __pyx_t_4;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_c_val + 0, __pyx_t_3 - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "brlapi.pyx":386
 * 	property attrAnd:
 * 		"""And attributes; applied first"""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			cdef char *c_val
 * 			if (not self.props.andMask):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("brlapi.WriteStruct.attrAnd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":393
 * 				c_val = <char*>self.props.andMask
 * 				return c_val[:self.regionSize]
 * 		def __set__(self, val):             # <<<<<<<<<<<<<<
 * 			cdef c_brlapi.size_t size
 * 			cdef char *c_val
*/

/* Python wrapper */
static int __pyx_pw_6brlapi_11WriteStruct_7attrAnd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_6brlapi_11WriteStruct_7attrAnd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6brlapi_11WriteStruct_7attrAnd_2__set__(((struct __pyx_obj_6brlapi_WriteStruct *)__pyx_v_self), ((PyObject *)__pyx_v_val));

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

static int __pyx_pf_6brlapi_11WriteStruct_7attrAnd_2__set__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self, PyObject *__pyx_v_val) {
  size_t __pyx_v_size;
  char *__pyx_v_c_val;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  char *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_val);

  /* "brlapi.pyx":396
 * 			cdef c_brlapi.size_t size
 * 			cdef char *c_val
 * 			if (self.props.andMask):             # <<<<<<<<<<<<<<
 * 				c_brlapi.free(<char*>self.props.andMask)
 * 			if (val):
*/
  __pyx_t_1 = (__pyx_v_self->props.andMask != 0);
  if (__pyx_t_1) {

    /* "brlapi.pyx":397
 * 			cdef char *c_val
 * 			if (self.props.andMask):
 * 				c_brlapi.free(<char*>self.props.andMask)             # <<<<<<<<<<<<<<
 * 			if (val):
 * 				if (type(val) == unicode):
*/
    free(((char *)__pyx_v_self->props.andMask));

    /* "brlapi.pyx":396
 * 			cdef c_brlapi.size_t size
 * 			cdef char *c_val
 * 			if (self.props.andMask):             # <<<<<<<<<<<<<<
 * 				c_brlapi.free(<char*>self.props.andMask)
 * 			if (val):
*/
  }

  /* "brlapi.pyx":398
 * 			if (self.props.andMask):
 * 				c_brlapi.free(<char*>self.props.andMask)
 * 			if (val):             # <<<<<<<<<<<<<<
 * 				if (type(val) == unicode):
 * 					val = val.encode('latin1')
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 398, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "brlapi.pyx":399
 * 				c_brlapi.free(<char*>self.props.andMask)
 * 			if (val):
 * 				if (type(val) == unicode):             # <<<<<<<<<<<<<<
 * 					val = val.encode('latin1')
 * 				size = len(val)
*/
    __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_val)), ((PyObject *)(&PyUnicode_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 399, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 399, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "brlapi.pyx":400
 * 			if (val):
 * 				if (type(val) == unicode):
 * 					val = val.encode('latin1')             # <<<<<<<<<<<<<<
 * 				size = len(val)
 * 				c_val = val
*/
      __pyx_t_3 = __pyx_v_val;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_latin1};
        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 400, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "brlapi.pyx":399
 * 				c_brlapi.free(<char*>self.props.andMask)
 * 			if (val):
 * 				if (type(val) == unicode):             # <<<<<<<<<<<<<<
 * 					val = val.encode('latin1')
 * 				size = len(val)
*/
    }

    /* "brlapi.pyx":401
 * 				if (type(val) == unicode):
 * 					val = val.encode('latin1')
 * 				size = len(val)             # <<<<<<<<<<<<<<
 * 				c_val = val
 * 				self.props.andMask = <unsigned char*>c_brlapi.malloc(size)
*/
    __pyx_t_5 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 401, __pyx_L1_error)
    __pyx_v_size = __pyx_t_5;

    /* "brlapi.pyx":402
 * 					val = val.encode('latin1')
 * 				size = len(val)
 * 				c_val = val             # <<<<<<<<<<<<<<
 * 				self.props.andMask = <unsigned char*>c_brlapi.malloc(size)
 * 				c_brlapi.memcpy(<void*>self.props.andMask,<void*>c_val,size)
*/
    __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_val); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 402, __pyx_L1_error)
    __pyx_v_c_val = __pyx_t_6;

    /* "brlapi.pyx":403
 * 				size = len(val)
 * 				c_val = val
 * 				self.props.andMask = <unsigned char*>c_brlapi.malloc(size)             # <<<<<<<<<<<<<<
 * 				c_brlapi.memcpy(<void*>self.props.andMask,<void*>c_val,size)
 * 			else:
*/
    __pyx_v_self->props.andMask = ((unsigned char *)malloc(__pyx_v_size));

    /* "brlapi.pyx":404
 * 				c_val = val
 * 				self.props.andMask = <unsigned char*>c_brlapi.malloc(size)
 * 				c_brlapi.memcpy(<void*>self.props.andMask,<void*>c_val,size)             # <<<<<<<<<<<<<<
 * 			else:
 * 				self.props.andMask = NULL
*/
    (void)(memcpy(((void *)__pyx_v_self->props.andMask), ((void *)__pyx_v_c_val), __pyx_v_size));

    /* "brlapi.pyx":398
 * 			if (self.props.andMask):
 * 				c_brlapi.free(<char*>self.props.andMask)
 * 			if (val):             # <<<<<<<<<<<<<<
 * 				if (type(val) == unicode):
 * 					val = val.encode('latin1')
*/
    goto __pyx_L4;
  }

  /* "brlapi.pyx":406
 * 				c_brlapi.memcpy(<void*>self.props.andMask,<void*>c_val,size)
 * 			else:
 * 				self.props.andMask = NULL             # <<<<<<<<<<<<<<
 * 
 * 	property attrOr:
*/
  /*else*/ {
    __pyx_v_self->props.andMask = NULL;
  }
  __pyx_L4:;

  /* "brlapi.pyx":393
 * 				c_val = <char*>self.props.andMask
 * 				return c_val[:self.regionSize]
 * 		def __set__(self, val):             # <<<<<<<<<<<<<<
 * 			cdef c_brlapi.size_t size
 * 			cdef char *c_val
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("brlapi.WriteStruct.attrAnd.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":410
 * 	property attrOr:
 * 		"""Or attributes; applied after ANDing"""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			cdef char *c_val
 * 			if (not self.props.orMask):
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_11WriteStruct_6attrOr_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6brlapi_11WriteStruct_6attrOr_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6brlapi_11WriteStruct_6attrOr___get__(((struct __pyx_obj_6brlapi_WriteStruct *)__pyx_v_self));

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

static PyObject *__pyx_pf_6brlapi_11WriteStruct_6attrOr___get__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self) {
  char *__pyx_v_c_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "brlapi.pyx":412
 * 		def __get__(self):
 * 			cdef char *c_val
 * 			if (not self.props.orMask):             # <<<<<<<<<<<<<<
 * 				return None
 * 			else:
*/
  __pyx_t_1 = (!(__pyx_v_self->props.orMask != 0));
  if (__pyx_t_1) {

    /* "brlapi.pyx":413
 * 			cdef char *c_val
 * 			if (not self.props.orMask):
 * 				return None             # <<<<<<<<<<<<<<
 * 			else:
 * 				c_val = <char*>self.props.orMask
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "brlapi.pyx":412
 * 		def __get__(self):
 * 			cdef char *c_val
 * 			if (not self.props.orMask):             # <<<<<<<<<<<<<<
 * 				return None
 * 			else:
*/
  }

  /* "brlapi.pyx":415
 * 				return None
 * 			else:
 * 				c_val = <char*>self.props.orMask             # <<<<<<<<<<<<<<
 * 				return c_val[:self.regionSize]
 * 		def __set__(self, val):
*/
  /*else*/ {
    __pyx_v_c_val = ((char *)__pyx_v_self->props.orMask);

    /* "brlapi.pyx":416
 * 			else:
 * 				c_val = <char*>self.props.orMask
 * 				return c_val[:self.regionSize]             # <<<<<<<<<<<<<<
 * 		def __set__(self, val):
 * 			cdef c_brlapi.size_t size
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_regionSize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = (__pyx_t_2 == Py_None);
    if (__pyx_t_1) {
      __pyx_t_3 = PY_SSIZE_T_MAX;
    } else {
      __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 416, __pyx_L1_error)
      __pyx_t_3 = __pyx_t_4;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_c_val + 0, __pyx_t_3 - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "brlapi.pyx":410
 * 	property attrOr:
 * 		"""Or attributes; applied after ANDing"""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			cdef char *c_val
 * 			if (not self.props.orMask):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("brlapi.WriteStruct.attrOr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":417
 * 				c_val = <char*>self.props.orMask
 * 				return c_val[:self.regionSize]
 * 		def __set__(self, val):             # <<<<<<<<<<<<<<
 * 			cdef c_brlapi.size_t size
 * 			cdef char *c_val
*/

/* Python wrapper */
static int __pyx_pw_6brlapi_11WriteStruct_6attrOr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_6brlapi_11WriteStruct_6attrOr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6brlapi_11WriteStruct_6attrOr_2__set__(((struct __pyx_obj_6brlapi_WriteStruct *)__pyx_v_self), ((PyObject *)__pyx_v_val));

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

static int __pyx_pf_6brlapi_11WriteStruct_6attrOr_2__set__(struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self, PyObject *__pyx_v_val) {
  size_t __pyx_v_size;
  char *__pyx_v_c_val;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  char *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_val);

  /* "brlapi.pyx":420
 * 			cdef c_brlapi.size_t size
 * 			cdef char *c_val
 * 			if (self.props.orMask):             # <<<<<<<<<<<<<<
 * 				c_brlapi.free(<char*>self.props.orMask)
 * 			if (val):
*/
  __pyx_t_1 = (__pyx_v_self->props.orMask != 0);
  if (__pyx_t_1) {

    /* "brlapi.pyx":421
 * 			cdef char *c_val
 * 			if (self.props.orMask):
 * 				c_brlapi.free(<char*>self.props.orMask)             # <<<<<<<<<<<<<<
 * 			if (val):
 * 				if (type(val) == unicode):
*/
    free(((char *)__pyx_v_self->props.orMask));

    /* "brlapi.pyx":420
 * 			cdef c_brlapi.size_t size
 * 			cdef char *c_val
 * 			if (self.props.orMask):             # <<<<<<<<<<<<<<
 * 				c_brlapi.free(<char*>self.props.orMask)
 * 			if (val):
*/
  }

  /* "brlapi.pyx":422
 * 			if (self.props.orMask):
 * 				c_brlapi.free(<char*>self.props.orMask)
 * 			if (val):             # <<<<<<<<<<<<<<
 * 				if (type(val) == unicode):
 * 					val = val.encode('latin1')
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 422, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "brlapi.pyx":423
 * 				c_brlapi.free(<char*>self.props.orMask)
 * 			if (val):
 * 				if (type(val) == unicode):             # <<<<<<<<<<<<<<
 * 					val = val.encode('latin1')
 * 				size = len(val)
*/
    __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_val)), ((PyObject *)(&PyUnicode_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 423, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 423, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "brlapi.pyx":424
 * 			if (val):
 * 				if (type(val) == unicode):
 * 					val = val.encode('latin1')             # <<<<<<<<<<<<<<
 * 				size = len(val)
 * 				c_val = val
*/
      __pyx_t_3 = __pyx_v_val;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_latin1};
        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "brlapi.pyx":423
 * 				c_brlapi.free(<char*>self.props.orMask)
 * 			if (val):
 * 				if (type(val) == unicode):             # <<<<<<<<<<<<<<
 * 					val = val.encode('latin1')
 * 				size = len(val)
*/
    }

    /* "brlapi.pyx":425
 * 				if (type(val) == unicode):
 * 					val = val.encode('latin1')
 * 				size = len(val)             # <<<<<<<<<<<<<<
 * 				c_val = val
 * 				self.props.orMask = <unsigned char*>c_brlapi.malloc(size)
*/
    __pyx_t_5 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 425, __pyx_L1_error)
    __pyx_v_size = __pyx_t_5;

    /* "brlapi.pyx":426
 * 					val = val.encode('latin1')
 * 				size = len(val)
 * 				c_val = val             # <<<<<<<<<<<<<<
 * 				self.props.orMask = <unsigned char*>c_brlapi.malloc(size)
 * 				c_brlapi.memcpy(<void*>self.props.orMask,<void*>c_val,size)
*/
    __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_val); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 426, __pyx_L1_error)
    __pyx_v_c_val = __pyx_t_6;

    /* "brlapi.pyx":427
 * 				size = len(val)
 * 				c_val = val
 * 				self.props.orMask = <unsigned char*>c_brlapi.malloc(size)             # <<<<<<<<<<<<<<
 * 				c_brlapi.memcpy(<void*>self.props.orMask,<void*>c_val,size)
 * 			else:
*/
    __pyx_v_self->props.orMask = ((unsigned char *)malloc(__pyx_v_size));

    /* "brlapi.pyx":428
 * 				c_val = val
 * 				self.props.orMask = <unsigned char*>c_brlapi.malloc(size)
 * 				c_brlapi.memcpy(<void*>self.props.orMask,<void*>c_val,size)             # <<<<<<<<<<<<<<
 * 			else:
 * 				self.props.orMask = NULL
*/
    (void)(memcpy(((void *)__pyx_v_self->props.orMask), ((void *)__pyx_v_c_val), __pyx_v_size));

    /* "brlapi.pyx":422
 * 			if (self.props.orMask):
 * 				c_brlapi.free(<char*>self.props.orMask)
 * 			if (val):             # <<<<<<<<<<<<<<
 * 				if (type(val) == unicode):
 * 					val = val.encode('latin1')
*/
    goto __pyx_L4;
  }

  /* "brlapi.pyx":430
 * 				c_brlapi.memcpy(<void*>self.props.orMask,<void*>c_val,size)
 * 			else:
 * 				self.props.orMask = NULL             # <<<<<<<<<<<<<<
 * 
 * cdef class Connection:
*/
  /*else*/ {
    __pyx_v_self->props.orMask = NULL;
  }
  __pyx_L4:;

  /* "brlapi.pyx":417
 * 				c_val = <char*>self.props.orMask
 * 				return c_val[:self.regionSize]
 * 		def __set__(self, val):             # <<<<<<<<<<<<<<
 * 			cdef c_brlapi.size_t size
 * 			cdef char *c_val
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("brlapi.WriteStruct.attrOr.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.props must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_11WriteStruct_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_11WriteStruct_2__reduce_cython__, "WriteStruct.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_6brlapi_11WriteStruct_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_11WriteStruct_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_11WriteStruct_2__reduce_cython__};
static PyObject *__pyx_pw_6brlapi_11WriteStruct_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_6brlapi_11WriteStruct_2__reduce_cython__(((struct __pyx_obj_6brlapi_WriteStruct *)__pyx_v_self));

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

static PyObject *__pyx_pf_6brlapi_11WriteStruct_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.props must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.props must be explicitly requested with @auto_pickle(True)"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.props must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("brlapi.WriteStruct.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.props must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.props must be explicitly requested with @auto_pickle(True)"
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_11WriteStruct_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_11WriteStruct_4__setstate_cython__, "WriteStruct.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_6brlapi_11WriteStruct_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_11WriteStruct_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_11WriteStruct_4__setstate_cython__};
static PyObject *__pyx_pw_6brlapi_11WriteStruct_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.WriteStruct.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_11WriteStruct_4__setstate_cython__(((struct __pyx_obj_6brlapi_WriteStruct *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_11WriteStruct_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "Pickling of struct members such as self.props must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.props must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.props must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.props must be explicitly requested with @auto_pickle(True)"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("brlapi.WriteStruct.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":439
 * 	cdef int fd
 * 
 * 	def __init__(self, host = None, auth = None):             # <<<<<<<<<<<<<<
 * 		"""Connect your program to BrlTTY using settings
 * 
*/

/* Python wrapper */
static int __pyx_pw_6brlapi_10Connection_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection___init__, "Connect your program to BrlTTY using settings\n\n\t\tSee brlapi_openConnection(3)\n\t\t\n\t\tSetting host to None defaults it to localhost, using the local installation's default TCP port, or to the content of the BRLAPI_HOST environment variable, if it exists.\n\t\tNote: Please check that resolving this name works before complaining.\n\n\t\tSetting auth to None defaults it to local installation setup or to the content of the BRLAPI_AUTH environment variable, if it exists.");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_6brlapi_10Connection___init__;
#endif
static int __pyx_pw_6brlapi_10Connection_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_host = 0;
  PyObject *__pyx_v_auth = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_host,&__pyx_mstate_global->__pyx_n_u_auth,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 439, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 439, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 439, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 439, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 439, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 439, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_host = values[0];
    __pyx_v_auth = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 439, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.Connection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_10Connection___init__(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self), __pyx_v_host, __pyx_v_auth);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6brlapi_10Connection___init__(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_auth) {
  brlapi_connectionSettings_t __pyx_v_client;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  char *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "brlapi.pyx":450
 * 		cdef c_brlapi.brlapi_connectionSettings_t client
 * 
 * 		if auth:             # <<<<<<<<<<<<<<
 * 			client.auth = auth
 * 		else:
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_auth); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 450, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "brlapi.pyx":451
 * 
 * 		if auth:
 * 			client.auth = auth             # <<<<<<<<<<<<<<
 * 		else:
 * 			client.auth = NULL
*/
    __pyx_t_2 = __Pyx_PyObject_AsWritableString(__pyx_v_auth); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 451, __pyx_L1_error)
    __pyx_v_client.auth = __pyx_t_2;

    /* "brlapi.pyx":450
 * 		cdef c_brlapi.brlapi_connectionSettings_t client
 * 
 * 		if auth:             # <<<<<<<<<<<<<<
 * 			client.auth = auth
 * 		else:
*/
    goto __pyx_L3;
  }

  /* "brlapi.pyx":453
 * 			client.auth = auth
 * 		else:
 * 			client.auth = NULL             # <<<<<<<<<<<<<<
 * 
 * 		if host:
*/
  /*else*/ {
    __pyx_v_client.auth = NULL;
  }
  __pyx_L3:;

  /* "brlapi.pyx":455
 * 			client.auth = NULL
 * 
 * 		if host:             # <<<<<<<<<<<<<<
 * 			client.host = host
 * 		else:
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_host); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 455, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "brlapi.pyx":456
 * 
 * 		if host:
 * 			client.host = host             # <<<<<<<<<<<<<<
 * 		else:
 * 			client.host = NULL
*/
    __pyx_t_2 = __Pyx_PyObject_AsWritableString(__pyx_v_host); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 456, __pyx_L1_error)
    __pyx_v_client.host = __pyx_t_2;

    /* "brlapi.pyx":455
 * 			client.auth = NULL
 * 
 * 		if host:             # <<<<<<<<<<<<<<
 * 			client.host = host
 * 		else:
*/
    goto __pyx_L4;
  }

  /* "brlapi.pyx":458
 * 			client.host = host
 * 		else:
 * 			client.host = NULL             # <<<<<<<<<<<<<<
 * 
 * 		self.h = <c_brlapi.brlapi_handle_t*> c_brlapi.malloc(c_brlapi.brlapi_getHandleSize())
*/
  /*else*/ {
    __pyx_v_client.host = NULL;
  }
  __pyx_L4:;

  /* "brlapi.pyx":460
 * 			client.host = NULL
 * 
 * 		self.h = <c_brlapi.brlapi_handle_t*> c_brlapi.malloc(c_brlapi.brlapi_getHandleSize())             # <<<<<<<<<<<<<<
 * 
 * 		with nogil:
*/
  __pyx_v_self->h = ((brlapi_handle_t *)malloc(brlapi_getHandleSize()));

  /* "brlapi.pyx":462
 * 		self.h = <c_brlapi.brlapi_handle_t*> c_brlapi.malloc(c_brlapi.brlapi_getHandleSize())
 * 
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			self.fd = <int>c_brlapi.brlapi__openConnection(self.h, &client, &self.settings)
 * 		c_brlapi.brlapi_protocolExceptionInit(self.h)
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":463
 * 
 * 		with nogil:
 * 			self.fd = <int>c_brlapi.brlapi__openConnection(self.h, &client, &self.settings)             # <<<<<<<<<<<<<<
 * 		c_brlapi.brlapi_protocolExceptionInit(self.h)
 * 		if self.fd == -1:
*/
        __pyx_v_self->fd = ((int)brlapi__openConnection(__pyx_v_self->h, (&__pyx_v_client), (&__pyx_v_self->settings)));
      }

      /* "brlapi.pyx":462
 * 		self.h = <c_brlapi.brlapi_handle_t*> c_brlapi.malloc(c_brlapi.brlapi_getHandleSize())
 * 
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			self.fd = <int>c_brlapi.brlapi__openConnection(self.h, &client, &self.settings)
 * 		c_brlapi.brlapi_protocolExceptionInit(self.h)
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L7;
        }
        __pyx_L7:;
      }
  }

  /* "brlapi.pyx":464
 * 		with nogil:
 * 			self.fd = <int>c_brlapi.brlapi__openConnection(self.h, &client, &self.settings)
 * 		c_brlapi.brlapi_protocolExceptionInit(self.h)             # <<<<<<<<<<<<<<
 * 		if self.fd == -1:
 * 			c_brlapi.free(self.h)
*/
  brlapi_protocolExceptionInit(__pyx_v_self->h);

  /* "brlapi.pyx":465
 * 			self.fd = <int>c_brlapi.brlapi__openConnection(self.h, &client, &self.settings)
 * 		c_brlapi.brlapi_protocolExceptionInit(self.h)
 * 		if self.fd == -1:             # <<<<<<<<<<<<<<
 * 			c_brlapi.free(self.h)
 * 			self.h = NULL
*/
  __pyx_t_1 = (__pyx_v_self->fd == -1L);
  if (unlikely(__pyx_t_1)) {

    /* "brlapi.pyx":466
 * 		c_brlapi.brlapi_protocolExceptionInit(self.h)
 * 		if self.fd == -1:
 * 			c_brlapi.free(self.h)             # <<<<<<<<<<<<<<
 * 			self.h = NULL
 * 			raise ConnectionError(self.settings.host, self.settings.auth)
*/
    free(__pyx_v_self->h);

    /* "brlapi.pyx":467
 * 		if self.fd == -1:
 * 			c_brlapi.free(self.h)
 * 			self.h = NULL             # <<<<<<<<<<<<<<
 * 			raise ConnectionError(self.settings.host, self.settings.auth)
 * 
*/
    __pyx_v_self->h = NULL;

    /* "brlapi.pyx":468
 * 			c_brlapi.free(self.h)
 * 			self.h = NULL
 * 			raise ConnectionError(self.settings.host, self.settings.auth)             # <<<<<<<<<<<<<<
 * 
 * 	def closeConnection(self):
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ConnectionError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->settings.host); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyBytes_FromString(__pyx_v_self->settings.auth); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_6, __pyx_t_7};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 468, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 468, __pyx_L1_error)

    /* "brlapi.pyx":465
 * 			self.fd = <int>c_brlapi.brlapi__openConnection(self.h, &client, &self.settings)
 * 		c_brlapi.brlapi_protocolExceptionInit(self.h)
 * 		if self.fd == -1:             # <<<<<<<<<<<<<<
 * 			c_brlapi.free(self.h)
 * 			self.h = NULL
*/
  }

  /* "brlapi.pyx":439
 * 	cdef int fd
 * 
 * 	def __init__(self, host = None, auth = None):             # <<<<<<<<<<<<<<
 * 		"""Connect your program to BrlTTY using settings
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("brlapi.Connection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":470
 * 			raise ConnectionError(self.settings.host, self.settings.auth)
 * 
 * 	def closeConnection(self):             # <<<<<<<<<<<<<<
 * 		"""Close the BrlAPI connection"""
 * 		if self.fd != -1:
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_3closeConnection(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_2closeConnection, "Connection.closeConnection(self)\n\nClose the BrlAPI connection");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_3closeConnection = {"closeConnection", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_3closeConnection, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_2closeConnection};
static PyObject *__pyx_pw_6brlapi_10Connection_3closeConnection(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("closeConnection (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("closeConnection", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("closeConnection", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_6brlapi_10Connection_2closeConnection(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_6brlapi_10Connection_2closeConnection(struct __pyx_obj_6brlapi_Connection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("closeConnection", 0);

  /* "brlapi.pyx":472
 * 	def closeConnection(self):
 * 		"""Close the BrlAPI connection"""
 * 		if self.fd != -1:             # <<<<<<<<<<<<<<
 * 			c_brlapi.brlapi__closeConnection(self.h)
 * 			self.fd = -1
*/
  __pyx_t_1 = (__pyx_v_self->fd != -1L);
  if (__pyx_t_1) {

    /* "brlapi.pyx":473
 * 		"""Close the BrlAPI connection"""
 * 		if self.fd != -1:
 * 			c_brlapi.brlapi__closeConnection(self.h)             # <<<<<<<<<<<<<<
 * 			self.fd = -1
 * 
*/
    brlapi__closeConnection(__pyx_v_self->h);

    /* "brlapi.pyx":474
 * 		if self.fd != -1:
 * 			c_brlapi.brlapi__closeConnection(self.h)
 * 			self.fd = -1             # <<<<<<<<<<<<<<
 * 
 * 	def __del__(self):
*/
    __pyx_v_self->fd = -1;

    /* "brlapi.pyx":472
 * 	def closeConnection(self):
 * 		"""Close the BrlAPI connection"""
 * 		if self.fd != -1:             # <<<<<<<<<<<<<<
 * 			c_brlapi.brlapi__closeConnection(self.h)
 * 			self.fd = -1
*/
  }

  /* "brlapi.pyx":470
 * 			raise ConnectionError(self.settings.host, self.settings.auth)
 * 
 * 	def closeConnection(self):             # <<<<<<<<<<<<<<
 * 		"""Close the BrlAPI connection"""
 * 		if self.fd != -1:
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":476
 * 			self.fd = -1
 * 
 * 	def __del__(self):             # <<<<<<<<<<<<<<
 * 		"""Release resources used by the connection"""
 * 		if self.fd != -1:
*/

/* Python wrapper */
static void __pyx_pw_6brlapi_10Connection_5__del__(PyObject *__pyx_v_self); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_4__del__, "Connection.__del__(self)\n\nRelease resources used by the connection");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_6brlapi_10Connection_4__del__;
#endif
static void __pyx_pw_6brlapi_10Connection_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_6brlapi_10Connection_4__del__(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self));

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

static void __pyx_pf_6brlapi_10Connection_4__del__(struct __pyx_obj_6brlapi_Connection *__pyx_v_self) {
  int __pyx_t_1;

  /* "brlapi.pyx":478
 * 	def __del__(self):
 * 		"""Release resources used by the connection"""
 * 		if self.fd != -1:             # <<<<<<<<<<<<<<
 * 			c_brlapi.brlapi__closeConnection(self.h)
 * 		if self.h != NULL:
*/
  __pyx_t_1 = (__pyx_v_self->fd != -1L);
  if (__pyx_t_1) {

    /* "brlapi.pyx":479
 * 		"""Release resources used by the connection"""
 * 		if self.fd != -1:
 * 			c_brlapi.brlapi__closeConnection(self.h)             # <<<<<<<<<<<<<<
 * 		if self.h != NULL:
 * 			c_brlapi.free(self.h)
*/
    brlapi__closeConnection(__pyx_v_self->h);

    /* "brlapi.pyx":478
 * 	def __del__(self):
 * 		"""Release resources used by the connection"""
 * 		if self.fd != -1:             # <<<<<<<<<<<<<<
 * 			c_brlapi.brlapi__closeConnection(self.h)
 * 		if self.h != NULL:
*/
  }

  /* "brlapi.pyx":480
 * 		if self.fd != -1:
 * 			c_brlapi.brlapi__closeConnection(self.h)
 * 		if self.h != NULL:             # <<<<<<<<<<<<<<
 * 			c_brlapi.free(self.h)
 * 
*/
  __pyx_t_1 = (__pyx_v_self->h != NULL);
  if (__pyx_t_1) {

    /* "brlapi.pyx":481
 * 			c_brlapi.brlapi__closeConnection(self.h)
 * 		if self.h != NULL:
 * 			c_brlapi.free(self.h)             # <<<<<<<<<<<<<<
 * 
 * 	property host:
*/
    free(__pyx_v_self->h);

    /* "brlapi.pyx":480
 * 		if self.fd != -1:
 * 			c_brlapi.brlapi__closeConnection(self.h)
 * 		if self.h != NULL:             # <<<<<<<<<<<<<<
 * 			c_brlapi.free(self.h)
 * 
*/
  }

  /* "brlapi.pyx":476
 * 			self.fd = -1
 * 
 * 	def __del__(self):             # <<<<<<<<<<<<<<
 * 		"""Release resources used by the connection"""
 * 		if self.fd != -1:
*/

  /* function exit code */
}

/* "brlapi.pyx":485
 * 	property host:
 * 		"""To get authorized to connect, libbrlapi has to tell the BrlAPI server a secret key, for security reasons. This is the path to the file which holds it; it will hence have to be readable by the application."""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			return self.settings.host
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_4host_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6brlapi_10Connection_4host_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6brlapi_10Connection_4host___get__(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self));

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

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

  /* "brlapi.pyx":486
 * 		"""To get authorized to connect, libbrlapi has to tell the BrlAPI server a secret key, for security reasons. This is the path to the file which holds it; it will hence have to be readable by the application."""
 * 		def __get__(self):
 * 			return self.settings.host             # <<<<<<<<<<<<<<
 * 
 * 	property auth:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->settings.host); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "brlapi.pyx":485
 * 	property host:
 * 		"""To get authorized to connect, libbrlapi has to tell the BrlAPI server a secret key, for security reasons. This is the path to the file which holds it; it will hence have to be readable by the application."""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			return self.settings.host
 * 
*/

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

/* "brlapi.pyx":490
 * 	property auth:
 * 		"""This tells where the BrlAPI server resides : it might be listening on another computer, on any TCP port. It should look like "foo:1", which means TCP port number BRLAPI_SOCKETPORTNUM+1 on computer called "foo"."""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			return self.settings.auth
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_4auth_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6brlapi_10Connection_4auth_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6brlapi_10Connection_4auth___get__(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self));

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

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

  /* "brlapi.pyx":491
 * 		"""This tells where the BrlAPI server resides : it might be listening on another computer, on any TCP port. It should look like "foo:1", which means TCP port number BRLAPI_SOCKETPORTNUM+1 on computer called "foo"."""
 * 		def __get__(self):
 * 			return self.settings.auth             # <<<<<<<<<<<<<<
 * 
 * 	property fileDescriptor:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->settings.auth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "brlapi.pyx":490
 * 	property auth:
 * 		"""This tells where the BrlAPI server resides : it might be listening on another computer, on any TCP port. It should look like "foo:1", which means TCP port number BRLAPI_SOCKETPORTNUM+1 on computer called "foo"."""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			return self.settings.auth
 * 
*/

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

/* "brlapi.pyx":495
 * 	property fileDescriptor:
 * 		"""Returns the Unix file descriptor that the connection uses"""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			return self.fd
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_14fileDescriptor_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6brlapi_10Connection_14fileDescriptor_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6brlapi_10Connection_14fileDescriptor___get__(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self));

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

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

  /* "brlapi.pyx":496
 * 		"""Returns the Unix file descriptor that the connection uses"""
 * 		def __get__(self):
 * 			return self.fd             # <<<<<<<<<<<<<<
 * 
 * 	property displaySize:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "brlapi.pyx":495
 * 	property fileDescriptor:
 * 		"""Returns the Unix file descriptor that the connection uses"""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			return self.fd
 * 
*/

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

/* "brlapi.pyx":501
 * 		"""Get the size of the braille display
 * 		See brlapi_getDisplaySize(3)."""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			cdef unsigned int x
 * 			cdef unsigned int y
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_11displaySize_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6brlapi_10Connection_11displaySize_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6brlapi_10Connection_11displaySize___get__(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_6brlapi_10Connection_11displaySize___get__(struct __pyx_obj_6brlapi_Connection *__pyx_v_self) {
  unsigned int __pyx_v_x;
  unsigned int __pyx_v_y;
  int __pyx_v_retval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "brlapi.pyx":505
 * 			cdef unsigned int y
 * 			cdef int retval
 * 			with nogil:             # <<<<<<<<<<<<<<
 * 				retval = c_brlapi.brlapi__getDisplaySize(self.h, &x, &y)
 * 			if retval == -1:
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":506
 * 			cdef int retval
 * 			with nogil:
 * 				retval = c_brlapi.brlapi__getDisplaySize(self.h, &x, &y)             # <<<<<<<<<<<<<<
 * 			if retval == -1:
 * 				raise OperationError()
*/
        __pyx_v_retval = brlapi__getDisplaySize(__pyx_v_self->h, (&__pyx_v_x), (&__pyx_v_y));
      }

      /* "brlapi.pyx":505
 * 			cdef unsigned int y
 * 			cdef int retval
 * 			with nogil:             # <<<<<<<<<<<<<<
 * 				retval = c_brlapi.brlapi__getDisplaySize(self.h, &x, &y)
 * 			if retval == -1:
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "brlapi.pyx":507
 * 			with nogil:
 * 				retval = c_brlapi.brlapi__getDisplaySize(self.h, &x, &y)
 * 			if retval == -1:             # <<<<<<<<<<<<<<
 * 				raise OperationError()
 * 			else:
*/
  __pyx_t_1 = (__pyx_v_retval == -1L);
  if (unlikely(__pyx_t_1)) {

    /* "brlapi.pyx":508
 * 				retval = c_brlapi.brlapi__getDisplaySize(self.h, &x, &y)
 * 			if retval == -1:
 * 				raise OperationError()             # <<<<<<<<<<<<<<
 * 			else:
 * 				return (x, y)
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 508, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 508, __pyx_L1_error)

    /* "brlapi.pyx":507
 * 			with nogil:
 * 				retval = c_brlapi.brlapi__getDisplaySize(self.h, &x, &y)
 * 			if retval == -1:             # <<<<<<<<<<<<<<
 * 				raise OperationError()
 * 			else:
*/
  }

  /* "brlapi.pyx":510
 * 				raise OperationError()
 * 			else:
 * 				return (x, y)             # <<<<<<<<<<<<<<
 * 
 * 	property driverName:
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyLong_From_unsigned_int(__pyx_v_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyLong_From_unsigned_int(__pyx_v_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 510, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 510, __pyx_L1_error);
    __pyx_t_2 = 0;
    __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "brlapi.pyx":501
 * 		"""Get the size of the braille display
 * 		See brlapi_getDisplaySize(3)."""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			cdef unsigned int x
 * 			cdef unsigned int y
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("brlapi.Connection.displaySize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":515
 * 		"""Get the complete name of the driver used by BrlTTY
 * 		See brlapi_getDriverName(3)."""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			cdef char name[21]
 * 			cdef int retval
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_10driverName_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6brlapi_10Connection_10driverName_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6brlapi_10Connection_10driverName___get__(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_6brlapi_10Connection_10driverName___get__(struct __pyx_obj_6brlapi_Connection *__pyx_v_self) {
  char __pyx_v_name[21];
  int __pyx_v_retval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "brlapi.pyx":518
 * 			cdef char name[21]
 * 			cdef int retval
 * 			with nogil:             # <<<<<<<<<<<<<<
 * 				retval = c_brlapi.brlapi__getDriverName(self.h, name, sizeof(name))
 * 			if retval == -1:
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":519
 * 			cdef int retval
 * 			with nogil:
 * 				retval = c_brlapi.brlapi__getDriverName(self.h, name, sizeof(name))             # <<<<<<<<<<<<<<
 * 			if retval == -1:
 * 				raise OperationError()
*/
        __pyx_v_retval = brlapi__getDriverName(__pyx_v_self->h, __pyx_v_name, (sizeof(__pyx_v_name)));
      }

      /* "brlapi.pyx":518
 * 			cdef char name[21]
 * 			cdef int retval
 * 			with nogil:             # <<<<<<<<<<<<<<
 * 				retval = c_brlapi.brlapi__getDriverName(self.h, name, sizeof(name))
 * 			if retval == -1:
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "brlapi.pyx":520
 * 			with nogil:
 * 				retval = c_brlapi.brlapi__getDriverName(self.h, name, sizeof(name))
 * 			if retval == -1:             # <<<<<<<<<<<<<<
 * 				raise OperationError()
 * 			else:
*/
  __pyx_t_1 = (__pyx_v_retval == -1L);
  if (unlikely(__pyx_t_1)) {

    /* "brlapi.pyx":521
 * 				retval = c_brlapi.brlapi__getDriverName(self.h, name, sizeof(name))
 * 			if retval == -1:
 * 				raise OperationError()             # <<<<<<<<<<<<<<
 * 			else:
 * 				return name
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 521, __pyx_L1_error)

    /* "brlapi.pyx":520
 * 			with nogil:
 * 				retval = c_brlapi.brlapi__getDriverName(self.h, name, sizeof(name))
 * 			if retval == -1:             # <<<<<<<<<<<<<<
 * 				raise OperationError()
 * 			else:
*/
  }

  /* "brlapi.pyx":523
 * 				raise OperationError()
 * 			else:
 * 				return name             # <<<<<<<<<<<<<<
 * 
 * 	property modelIdentifier:
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "brlapi.pyx":515
 * 		"""Get the complete name of the driver used by BrlTTY
 * 		See brlapi_getDriverName(3)."""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			cdef char name[21]
 * 			cdef int retval
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("brlapi.Connection.driverName.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":528
 * 		"""Get the identifier for the model of the braille display
 * 		See brlapi_getModelIdentifier(3)."""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			cdef char identifier[21]
 * 			cdef int retval
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_15modelIdentifier_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6brlapi_10Connection_15modelIdentifier_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6brlapi_10Connection_15modelIdentifier___get__(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_6brlapi_10Connection_15modelIdentifier___get__(struct __pyx_obj_6brlapi_Connection *__pyx_v_self) {
  char __pyx_v_identifier[21];
  int __pyx_v_retval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "brlapi.pyx":531
 * 			cdef char identifier[21]
 * 			cdef int retval
 * 			with nogil:             # <<<<<<<<<<<<<<
 * 				retval = c_brlapi.brlapi__getModelIdentifier(self.h, identifier, sizeof(identifier))
 * 			if retval == -1:
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":532
 * 			cdef int retval
 * 			with nogil:
 * 				retval = c_brlapi.brlapi__getModelIdentifier(self.h, identifier, sizeof(identifier))             # <<<<<<<<<<<<<<
 * 			if retval == -1:
 * 				raise OperationError()
*/
        __pyx_v_retval = brlapi__getModelIdentifier(__pyx_v_self->h, __pyx_v_identifier, (sizeof(__pyx_v_identifier)));
      }

      /* "brlapi.pyx":531
 * 			cdef char identifier[21]
 * 			cdef int retval
 * 			with nogil:             # <<<<<<<<<<<<<<
 * 				retval = c_brlapi.brlapi__getModelIdentifier(self.h, identifier, sizeof(identifier))
 * 			if retval == -1:
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "brlapi.pyx":533
 * 			with nogil:
 * 				retval = c_brlapi.brlapi__getModelIdentifier(self.h, identifier, sizeof(identifier))
 * 			if retval == -1:             # <<<<<<<<<<<<<<
 * 				raise OperationError()
 * 			else:
*/
  __pyx_t_1 = (__pyx_v_retval == -1L);
  if (unlikely(__pyx_t_1)) {

    /* "brlapi.pyx":534
 * 				retval = c_brlapi.brlapi__getModelIdentifier(self.h, identifier, sizeof(identifier))
 * 			if retval == -1:
 * 				raise OperationError()             # <<<<<<<<<<<<<<
 * 			else:
 * 				return identifier
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 534, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 534, __pyx_L1_error)

    /* "brlapi.pyx":533
 * 			with nogil:
 * 				retval = c_brlapi.brlapi__getModelIdentifier(self.h, identifier, sizeof(identifier))
 * 			if retval == -1:             # <<<<<<<<<<<<<<
 * 				raise OperationError()
 * 			else:
*/
  }

  /* "brlapi.pyx":536
 * 				raise OperationError()
 * 			else:
 * 				return identifier             # <<<<<<<<<<<<<<
 * 
 * 	def enterTtyMode(self, tty = TTY_DEFAULT, driver = None):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_identifier); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "brlapi.pyx":528
 * 		"""Get the identifier for the model of the braille display
 * 		See brlapi_getModelIdentifier(3)."""
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			cdef char identifier[21]
 * 			cdef int retval
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("brlapi.Connection.modelIdentifier.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":538
 * 				return identifier
 * 
 * 	def enterTtyMode(self, tty = TTY_DEFAULT, driver = None):             # <<<<<<<<<<<<<<
 * 		"""Ask for some tty, with some key mechanism
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_7enterTtyMode(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_6enterTtyMode, "Connection.enterTtyMode(self, tty=TTY_DEFAULT, driver=None)\n\nAsk for some tty, with some key mechanism\n\nSee brlapi_enterTtyMode(3).\n\n* tty : If tty >= 0, application takes control of the specified tty\n        If tty == TTY_DEFAULT, the library first tries to get the tty number from the WINDOWID environment variable (form xterm case), then the CONTROLVT variable, and at last reads /proc/self/stat (on linux)\n* driver : Tells how the application wants readKey() to return key presses. None or \"\" means BrlTTY commands are required, whereas a driver name means that raw key codes returned by this driver are expected.\n\nIf the application does not want to take control of a particular tty, but keep control on all ttys, brlapi_enterTtyModeWithPath should be called instead with path equal to []. This is usually what a screen reader wants to use.");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_7enterTtyMode = {"enterTtyMode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_7enterTtyMode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_6enterTtyMode};
static PyObject *__pyx_pw_6brlapi_10Connection_7enterTtyMode(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_tty = 0;
  PyObject *__pyx_v_driver = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("enterTtyMode (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_tty,&__pyx_mstate_global->__pyx_n_u_driver,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 538, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 538, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 538, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "enterTtyMode", 0) < (0)) __PYX_ERR(0, 538, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__4);
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 538, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 538, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__4);
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_tty = values[0];
    __pyx_v_driver = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("enterTtyMode", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 538, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.Connection.enterTtyMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_10Connection_6enterTtyMode(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self), __pyx_v_tty, __pyx_v_driver);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_10Connection_6enterTtyMode(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_tty, PyObject *__pyx_v_driver) {
  int __pyx_v_retval;
  int __pyx_v_c_tty;
  char *__pyx_v_c_driver;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  char *__pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("enterTtyMode", 0);
  __Pyx_INCREF(__pyx_v_driver);

  /* "brlapi.pyx":551
 * 		cdef int c_tty
 * 		cdef char *c_driver
 * 		c_tty = tty             # <<<<<<<<<<<<<<
 * 		if not driver:
 * 			c_driver = NULL
*/
  __pyx_t_1 = __Pyx_PyLong_As_int(__pyx_v_tty); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 551, __pyx_L1_error)
  __pyx_v_c_tty = __pyx_t_1;

  /* "brlapi.pyx":552
 * 		cdef char *c_driver
 * 		c_tty = tty
 * 		if not driver:             # <<<<<<<<<<<<<<
 * 			c_driver = NULL
 * 		else:
*/
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_driver); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 552, __pyx_L1_error)
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "brlapi.pyx":553
 * 		c_tty = tty
 * 		if not driver:
 * 			c_driver = NULL             # <<<<<<<<<<<<<<
 * 		else:
 * 			if (type(driver) == unicode):
*/
    __pyx_v_c_driver = NULL;

    /* "brlapi.pyx":552
 * 		cdef char *c_driver
 * 		c_tty = tty
 * 		if not driver:             # <<<<<<<<<<<<<<
 * 			c_driver = NULL
 * 		else:
*/
    goto __pyx_L3;
  }

  /* "brlapi.pyx":555
 * 			c_driver = NULL
 * 		else:
 * 			if (type(driver) == unicode):             # <<<<<<<<<<<<<<
 * 				driver = driver.encode('ASCII')
 * 			c_driver = driver
*/
  /*else*/ {
    __pyx_t_4 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_driver)), ((PyObject *)(&PyUnicode_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 555, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 555, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_3) {

      /* "brlapi.pyx":556
 * 		else:
 * 			if (type(driver) == unicode):
 * 				driver = driver.encode('ASCII')             # <<<<<<<<<<<<<<
 * 			c_driver = driver
 * 		with nogil:
*/
      __pyx_t_5 = __pyx_v_driver;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ASCII};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 556, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_DECREF_SET(__pyx_v_driver, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "brlapi.pyx":555
 * 			c_driver = NULL
 * 		else:
 * 			if (type(driver) == unicode):             # <<<<<<<<<<<<<<
 * 				driver = driver.encode('ASCII')
 * 			c_driver = driver
*/
    }

    /* "brlapi.pyx":557
 * 			if (type(driver) == unicode):
 * 				driver = driver.encode('ASCII')
 * 			c_driver = driver             # <<<<<<<<<<<<<<
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__enterTtyMode(self.h, c_tty, c_driver)
*/
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_driver); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 557, __pyx_L1_error)
    __pyx_v_c_driver = __pyx_t_7;
  }
  __pyx_L3:;

  /* "brlapi.pyx":558
 * 				driver = driver.encode('ASCII')
 * 			c_driver = driver
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__enterTtyMode(self.h, c_tty, c_driver)
 * 		if retval == -1:
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":559
 * 			c_driver = driver
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__enterTtyMode(self.h, c_tty, c_driver)             # <<<<<<<<<<<<<<
 * 		if retval == -1:
 * 			raise OperationError()
*/
        __pyx_v_retval = brlapi__enterTtyMode(__pyx_v_self->h, __pyx_v_c_tty, __pyx_v_c_driver);
      }

      /* "brlapi.pyx":558
 * 				driver = driver.encode('ASCII')
 * 			c_driver = driver
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__enterTtyMode(self.h, c_tty, c_driver)
 * 		if retval == -1:
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L7;
        }
        __pyx_L7:;
      }
  }

  /* "brlapi.pyx":560
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__enterTtyMode(self.h, c_tty, c_driver)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  __pyx_t_3 = (__pyx_v_retval == -1L);
  if (unlikely(__pyx_t_3)) {

    /* "brlapi.pyx":561
 * 			retval = c_brlapi.brlapi__enterTtyMode(self.h, c_tty, c_driver)
 * 		if retval == -1:
 * 			raise OperationError()             # <<<<<<<<<<<<<<
 * 		else:
 * 			return retval
*/
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 561, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 561, __pyx_L1_error)

    /* "brlapi.pyx":560
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__enterTtyMode(self.h, c_tty, c_driver)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  }

  /* "brlapi.pyx":563
 * 			raise OperationError()
 * 		else:
 * 			return retval             # <<<<<<<<<<<<<<
 * 
 * 	def enterTtyModeWithPath(self, path = [], driver = None):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_retval); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "brlapi.pyx":538
 * 				return identifier
 * 
 * 	def enterTtyMode(self, tty = TTY_DEFAULT, driver = None):             # <<<<<<<<<<<<<<
 * 		"""Ask for some tty, with some key mechanism
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("brlapi.Connection.enterTtyMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_driver);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":565
 * 			return retval
 * 
 * 	def enterTtyModeWithPath(self, path = [], driver = None):             # <<<<<<<<<<<<<<
 * 		"""Ask for some tty, with some key mechanism
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_9enterTtyModeWithPath(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_8enterTtyModeWithPath, "Connection.enterTtyModeWithPath(self, path=[], driver=None)\n\nAsk for some tty, with some key mechanism\n\nSee brlapi_enterTtyModeWithPath(3).\n\n* tty is an array of ttys representing the tty path to be got. Can be None.\n* driver : has the same meaning as in enterTtyMode.\n\nProviding an empty array or None means to get the root.");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_9enterTtyModeWithPath = {"enterTtyModeWithPath", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_9enterTtyModeWithPath, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_8enterTtyModeWithPath};
static PyObject *__pyx_pw_6brlapi_10Connection_9enterTtyModeWithPath(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_path = 0;
  PyObject *__pyx_v_driver = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("enterTtyModeWithPath (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_path,&__pyx_mstate_global->__pyx_n_u_driver,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 565, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 565, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 565, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "enterTtyModeWithPath", 0) < (0)) __PYX_ERR(0, 565, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__5);
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 565, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 565, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__5);
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_path = values[0];
    __pyx_v_driver = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("enterTtyModeWithPath", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 565, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.Connection.enterTtyModeWithPath", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_10Connection_8enterTtyModeWithPath(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self), __pyx_v_path, __pyx_v_driver);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_10Connection_8enterTtyModeWithPath(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_driver) {
  int __pyx_v_retval;
  int *__pyx_v_c_ttys;
  int __pyx_v_c_nttys;
  char *__pyx_v_c_driver;
  long __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  char *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("enterTtyModeWithPath", 0);
  __Pyx_INCREF(__pyx_v_driver);

  /* "brlapi.pyx":578
 * 		cdef int c_nttys
 * 		cdef char *c_driver
 * 		if not path:             # <<<<<<<<<<<<<<
 * 			c_ttys = NULL
 * 			c_nttys = 0
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_path); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 578, __pyx_L1_error)
  __pyx_t_2 = (!__pyx_t_1);
  if (__pyx_t_2) {

    /* "brlapi.pyx":579
 * 		cdef char *c_driver
 * 		if not path:
 * 			c_ttys = NULL             # <<<<<<<<<<<<<<
 * 			c_nttys = 0
 * 		else:
*/
    __pyx_v_c_ttys = NULL;

    /* "brlapi.pyx":580
 * 		if not path:
 * 			c_ttys = NULL
 * 			c_nttys = 0             # <<<<<<<<<<<<<<
 * 		else:
 * 			c_nttys = len(path)
*/
    __pyx_v_c_nttys = 0;

    /* "brlapi.pyx":578
 * 		cdef int c_nttys
 * 		cdef char *c_driver
 * 		if not path:             # <<<<<<<<<<<<<<
 * 			c_ttys = NULL
 * 			c_nttys = 0
*/
    goto __pyx_L3;
  }

  /* "brlapi.pyx":582
 * 			c_nttys = 0
 * 		else:
 * 			c_nttys = len(path)             # <<<<<<<<<<<<<<
 * 			c_ttys = <int*>c_brlapi.malloc(c_nttys * sizeof(int))
 * 			for i from 0 <= i < c_nttys:
*/
  /*else*/ {
    __pyx_t_3 = PyObject_Length(__pyx_v_path); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 582, __pyx_L1_error)
    __pyx_v_c_nttys = __pyx_t_3;

    /* "brlapi.pyx":583
 * 		else:
 * 			c_nttys = len(path)
 * 			c_ttys = <int*>c_brlapi.malloc(c_nttys * sizeof(int))             # <<<<<<<<<<<<<<
 * 			for i from 0 <= i < c_nttys:
 * 				c_ttys[i] = path[i]
*/
    __pyx_v_c_ttys = ((int *)malloc((__pyx_v_c_nttys * (sizeof(int)))));

    /* "brlapi.pyx":584
 * 			c_nttys = len(path)
 * 			c_ttys = <int*>c_brlapi.malloc(c_nttys * sizeof(int))
 * 			for i from 0 <= i < c_nttys:             # <<<<<<<<<<<<<<
 * 				c_ttys[i] = path[i]
 * 		if not driver:
*/
    __pyx_t_4 = __pyx_v_c_nttys;
    for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) {

      /* "brlapi.pyx":585
 * 			c_ttys = <int*>c_brlapi.malloc(c_nttys * sizeof(int))
 * 			for i from 0 <= i < c_nttys:
 * 				c_ttys[i] = path[i]             # <<<<<<<<<<<<<<
 * 		if not driver:
 * 			c_driver = NULL
*/
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_path, __pyx_v_i, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 585, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_5); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 585, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      (__pyx_v_c_ttys[__pyx_v_i]) = __pyx_t_6;
    }
  }
  __pyx_L3:;

  /* "brlapi.pyx":586
 * 			for i from 0 <= i < c_nttys:
 * 				c_ttys[i] = path[i]
 * 		if not driver:             # <<<<<<<<<<<<<<
 * 			c_driver = NULL
 * 		else:
*/
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_driver); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 586, __pyx_L1_error)
  __pyx_t_1 = (!__pyx_t_2);
  if (__pyx_t_1) {

    /* "brlapi.pyx":587
 * 				c_ttys[i] = path[i]
 * 		if not driver:
 * 			c_driver = NULL             # <<<<<<<<<<<<<<
 * 		else:
 * 			if (type(driver) == unicode):
*/
    __pyx_v_c_driver = NULL;

    /* "brlapi.pyx":586
 * 			for i from 0 <= i < c_nttys:
 * 				c_ttys[i] = path[i]
 * 		if not driver:             # <<<<<<<<<<<<<<
 * 			c_driver = NULL
 * 		else:
*/
    goto __pyx_L6;
  }

  /* "brlapi.pyx":589
 * 			c_driver = NULL
 * 		else:
 * 			if (type(driver) == unicode):             # <<<<<<<<<<<<<<
 * 				driver = driver.encode('ASCII')
 * 			c_driver = driver
*/
  /*else*/ {
    __pyx_t_5 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_driver)), ((PyObject *)(&PyUnicode_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 589, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 589, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_1) {

      /* "brlapi.pyx":590
 * 		else:
 * 			if (type(driver) == unicode):
 * 				driver = driver.encode('ASCII')             # <<<<<<<<<<<<<<
 * 			c_driver = driver
 * 		with nogil:
*/
      __pyx_t_7 = __pyx_v_driver;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_8 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ASCII};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 590, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_DECREF_SET(__pyx_v_driver, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "brlapi.pyx":589
 * 			c_driver = NULL
 * 		else:
 * 			if (type(driver) == unicode):             # <<<<<<<<<<<<<<
 * 				driver = driver.encode('ASCII')
 * 			c_driver = driver
*/
    }

    /* "brlapi.pyx":591
 * 			if (type(driver) == unicode):
 * 				driver = driver.encode('ASCII')
 * 			c_driver = driver             # <<<<<<<<<<<<<<
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__enterTtyModeWithPath(self.h, c_ttys, c_nttys, c_driver)
*/
    __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_driver); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 591, __pyx_L1_error)
    __pyx_v_c_driver = __pyx_t_9;
  }
  __pyx_L6:;

  /* "brlapi.pyx":592
 * 				driver = driver.encode('ASCII')
 * 			c_driver = driver
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__enterTtyModeWithPath(self.h, c_ttys, c_nttys, c_driver)
 * 		if (c_ttys):
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":593
 * 			c_driver = driver
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__enterTtyModeWithPath(self.h, c_ttys, c_nttys, c_driver)             # <<<<<<<<<<<<<<
 * 		if (c_ttys):
 * 			c_brlapi.free(c_ttys)
*/
        __pyx_v_retval = brlapi__enterTtyModeWithPath(__pyx_v_self->h, __pyx_v_c_ttys, __pyx_v_c_nttys, __pyx_v_c_driver);
      }

      /* "brlapi.pyx":592
 * 				driver = driver.encode('ASCII')
 * 			c_driver = driver
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__enterTtyModeWithPath(self.h, c_ttys, c_nttys, c_driver)
 * 		if (c_ttys):
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L10;
        }
        __pyx_L10:;
      }
  }

  /* "brlapi.pyx":594
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__enterTtyModeWithPath(self.h, c_ttys, c_nttys, c_driver)
 * 		if (c_ttys):             # <<<<<<<<<<<<<<
 * 			c_brlapi.free(c_ttys)
 * 		if retval == -1:
*/
  __pyx_t_1 = (__pyx_v_c_ttys != 0);
  if (__pyx_t_1) {

    /* "brlapi.pyx":595
 * 			retval = c_brlapi.brlapi__enterTtyModeWithPath(self.h, c_ttys, c_nttys, c_driver)
 * 		if (c_ttys):
 * 			c_brlapi.free(c_ttys)             # <<<<<<<<<<<<<<
 * 		if retval == -1:
 * 			raise OperationError()
*/
    free(__pyx_v_c_ttys);

    /* "brlapi.pyx":594
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__enterTtyModeWithPath(self.h, c_ttys, c_nttys, c_driver)
 * 		if (c_ttys):             # <<<<<<<<<<<<<<
 * 			c_brlapi.free(c_ttys)
 * 		if retval == -1:
*/
  }

  /* "brlapi.pyx":596
 * 		if (c_ttys):
 * 			c_brlapi.free(c_ttys)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  __pyx_t_1 = (__pyx_v_retval == -1L);
  if (unlikely(__pyx_t_1)) {

    /* "brlapi.pyx":597
 * 			c_brlapi.free(c_ttys)
 * 		if retval == -1:
 * 			raise OperationError()             # <<<<<<<<<<<<<<
 * 		else:
 * 			return retval
*/
    __pyx_t_7 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10);
      assert(__pyx_t_7);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
      __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 597, __pyx_L1_error)

    /* "brlapi.pyx":596
 * 		if (c_ttys):
 * 			c_brlapi.free(c_ttys)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  }

  /* "brlapi.pyx":599
 * 			raise OperationError()
 * 		else:
 * 			return retval             # <<<<<<<<<<<<<<
 * 
 * 	def leaveTtyMode(self):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_retval); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
  }

  /* "brlapi.pyx":565
 * 			return retval
 * 
 * 	def enterTtyModeWithPath(self, path = [], driver = None):             # <<<<<<<<<<<<<<
 * 		"""Ask for some tty, with some key mechanism
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("brlapi.Connection.enterTtyModeWithPath", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_driver);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":601
 * 			return retval
 * 
 * 	def leaveTtyMode(self):             # <<<<<<<<<<<<<<
 * 		"""Stop controlling the tty
 * 		See brlapi_leaveTtyMode(3)."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_11leaveTtyMode(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_10leaveTtyMode, "Connection.leaveTtyMode(self)\n\nStop controlling the tty\nSee brlapi_leaveTtyMode(3).");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_11leaveTtyMode = {"leaveTtyMode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_11leaveTtyMode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_10leaveTtyMode};
static PyObject *__pyx_pw_6brlapi_10Connection_11leaveTtyMode(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("leaveTtyMode (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("leaveTtyMode", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("leaveTtyMode", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_6brlapi_10Connection_10leaveTtyMode(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_6brlapi_10Connection_10leaveTtyMode(struct __pyx_obj_6brlapi_Connection *__pyx_v_self) {
  int __pyx_v_retval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("leaveTtyMode", 0);

  /* "brlapi.pyx":605
 * 		See brlapi_leaveTtyMode(3)."""
 * 		cdef int retval
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__leaveTtyMode(self.h)
 * 		if retval == -1:
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":606
 * 		cdef int retval
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__leaveTtyMode(self.h)             # <<<<<<<<<<<<<<
 * 		if retval == -1:
 * 			raise OperationError()
*/
        __pyx_v_retval = brlapi__leaveTtyMode(__pyx_v_self->h);
      }

      /* "brlapi.pyx":605
 * 		See brlapi_leaveTtyMode(3)."""
 * 		cdef int retval
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__leaveTtyMode(self.h)
 * 		if retval == -1:
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "brlapi.pyx":607
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__leaveTtyMode(self.h)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  __pyx_t_1 = (__pyx_v_retval == -1L);
  if (unlikely(__pyx_t_1)) {

    /* "brlapi.pyx":608
 * 			retval = c_brlapi.brlapi__leaveTtyMode(self.h)
 * 		if retval == -1:
 * 			raise OperationError()             # <<<<<<<<<<<<<<
 * 		else:
 * 			return retval
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 608, __pyx_L1_error)

    /* "brlapi.pyx":607
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__leaveTtyMode(self.h)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  }

  /* "brlapi.pyx":610
 * 			raise OperationError()
 * 		else:
 * 			return retval             # <<<<<<<<<<<<<<
 * 
 * 	def setFocus(self, tty):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_retval); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "brlapi.pyx":601
 * 			return retval
 * 
 * 	def leaveTtyMode(self):             # <<<<<<<<<<<<<<
 * 		"""Stop controlling the tty
 * 		See brlapi_leaveTtyMode(3)."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("brlapi.Connection.leaveTtyMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":612
 * 			return retval
 * 
 * 	def setFocus(self, tty):             # <<<<<<<<<<<<<<
 * 		"""Tell the current tty to brltty.
 * 		See brlapi_setFocus(3).
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_13setFocus(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_12setFocus, "Connection.setFocus(self, tty)\n\nTell the current tty to brltty.\nSee brlapi_setFocus(3).\nThis is intended for focus tellers, such as brltty, xbrlapi, screen, ... enterTtyMode() must have been called before hand to tell where this focus applies in the tty tree.");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_13setFocus = {"setFocus", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_13setFocus, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_12setFocus};
static PyObject *__pyx_pw_6brlapi_10Connection_13setFocus(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_tty = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setFocus (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_tty,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 612, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 612, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "setFocus", 0) < (0)) __PYX_ERR(0, 612, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("setFocus", 1, 1, 1, i); __PYX_ERR(0, 612, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 612, __pyx_L3_error)
    }
    __pyx_v_tty = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setFocus", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 612, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.Connection.setFocus", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_10Connection_12setFocus(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self), __pyx_v_tty);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_10Connection_12setFocus(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_tty) {
  int __pyx_v_retval;
  int __pyx_v_c_tty;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setFocus", 0);

  /* "brlapi.pyx":618
 * 		cdef int retval
 * 		cdef int c_tty
 * 		c_tty = tty             # <<<<<<<<<<<<<<
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__setFocus(self.h, c_tty)
*/
  __pyx_t_1 = __Pyx_PyLong_As_int(__pyx_v_tty); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 618, __pyx_L1_error)
  __pyx_v_c_tty = __pyx_t_1;

  /* "brlapi.pyx":619
 * 		cdef int c_tty
 * 		c_tty = tty
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__setFocus(self.h, c_tty)
 * 		if retval == -1:
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":620
 * 		c_tty = tty
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__setFocus(self.h, c_tty)             # <<<<<<<<<<<<<<
 * 		if retval == -1:
 * 			raise OperationError()
*/
        __pyx_v_retval = brlapi__setFocus(__pyx_v_self->h, __pyx_v_c_tty);
      }

      /* "brlapi.pyx":619
 * 		cdef int c_tty
 * 		c_tty = tty
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__setFocus(self.h, c_tty)
 * 		if retval == -1:
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "brlapi.pyx":621
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__setFocus(self.h, c_tty)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  __pyx_t_2 = (__pyx_v_retval == -1L);
  if (unlikely(__pyx_t_2)) {

    /* "brlapi.pyx":622
 * 			retval = c_brlapi.brlapi__setFocus(self.h, c_tty)
 * 		if retval == -1:
 * 			raise OperationError()             # <<<<<<<<<<<<<<
 * 		else:
 * 			return retval
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 622, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 622, __pyx_L1_error)

    /* "brlapi.pyx":621
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__setFocus(self.h, c_tty)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  }

  /* "brlapi.pyx":624
 * 			raise OperationError()
 * 		else:
 * 			return retval             # <<<<<<<<<<<<<<
 * 
 * 	# The writeArguments parameter must remain first (after self) in order
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_retval); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "brlapi.pyx":612
 * 			return retval
 * 
 * 	def setFocus(self, tty):             # <<<<<<<<<<<<<<
 * 		"""Tell the current tty to brltty.
 * 		See brlapi_setFocus(3).
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("brlapi.Connection.setFocus", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":631
 * 	# it once it's no longer being used. New code should supply attributes
 * 	# by specifying the remaining parameters, as needed, by name.
 * 	def write(self, WriteStruct writeArguments = None,             # <<<<<<<<<<<<<<
 * 			displayNumber = None,
 * 			regionBegin = None,
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_15write(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_14write, "Connection.write(self, WriteStruct writeArguments=None, displayNumber=None, regionBegin=None, regionSize=None, text=None, andMask=None, orMask=None, cursor=None, charset=None)\n\nUpdate a specific region of the braille display and apply and/or masks.\nSee brlapi_write(3).\n* s : gives information necessary for the update");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_15write = {"write", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_15write, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_14write};
static PyObject *__pyx_pw_6brlapi_10Connection_15write(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_writeArguments = 0;
  PyObject *__pyx_v_displayNumber = 0;
  PyObject *__pyx_v_regionBegin = 0;
  PyObject *__pyx_v_regionSize = 0;
  PyObject *__pyx_v_text = 0;
  PyObject *__pyx_v_andMask = 0;
  PyObject *__pyx_v_orMask = 0;
  PyObject *__pyx_v_cursor = 0;
  PyObject *__pyx_v_charset = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_writeArguments,&__pyx_mstate_global->__pyx_n_u_displayNumber,&__pyx_mstate_global->__pyx_n_u_regionBegin,&__pyx_mstate_global->__pyx_n_u_regionSize,&__pyx_mstate_global->__pyx_n_u_text,&__pyx_mstate_global->__pyx_n_u_andMask,&__pyx_mstate_global->__pyx_n_u_orMask,&__pyx_mstate_global->__pyx_n_u_cursor,&__pyx_mstate_global->__pyx_n_u_charset,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 631, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 631, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 631, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 631, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 631, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 631, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 631, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 631, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 631, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 631, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write", 0) < (0)) __PYX_ERR(0, 631, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_6brlapi_WriteStruct *)Py_None));

      /* "brlapi.pyx":632
 * 	# by specifying the remaining parameters, as needed, by name.
 * 	def write(self, WriteStruct writeArguments = None,
 * 			displayNumber = None,             # <<<<<<<<<<<<<<
 * 			regionBegin = None,
 * 			regionSize = None,
*/
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "brlapi.pyx":633
 * 	def write(self, WriteStruct writeArguments = None,
 * 			displayNumber = None,
 * 			regionBegin = None,             # <<<<<<<<<<<<<<
 * 			regionSize = None,
 * 			text = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "brlapi.pyx":634
 * 			displayNumber = None,
 * 			regionBegin = None,
 * 			regionSize = None,             # <<<<<<<<<<<<<<
 * 			text = None,
 * 			andMask = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "brlapi.pyx":635
 * 			regionBegin = None,
 * 			regionSize = None,
 * 			text = None,             # <<<<<<<<<<<<<<
 * 			andMask = None,
 * 			orMask = None,
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "brlapi.pyx":636
 * 			regionSize = None,
 * 			text = None,
 * 			andMask = None,             # <<<<<<<<<<<<<<
 * 			orMask = None,
 * 			cursor = None,
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "brlapi.pyx":637
 * 			text = None,
 * 			andMask = None,
 * 			orMask = None,             # <<<<<<<<<<<<<<
 * 			cursor = None,
 * 			charset = None):
*/
      if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "brlapi.pyx":638
 * 			andMask = None,
 * 			orMask = None,
 * 			cursor = None,             # <<<<<<<<<<<<<<
 * 			charset = None):
 * 		"""Update a specific region of the braille display and apply and/or masks.
*/
      if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "brlapi.pyx":639
 * 			orMask = None,
 * 			cursor = None,
 * 			charset = None):             # <<<<<<<<<<<<<<
 * 		"""Update a specific region of the braille display and apply and/or masks.
 * 		See brlapi_write(3).
*/
      if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 631, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 631, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 631, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 631, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 631, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 631, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 631, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 631, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 631, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "brlapi.pyx":631
 * 	# it once it's no longer being used. New code should supply attributes
 * 	# by specifying the remaining parameters, as needed, by name.
 * 	def write(self, WriteStruct writeArguments = None,             # <<<<<<<<<<<<<<
 * 			displayNumber = None,
 * 			regionBegin = None,
*/
      if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_6brlapi_WriteStruct *)Py_None));

      /* "brlapi.pyx":632
 * 	# by specifying the remaining parameters, as needed, by name.
 * 	def write(self, WriteStruct writeArguments = None,
 * 			displayNumber = None,             # <<<<<<<<<<<<<<
 * 			regionBegin = None,
 * 			regionSize = None,
*/
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "brlapi.pyx":633
 * 	def write(self, WriteStruct writeArguments = None,
 * 			displayNumber = None,
 * 			regionBegin = None,             # <<<<<<<<<<<<<<
 * 			regionSize = None,
 * 			text = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "brlapi.pyx":634
 * 			displayNumber = None,
 * 			regionBegin = None,
 * 			regionSize = None,             # <<<<<<<<<<<<<<
 * 			text = None,
 * 			andMask = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "brlapi.pyx":635
 * 			regionBegin = None,
 * 			regionSize = None,
 * 			text = None,             # <<<<<<<<<<<<<<
 * 			andMask = None,
 * 			orMask = None,
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "brlapi.pyx":636
 * 			regionSize = None,
 * 			text = None,
 * 			andMask = None,             # <<<<<<<<<<<<<<
 * 			orMask = None,
 * 			cursor = None,
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "brlapi.pyx":637
 * 			text = None,
 * 			andMask = None,
 * 			orMask = None,             # <<<<<<<<<<<<<<
 * 			cursor = None,
 * 			charset = None):
*/
      if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "brlapi.pyx":638
 * 			andMask = None,
 * 			orMask = None,
 * 			cursor = None,             # <<<<<<<<<<<<<<
 * 			charset = None):
 * 		"""Update a specific region of the braille display and apply and/or masks.
*/
      if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "brlapi.pyx":639
 * 			orMask = None,
 * 			cursor = None,
 * 			charset = None):             # <<<<<<<<<<<<<<
 * 		"""Update a specific region of the braille display and apply and/or masks.
 * 		See brlapi_write(3).
*/
      if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_writeArguments = ((struct __pyx_obj_6brlapi_WriteStruct *)values[0]);
    __pyx_v_displayNumber = values[1];
    __pyx_v_regionBegin = values[2];
    __pyx_v_regionSize = values[3];
    __pyx_v_text = values[4];
    __pyx_v_andMask = values[5];
    __pyx_v_orMask = values[6];
    __pyx_v_cursor = values[7];
    __pyx_v_charset = values[8];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("write", 0, 0, 9, __pyx_nargs); __PYX_ERR(0, 631, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.Connection.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_writeArguments), __pyx_mstate_global->__pyx_ptype_6brlapi_WriteStruct, 1, "writeArguments", 0))) __PYX_ERR(0, 631, __pyx_L1_error)
  __pyx_r = __pyx_pf_6brlapi_10Connection_14write(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self), __pyx_v_writeArguments, __pyx_v_displayNumber, __pyx_v_regionBegin, __pyx_v_regionSize, __pyx_v_text, __pyx_v_andMask, __pyx_v_orMask, __pyx_v_cursor, __pyx_v_charset);

  /* "brlapi.pyx":631
 * 	# it once it's no longer being used. New code should supply attributes
 * 	# by specifying the remaining parameters, as needed, by name.
 * 	def write(self, WriteStruct writeArguments = None,             # <<<<<<<<<<<<<<
 * 			displayNumber = None,
 * 			regionBegin = None,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_10Connection_14write(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_writeArguments, PyObject *__pyx_v_displayNumber, PyObject *__pyx_v_regionBegin, PyObject *__pyx_v_regionSize, PyObject *__pyx_v_text, PyObject *__pyx_v_andMask, PyObject *__pyx_v_orMask, PyObject *__pyx_v_cursor, PyObject *__pyx_v_charset) {
  int __pyx_v_retval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("write", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_writeArguments);

  /* "brlapi.pyx":644
 * 		* s : gives information necessary for the update"""
 * 		cdef int retval
 * 		if not writeArguments:             # <<<<<<<<<<<<<<
 * 			writeArguments = WriteStruct()
 * 		if displayNumber != None:
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_writeArguments)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 644, __pyx_L1_error)
  __pyx_t_2 = (!__pyx_t_1);
  if (__pyx_t_2) {

    /* "brlapi.pyx":645
 * 		cdef int retval
 * 		if not writeArguments:
 * 			writeArguments = WriteStruct()             # <<<<<<<<<<<<<<
 * 		if displayNumber != None:
 * 			writeArguments.displayNumber = displayNumber
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6brlapi_WriteStruct, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 645, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_3);
    }
    __Pyx_DECREF_SET(__pyx_v_writeArguments, ((struct __pyx_obj_6brlapi_WriteStruct *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "brlapi.pyx":644
 * 		* s : gives information necessary for the update"""
 * 		cdef int retval
 * 		if not writeArguments:             # <<<<<<<<<<<<<<
 * 			writeArguments = WriteStruct()
 * 		if displayNumber != None:
*/
  }

  /* "brlapi.pyx":646
 * 		if not writeArguments:
 * 			writeArguments = WriteStruct()
 * 		if displayNumber != None:             # <<<<<<<<<<<<<<
 * 			writeArguments.displayNumber = displayNumber
 * 		if regionBegin != None:
*/
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_displayNumber, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 646, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 646, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "brlapi.pyx":647
 * 			writeArguments = WriteStruct()
 * 		if displayNumber != None:
 * 			writeArguments.displayNumber = displayNumber             # <<<<<<<<<<<<<<
 * 		if regionBegin != None:
 * 			writeArguments.regionBegin = regionBegin
*/
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_writeArguments), __pyx_mstate_global->__pyx_n_u_displayNumber, __pyx_v_displayNumber) < (0)) __PYX_ERR(0, 647, __pyx_L1_error)

    /* "brlapi.pyx":646
 * 		if not writeArguments:
 * 			writeArguments = WriteStruct()
 * 		if displayNumber != None:             # <<<<<<<<<<<<<<
 * 			writeArguments.displayNumber = displayNumber
 * 		if regionBegin != None:
*/
  }

  /* "brlapi.pyx":648
 * 		if displayNumber != None:
 * 			writeArguments.displayNumber = displayNumber
 * 		if regionBegin != None:             # <<<<<<<<<<<<<<
 * 			writeArguments.regionBegin = regionBegin
 * 		if regionSize != None:
*/
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_regionBegin, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 648, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 648, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "brlapi.pyx":649
 * 			writeArguments.displayNumber = displayNumber
 * 		if regionBegin != None:
 * 			writeArguments.regionBegin = regionBegin             # <<<<<<<<<<<<<<
 * 		if regionSize != None:
 * 			writeArguments.regionSize = regionSize
*/
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_writeArguments), __pyx_mstate_global->__pyx_n_u_regionBegin, __pyx_v_regionBegin) < (0)) __PYX_ERR(0, 649, __pyx_L1_error)

    /* "brlapi.pyx":648
 * 		if displayNumber != None:
 * 			writeArguments.displayNumber = displayNumber
 * 		if regionBegin != None:             # <<<<<<<<<<<<<<
 * 			writeArguments.regionBegin = regionBegin
 * 		if regionSize != None:
*/
  }

  /* "brlapi.pyx":650
 * 		if regionBegin != None:
 * 			writeArguments.regionBegin = regionBegin
 * 		if regionSize != None:             # <<<<<<<<<<<<<<
 * 			writeArguments.regionSize = regionSize
 * 		if text:
*/
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_regionSize, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 650, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "brlapi.pyx":651
 * 			writeArguments.regionBegin = regionBegin
 * 		if regionSize != None:
 * 			writeArguments.regionSize = regionSize             # <<<<<<<<<<<<<<
 * 		if text:
 * 			writeArguments.text = text
*/
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_writeArguments), __pyx_mstate_global->__pyx_n_u_regionSize, __pyx_v_regionSize) < (0)) __PYX_ERR(0, 651, __pyx_L1_error)

    /* "brlapi.pyx":650
 * 		if regionBegin != None:
 * 			writeArguments.regionBegin = regionBegin
 * 		if regionSize != None:             # <<<<<<<<<<<<<<
 * 			writeArguments.regionSize = regionSize
 * 		if text:
*/
  }

  /* "brlapi.pyx":652
 * 		if regionSize != None:
 * 			writeArguments.regionSize = regionSize
 * 		if text:             # <<<<<<<<<<<<<<
 * 			writeArguments.text = text
 * 		if andMask:
*/
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_text); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 652, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "brlapi.pyx":653
 * 			writeArguments.regionSize = regionSize
 * 		if text:
 * 			writeArguments.text = text             # <<<<<<<<<<<<<<
 * 		if andMask:
 * 			writeArguments.attrAnd = andMask
*/
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_writeArguments), __pyx_mstate_global->__pyx_n_u_text, __pyx_v_text) < (0)) __PYX_ERR(0, 653, __pyx_L1_error)

    /* "brlapi.pyx":652
 * 		if regionSize != None:
 * 			writeArguments.regionSize = regionSize
 * 		if text:             # <<<<<<<<<<<<<<
 * 			writeArguments.text = text
 * 		if andMask:
*/
  }

  /* "brlapi.pyx":654
 * 		if text:
 * 			writeArguments.text = text
 * 		if andMask:             # <<<<<<<<<<<<<<
 * 			writeArguments.attrAnd = andMask
 * 		if orMask:
*/
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_andMask); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 654, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "brlapi.pyx":655
 * 			writeArguments.text = text
 * 		if andMask:
 * 			writeArguments.attrAnd = andMask             # <<<<<<<<<<<<<<
 * 		if orMask:
 * 			writeArguments.attrOr = orMask
*/
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_writeArguments), __pyx_mstate_global->__pyx_n_u_attrAnd, __pyx_v_andMask) < (0)) __PYX_ERR(0, 655, __pyx_L1_error)

    /* "brlapi.pyx":654
 * 		if text:
 * 			writeArguments.text = text
 * 		if andMask:             # <<<<<<<<<<<<<<
 * 			writeArguments.attrAnd = andMask
 * 		if orMask:
*/
  }

  /* "brlapi.pyx":656
 * 		if andMask:
 * 			writeArguments.attrAnd = andMask
 * 		if orMask:             # <<<<<<<<<<<<<<
 * 			writeArguments.attrOr = orMask
 * 		if cursor != None:
*/
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_orMask); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 656, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "brlapi.pyx":657
 * 			writeArguments.attrAnd = andMask
 * 		if orMask:
 * 			writeArguments.attrOr = orMask             # <<<<<<<<<<<<<<
 * 		if cursor != None:
 * 			writeArguments.cursor = cursor
*/
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_writeArguments), __pyx_mstate_global->__pyx_n_u_attrOr, __pyx_v_orMask) < (0)) __PYX_ERR(0, 657, __pyx_L1_error)

    /* "brlapi.pyx":656
 * 		if andMask:
 * 			writeArguments.attrAnd = andMask
 * 		if orMask:             # <<<<<<<<<<<<<<
 * 			writeArguments.attrOr = orMask
 * 		if cursor != None:
*/
  }

  /* "brlapi.pyx":658
 * 		if orMask:
 * 			writeArguments.attrOr = orMask
 * 		if cursor != None:             # <<<<<<<<<<<<<<
 * 			writeArguments.cursor = cursor
 * 		if charset:
*/
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_cursor, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 658, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 658, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "brlapi.pyx":659
 * 			writeArguments.attrOr = orMask
 * 		if cursor != None:
 * 			writeArguments.cursor = cursor             # <<<<<<<<<<<<<<
 * 		if charset:
 * 			writeArguments.charset = charset
*/
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_writeArguments), __pyx_mstate_global->__pyx_n_u_cursor, __pyx_v_cursor) < (0)) __PYX_ERR(0, 659, __pyx_L1_error)

    /* "brlapi.pyx":658
 * 		if orMask:
 * 			writeArguments.attrOr = orMask
 * 		if cursor != None:             # <<<<<<<<<<<<<<
 * 			writeArguments.cursor = cursor
 * 		if charset:
*/
  }

  /* "brlapi.pyx":660
 * 		if cursor != None:
 * 			writeArguments.cursor = cursor
 * 		if charset:             # <<<<<<<<<<<<<<
 * 			writeArguments.charset = charset
 * 		with nogil:
*/
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_charset); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 660, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "brlapi.pyx":661
 * 			writeArguments.cursor = cursor
 * 		if charset:
 * 			writeArguments.charset = charset             # <<<<<<<<<<<<<<
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__write(self.h, &writeArguments.props)
*/
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_writeArguments), __pyx_mstate_global->__pyx_n_u_charset, __pyx_v_charset) < (0)) __PYX_ERR(0, 661, __pyx_L1_error)

    /* "brlapi.pyx":660
 * 		if cursor != None:
 * 			writeArguments.cursor = cursor
 * 		if charset:             # <<<<<<<<<<<<<<
 * 			writeArguments.charset = charset
 * 		with nogil:
*/
  }

  /* "brlapi.pyx":662
 * 		if charset:
 * 			writeArguments.charset = charset
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__write(self.h, &writeArguments.props)
 * 		if retval == -1:
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":663
 * 			writeArguments.charset = charset
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__write(self.h, &writeArguments.props)             # <<<<<<<<<<<<<<
 * 		if retval == -1:
 * 			raise OperationError()
*/
        __pyx_v_retval = brlapi__write(__pyx_v_self->h, (&__pyx_v_writeArguments->props));
      }

      /* "brlapi.pyx":662
 * 		if charset:
 * 			writeArguments.charset = charset
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__write(self.h, &writeArguments.props)
 * 		if retval == -1:
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L14;
        }
        __pyx_L14:;
      }
  }

  /* "brlapi.pyx":664
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__write(self.h, &writeArguments.props)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  __pyx_t_2 = (__pyx_v_retval == -1L);
  if (unlikely(__pyx_t_2)) {

    /* "brlapi.pyx":665
 * 			retval = c_brlapi.brlapi__write(self.h, &writeArguments.props)
 * 		if retval == -1:
 * 			raise OperationError()             # <<<<<<<<<<<<<<
 * 		else:
 * 			return retval
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 665, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 665, __pyx_L1_error)

    /* "brlapi.pyx":664
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__write(self.h, &writeArguments.props)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  }

  /* "brlapi.pyx":667
 * 			raise OperationError()
 * 		else:
 * 			return retval             # <<<<<<<<<<<<<<
 * 
 * 	def writeDots(self, dots):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_retval); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "brlapi.pyx":631
 * 	# it once it's no longer being used. New code should supply attributes
 * 	# by specifying the remaining parameters, as needed, by name.
 * 	def write(self, WriteStruct writeArguments = None,             # <<<<<<<<<<<<<<
 * 			displayNumber = None,
 * 			regionBegin = None,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("brlapi.Connection.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_writeArguments);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":669
 * 			return retval
 * 
 * 	def writeDots(self, dots):             # <<<<<<<<<<<<<<
 * 		"""Write the given dots array to the display.
 * 		See brlapi_writeDots(3).
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_17writeDots(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_16writeDots, "Connection.writeDots(self, dots)\n\nWrite the given dots array to the display.\nSee brlapi_writeDots(3).\n* dots : points on an array of dot information, one per character. Its size must hence be the same as what displaysize provides.");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_17writeDots = {"writeDots", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_17writeDots, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_16writeDots};
static PyObject *__pyx_pw_6brlapi_10Connection_17writeDots(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_dots = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("writeDots (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_dots,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 669, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 669, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "writeDots", 0) < (0)) __PYX_ERR(0, 669, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("writeDots", 1, 1, 1, i); __PYX_ERR(0, 669, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 669, __pyx_L3_error)
    }
    __pyx_v_dots = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("writeDots", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 669, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.Connection.writeDots", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_10Connection_16writeDots(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self), __pyx_v_dots);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_10Connection_16writeDots(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_dots) {
  int __pyx_v_retval;
  char *__pyx_v_c_dots;
  unsigned char *__pyx_v_c_udots;
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_v_y = NULL;
  PyObject *__pyx_v_dispSize = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_t_6;
  size_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  char *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("writeDots", 0);
  __Pyx_INCREF(__pyx_v_dots);

  /* "brlapi.pyx":676
 * 		cdef char *c_dots
 * 		cdef unsigned char *c_udots
 * 		(x, y) = self.displaySize             # <<<<<<<<<<<<<<
 * 		dispSize = x * y
 * 		if (type(dots) == unicode):
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_displaySize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 676, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
      __Pyx_INCREF(__pyx_t_3);
    } else {
      __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 676, __pyx_L1_error)
      __Pyx_XGOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 676, __pyx_L1_error)
      __Pyx_XGOTREF(__pyx_t_3);
    }
    #else
    __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 676, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 676, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 676, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4);
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < (0)) __PYX_ERR(0, 676, __pyx_L1_error)
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 676, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_x = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_y = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "brlapi.pyx":677
 * 		cdef unsigned char *c_udots
 * 		(x, y) = self.displaySize
 * 		dispSize = x * y             # <<<<<<<<<<<<<<
 * 		if (type(dots) == unicode):
 * 			dots = dots.encode('latin1')
*/
  __pyx_t_1 = PyNumber_Multiply(__pyx_v_x, __pyx_v_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_dispSize = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "brlapi.pyx":678
 * 		(x, y) = self.displaySize
 * 		dispSize = x * y
 * 		if (type(dots) == unicode):             # <<<<<<<<<<<<<<
 * 			dots = dots.encode('latin1')
 * 		if (len(dots) < dispSize):
*/
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_dots)), ((PyObject *)(&PyUnicode_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {

    /* "brlapi.pyx":679
 * 		dispSize = x * y
 * 		if (type(dots) == unicode):
 * 			dots = dots.encode('latin1')             # <<<<<<<<<<<<<<
 * 		if (len(dots) < dispSize):
 * 			dots = dots + b"".center(dispSize - len(dots), b'\0')
*/
    __pyx_t_3 = __pyx_v_dots;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_latin1};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_DECREF_SET(__pyx_v_dots, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "brlapi.pyx":678
 * 		(x, y) = self.displaySize
 * 		dispSize = x * y
 * 		if (type(dots) == unicode):             # <<<<<<<<<<<<<<
 * 			dots = dots.encode('latin1')
 * 		if (len(dots) < dispSize):
*/
  }

  /* "brlapi.pyx":680
 * 		if (type(dots) == unicode):
 * 			dots = dots.encode('latin1')
 * 		if (len(dots) < dispSize):             # <<<<<<<<<<<<<<
 * 			dots = dots + b"".center(dispSize - len(dots), b'\0')
 * 		c_dots = dots
*/
  __pyx_t_8 = PyObject_Length(__pyx_v_dots); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 680, __pyx_L1_error)
  __pyx_t_1 = PyLong_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_v_dispSize, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_6) {

    /* "brlapi.pyx":681
 * 			dots = dots.encode('latin1')
 * 		if (len(dots) < dispSize):
 * 			dots = dots + b"".center(dispSize - len(dots), b'\0')             # <<<<<<<<<<<<<<
 * 		c_dots = dots
 * 		c_udots = <unsigned char *>c_dots
*/
    __pyx_t_1 = __pyx_mstate_global->__pyx_kp_b_;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_8 = PyObject_Length(__pyx_v_dots); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 681, __pyx_L1_error)
    __pyx_t_2 = PyLong_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyNumber_Subtract(__pyx_v_dispSize, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_4, __pyx_mstate_global->__pyx_kp_b__6};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_center, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_t_4 = PyNumber_Add(__pyx_v_dots, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_dots, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "brlapi.pyx":680
 * 		if (type(dots) == unicode):
 * 			dots = dots.encode('latin1')
 * 		if (len(dots) < dispSize):             # <<<<<<<<<<<<<<
 * 			dots = dots + b"".center(dispSize - len(dots), b'\0')
 * 		c_dots = dots
*/
  }

  /* "brlapi.pyx":682
 * 		if (len(dots) < dispSize):
 * 			dots = dots + b"".center(dispSize - len(dots), b'\0')
 * 		c_dots = dots             # <<<<<<<<<<<<<<
 * 		c_udots = <unsigned char *>c_dots
 * 		with nogil:
*/
  __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_dots); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 682, __pyx_L1_error)
  __pyx_v_c_dots = __pyx_t_9;

  /* "brlapi.pyx":683
 * 			dots = dots + b"".center(dispSize - len(dots), b'\0')
 * 		c_dots = dots
 * 		c_udots = <unsigned char *>c_dots             # <<<<<<<<<<<<<<
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__writeDots(self.h, c_udots)
*/
  __pyx_v_c_udots = ((unsigned char *)__pyx_v_c_dots);

  /* "brlapi.pyx":684
 * 		c_dots = dots
 * 		c_udots = <unsigned char *>c_dots
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__writeDots(self.h, c_udots)
 * 		if retval == -1:
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":685
 * 		c_udots = <unsigned char *>c_dots
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__writeDots(self.h, c_udots)             # <<<<<<<<<<<<<<
 * 		if retval == -1:
 * 			raise OperationError()
*/
        __pyx_v_retval = brlapi__writeDots(__pyx_v_self->h, __pyx_v_c_udots);
      }

      /* "brlapi.pyx":684
 * 		c_dots = dots
 * 		c_udots = <unsigned char *>c_dots
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__writeDots(self.h, c_udots)
 * 		if retval == -1:
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L9;
        }
        __pyx_L9:;
      }
  }

  /* "brlapi.pyx":686
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__writeDots(self.h, c_udots)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  __pyx_t_6 = (__pyx_v_retval == -1L);
  if (unlikely(__pyx_t_6)) {

    /* "brlapi.pyx":687
 * 			retval = c_brlapi.brlapi__writeDots(self.h, c_udots)
 * 		if retval == -1:
 * 			raise OperationError()             # <<<<<<<<<<<<<<
 * 		else:
 * 			return retval
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 687, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 687, __pyx_L1_error)

    /* "brlapi.pyx":686
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__writeDots(self.h, c_udots)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  }

  /* "brlapi.pyx":689
 * 			raise OperationError()
 * 		else:
 * 			return retval             # <<<<<<<<<<<<<<
 * 
 * 	def writeText(self, text, cursor = CURSOR_OFF):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_retval); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 689, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "brlapi.pyx":669
 * 			return retval
 * 
 * 	def writeDots(self, dots):             # <<<<<<<<<<<<<<
 * 		"""Write the given dots array to the display.
 * 		See brlapi_writeDots(3).
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("brlapi.Connection.writeDots", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_y);
  __Pyx_XDECREF(__pyx_v_dispSize);
  __Pyx_XDECREF(__pyx_v_dots);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":691
 * 			return retval
 * 
 * 	def writeText(self, text, cursor = CURSOR_OFF):             # <<<<<<<<<<<<<<
 * 		"""Write the given \0-terminated string to the braille display.
 * 		See brlapi_writeText(3).
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_19writeText(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_18writeText, "Connection.writeText(self, text, cursor=CURSOR_OFF)\n\nWrite the given \000-terminated string to the braille display.\nSee brlapi_writeText(3).\nIf the string is too long, it is cut. If it's too short, spaces are appended. The current LC_CTYPE locale is considered, unless it is left as default \"C\", in which case the charset is assumed to be 8bits, and the same as the server's.\n\n* cursor : gives the cursor position; if equal to CURSOR_OFF, no cursor is shown at all; if cursor == CURSOR_LEAVE, the cursor is left where it is\n* text : points to the string to be displayed");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_19writeText = {"writeText", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_19writeText, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_18writeText};
static PyObject *__pyx_pw_6brlapi_10Connection_19writeText(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_text = 0;
  PyObject *__pyx_v_cursor = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("writeText (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_text,&__pyx_mstate_global->__pyx_n_u_cursor,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 691, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 691, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 691, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "writeText", 0) < (0)) __PYX_ERR(0, 691, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__7);
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("writeText", 0, 1, 2, i); __PYX_ERR(0, 691, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 691, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 691, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__7);
    }
    __pyx_v_text = values[0];
    __pyx_v_cursor = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("writeText", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 691, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.Connection.writeText", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_10Connection_18writeText(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self), __pyx_v_text, __pyx_v_cursor);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_10Connection_18writeText(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_text, PyObject *__pyx_v_cursor) {
  struct __pyx_obj_6brlapi_WriteStruct *__pyx_v_w = NULL;
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_v_y = NULL;
  PyObject *__pyx_v_dispSize = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("writeText", 0);
  __Pyx_INCREF(__pyx_v_text);

  /* "brlapi.pyx":698
 * 		* cursor : gives the cursor position; if equal to CURSOR_OFF, no cursor is shown at all; if cursor == CURSOR_LEAVE, the cursor is left where it is
 * 		* text : points to the string to be displayed"""
 * 		w = WriteStruct()             # <<<<<<<<<<<<<<
 * 		w.cursor = cursor
 * 		if text is not None:
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6brlapi_WriteStruct, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_w = ((struct __pyx_obj_6brlapi_WriteStruct *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "brlapi.pyx":699
 * 		* text : points to the string to be displayed"""
 * 		w = WriteStruct()
 * 		w.cursor = cursor             # <<<<<<<<<<<<<<
 * 		if text is not None:
 * 			(x, y) = self.displaySize
*/
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_w), __pyx_mstate_global->__pyx_n_u_cursor, __pyx_v_cursor) < (0)) __PYX_ERR(0, 699, __pyx_L1_error)

  /* "brlapi.pyx":700
 * 		w = WriteStruct()
 * 		w.cursor = cursor
 * 		if text is not None:             # <<<<<<<<<<<<<<
 * 			(x, y) = self.displaySize
 * 			dispSize = x * y
*/
  __pyx_t_4 = (__pyx_v_text != Py_None);
  if (__pyx_t_4) {

    /* "brlapi.pyx":701
 * 		w.cursor = cursor
 * 		if text is not None:
 * 			(x, y) = self.displaySize             # <<<<<<<<<<<<<<
 * 			dispSize = x * y
 * 			if (len(text) < dispSize):
*/
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_displaySize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 701, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
        __Pyx_INCREF(__pyx_t_5);
      } else {
        __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_2);
        __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 701, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_5);
      }
      #else
      __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 701, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 701, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < (0)) __PYX_ERR(0, 701, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L5_unpacking_done;
      __pyx_L4_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 701, __pyx_L1_error)
      __pyx_L5_unpacking_done:;
    }
    __pyx_v_x = __pyx_t_2;
    __pyx_t_2 = 0;
    __pyx_v_y = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "brlapi.pyx":702
 * 		if text is not None:
 * 			(x, y) = self.displaySize
 * 			dispSize = x * y             # <<<<<<<<<<<<<<
 * 			if (len(text) < dispSize):
 * 				text = text + "".center(dispSize - len(text))
*/
    __pyx_t_1 = PyNumber_Multiply(__pyx_v_x, __pyx_v_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_dispSize = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "brlapi.pyx":703
 * 			(x, y) = self.displaySize
 * 			dispSize = x * y
 * 			if (len(text) < dispSize):             # <<<<<<<<<<<<<<
 * 				text = text + "".center(dispSize - len(text))
 * 			w.regionBegin = 1
*/
    __pyx_t_8 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 703, __pyx_L1_error)
    __pyx_t_1 = PyLong_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_v_dispSize, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 703, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 703, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_4) {

      /* "brlapi.pyx":704
 * 			dispSize = x * y
 * 			if (len(text) < dispSize):
 * 				text = text + "".center(dispSize - len(text))             # <<<<<<<<<<<<<<
 * 			w.regionBegin = 1
 * 			w.regionSize = dispSize
*/
      __pyx_t_1 = __pyx_mstate_global->__pyx_kp_u_;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_8 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 704, __pyx_L1_error)
      __pyx_t_2 = PyLong_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 704, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = PyNumber_Subtract(__pyx_v_dispSize, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 704, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_6};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_center, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 704, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_6 = PyNumber_Add(__pyx_v_text, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 704, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "brlapi.pyx":703
 * 			(x, y) = self.displaySize
 * 			dispSize = x * y
 * 			if (len(text) < dispSize):             # <<<<<<<<<<<<<<
 * 				text = text + "".center(dispSize - len(text))
 * 			w.regionBegin = 1
*/
    }

    /* "brlapi.pyx":705
 * 			if (len(text) < dispSize):
 * 				text = text + "".center(dispSize - len(text))
 * 			w.regionBegin = 1             # <<<<<<<<<<<<<<
 * 			w.regionSize = dispSize
 * 			w.text = text[0 : dispSize]
*/
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_w), __pyx_mstate_global->__pyx_n_u_regionBegin, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 705, __pyx_L1_error)

    /* "brlapi.pyx":706
 * 				text = text + "".center(dispSize - len(text))
 * 			w.regionBegin = 1
 * 			w.regionSize = dispSize             # <<<<<<<<<<<<<<
 * 			w.text = text[0 : dispSize]
 * 		return self.write(w)
*/
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_w), __pyx_mstate_global->__pyx_n_u_regionSize, __pyx_v_dispSize) < (0)) __PYX_ERR(0, 706, __pyx_L1_error)

    /* "brlapi.pyx":707
 * 			w.regionBegin = 1
 * 			w.regionSize = dispSize
 * 			w.text = text[0 : dispSize]             # <<<<<<<<<<<<<<
 * 		return self.write(w)
 * 
*/
    __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, NULL, &__pyx_v_dispSize, NULL, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_w), __pyx_mstate_global->__pyx_n_u_text, __pyx_t_6) < (0)) __PYX_ERR(0, 707, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "brlapi.pyx":700
 * 		w = WriteStruct()
 * 		w.cursor = cursor
 * 		if text is not None:             # <<<<<<<<<<<<<<
 * 			(x, y) = self.displaySize
 * 			dispSize = x * y
*/
  }

  /* "brlapi.pyx":708
 * 			w.regionSize = dispSize
 * 			w.text = text[0 : dispSize]
 * 		return self.write(w)             # <<<<<<<<<<<<<<
 * 
 * 	def readKey(self, wait = True):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, ((PyObject *)__pyx_v_w)};
    __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 708, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "brlapi.pyx":691
 * 			return retval
 * 
 * 	def writeText(self, text, cursor = CURSOR_OFF):             # <<<<<<<<<<<<<<
 * 		"""Write the given \0-terminated string to the braille display.
 * 		See brlapi_writeText(3).
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("brlapi.Connection.writeText", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_w);
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_y);
  __Pyx_XDECREF(__pyx_v_dispSize);
  __Pyx_XDECREF(__pyx_v_text);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":710
 * 		return self.write(w)
 * 
 * 	def readKey(self, wait = True):             # <<<<<<<<<<<<<<
 * 		"""Read a key from the braille keyboard.
 * 		See brlapi_readKey(3).
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_21readKey(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_20readKey, "Connection.readKey(self, wait=True)\n\nRead a key from the braille keyboard.\nSee brlapi_readKey(3).\n\nThis function returns one key press's code.\n\nIf None or \"\" was given to enterTtyPath(), a brltty command is returned. It is hence pretty driver-independent, and should be used by default when no other option is possible.\n\nBy default, all commands but those which restart drivers and switch virtual are returned to the application and not to brltty. If the application doesn't want to see some command events, it should call either ignoreKeys() or ignoreKeyRanges().\n\nIf some driver name was given to enterTtyMode(), a raw keycode is returned, as specified by the terminal driver. It generally corresponds to the very code that the terminal tells to the driver. This should only be used by applications which are dedicated to a particular braille terminal. Hence, checking the terminal type thanks to a call to drivername before getting tty control is a pretty good idea.\n\nBy default, all the keypresses will be passed to the client, none will go through brltty, so the application will have to handle console switching itself for instance.");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_21readKey = {"readKey", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_21readKey, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_20readKey};
static PyObject *__pyx_pw_6brlapi_10Connection_21readKey(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_wait = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("readKey (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_wait,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 710, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 710, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "readKey", 0) < (0)) __PYX_ERR(0, 710, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_True));
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 710, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_True));
    }
    __pyx_v_wait = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("readKey", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 710, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.Connection.readKey", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_10Connection_20readKey(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self), __pyx_v_wait);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_10Connection_20readKey(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_wait) {
  brlapi_keyCode_t __pyx_v_code;
  int __pyx_v_retval;
  int __pyx_v_c_wait;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("readKey", 0);

  /* "brlapi.pyx":726
 * 		cdef int retval
 * 		cdef int c_wait
 * 		c_wait = wait             # <<<<<<<<<<<<<<
 * 
 * 		while True:
*/
  __pyx_t_1 = __Pyx_PyLong_As_int(__pyx_v_wait); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 726, __pyx_L1_error)
  __pyx_v_c_wait = __pyx_t_1;

  /* "brlapi.pyx":728
 * 		c_wait = wait
 * 
 * 		while True:             # <<<<<<<<<<<<<<
 * 			with nogil:
 * 				retval = c_brlapi.brlapi__readKey(self.h, c_wait, <c_brlapi.brlapi_keyCode_t*>&code)
*/
  while (1) {

    /* "brlapi.pyx":729
 * 
 * 		while True:
 * 			with nogil:             # <<<<<<<<<<<<<<
 * 				retval = c_brlapi.brlapi__readKey(self.h, c_wait, <c_brlapi.brlapi_keyCode_t*>&code)
 * 			if retval == -1 and not (c_brlapi.brlapi_error.brlerrno == ERROR_LIBCERR and c_brlapi.brlapi_error.libcerrno == errno.EINTR):
*/
    {
        PyThreadState * _save;
        _save = PyEval_SaveThread();
        __Pyx_FastGIL_Remember();
        /*try:*/ {

          /* "brlapi.pyx":730
 * 		while True:
 * 			with nogil:
 * 				retval = c_brlapi.brlapi__readKey(self.h, c_wait, <c_brlapi.brlapi_keyCode_t*>&code)             # <<<<<<<<<<<<<<
 * 			if retval == -1 and not (c_brlapi.brlapi_error.brlerrno == ERROR_LIBCERR and c_brlapi.brlapi_error.libcerrno == errno.EINTR):
 * 				raise OperationError()
*/
          __pyx_v_retval = brlapi__readKey(__pyx_v_self->h, __pyx_v_c_wait, ((brlapi_keyCode_t *)(&__pyx_v_code)));
        }

        /* "brlapi.pyx":729
 * 
 * 		while True:
 * 			with nogil:             # <<<<<<<<<<<<<<
 * 				retval = c_brlapi.brlapi__readKey(self.h, c_wait, <c_brlapi.brlapi_keyCode_t*>&code)
 * 			if retval == -1 and not (c_brlapi.brlapi_error.brlerrno == ERROR_LIBCERR and c_brlapi.brlapi_error.libcerrno == errno.EINTR):
*/
        /*finally:*/ {
          /*normal exit:*/{
            __Pyx_FastGIL_Forget();
            PyEval_RestoreThread(_save);
            goto __pyx_L9;
          }
          __pyx_L9:;
        }
    }

    /* "brlapi.pyx":731
 * 			with nogil:
 * 				retval = c_brlapi.brlapi__readKey(self.h, c_wait, <c_brlapi.brlapi_keyCode_t*>&code)
 * 			if retval == -1 and not (c_brlapi.brlapi_error.brlerrno == ERROR_LIBCERR and c_brlapi.brlapi_error.libcerrno == errno.EINTR):             # <<<<<<<<<<<<<<
 * 				raise OperationError()
 * 			elif retval <= 0:
*/
    __pyx_t_3 = (__pyx_v_retval == -1L);
    if (__pyx_t_3) {
    } else {
      __pyx_t_2 = __pyx_t_3;
      goto __pyx_L11_bool_binop_done;
    }
    __pyx_t_4 = __Pyx_PyLong_From_int(brlapi_error.brlerrno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_LIBCERR); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 731, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 731, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_7) {
    } else {
      __pyx_t_3 = __pyx_t_7;
      goto __pyx_L13_bool_binop_done;
    }
    __pyx_t_6 = __Pyx_PyLong_From_int(brlapi_error.libcerrno); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_errno); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_EINTR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 731, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 731, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_3 = __pyx_t_7;
    __pyx_L13_bool_binop_done:;
    __pyx_t_7 = (!__pyx_t_3);
    __pyx_t_2 = __pyx_t_7;
    __pyx_L11_bool_binop_done:;
    if (unlikely(__pyx_t_2)) {

      /* "brlapi.pyx":732
 * 				retval = c_brlapi.brlapi__readKey(self.h, c_wait, <c_brlapi.brlapi_keyCode_t*>&code)
 * 			if retval == -1 and not (c_brlapi.brlapi_error.brlerrno == ERROR_LIBCERR and c_brlapi.brlapi_error.libcerrno == errno.EINTR):
 * 				raise OperationError()             # <<<<<<<<<<<<<<
 * 			elif retval <= 0:
 * 				if not wait:
*/
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 732, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_8 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 732, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __PYX_ERR(0, 732, __pyx_L1_error)

      /* "brlapi.pyx":731
 * 			with nogil:
 * 				retval = c_brlapi.brlapi__readKey(self.h, c_wait, <c_brlapi.brlapi_keyCode_t*>&code)
 * 			if retval == -1 and not (c_brlapi.brlapi_error.brlerrno == ERROR_LIBCERR and c_brlapi.brlapi_error.libcerrno == errno.EINTR):             # <<<<<<<<<<<<<<
 * 				raise OperationError()
 * 			elif retval <= 0:
*/
    }

    /* "brlapi.pyx":733
 * 			if retval == -1 and not (c_brlapi.brlapi_error.brlerrno == ERROR_LIBCERR and c_brlapi.brlapi_error.libcerrno == errno.EINTR):
 * 				raise OperationError()
 * 			elif retval <= 0:             # <<<<<<<<<<<<<<
 * 				if not wait:
 * 					return None
*/
    __pyx_t_2 = (__pyx_v_retval <= 0);
    if (__pyx_t_2) {

      /* "brlapi.pyx":734
 * 				raise OperationError()
 * 			elif retval <= 0:
 * 				if not wait:             # <<<<<<<<<<<<<<
 * 					return None
 * 			else:
*/
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_wait); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 734, __pyx_L1_error)
      __pyx_t_7 = (!__pyx_t_2);
      if (__pyx_t_7) {

        /* "brlapi.pyx":735
 * 			elif retval <= 0:
 * 				if not wait:
 * 					return None             # <<<<<<<<<<<<<<
 * 			else:
 * 				return code
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

        /* "brlapi.pyx":734
 * 				raise OperationError()
 * 			elif retval <= 0:
 * 				if not wait:             # <<<<<<<<<<<<<<
 * 					return None
 * 			else:
*/
      }

      /* "brlapi.pyx":733
 * 			if retval == -1 and not (c_brlapi.brlapi_error.brlerrno == ERROR_LIBCERR and c_brlapi.brlapi_error.libcerrno == errno.EINTR):
 * 				raise OperationError()
 * 			elif retval <= 0:             # <<<<<<<<<<<<<<
 * 				if not wait:
 * 					return None
*/
      goto __pyx_L10;
    }

    /* "brlapi.pyx":737
 * 					return None
 * 			else:
 * 				return code             # <<<<<<<<<<<<<<
 * 
 * 	def readKeyWithTimeout(self, timeout_ms = -1):
*/
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_PyLong_From_brlapi_keyCode_t(__pyx_v_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 737, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;
    }
    __pyx_L10:;
  }

  /* "brlapi.pyx":710
 * 		return self.write(w)
 * 
 * 	def readKey(self, wait = True):             # <<<<<<<<<<<<<<
 * 		"""Read a key from the braille keyboard.
 * 		See brlapi_readKey(3).
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("brlapi.Connection.readKey", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":739
 * 				return code
 * 
 * 	def readKeyWithTimeout(self, timeout_ms = -1):             # <<<<<<<<<<<<<<
 * 		"""Read a key from the braille keyboard.
 * 		See brlapi_readKeyWithtimeout(3).
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_23readKeyWithTimeout(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_22readKeyWithTimeout, "Connection.readKeyWithTimeout(self, timeout_ms=-1)\n\nRead a key from the braille keyboard.\nSee brlapi_readKeyWithtimeout(3).\n\nThis function works like brlapi_readKey, except that parameter wait is replaced by a timeout_ms parameter.");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_23readKeyWithTimeout = {"readKeyWithTimeout", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_23readKeyWithTimeout, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_22readKeyWithTimeout};
static PyObject *__pyx_pw_6brlapi_10Connection_23readKeyWithTimeout(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_timeout_ms = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("readKeyWithTimeout (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_timeout_ms,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 739, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 739, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "readKeyWithTimeout", 0) < (0)) __PYX_ERR(0, 739, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_neg_1));
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 739, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_neg_1));
    }
    __pyx_v_timeout_ms = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("readKeyWithTimeout", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 739, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.Connection.readKeyWithTimeout", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_10Connection_22readKeyWithTimeout(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self), __pyx_v_timeout_ms);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_10Connection_22readKeyWithTimeout(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_timeout_ms) {
  brlapi_keyCode_t __pyx_v_code;
  int __pyx_v_retval;
  int __pyx_v_c_timeout_ms;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("readKeyWithTimeout", 0);

  /* "brlapi.pyx":747
 * 		cdef int retval
 * 		cdef int c_timeout_ms
 * 		c_timeout_ms = timeout_ms             # <<<<<<<<<<<<<<
 * 
 * 		while True:
*/
  __pyx_t_1 = __Pyx_PyLong_As_int(__pyx_v_timeout_ms); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 747, __pyx_L1_error)
  __pyx_v_c_timeout_ms = __pyx_t_1;

  /* "brlapi.pyx":749
 * 		c_timeout_ms = timeout_ms
 * 
 * 		while True:             # <<<<<<<<<<<<<<
 * 			with nogil:
 * 				retval = c_brlapi.brlapi__readKeyWithTimeout(self.h, c_timeout_ms, <c_brlapi.brlapi_keyCode_t*>&code)
*/
  while (1) {

    /* "brlapi.pyx":750
 * 
 * 		while True:
 * 			with nogil:             # <<<<<<<<<<<<<<
 * 				retval = c_brlapi.brlapi__readKeyWithTimeout(self.h, c_timeout_ms, <c_brlapi.brlapi_keyCode_t*>&code)
 * 			if retval == -1 and not (c_brlapi.brlapi_error.brlerrno == ERROR_LIBCERR and c_brlapi.brlapi_error.libcerrno == errno.EINTR):
*/
    {
        PyThreadState * _save;
        _save = PyEval_SaveThread();
        __Pyx_FastGIL_Remember();
        /*try:*/ {

          /* "brlapi.pyx":751
 * 		while True:
 * 			with nogil:
 * 				retval = c_brlapi.brlapi__readKeyWithTimeout(self.h, c_timeout_ms, <c_brlapi.brlapi_keyCode_t*>&code)             # <<<<<<<<<<<<<<
 * 			if retval == -1 and not (c_brlapi.brlapi_error.brlerrno == ERROR_LIBCERR and c_brlapi.brlapi_error.libcerrno == errno.EINTR):
 * 				raise OperationError()
*/
          __pyx_v_retval = brlapi__readKeyWithTimeout(__pyx_v_self->h, __pyx_v_c_timeout_ms, ((brlapi_keyCode_t *)(&__pyx_v_code)));
        }

        /* "brlapi.pyx":750
 * 
 * 		while True:
 * 			with nogil:             # <<<<<<<<<<<<<<
 * 				retval = c_brlapi.brlapi__readKeyWithTimeout(self.h, c_timeout_ms, <c_brlapi.brlapi_keyCode_t*>&code)
 * 			if retval == -1 and not (c_brlapi.brlapi_error.brlerrno == ERROR_LIBCERR and c_brlapi.brlapi_error.libcerrno == errno.EINTR):
*/
        /*finally:*/ {
          /*normal exit:*/{
            __Pyx_FastGIL_Forget();
            PyEval_RestoreThread(_save);
            goto __pyx_L9;
          }
          __pyx_L9:;
        }
    }

    /* "brlapi.pyx":752
 * 			with nogil:
 * 				retval = c_brlapi.brlapi__readKeyWithTimeout(self.h, c_timeout_ms, <c_brlapi.brlapi_keyCode_t*>&code)
 * 			if retval == -1 and not (c_brlapi.brlapi_error.brlerrno == ERROR_LIBCERR and c_brlapi.brlapi_error.libcerrno == errno.EINTR):             # <<<<<<<<<<<<<<
 * 				raise OperationError()
 * 			elif retval <= 0:
*/
    __pyx_t_3 = (__pyx_v_retval == -1L);
    if (__pyx_t_3) {
    } else {
      __pyx_t_2 = __pyx_t_3;
      goto __pyx_L11_bool_binop_done;
    }
    __pyx_t_4 = __Pyx_PyLong_From_int(brlapi_error.brlerrno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 752, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_LIBCERR); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 752, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 752, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 752, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_7) {
    } else {
      __pyx_t_3 = __pyx_t_7;
      goto __pyx_L13_bool_binop_done;
    }
    __pyx_t_6 = __Pyx_PyLong_From_int(brlapi_error.libcerrno); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 752, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_errno); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 752, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_EINTR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 752, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 752, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 752, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_3 = __pyx_t_7;
    __pyx_L13_bool_binop_done:;
    __pyx_t_7 = (!__pyx_t_3);
    __pyx_t_2 = __pyx_t_7;
    __pyx_L11_bool_binop_done:;
    if (unlikely(__pyx_t_2)) {

      /* "brlapi.pyx":753
 * 				retval = c_brlapi.brlapi__readKeyWithTimeout(self.h, c_timeout_ms, <c_brlapi.brlapi_keyCode_t*>&code)
 * 			if retval == -1 and not (c_brlapi.brlapi_error.brlerrno == ERROR_LIBCERR and c_brlapi.brlapi_error.libcerrno == errno.EINTR):
 * 				raise OperationError()             # <<<<<<<<<<<<<<
 * 			elif retval <= 0:
 * 				if timeout_ms >= 0:
*/
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 753, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_8 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 753, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __PYX_ERR(0, 753, __pyx_L1_error)

      /* "brlapi.pyx":752
 * 			with nogil:
 * 				retval = c_brlapi.brlapi__readKeyWithTimeout(self.h, c_timeout_ms, <c_brlapi.brlapi_keyCode_t*>&code)
 * 			if retval == -1 and not (c_brlapi.brlapi_error.brlerrno == ERROR_LIBCERR and c_brlapi.brlapi_error.libcerrno == errno.EINTR):             # <<<<<<<<<<<<<<
 * 				raise OperationError()
 * 			elif retval <= 0:
*/
    }

    /* "brlapi.pyx":754
 * 			if retval == -1 and not (c_brlapi.brlapi_error.brlerrno == ERROR_LIBCERR and c_brlapi.brlapi_error.libcerrno == errno.EINTR):
 * 				raise OperationError()
 * 			elif retval <= 0:             # <<<<<<<<<<<<<<
 * 				if timeout_ms >= 0:
 * 					return None
*/
    __pyx_t_2 = (__pyx_v_retval <= 0);
    if (__pyx_t_2) {

      /* "brlapi.pyx":755
 * 				raise OperationError()
 * 			elif retval <= 0:
 * 				if timeout_ms >= 0:             # <<<<<<<<<<<<<<
 * 					return None
 * 			else:
*/
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_timeout_ms, __pyx_mstate_global->__pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 755, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 755, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_2) {

        /* "brlapi.pyx":756
 * 			elif retval <= 0:
 * 				if timeout_ms >= 0:
 * 					return None             # <<<<<<<<<<<<<<
 * 			else:
 * 				return code
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

        /* "brlapi.pyx":755
 * 				raise OperationError()
 * 			elif retval <= 0:
 * 				if timeout_ms >= 0:             # <<<<<<<<<<<<<<
 * 					return None
 * 			else:
*/
      }

      /* "brlapi.pyx":754
 * 			if retval == -1 and not (c_brlapi.brlapi_error.brlerrno == ERROR_LIBCERR and c_brlapi.brlapi_error.libcerrno == errno.EINTR):
 * 				raise OperationError()
 * 			elif retval <= 0:             # <<<<<<<<<<<<<<
 * 				if timeout_ms >= 0:
 * 					return None
*/
      goto __pyx_L10;
    }

    /* "brlapi.pyx":758
 * 					return None
 * 			else:
 * 				return code             # <<<<<<<<<<<<<<
 * 
 * 	def expandKeyCode(self, code):
*/
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_PyLong_From_brlapi_keyCode_t(__pyx_v_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 758, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;
    }
    __pyx_L10:;
  }

  /* "brlapi.pyx":739
 * 				return code
 * 
 * 	def readKeyWithTimeout(self, timeout_ms = -1):             # <<<<<<<<<<<<<<
 * 		"""Read a key from the braille keyboard.
 * 		See brlapi_readKeyWithtimeout(3).
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("brlapi.Connection.readKeyWithTimeout", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":760
 * 				return code
 * 
 * 	def expandKeyCode(self, code):             # <<<<<<<<<<<<<<
 * 		"""Expand a keycode into its individual components.
 * 		This is a stub to maintain backward compatibility.
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_25expandKeyCode(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_24expandKeyCode, "Connection.expandKeyCode(self, code)\n\nExpand a keycode into its individual components.\nThis is a stub to maintain backward compatibility.\nCall brlapi.expandKeyCode(code) instead.");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_25expandKeyCode = {"expandKeyCode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_25expandKeyCode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_24expandKeyCode};
static PyObject *__pyx_pw_6brlapi_10Connection_25expandKeyCode(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_code = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("expandKeyCode (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_code,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 760, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 760, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "expandKeyCode", 0) < (0)) __PYX_ERR(0, 760, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("expandKeyCode", 1, 1, 1, i); __PYX_ERR(0, 760, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 760, __pyx_L3_error)
    }
    __pyx_v_code = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("expandKeyCode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 760, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.Connection.expandKeyCode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_10Connection_24expandKeyCode(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self), __pyx_v_code);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_10Connection_24expandKeyCode(CYTHON_UNUSED struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_code) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("expandKeyCode", 0);

  /* "brlapi.pyx":764
 * 		This is a stub to maintain backward compatibility.
 * 		Call brlapi.expandKeyCode(code) instead."""
 * 		return expandKeyCode(code)             # <<<<<<<<<<<<<<
 * 
 * 	def ignoreKeys(self, key_type, set):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_expandKeyCode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_code};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "brlapi.pyx":760
 * 				return code
 * 
 * 	def expandKeyCode(self, code):             # <<<<<<<<<<<<<<
 * 		"""Expand a keycode into its individual components.
 * 		This is a stub to maintain backward compatibility.
*/

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

/* "brlapi.pyx":766
 * 		return expandKeyCode(code)
 * 
 * 	def ignoreKeys(self, key_type, set):             # <<<<<<<<<<<<<<
 * 		"""Ignore some key presses from the braille keyboard.
 * 		See brlapi_ignoreKeys(3).
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_27ignoreKeys(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_26ignoreKeys, "Connection.ignoreKeys(self, key_type, set)\n\nIgnore some key presses from the braille keyboard.\nSee brlapi_ignoreKeys(3).\n\nThis function asks the server to give the provided keys to brltty, rather than returning them to the application via brlapi_readKey().\n\nThe given codes should be brltty commands (nul or \"\" was given to brlapi_enterTtyMode())");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_27ignoreKeys = {"ignoreKeys", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_27ignoreKeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_26ignoreKeys};
static PyObject *__pyx_pw_6brlapi_10Connection_27ignoreKeys(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_key_type = 0;
  PyObject *__pyx_v_set = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ignoreKeys (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_key_type,&__pyx_mstate_global->__pyx_n_u_set,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 766, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 766, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 766, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "ignoreKeys", 0) < (0)) __PYX_ERR(0, 766, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("ignoreKeys", 1, 2, 2, i); __PYX_ERR(0, 766, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 766, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 766, __pyx_L3_error)
    }
    __pyx_v_key_type = values[0];
    __pyx_v_set = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ignoreKeys", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 766, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.Connection.ignoreKeys", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_10Connection_26ignoreKeys(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self), __pyx_v_key_type, __pyx_v_set);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_10Connection_26ignoreKeys(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_key_type, PyObject *__pyx_v_set) {
  int __pyx_v_retval;
  brlapi_rangeType_t __pyx_v_c_type;
  brlapi_keyCode_t *__pyx_v_c_set;
  long __pyx_v_c_n;
  long __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  brlapi_rangeType_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  long __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  brlapi_keyCode_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ignoreKeys", 0);

  /* "brlapi.pyx":777
 * 		cdef c_brlapi.brlapi_keyCode_t *c_set
 * 		cdef long c_n
 * 		c_type = key_type             # <<<<<<<<<<<<<<
 * 		c_n = len(set)
 * 		c_set = <c_brlapi.brlapi_keyCode_t*>c_brlapi.malloc(c_n * sizeof(c_brlapi.brlapi_keyCode_t))
*/
  __pyx_t_1 = ((brlapi_rangeType_t)__Pyx_PyLong_As_brlapi_rangeType_t(__pyx_v_key_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 777, __pyx_L1_error)
  __pyx_v_c_type = __pyx_t_1;

  /* "brlapi.pyx":778
 * 		cdef long c_n
 * 		c_type = key_type
 * 		c_n = len(set)             # <<<<<<<<<<<<<<
 * 		c_set = <c_brlapi.brlapi_keyCode_t*>c_brlapi.malloc(c_n * sizeof(c_brlapi.brlapi_keyCode_t))
 * 		for i from 0 <= i < c_n:
*/
  __pyx_t_2 = PyObject_Length(__pyx_v_set); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 778, __pyx_L1_error)
  __pyx_v_c_n = __pyx_t_2;

  /* "brlapi.pyx":779
 * 		c_type = key_type
 * 		c_n = len(set)
 * 		c_set = <c_brlapi.brlapi_keyCode_t*>c_brlapi.malloc(c_n * sizeof(c_brlapi.brlapi_keyCode_t))             # <<<<<<<<<<<<<<
 * 		for i from 0 <= i < c_n:
 * 			c_set[i] = set[i]
*/
  __pyx_v_c_set = ((brlapi_keyCode_t *)malloc((__pyx_v_c_n * (sizeof(brlapi_keyCode_t)))));

  /* "brlapi.pyx":780
 * 		c_n = len(set)
 * 		c_set = <c_brlapi.brlapi_keyCode_t*>c_brlapi.malloc(c_n * sizeof(c_brlapi.brlapi_keyCode_t))
 * 		for i from 0 <= i < c_n:             # <<<<<<<<<<<<<<
 * 			c_set[i] = set[i]
 * 		with nogil:
*/
  __pyx_t_3 = __pyx_v_c_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {

    /* "brlapi.pyx":781
 * 		c_set = <c_brlapi.brlapi_keyCode_t*>c_brlapi.malloc(c_n * sizeof(c_brlapi.brlapi_keyCode_t))
 * 		for i from 0 <= i < c_n:
 * 			c_set[i] = set[i]             # <<<<<<<<<<<<<<
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__ignoreKeys(self.h, c_type, c_set, c_n)
*/
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_set, __pyx_v_i, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyLong_As_brlapi_keyCode_t(__pyx_t_4); if (unlikely((__pyx_t_5 == ((brlapi_keyCode_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 781, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    (__pyx_v_c_set[__pyx_v_i]) = __pyx_t_5;
  }

  /* "brlapi.pyx":782
 * 		for i from 0 <= i < c_n:
 * 			c_set[i] = set[i]
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__ignoreKeys(self.h, c_type, c_set, c_n)
 * 		c_brlapi.free(c_set)
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":783
 * 			c_set[i] = set[i]
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__ignoreKeys(self.h, c_type, c_set, c_n)             # <<<<<<<<<<<<<<
 * 		c_brlapi.free(c_set)
 * 		if retval == -1:
*/
        __pyx_v_retval = brlapi__ignoreKeys(__pyx_v_self->h, __pyx_v_c_type, __pyx_v_c_set, __pyx_v_c_n);
      }

      /* "brlapi.pyx":782
 * 		for i from 0 <= i < c_n:
 * 			c_set[i] = set[i]
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__ignoreKeys(self.h, c_type, c_set, c_n)
 * 		c_brlapi.free(c_set)
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L7;
        }
        __pyx_L7:;
      }
  }

  /* "brlapi.pyx":784
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__ignoreKeys(self.h, c_type, c_set, c_n)
 * 		c_brlapi.free(c_set)             # <<<<<<<<<<<<<<
 * 		if retval == -1:
 * 			raise OperationError()
*/
  free(__pyx_v_c_set);

  /* "brlapi.pyx":785
 * 			retval = c_brlapi.brlapi__ignoreKeys(self.h, c_type, c_set, c_n)
 * 		c_brlapi.free(c_set)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  __pyx_t_6 = (__pyx_v_retval == -1L);
  if (unlikely(__pyx_t_6)) {

    /* "brlapi.pyx":786
 * 		c_brlapi.free(c_set)
 * 		if retval == -1:
 * 			raise OperationError()             # <<<<<<<<<<<<<<
 * 		else:
 * 			return retval
*/
    __pyx_t_7 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
      assert(__pyx_t_7);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
      __pyx_t_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 786, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 786, __pyx_L1_error)

    /* "brlapi.pyx":785
 * 			retval = c_brlapi.brlapi__ignoreKeys(self.h, c_type, c_set, c_n)
 * 		c_brlapi.free(c_set)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  }

  /* "brlapi.pyx":788
 * 			raise OperationError()
 * 		else:
 * 			return retval             # <<<<<<<<<<<<<<
 * 
 * 	def acceptKeys(self, key_type, set):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_retval); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "brlapi.pyx":766
 * 		return expandKeyCode(code)
 * 
 * 	def ignoreKeys(self, key_type, set):             # <<<<<<<<<<<<<<
 * 		"""Ignore some key presses from the braille keyboard.
 * 		See brlapi_ignoreKeys(3).
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("brlapi.Connection.ignoreKeys", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":790
 * 			return retval
 * 
 * 	def acceptKeys(self, key_type, set):             # <<<<<<<<<<<<<<
 * 		"""Accept some key presses from the braille keyboard.
 * 		See brlapi_ignoreKeys(3).
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_29acceptKeys(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_28acceptKeys, "Connection.acceptKeys(self, key_type, set)\n\nAccept some key presses from the braille keyboard.\nSee brlapi_ignoreKeys(3).\n\nThis function asks the server to give the provided keys to the application, and not give them to brltty.\n\nThe given codes should be brltty commands (nul or \"\" was given to brlapi_enterTtyMode())");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_29acceptKeys = {"acceptKeys", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_29acceptKeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_28acceptKeys};
static PyObject *__pyx_pw_6brlapi_10Connection_29acceptKeys(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_key_type = 0;
  PyObject *__pyx_v_set = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("acceptKeys (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_key_type,&__pyx_mstate_global->__pyx_n_u_set,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 790, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 790, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 790, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "acceptKeys", 0) < (0)) __PYX_ERR(0, 790, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("acceptKeys", 1, 2, 2, i); __PYX_ERR(0, 790, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 790, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 790, __pyx_L3_error)
    }
    __pyx_v_key_type = values[0];
    __pyx_v_set = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("acceptKeys", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 790, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.Connection.acceptKeys", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_10Connection_28acceptKeys(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self), __pyx_v_key_type, __pyx_v_set);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_10Connection_28acceptKeys(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_key_type, PyObject *__pyx_v_set) {
  int __pyx_v_retval;
  brlapi_rangeType_t __pyx_v_c_type;
  brlapi_keyCode_t *__pyx_v_c_set;
  long __pyx_v_c_n;
  long __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  brlapi_rangeType_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  long __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  brlapi_keyCode_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("acceptKeys", 0);

  /* "brlapi.pyx":801
 * 		cdef c_brlapi.brlapi_keyCode_t *c_set
 * 		cdef long c_n
 * 		c_type = key_type             # <<<<<<<<<<<<<<
 * 		c_n = len(set)
 * 		c_set = <c_brlapi.brlapi_keyCode_t*>c_brlapi.malloc(c_n * sizeof(c_brlapi.brlapi_keyCode_t))
*/
  __pyx_t_1 = ((brlapi_rangeType_t)__Pyx_PyLong_As_brlapi_rangeType_t(__pyx_v_key_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 801, __pyx_L1_error)
  __pyx_v_c_type = __pyx_t_1;

  /* "brlapi.pyx":802
 * 		cdef long c_n
 * 		c_type = key_type
 * 		c_n = len(set)             # <<<<<<<<<<<<<<
 * 		c_set = <c_brlapi.brlapi_keyCode_t*>c_brlapi.malloc(c_n * sizeof(c_brlapi.brlapi_keyCode_t))
 * 		for i from 0 <= i < c_n:
*/
  __pyx_t_2 = PyObject_Length(__pyx_v_set); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 802, __pyx_L1_error)
  __pyx_v_c_n = __pyx_t_2;

  /* "brlapi.pyx":803
 * 		c_type = key_type
 * 		c_n = len(set)
 * 		c_set = <c_brlapi.brlapi_keyCode_t*>c_brlapi.malloc(c_n * sizeof(c_brlapi.brlapi_keyCode_t))             # <<<<<<<<<<<<<<
 * 		for i from 0 <= i < c_n:
 * 			c_set[i] = set[i]
*/
  __pyx_v_c_set = ((brlapi_keyCode_t *)malloc((__pyx_v_c_n * (sizeof(brlapi_keyCode_t)))));

  /* "brlapi.pyx":804
 * 		c_n = len(set)
 * 		c_set = <c_brlapi.brlapi_keyCode_t*>c_brlapi.malloc(c_n * sizeof(c_brlapi.brlapi_keyCode_t))
 * 		for i from 0 <= i < c_n:             # <<<<<<<<<<<<<<
 * 			c_set[i] = set[i]
 * 		with nogil:
*/
  __pyx_t_3 = __pyx_v_c_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {

    /* "brlapi.pyx":805
 * 		c_set = <c_brlapi.brlapi_keyCode_t*>c_brlapi.malloc(c_n * sizeof(c_brlapi.brlapi_keyCode_t))
 * 		for i from 0 <= i < c_n:
 * 			c_set[i] = set[i]             # <<<<<<<<<<<<<<
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__acceptKeys(self.h, c_type, c_set, c_n)
*/
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_set, __pyx_v_i, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyLong_As_brlapi_keyCode_t(__pyx_t_4); if (unlikely((__pyx_t_5 == ((brlapi_keyCode_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 805, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    (__pyx_v_c_set[__pyx_v_i]) = __pyx_t_5;
  }

  /* "brlapi.pyx":806
 * 		for i from 0 <= i < c_n:
 * 			c_set[i] = set[i]
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__acceptKeys(self.h, c_type, c_set, c_n)
 * 		c_brlapi.free(c_set)
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":807
 * 			c_set[i] = set[i]
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__acceptKeys(self.h, c_type, c_set, c_n)             # <<<<<<<<<<<<<<
 * 		c_brlapi.free(c_set)
 * 		if retval == -1:
*/
        __pyx_v_retval = brlapi__acceptKeys(__pyx_v_self->h, __pyx_v_c_type, __pyx_v_c_set, __pyx_v_c_n);
      }

      /* "brlapi.pyx":806
 * 		for i from 0 <= i < c_n:
 * 			c_set[i] = set[i]
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__acceptKeys(self.h, c_type, c_set, c_n)
 * 		c_brlapi.free(c_set)
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L7;
        }
        __pyx_L7:;
      }
  }

  /* "brlapi.pyx":808
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__acceptKeys(self.h, c_type, c_set, c_n)
 * 		c_brlapi.free(c_set)             # <<<<<<<<<<<<<<
 * 		if retval == -1:
 * 			raise OperationError()
*/
  free(__pyx_v_c_set);

  /* "brlapi.pyx":809
 * 			retval = c_brlapi.brlapi__acceptKeys(self.h, c_type, c_set, c_n)
 * 		c_brlapi.free(c_set)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  __pyx_t_6 = (__pyx_v_retval == -1L);
  if (unlikely(__pyx_t_6)) {

    /* "brlapi.pyx":810
 * 		c_brlapi.free(c_set)
 * 		if retval == -1:
 * 			raise OperationError()             # <<<<<<<<<<<<<<
 * 		else:
 * 			return retval
*/
    __pyx_t_7 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 810, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
      assert(__pyx_t_7);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
      __pyx_t_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 810, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 810, __pyx_L1_error)

    /* "brlapi.pyx":809
 * 			retval = c_brlapi.brlapi__acceptKeys(self.h, c_type, c_set, c_n)
 * 		c_brlapi.free(c_set)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  }

  /* "brlapi.pyx":812
 * 			raise OperationError()
 * 		else:
 * 			return retval             # <<<<<<<<<<<<<<
 * 
 * 	def ignoreAllKeys(self):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_retval); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "brlapi.pyx":790
 * 			return retval
 * 
 * 	def acceptKeys(self, key_type, set):             # <<<<<<<<<<<<<<
 * 		"""Accept some key presses from the braille keyboard.
 * 		See brlapi_ignoreKeys(3).
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("brlapi.Connection.acceptKeys", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":814
 * 			return retval
 * 
 * 	def ignoreAllKeys(self):             # <<<<<<<<<<<<<<
 * 		"""Ignore all key presses from the braille keyboard.
 * 		See brlapi_ignoreAllKeys(3).
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_31ignoreAllKeys(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_30ignoreAllKeys, "Connection.ignoreAllKeys(self)\n\nIgnore all key presses from the braille keyboard.\nSee brlapi_ignoreAllKeys(3).\n\nThis function asks the server to give all keys to brltty, rather than returning them to the application via brlapi_readKey().");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_31ignoreAllKeys = {"ignoreAllKeys", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_31ignoreAllKeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_30ignoreAllKeys};
static PyObject *__pyx_pw_6brlapi_10Connection_31ignoreAllKeys(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ignoreAllKeys (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("ignoreAllKeys", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("ignoreAllKeys", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_6brlapi_10Connection_30ignoreAllKeys(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_6brlapi_10Connection_30ignoreAllKeys(struct __pyx_obj_6brlapi_Connection *__pyx_v_self) {
  int __pyx_v_retval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ignoreAllKeys", 0);

  /* "brlapi.pyx":820
 * 		This function asks the server to give all keys to brltty, rather than returning them to the application via brlapi_readKey()."""
 * 		cdef int retval
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__ignoreAllKeys(self.h)
 * 		if retval == -1:
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":821
 * 		cdef int retval
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__ignoreAllKeys(self.h)             # <<<<<<<<<<<<<<
 * 		if retval == -1:
 * 			raise OperationError()
*/
        __pyx_v_retval = brlapi__ignoreAllKeys(__pyx_v_self->h);
      }

      /* "brlapi.pyx":820
 * 		This function asks the server to give all keys to brltty, rather than returning them to the application via brlapi_readKey()."""
 * 		cdef int retval
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__ignoreAllKeys(self.h)
 * 		if retval == -1:
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "brlapi.pyx":822
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__ignoreAllKeys(self.h)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  __pyx_t_1 = (__pyx_v_retval == -1L);
  if (unlikely(__pyx_t_1)) {

    /* "brlapi.pyx":823
 * 			retval = c_brlapi.brlapi__ignoreAllKeys(self.h)
 * 		if retval == -1:
 * 			raise OperationError()             # <<<<<<<<<<<<<<
 * 		else:
 * 			return retval
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 823, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 823, __pyx_L1_error)

    /* "brlapi.pyx":822
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__ignoreAllKeys(self.h)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  }

  /* "brlapi.pyx":825
 * 			raise OperationError()
 * 		else:
 * 			return retval             # <<<<<<<<<<<<<<
 * 
 * 	def acceptAllKeys(self):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_retval); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 825, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "brlapi.pyx":814
 * 			return retval
 * 
 * 	def ignoreAllKeys(self):             # <<<<<<<<<<<<<<
 * 		"""Ignore all key presses from the braille keyboard.
 * 		See brlapi_ignoreAllKeys(3).
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("brlapi.Connection.ignoreAllKeys", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":827
 * 			return retval
 * 
 * 	def acceptAllKeys(self):             # <<<<<<<<<<<<<<
 * 		"""Accept all key presses from the braille keyboard.
 * 		See brlapi_acceptAllKeys(3).
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_33acceptAllKeys(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_32acceptAllKeys, "Connection.acceptAllKeys(self)\n\nAccept all key presses from the braille keyboard.\nSee brlapi_acceptAllKeys(3).\n\nThis function asks the server to give all keys to the application, and not give them to brltty.\n\nWarning: after calling this function, make sure to call brlapi_ignoreKeys() for ignoring important keys like BRL_CMD_SWITCHVT_PREV/NEXT and such.");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_33acceptAllKeys = {"acceptAllKeys", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_33acceptAllKeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_32acceptAllKeys};
static PyObject *__pyx_pw_6brlapi_10Connection_33acceptAllKeys(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("acceptAllKeys (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("acceptAllKeys", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("acceptAllKeys", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_6brlapi_10Connection_32acceptAllKeys(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_6brlapi_10Connection_32acceptAllKeys(struct __pyx_obj_6brlapi_Connection *__pyx_v_self) {
  int __pyx_v_retval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("acceptAllKeys", 0);

  /* "brlapi.pyx":835
 * 		Warning: after calling this function, make sure to call brlapi_ignoreKeys() for ignoring important keys like BRL_CMD_SWITCHVT_PREV/NEXT and such."""
 * 		cdef int retval
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__acceptAllKeys(self.h)
 * 		if retval == -1:
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":836
 * 		cdef int retval
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__acceptAllKeys(self.h)             # <<<<<<<<<<<<<<
 * 		if retval == -1:
 * 			raise OperationError()
*/
        __pyx_v_retval = brlapi__acceptAllKeys(__pyx_v_self->h);
      }

      /* "brlapi.pyx":835
 * 		Warning: after calling this function, make sure to call brlapi_ignoreKeys() for ignoring important keys like BRL_CMD_SWITCHVT_PREV/NEXT and such."""
 * 		cdef int retval
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__acceptAllKeys(self.h)
 * 		if retval == -1:
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "brlapi.pyx":837
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__acceptAllKeys(self.h)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  __pyx_t_1 = (__pyx_v_retval == -1L);
  if (unlikely(__pyx_t_1)) {

    /* "brlapi.pyx":838
 * 			retval = c_brlapi.brlapi__acceptAllKeys(self.h)
 * 		if retval == -1:
 * 			raise OperationError()             # <<<<<<<<<<<<<<
 * 		else:
 * 			return retval
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 838, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 838, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 838, __pyx_L1_error)

    /* "brlapi.pyx":837
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__acceptAllKeys(self.h)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  }

  /* "brlapi.pyx":840
 * 			raise OperationError()
 * 		else:
 * 			return retval             # <<<<<<<<<<<<<<
 * 
 * 	def ignoreKeyRanges(self, keys):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_retval); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 840, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "brlapi.pyx":827
 * 			return retval
 * 
 * 	def acceptAllKeys(self):             # <<<<<<<<<<<<<<
 * 		"""Accept all key presses from the braille keyboard.
 * 		See brlapi_acceptAllKeys(3).
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("brlapi.Connection.acceptAllKeys", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":842
 * 			return retval
 * 
 * 	def ignoreKeyRanges(self, keys):             # <<<<<<<<<<<<<<
 * 		"""Ignore some key presses from the braille keyboard.
 * 		See brlapi_ignoreKeyRanges(3).
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_35ignoreKeyRanges(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_34ignoreKeyRanges, "Connection.ignoreKeyRanges(self, keys)\n\nIgnore some key presses from the braille keyboard.\nSee brlapi_ignoreKeyRanges(3).\n\nThis function asks the server to give the provided key ranges to brltty, rather than returning them to the application via brlapi_readKey().\n\nThe given codes should be raw keycodes (i.e. some driver name was given to brlapi_enterTtyMode()) ");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_35ignoreKeyRanges = {"ignoreKeyRanges", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_35ignoreKeyRanges, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_34ignoreKeyRanges};
static PyObject *__pyx_pw_6brlapi_10Connection_35ignoreKeyRanges(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_keys = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ignoreKeyRanges (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_keys,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 842, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 842, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "ignoreKeyRanges", 0) < (0)) __PYX_ERR(0, 842, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("ignoreKeyRanges", 1, 1, 1, i); __PYX_ERR(0, 842, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 842, __pyx_L3_error)
    }
    __pyx_v_keys = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ignoreKeyRanges", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 842, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.Connection.ignoreKeyRanges", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_10Connection_34ignoreKeyRanges(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self), __pyx_v_keys);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_10Connection_34ignoreKeyRanges(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_keys) {
  int __pyx_v_retval;
  brlapi_range_t *__pyx_v_c_keys;
  long __pyx_v_c_n;
  long __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  long __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  brlapi_keyCode_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ignoreKeyRanges", 0);

  /* "brlapi.pyx":852
 * 		cdef c_brlapi.brlapi_range_t *c_keys
 * 		cdef long c_n
 * 		c_n = len(keys)             # <<<<<<<<<<<<<<
 * 		c_keys = <c_brlapi.brlapi_range_t*>c_brlapi.malloc(c_n * sizeof(c_brlapi.brlapi_range_t))
 * 		for i from 0 <= i < c_n:
*/
  __pyx_t_1 = PyObject_Length(__pyx_v_keys); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 852, __pyx_L1_error)
  __pyx_v_c_n = __pyx_t_1;

  /* "brlapi.pyx":853
 * 		cdef long c_n
 * 		c_n = len(keys)
 * 		c_keys = <c_brlapi.brlapi_range_t*>c_brlapi.malloc(c_n * sizeof(c_brlapi.brlapi_range_t))             # <<<<<<<<<<<<<<
 * 		for i from 0 <= i < c_n:
 * 			c_keys[i].first = keys[i][0]
*/
  __pyx_v_c_keys = ((brlapi_range_t *)malloc((__pyx_v_c_n * (sizeof(brlapi_range_t)))));

  /* "brlapi.pyx":854
 * 		c_n = len(keys)
 * 		c_keys = <c_brlapi.brlapi_range_t*>c_brlapi.malloc(c_n * sizeof(c_brlapi.brlapi_range_t))
 * 		for i from 0 <= i < c_n:             # <<<<<<<<<<<<<<
 * 			c_keys[i].first = keys[i][0]
 * 			c_keys[i].last = keys[i][1]
*/
  __pyx_t_2 = __pyx_v_c_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "brlapi.pyx":855
 * 		c_keys = <c_brlapi.brlapi_range_t*>c_brlapi.malloc(c_n * sizeof(c_brlapi.brlapi_range_t))
 * 		for i from 0 <= i < c_n:
 * 			c_keys[i].first = keys[i][0]             # <<<<<<<<<<<<<<
 * 			c_keys[i].last = keys[i][1]
 * 		with nogil:
*/
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_keys, __pyx_v_i, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyLong_As_brlapi_keyCode_t(__pyx_t_4); if (unlikely((__pyx_t_5 == ((brlapi_keyCode_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 855, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    (__pyx_v_c_keys[__pyx_v_i]).first = __pyx_t_5;

    /* "brlapi.pyx":856
 * 		for i from 0 <= i < c_n:
 * 			c_keys[i].first = keys[i][0]
 * 			c_keys[i].last = keys[i][1]             # <<<<<<<<<<<<<<
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__ignoreKeyRanges(self.h, c_keys, c_n)
*/
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_keys, __pyx_v_i, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyLong_As_brlapi_keyCode_t(__pyx_t_3); if (unlikely((__pyx_t_5 == ((brlapi_keyCode_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 856, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_c_keys[__pyx_v_i]).last = __pyx_t_5;
  }

  /* "brlapi.pyx":857
 * 			c_keys[i].first = keys[i][0]
 * 			c_keys[i].last = keys[i][1]
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__ignoreKeyRanges(self.h, c_keys, c_n)
 * 		c_brlapi.free(c_keys)
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":858
 * 			c_keys[i].last = keys[i][1]
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__ignoreKeyRanges(self.h, c_keys, c_n)             # <<<<<<<<<<<<<<
 * 		c_brlapi.free(c_keys)
 * 		if retval == -1:
*/
        __pyx_v_retval = brlapi__ignoreKeyRanges(__pyx_v_self->h, __pyx_v_c_keys, __pyx_v_c_n);
      }

      /* "brlapi.pyx":857
 * 			c_keys[i].first = keys[i][0]
 * 			c_keys[i].last = keys[i][1]
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__ignoreKeyRanges(self.h, c_keys, c_n)
 * 		c_brlapi.free(c_keys)
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L7;
        }
        __pyx_L7:;
      }
  }

  /* "brlapi.pyx":859
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__ignoreKeyRanges(self.h, c_keys, c_n)
 * 		c_brlapi.free(c_keys)             # <<<<<<<<<<<<<<
 * 		if retval == -1:
 * 			raise OperationError()
*/
  free(__pyx_v_c_keys);

  /* "brlapi.pyx":860
 * 			retval = c_brlapi.brlapi__ignoreKeyRanges(self.h, c_keys, c_n)
 * 		c_brlapi.free(c_keys)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  __pyx_t_6 = (__pyx_v_retval == -1L);
  if (unlikely(__pyx_t_6)) {

    /* "brlapi.pyx":861
 * 		c_brlapi.free(c_keys)
 * 		if retval == -1:
 * 			raise OperationError()             # <<<<<<<<<<<<<<
 * 		else:
 * 			return retval
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 861, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 861, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 861, __pyx_L1_error)

    /* "brlapi.pyx":860
 * 			retval = c_brlapi.brlapi__ignoreKeyRanges(self.h, c_keys, c_n)
 * 		c_brlapi.free(c_keys)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  }

  /* "brlapi.pyx":863
 * 			raise OperationError()
 * 		else:
 * 			return retval             # <<<<<<<<<<<<<<
 * 
 * 	def acceptKeyRanges(self, keys):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_retval); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "brlapi.pyx":842
 * 			return retval
 * 
 * 	def ignoreKeyRanges(self, keys):             # <<<<<<<<<<<<<<
 * 		"""Ignore some key presses from the braille keyboard.
 * 		See brlapi_ignoreKeyRanges(3).
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("brlapi.Connection.ignoreKeyRanges", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":865
 * 			return retval
 * 
 * 	def acceptKeyRanges(self, keys):             # <<<<<<<<<<<<<<
 * 		"""Accept some key presses from the braille keyboard.
 * 		See brlapi_acceptKeyRanges(3).
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_37acceptKeyRanges(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_36acceptKeyRanges, "Connection.acceptKeyRanges(self, keys)\n\nAccept some key presses from the braille keyboard.\nSee brlapi_acceptKeyRanges(3).\n\nThis function asks the server to return the provided key ranges (inclusive) to the application, and not give them to brltty.\n\nThe given codes should be raw keycodes (i.e. some driver name was given to brlapi_enterTtyMode()) ");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_37acceptKeyRanges = {"acceptKeyRanges", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_37acceptKeyRanges, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_36acceptKeyRanges};
static PyObject *__pyx_pw_6brlapi_10Connection_37acceptKeyRanges(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_keys = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("acceptKeyRanges (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_keys,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 865, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 865, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "acceptKeyRanges", 0) < (0)) __PYX_ERR(0, 865, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("acceptKeyRanges", 1, 1, 1, i); __PYX_ERR(0, 865, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 865, __pyx_L3_error)
    }
    __pyx_v_keys = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("acceptKeyRanges", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 865, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.Connection.acceptKeyRanges", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_10Connection_36acceptKeyRanges(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self), __pyx_v_keys);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_10Connection_36acceptKeyRanges(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_keys) {
  int __pyx_v_retval;
  brlapi_range_t *__pyx_v_c_keys;
  long __pyx_v_c_n;
  long __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  long __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  brlapi_keyCode_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("acceptKeyRanges", 0);

  /* "brlapi.pyx":875
 * 		cdef c_brlapi.brlapi_range_t *c_keys
 * 		cdef long c_n
 * 		c_n = len(keys)             # <<<<<<<<<<<<<<
 * 		c_keys = <c_brlapi.brlapi_range_t*>c_brlapi.malloc(c_n * sizeof(c_brlapi.brlapi_range_t))
 * 		for i from 0 <= i < c_n:
*/
  __pyx_t_1 = PyObject_Length(__pyx_v_keys); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 875, __pyx_L1_error)
  __pyx_v_c_n = __pyx_t_1;

  /* "brlapi.pyx":876
 * 		cdef long c_n
 * 		c_n = len(keys)
 * 		c_keys = <c_brlapi.brlapi_range_t*>c_brlapi.malloc(c_n * sizeof(c_brlapi.brlapi_range_t))             # <<<<<<<<<<<<<<
 * 		for i from 0 <= i < c_n:
 * 			c_keys[i].first = keys[i][0]
*/
  __pyx_v_c_keys = ((brlapi_range_t *)malloc((__pyx_v_c_n * (sizeof(brlapi_range_t)))));

  /* "brlapi.pyx":877
 * 		c_n = len(keys)
 * 		c_keys = <c_brlapi.brlapi_range_t*>c_brlapi.malloc(c_n * sizeof(c_brlapi.brlapi_range_t))
 * 		for i from 0 <= i < c_n:             # <<<<<<<<<<<<<<
 * 			c_keys[i].first = keys[i][0]
 * 			c_keys[i].last = keys[i][1]
*/
  __pyx_t_2 = __pyx_v_c_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "brlapi.pyx":878
 * 		c_keys = <c_brlapi.brlapi_range_t*>c_brlapi.malloc(c_n * sizeof(c_brlapi.brlapi_range_t))
 * 		for i from 0 <= i < c_n:
 * 			c_keys[i].first = keys[i][0]             # <<<<<<<<<<<<<<
 * 			c_keys[i].last = keys[i][1]
 * 		with nogil:
*/
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_keys, __pyx_v_i, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 878, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 878, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyLong_As_brlapi_keyCode_t(__pyx_t_4); if (unlikely((__pyx_t_5 == ((brlapi_keyCode_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 878, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    (__pyx_v_c_keys[__pyx_v_i]).first = __pyx_t_5;

    /* "brlapi.pyx":879
 * 		for i from 0 <= i < c_n:
 * 			c_keys[i].first = keys[i][0]
 * 			c_keys[i].last = keys[i][1]             # <<<<<<<<<<<<<<
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__acceptKeyRanges(self.h, c_keys, c_n)
*/
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_keys, __pyx_v_i, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyLong_As_brlapi_keyCode_t(__pyx_t_3); if (unlikely((__pyx_t_5 == ((brlapi_keyCode_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 879, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_c_keys[__pyx_v_i]).last = __pyx_t_5;
  }

  /* "brlapi.pyx":880
 * 			c_keys[i].first = keys[i][0]
 * 			c_keys[i].last = keys[i][1]
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__acceptKeyRanges(self.h, c_keys, c_n)
 * 		c_brlapi.free(c_keys)
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":881
 * 			c_keys[i].last = keys[i][1]
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__acceptKeyRanges(self.h, c_keys, c_n)             # <<<<<<<<<<<<<<
 * 		c_brlapi.free(c_keys)
 * 		if retval == -1:
*/
        __pyx_v_retval = brlapi__acceptKeyRanges(__pyx_v_self->h, __pyx_v_c_keys, __pyx_v_c_n);
      }

      /* "brlapi.pyx":880
 * 			c_keys[i].first = keys[i][0]
 * 			c_keys[i].last = keys[i][1]
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__acceptKeyRanges(self.h, c_keys, c_n)
 * 		c_brlapi.free(c_keys)
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L7;
        }
        __pyx_L7:;
      }
  }

  /* "brlapi.pyx":882
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__acceptKeyRanges(self.h, c_keys, c_n)
 * 		c_brlapi.free(c_keys)             # <<<<<<<<<<<<<<
 * 		if retval == -1:
 * 			raise OperationError()
*/
  free(__pyx_v_c_keys);

  /* "brlapi.pyx":883
 * 			retval = c_brlapi.brlapi__acceptKeyRanges(self.h, c_keys, c_n)
 * 		c_brlapi.free(c_keys)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  __pyx_t_6 = (__pyx_v_retval == -1L);
  if (unlikely(__pyx_t_6)) {

    /* "brlapi.pyx":884
 * 		c_brlapi.free(c_keys)
 * 		if retval == -1:
 * 			raise OperationError()             # <<<<<<<<<<<<<<
 * 		else:
 * 			return retval
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 884, __pyx_L1_error)

    /* "brlapi.pyx":883
 * 			retval = c_brlapi.brlapi__acceptKeyRanges(self.h, c_keys, c_n)
 * 		c_brlapi.free(c_keys)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  }

  /* "brlapi.pyx":886
 * 			raise OperationError()
 * 		else:
 * 			return retval             # <<<<<<<<<<<<<<
 * 
 * 	def enterRawMode(self, driver):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_retval); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "brlapi.pyx":865
 * 			return retval
 * 
 * 	def acceptKeyRanges(self, keys):             # <<<<<<<<<<<<<<
 * 		"""Accept some key presses from the braille keyboard.
 * 		See brlapi_acceptKeyRanges(3).
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("brlapi.Connection.acceptKeyRanges", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":888
 * 			return retval
 * 
 * 	def enterRawMode(self, driver):             # <<<<<<<<<<<<<<
 * 		"""Switch to Raw mode
 * 		See brlapi_enterRawMode(3).
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_39enterRawMode(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_38enterRawMode, "Connection.enterRawMode(self, driver)\n\nSwitch to Raw mode\nSee brlapi_enterRawMode(3).\n\n* driver : Specifies the name of the driver for which the raw communication will be established");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_39enterRawMode = {"enterRawMode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_39enterRawMode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_38enterRawMode};
static PyObject *__pyx_pw_6brlapi_10Connection_39enterRawMode(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_driver = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("enterRawMode (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_driver,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 888, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 888, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "enterRawMode", 0) < (0)) __PYX_ERR(0, 888, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("enterRawMode", 1, 1, 1, i); __PYX_ERR(0, 888, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 888, __pyx_L3_error)
    }
    __pyx_v_driver = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("enterRawMode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 888, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.Connection.enterRawMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_10Connection_38enterRawMode(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self), __pyx_v_driver);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_10Connection_38enterRawMode(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_driver) {
  int __pyx_v_retval;
  char *__pyx_v_c_driver;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  char *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("enterRawMode", 0);
  __Pyx_INCREF(__pyx_v_driver);

  /* "brlapi.pyx":895
 * 		cdef int retval
 * 		cdef char *c_driver
 * 		if (type(driver) == unicode):             # <<<<<<<<<<<<<<
 * 			driver = driver.encode('ASCII')
 * 		c_driver = driver
*/
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_driver)), ((PyObject *)(&PyUnicode_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 895, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "brlapi.pyx":896
 * 		cdef char *c_driver
 * 		if (type(driver) == unicode):
 * 			driver = driver.encode('ASCII')             # <<<<<<<<<<<<<<
 * 		c_driver = driver
 * 		with nogil:
*/
    __pyx_t_3 = __pyx_v_driver;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ASCII};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_DECREF_SET(__pyx_v_driver, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "brlapi.pyx":895
 * 		cdef int retval
 * 		cdef char *c_driver
 * 		if (type(driver) == unicode):             # <<<<<<<<<<<<<<
 * 			driver = driver.encode('ASCII')
 * 		c_driver = driver
*/
  }

  /* "brlapi.pyx":897
 * 		if (type(driver) == unicode):
 * 			driver = driver.encode('ASCII')
 * 		c_driver = driver             # <<<<<<<<<<<<<<
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__enterRawMode(self.h, c_driver)
*/
  __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_driver); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 897, __pyx_L1_error)
  __pyx_v_c_driver = __pyx_t_5;

  /* "brlapi.pyx":898
 * 			driver = driver.encode('ASCII')
 * 		c_driver = driver
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__enterRawMode(self.h, c_driver)
 * 		if retval == -1:
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":899
 * 		c_driver = driver
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__enterRawMode(self.h, c_driver)             # <<<<<<<<<<<<<<
 * 		if retval == -1:
 * 			raise OperationError()
*/
        __pyx_v_retval = brlapi__enterRawMode(__pyx_v_self->h, __pyx_v_c_driver);
      }

      /* "brlapi.pyx":898
 * 			driver = driver.encode('ASCII')
 * 		c_driver = driver
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__enterRawMode(self.h, c_driver)
 * 		if retval == -1:
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L6;
        }
        __pyx_L6:;
      }
  }

  /* "brlapi.pyx":900
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__enterRawMode(self.h, c_driver)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  __pyx_t_2 = (__pyx_v_retval == -1L);
  if (unlikely(__pyx_t_2)) {

    /* "brlapi.pyx":901
 * 			retval = c_brlapi.brlapi__enterRawMode(self.h, c_driver)
 * 		if retval == -1:
 * 			raise OperationError()             # <<<<<<<<<<<<<<
 * 		else:
 * 			return retval
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_4 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 901, __pyx_L1_error)

    /* "brlapi.pyx":900
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__enterRawMode(self.h, c_driver)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  }

  /* "brlapi.pyx":903
 * 			raise OperationError()
 * 		else:
 * 			return retval             # <<<<<<<<<<<<<<
 * 
 * 	def leaveRawMode(self):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_retval); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "brlapi.pyx":888
 * 			return retval
 * 
 * 	def enterRawMode(self, driver):             # <<<<<<<<<<<<<<
 * 		"""Switch to Raw mode
 * 		See brlapi_enterRawMode(3).
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("brlapi.Connection.enterRawMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_driver);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":905
 * 			return retval
 * 
 * 	def leaveRawMode(self):             # <<<<<<<<<<<<<<
 * 		"""leave Raw mode
 * 		See brlapi_leaveRawMode(3)."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_41leaveRawMode(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_40leaveRawMode, "Connection.leaveRawMode(self)\n\nleave Raw mode\nSee brlapi_leaveRawMode(3).");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_41leaveRawMode = {"leaveRawMode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_41leaveRawMode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_40leaveRawMode};
static PyObject *__pyx_pw_6brlapi_10Connection_41leaveRawMode(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("leaveRawMode (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("leaveRawMode", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("leaveRawMode", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_6brlapi_10Connection_40leaveRawMode(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_6brlapi_10Connection_40leaveRawMode(struct __pyx_obj_6brlapi_Connection *__pyx_v_self) {
  int __pyx_v_retval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("leaveRawMode", 0);

  /* "brlapi.pyx":909
 * 		See brlapi_leaveRawMode(3)."""
 * 		cdef int retval
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__leaveRawMode(self.h)
 * 		if retval == -1:
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":910
 * 		cdef int retval
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__leaveRawMode(self.h)             # <<<<<<<<<<<<<<
 * 		if retval == -1:
 * 			raise OperationError()
*/
        __pyx_v_retval = brlapi__leaveRawMode(__pyx_v_self->h);
      }

      /* "brlapi.pyx":909
 * 		See brlapi_leaveRawMode(3)."""
 * 		cdef int retval
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__leaveRawMode(self.h)
 * 		if retval == -1:
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "brlapi.pyx":911
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__leaveRawMode(self.h)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  __pyx_t_1 = (__pyx_v_retval == -1L);
  if (unlikely(__pyx_t_1)) {

    /* "brlapi.pyx":912
 * 			retval = c_brlapi.brlapi__leaveRawMode(self.h)
 * 		if retval == -1:
 * 			raise OperationError()             # <<<<<<<<<<<<<<
 * 		else:
 * 			return retval
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 912, __pyx_L1_error)

    /* "brlapi.pyx":911
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__leaveRawMode(self.h)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		else:
*/
  }

  /* "brlapi.pyx":914
 * 			raise OperationError()
 * 		else:
 * 			return retval             # <<<<<<<<<<<<<<
 * 
 * 	def getParameter(self, param, subparam = 0, flags = 0):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_retval); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "brlapi.pyx":905
 * 			return retval
 * 
 * 	def leaveRawMode(self):             # <<<<<<<<<<<<<<
 * 		"""leave Raw mode
 * 		See brlapi_leaveRawMode(3)."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("brlapi.Connection.leaveRawMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":916
 * 			return retval
 * 
 * 	def getParameter(self, param, subparam = 0, flags = 0):             # <<<<<<<<<<<<<<
 * 		"""Get the value of a parameter.
 * 		See brlapi_getParameter(3).
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_43getParameter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_42getParameter, "Connection.getParameter(self, param, subparam=0, flags=0)\n\nGet the value of a parameter.\nSee brlapi_getParameter(3).\n\nThis gets the current content of a parameter");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_43getParameter = {"getParameter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_43getParameter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_42getParameter};
static PyObject *__pyx_pw_6brlapi_10Connection_43getParameter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_param = 0;
  PyObject *__pyx_v_subparam = 0;
  PyObject *__pyx_v_flags = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getParameter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_param,&__pyx_mstate_global->__pyx_n_u_subparam,&__pyx_mstate_global->__pyx_n_u_flags,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 916, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 916, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 916, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 916, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "getParameter", 0) < (0)) __PYX_ERR(0, 916, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("getParameter", 0, 1, 3, i); __PYX_ERR(0, 916, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 916, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 916, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 916, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
    }
    __pyx_v_param = values[0];
    __pyx_v_subparam = values[1];
    __pyx_v_flags = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getParameter", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 916, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.Connection.getParameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_10Connection_42getParameter(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self), __pyx_v_param, __pyx_v_subparam, __pyx_v_flags);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_10Connection_42getParameter(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_param, PyObject *__pyx_v_subparam, PyObject *__pyx_v_flags) {
  brlapi_param_t __pyx_v_c_param;
  brlapi_param_subparam_t __pyx_v_c_subparam;
  brlapi_param_flags_t __pyx_v_c_flags;
  void *__pyx_v_c_value;
  size_t __pyx_v_size;
  PyObject *__pyx_v_ret = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  brlapi_param_t __pyx_t_1;
  brlapi_param_subparam_t __pyx_t_2;
  brlapi_param_flags_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_t_13;
  char const *__pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getParameter", 0);

  /* "brlapi.pyx":933
 * 		cdef char *string
 * 
 * 		c_param = param             # <<<<<<<<<<<<<<
 * 		c_subparam = subparam
 * 		c_flags = flags
*/
  __pyx_t_1 = __Pyx_PyLong_As_brlapi_param_t(__pyx_v_param); if (unlikely((__pyx_t_1 == ((brlapi_param_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 933, __pyx_L1_error)
  __pyx_v_c_param = __pyx_t_1;

  /* "brlapi.pyx":934
 * 
 * 		c_param = param
 * 		c_subparam = subparam             # <<<<<<<<<<<<<<
 * 		c_flags = flags
 * 
*/
  __pyx_t_2 = __Pyx_PyLong_As_uint64_t(__pyx_v_subparam); if (unlikely((__pyx_t_2 == ((brlapi_param_subparam_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 934, __pyx_L1_error)
  __pyx_v_c_subparam = __pyx_t_2;

  /* "brlapi.pyx":935
 * 		c_param = param
 * 		c_subparam = subparam
 * 		c_flags = flags             # <<<<<<<<<<<<<<
 * 
 * 		with nogil:
*/
  __pyx_t_3 = __Pyx_PyLong_As_uint32_t(__pyx_v_flags); if (unlikely((__pyx_t_3 == ((brlapi_param_flags_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 935, __pyx_L1_error)
  __pyx_v_c_flags = __pyx_t_3;

  /* "brlapi.pyx":937
 * 		c_flags = flags
 * 
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			c_value = c_brlapi.brlapi__getParameterAlloc(self.h, c_param, c_subparam, c_flags, &size)
 * 		if c_value == NULL:
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":938
 * 
 * 		with nogil:
 * 			c_value = c_brlapi.brlapi__getParameterAlloc(self.h, c_param, c_subparam, c_flags, &size)             # <<<<<<<<<<<<<<
 * 		if c_value == NULL:
 * 			raise OperationError()
*/
        __pyx_v_c_value = brlapi__getParameterAlloc(__pyx_v_self->h, __pyx_v_c_param, __pyx_v_c_subparam, __pyx_v_c_flags, (&__pyx_v_size));
      }

      /* "brlapi.pyx":937
 * 		c_flags = flags
 * 
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			c_value = c_brlapi.brlapi__getParameterAlloc(self.h, c_param, c_subparam, c_flags, &size)
 * 		if c_value == NULL:
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "brlapi.pyx":939
 * 		with nogil:
 * 			c_value = c_brlapi.brlapi__getParameterAlloc(self.h, c_param, c_subparam, c_flags, &size)
 * 		if c_value == NULL:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 
*/
  __pyx_t_4 = (__pyx_v_c_value == NULL);
  if (unlikely(__pyx_t_4)) {

    /* "brlapi.pyx":940
 * 			c_value = c_brlapi.brlapi__getParameterAlloc(self.h, c_param, c_subparam, c_flags, &size)
 * 		if c_value == NULL:
 * 			raise OperationError()             # <<<<<<<<<<<<<<
 * 
 * 		try:
*/
    __pyx_t_6 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
      assert(__pyx_t_6);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 940, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 940, __pyx_L1_error)

    /* "brlapi.pyx":939
 * 		with nogil:
 * 			c_value = c_brlapi.brlapi__getParameterAlloc(self.h, c_param, c_subparam, c_flags, &size)
 * 		if c_value == NULL:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 
*/
  }

  /* "brlapi.pyx":942
 * 			raise OperationError()
 * 
 * 		try:             # <<<<<<<<<<<<<<
 * 			ret = _parameterToPython(c_param, c_value, size)
 * 		except Exception as e:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_11);
    /*try:*/ {

      /* "brlapi.pyx":943
 * 
 * 		try:
 * 			ret = _parameterToPython(c_param, c_value, size)             # <<<<<<<<<<<<<<
 * 		except Exception as e:
 * 			c_brlapi.free(c_value)
*/
      __pyx_t_5 = __pyx_f_6brlapi__parameterToPython(__pyx_v_c_param, __pyx_v_c_value, __pyx_v_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 943, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_v_ret = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "brlapi.pyx":942
 * 			raise OperationError()
 * 
 * 		try:             # <<<<<<<<<<<<<<
 * 			ret = _parameterToPython(c_param, c_value, size)
 * 		except Exception as e:
*/
    }
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    goto __pyx_L12_try_end;
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "brlapi.pyx":944
 * 		try:
 * 			ret = _parameterToPython(c_param, c_value, size)
 * 		except Exception as e:             # <<<<<<<<<<<<<<
 * 			c_brlapi.free(c_value)
 * 			raise(e)
*/
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_12) {
      __Pyx_AddTraceback("brlapi.Connection.getParameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 944, __pyx_L9_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_v_e = __pyx_t_7;
      /*try:*/ {

        /* "brlapi.pyx":945
 * 			ret = _parameterToPython(c_param, c_value, size)
 * 		except Exception as e:
 * 			c_brlapi.free(c_value)             # <<<<<<<<<<<<<<
 * 			raise(e)
 * 
*/
        free(__pyx_v_c_value);

        /* "brlapi.pyx":946
 * 		except Exception as e:
 * 			c_brlapi.free(c_value)
 * 			raise(e)             # <<<<<<<<<<<<<<
 * 
 * 		c_brlapi.free(c_value)
*/
        __Pyx_Raise(__pyx_v_e, 0, 0, 0);
        __PYX_ERR(0, 946, __pyx_L18_error)
      }

      /* "brlapi.pyx":944
 * 		try:
 * 			ret = _parameterToPython(c_param, c_value, size)
 * 		except Exception as e:             # <<<<<<<<<<<<<<
 * 			c_brlapi.free(c_value)
 * 			raise(e)
*/
      /*finally:*/ {
        __pyx_L18_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          if ( unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __pyx_t_12 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
          __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
          __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
          goto __pyx_L9_except_error;
        }
      }
    }
    goto __pyx_L9_except_error;

    /* "brlapi.pyx":942
 * 			raise OperationError()
 * 
 * 		try:             # <<<<<<<<<<<<<<
 * 			ret = _parameterToPython(c_param, c_value, size)
 * 		except Exception as e:
*/
    __pyx_L9_except_error:;
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
    goto __pyx_L1_error;
    __pyx_L12_try_end:;
  }

  /* "brlapi.pyx":948
 * 			raise(e)
 * 
 * 		c_brlapi.free(c_value)             # <<<<<<<<<<<<<<
 * 		return ret
 * 
*/
  free(__pyx_v_c_value);

  /* "brlapi.pyx":949
 * 
 * 		c_brlapi.free(c_value)
 * 		return ret             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "brlapi.pyx":916
 * 			return retval
 * 
 * 	def getParameter(self, param, subparam = 0, flags = 0):             # <<<<<<<<<<<<<<
 * 		"""Get the value of a parameter.
 * 		See brlapi_getParameter(3).
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("brlapi.Connection.getParameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":952
 * 
 * 
 * 	def setParameter(self, param, subparam, flags, value):             # <<<<<<<<<<<<<<
 * 		"""Set the value of a parameter.
 * 		See brlapi_setParameter(3).
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_45setParameter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_44setParameter, "Connection.setParameter(self, param, subparam, flags, value)\n\nSet the value of a parameter.\nSee brlapi_setParameter(3).\n\nThis sets the content of a parameter");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_45setParameter = {"setParameter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_45setParameter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_44setParameter};
static PyObject *__pyx_pw_6brlapi_10Connection_45setParameter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_param = 0;
  PyObject *__pyx_v_subparam = 0;
  PyObject *__pyx_v_flags = 0;
  PyObject *__pyx_v_value = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setParameter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_param,&__pyx_mstate_global->__pyx_n_u_subparam,&__pyx_mstate_global->__pyx_n_u_flags,&__pyx_mstate_global->__pyx_n_u_value,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 952, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 952, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 952, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 952, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 952, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "setParameter", 0) < (0)) __PYX_ERR(0, 952, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("setParameter", 1, 4, 4, i); __PYX_ERR(0, 952, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 952, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 952, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 952, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 952, __pyx_L3_error)
    }
    __pyx_v_param = values[0];
    __pyx_v_subparam = values[1];
    __pyx_v_flags = values[2];
    __pyx_v_value = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setParameter", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 952, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.Connection.setParameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_10Connection_44setParameter(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self), __pyx_v_param, __pyx_v_subparam, __pyx_v_flags, __pyx_v_value);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_10Connection_44setParameter(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_param, PyObject *__pyx_v_subparam, PyObject *__pyx_v_flags, PyObject *__pyx_v_value) {
  brlapi_param_t __pyx_v_c_param;
  brlapi_param_subparam_t __pyx_v_c_subparam;
  brlapi_param_flags_t __pyx_v_c_flags;
  void *__pyx_v_c_value;
  uint64_t *__pyx_v_values64;
  uint32_t *__pyx_v_values32;
  uint16_t *__pyx_v_values16;
  uint8_t *__pyx_v_values8;
  char *__pyx_v_string;
  brlapi_param_properties_t const *__pyx_v_props;
  Py_ssize_t __pyx_v_size;
  PyObject *__pyx_v_i = NULL;
  int __pyx_v_retval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  brlapi_param_t __pyx_t_1;
  brlapi_param_subparam_t __pyx_t_2;
  brlapi_param_flags_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  char *__pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  uint8_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  uint16_t __pyx_t_15;
  uint32_t __pyx_t_16;
  uint64_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setParameter", 0);
  __Pyx_INCREF(__pyx_v_value);

  /* "brlapi.pyx":968
 * 		cdef const c_brlapi.brlapi_param_properties_t *props
 * 
 * 		c_param = param             # <<<<<<<<<<<<<<
 * 		c_subparam = subparam
 * 		c_flags = flags
*/
  __pyx_t_1 = __Pyx_PyLong_As_brlapi_param_t(__pyx_v_param); if (unlikely((__pyx_t_1 == ((brlapi_param_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 968, __pyx_L1_error)
  __pyx_v_c_param = __pyx_t_1;

  /* "brlapi.pyx":969
 * 
 * 		c_param = param
 * 		c_subparam = subparam             # <<<<<<<<<<<<<<
 * 		c_flags = flags
 * 
*/
  __pyx_t_2 = __Pyx_PyLong_As_uint64_t(__pyx_v_subparam); if (unlikely((__pyx_t_2 == ((brlapi_param_subparam_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 969, __pyx_L1_error)
  __pyx_v_c_subparam = __pyx_t_2;

  /* "brlapi.pyx":970
 * 		c_param = param
 * 		c_subparam = subparam
 * 		c_flags = flags             # <<<<<<<<<<<<<<
 * 
 * 		with nogil:
*/
  __pyx_t_3 = __Pyx_PyLong_As_uint32_t(__pyx_v_flags); if (unlikely((__pyx_t_3 == ((brlapi_param_flags_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 970, __pyx_L1_error)
  __pyx_v_c_flags = __pyx_t_3;

  /* "brlapi.pyx":972
 * 		c_flags = flags
 * 
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			props = c_brlapi.brlapi_getParameterProperties(c_param)
 * 
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":973
 * 
 * 		with nogil:
 * 			props = c_brlapi.brlapi_getParameterProperties(c_param)             # <<<<<<<<<<<<<<
 * 
 * 		if props == NULL:
*/
        __pyx_v_props = brlapi_getParameterProperties(__pyx_v_c_param);
      }

      /* "brlapi.pyx":972
 * 		c_flags = flags
 * 
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			props = c_brlapi.brlapi_getParameterProperties(c_param)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "brlapi.pyx":975
 * 			props = c_brlapi.brlapi_getParameterProperties(c_param)
 * 
 * 		if props == NULL:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 
*/
  __pyx_t_4 = (__pyx_v_props == NULL);
  if (unlikely(__pyx_t_4)) {

    /* "brlapi.pyx":976
 * 
 * 		if props == NULL:
 * 			raise OperationError()             # <<<<<<<<<<<<<<
 * 
 * 		if props.type == PARAM_TYPE_STRING:
*/
    __pyx_t_6 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 976, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
      assert(__pyx_t_6);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 976, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 976, __pyx_L1_error)

    /* "brlapi.pyx":975
 * 			props = c_brlapi.brlapi_getParameterProperties(c_param)
 * 
 * 		if props == NULL:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 
*/
  }

  /* "brlapi.pyx":978
 * 			raise OperationError()
 * 
 * 		if props.type == PARAM_TYPE_STRING:             # <<<<<<<<<<<<<<
 * 			if type(value) != unicode and type(value) != str:
 * 				raise ValueError("String value expected")
*/
  __pyx_t_5 = __Pyx_PyLong_From_brlapi_param_type_t(__pyx_v_props->type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_STRING); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 978, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 978, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_4) {

    /* "brlapi.pyx":979
 * 
 * 		if props.type == PARAM_TYPE_STRING:
 * 			if type(value) != unicode and type(value) != str:             # <<<<<<<<<<<<<<
 * 				raise ValueError("String value expected")
 * 
*/
    __pyx_t_6 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_value)), ((PyObject *)(&PyUnicode_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 979, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 979, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_9) {
    } else {
      __pyx_t_4 = __pyx_t_9;
      goto __pyx_L9_bool_binop_done;
    }
    __pyx_t_6 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_value)), ((PyObject *)(&PyUnicode_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 979, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 979, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_4 = __pyx_t_9;
    __pyx_L9_bool_binop_done:;
    if (unlikely(__pyx_t_4)) {

      /* "brlapi.pyx":980
 * 		if props.type == PARAM_TYPE_STRING:
 * 			if type(value) != unicode and type(value) != str:
 * 				raise ValueError("String value expected")             # <<<<<<<<<<<<<<
 * 
 * 		if props.type == PARAM_TYPE_BOOLEAN:
*/
      __pyx_t_7 = NULL;
      __pyx_t_8 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_String_value_expected};
        __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 980, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(0, 980, __pyx_L1_error)

      /* "brlapi.pyx":979
 * 
 * 		if props.type == PARAM_TYPE_STRING:
 * 			if type(value) != unicode and type(value) != str:             # <<<<<<<<<<<<<<
 * 				raise ValueError("String value expected")
 * 
*/
    }

    /* "brlapi.pyx":978
 * 			raise OperationError()
 * 
 * 		if props.type == PARAM_TYPE_STRING:             # <<<<<<<<<<<<<<
 * 			if type(value) != unicode and type(value) != str:
 * 				raise ValueError("String value expected")
*/
  }

  /* "brlapi.pyx":982
 * 				raise ValueError("String value expected")
 * 
 * 		if props.type == PARAM_TYPE_BOOLEAN:             # <<<<<<<<<<<<<<
 * 			if props.isArray:
 * 				if type(value[0]) != bool:
*/
  __pyx_t_6 = __Pyx_PyLong_From_brlapi_param_type_t(__pyx_v_props->type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_BOOLEAN); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 982, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 982, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_4) {

    /* "brlapi.pyx":983
 * 
 * 		if props.type == PARAM_TYPE_BOOLEAN:
 * 			if props.isArray:             # <<<<<<<<<<<<<<
 * 				if type(value[0]) != bool:
 * 					raise ValueError("Boolean values expected")
*/
    __pyx_t_4 = (__pyx_v_props->isArray != 0);
    if (__pyx_t_4) {

      /* "brlapi.pyx":984
 * 		if props.type == PARAM_TYPE_BOOLEAN:
 * 			if props.isArray:
 * 				if type(value[0]) != bool:             # <<<<<<<<<<<<<<
 * 					raise ValueError("Boolean values expected")
 * 			else:
*/
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 984, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_t_5)), ((PyObject *)(&PyBool_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 984, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 984, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__pyx_t_4)) {

        /* "brlapi.pyx":985
 * 			if props.isArray:
 * 				if type(value[0]) != bool:
 * 					raise ValueError("Boolean values expected")             # <<<<<<<<<<<<<<
 * 			else:
 * 				if type(value) != bool:
*/
        __pyx_t_5 = NULL;
        __pyx_t_8 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Boolean_values_expected};
          __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 985, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
        }
        __Pyx_Raise(__pyx_t_7, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __PYX_ERR(0, 985, __pyx_L1_error)

        /* "brlapi.pyx":984
 * 		if props.type == PARAM_TYPE_BOOLEAN:
 * 			if props.isArray:
 * 				if type(value[0]) != bool:             # <<<<<<<<<<<<<<
 * 					raise ValueError("Boolean values expected")
 * 			else:
*/
      }

      /* "brlapi.pyx":983
 * 
 * 		if props.type == PARAM_TYPE_BOOLEAN:
 * 			if props.isArray:             # <<<<<<<<<<<<<<
 * 				if type(value[0]) != bool:
 * 					raise ValueError("Boolean values expected")
*/
      goto __pyx_L12;
    }

    /* "brlapi.pyx":987
 * 					raise ValueError("Boolean values expected")
 * 			else:
 * 				if type(value) != bool:             # <<<<<<<<<<<<<<
 * 					raise ValueError("Boolean value expected")
 * 
*/
    /*else*/ {
      __pyx_t_7 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_value)), ((PyObject *)(&PyBool_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 987, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 987, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__pyx_t_4)) {

        /* "brlapi.pyx":988
 * 			else:
 * 				if type(value) != bool:
 * 					raise ValueError("Boolean value expected")             # <<<<<<<<<<<<<<
 * 
 * 		if props.type == PARAM_TYPE_UINT8 or \
*/
        __pyx_t_5 = NULL;
        __pyx_t_8 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Boolean_value_expected};
          __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 988, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
        }
        __Pyx_Raise(__pyx_t_7, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __PYX_ERR(0, 988, __pyx_L1_error)

        /* "brlapi.pyx":987
 * 					raise ValueError("Boolean values expected")
 * 			else:
 * 				if type(value) != bool:             # <<<<<<<<<<<<<<
 * 					raise ValueError("Boolean value expected")
 * 
*/
      }
    }
    __pyx_L12:;

    /* "brlapi.pyx":982
 * 				raise ValueError("String value expected")
 * 
 * 		if props.type == PARAM_TYPE_BOOLEAN:             # <<<<<<<<<<<<<<
 * 			if props.isArray:
 * 				if type(value[0]) != bool:
*/
  }

  /* "brlapi.pyx":990
 * 					raise ValueError("Boolean value expected")
 * 
 * 		if props.type == PARAM_TYPE_UINT8 or \             # <<<<<<<<<<<<<<
 * 		   props.type == PARAM_TYPE_UINT16 or \
 * 		   props.type == PARAM_TYPE_UINT32:
*/
  __pyx_t_7 = __Pyx_PyLong_From_brlapi_param_type_t(__pyx_v_props->type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_UINT8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 990, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 990, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (!__pyx_t_9) {
  } else {
    __pyx_t_4 = __pyx_t_9;
    goto __pyx_L16_bool_binop_done;
  }

  /* "brlapi.pyx":991
 * 
 * 		if props.type == PARAM_TYPE_UINT8 or \
 * 		   props.type == PARAM_TYPE_UINT16 or \             # <<<<<<<<<<<<<<
 * 		   props.type == PARAM_TYPE_UINT32:
 * 			if props.isArray:
*/
  __pyx_t_6 = __Pyx_PyLong_From_brlapi_param_type_t(__pyx_v_props->type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_UINT16); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 991, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 991, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!__pyx_t_9) {
  } else {
    __pyx_t_4 = __pyx_t_9;
    goto __pyx_L16_bool_binop_done;
  }

  /* "brlapi.pyx":992
 * 		if props.type == PARAM_TYPE_UINT8 or \
 * 		   props.type == PARAM_TYPE_UINT16 or \
 * 		   props.type == PARAM_TYPE_UINT32:             # <<<<<<<<<<<<<<
 * 			if props.isArray:
 * 				if type(value[0]) != int:
*/
  __pyx_t_7 = __Pyx_PyLong_From_brlapi_param_type_t(__pyx_v_props->type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_UINT32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 992, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 992, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_4 = __pyx_t_9;
  __pyx_L16_bool_binop_done:;

  /* "brlapi.pyx":990
 * 					raise ValueError("Boolean value expected")
 * 
 * 		if props.type == PARAM_TYPE_UINT8 or \             # <<<<<<<<<<<<<<
 * 		   props.type == PARAM_TYPE_UINT16 or \
 * 		   props.type == PARAM_TYPE_UINT32:
*/
  if (__pyx_t_4) {

    /* "brlapi.pyx":993
 * 		   props.type == PARAM_TYPE_UINT16 or \
 * 		   props.type == PARAM_TYPE_UINT32:
 * 			if props.isArray:             # <<<<<<<<<<<<<<
 * 				if type(value[0]) != int:
 * 					raise ValueError("Integer values expected")
*/
    __pyx_t_4 = (__pyx_v_props->isArray != 0);
    if (__pyx_t_4) {

      /* "brlapi.pyx":994
 * 		   props.type == PARAM_TYPE_UINT32:
 * 			if props.isArray:
 * 				if type(value[0]) != int:             # <<<<<<<<<<<<<<
 * 					raise ValueError("Integer values expected")
 * 			else:
*/
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 994, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_t_6)), ((PyObject *)(&PyLong_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 994, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 994, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(__pyx_t_4)) {

        /* "brlapi.pyx":995
 * 			if props.isArray:
 * 				if type(value[0]) != int:
 * 					raise ValueError("Integer values expected")             # <<<<<<<<<<<<<<
 * 			else:
 * 				if type(value) != int:
*/
        __pyx_t_6 = NULL;
        __pyx_t_8 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Integer_values_expected};
          __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 995, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(0, 995, __pyx_L1_error)

        /* "brlapi.pyx":994
 * 		   props.type == PARAM_TYPE_UINT32:
 * 			if props.isArray:
 * 				if type(value[0]) != int:             # <<<<<<<<<<<<<<
 * 					raise ValueError("Integer values expected")
 * 			else:
*/
      }

      /* "brlapi.pyx":993
 * 		   props.type == PARAM_TYPE_UINT16 or \
 * 		   props.type == PARAM_TYPE_UINT32:
 * 			if props.isArray:             # <<<<<<<<<<<<<<
 * 				if type(value[0]) != int:
 * 					raise ValueError("Integer values expected")
*/
      goto __pyx_L19;
    }

    /* "brlapi.pyx":997
 * 					raise ValueError("Integer values expected")
 * 			else:
 * 				if type(value) != int:             # <<<<<<<<<<<<<<
 * 					raise ValueError("Integer value expected")
 * 
*/
    /*else*/ {
      __pyx_t_5 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_value)), ((PyObject *)(&PyLong_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 997, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 997, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(__pyx_t_4)) {

        /* "brlapi.pyx":998
 * 			else:
 * 				if type(value) != int:
 * 					raise ValueError("Integer value expected")             # <<<<<<<<<<<<<<
 * 
 * 		if props.type == PARAM_TYPE_STRING:
*/
        __pyx_t_6 = NULL;
        __pyx_t_8 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Integer_value_expected};
          __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 998, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(0, 998, __pyx_L1_error)

        /* "brlapi.pyx":997
 * 					raise ValueError("Integer values expected")
 * 			else:
 * 				if type(value) != int:             # <<<<<<<<<<<<<<
 * 					raise ValueError("Integer value expected")
 * 
*/
      }
    }
    __pyx_L19:;

    /* "brlapi.pyx":990
 * 					raise ValueError("Boolean value expected")
 * 
 * 		if props.type == PARAM_TYPE_UINT8 or \             # <<<<<<<<<<<<<<
 * 		   props.type == PARAM_TYPE_UINT16 or \
 * 		   props.type == PARAM_TYPE_UINT32:
*/
  }

  /* "brlapi.pyx":1000
 * 					raise ValueError("Integer value expected")
 * 
 * 		if props.type == PARAM_TYPE_STRING:             # <<<<<<<<<<<<<<
 * 			if type(value) == unicode:
 * 				value = value.encode('UTF-8')
*/
  __pyx_t_5 = __Pyx_PyLong_From_brlapi_param_type_t(__pyx_v_props->type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_STRING); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1000, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1000, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_4) {

    /* "brlapi.pyx":1001
 * 
 * 		if props.type == PARAM_TYPE_STRING:
 * 			if type(value) == unicode:             # <<<<<<<<<<<<<<
 * 				value = value.encode('UTF-8')
 * 			size = len(value)
*/
    __pyx_t_7 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_value)), ((PyObject *)(&PyUnicode_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1001, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1001, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_4) {

      /* "brlapi.pyx":1002
 * 		if props.type == PARAM_TYPE_STRING:
 * 			if type(value) == unicode:
 * 				value = value.encode('UTF-8')             # <<<<<<<<<<<<<<
 * 			size = len(value)
 * 			c_value = <void*>c_brlapi.malloc(size)
*/
      __pyx_t_6 = __pyx_v_value;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_8 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_UTF_8};
        __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1002, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "brlapi.pyx":1001
 * 
 * 		if props.type == PARAM_TYPE_STRING:
 * 			if type(value) == unicode:             # <<<<<<<<<<<<<<
 * 				value = value.encode('UTF-8')
 * 			size = len(value)
*/
    }

    /* "brlapi.pyx":1003
 * 			if type(value) == unicode:
 * 				value = value.encode('UTF-8')
 * 			size = len(value)             # <<<<<<<<<<<<<<
 * 			c_value = <void*>c_brlapi.malloc(size)
 * 			values8 = <uint8_t *>c_value
*/
    __pyx_t_10 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1003, __pyx_L1_error)
    __pyx_v_size = __pyx_t_10;

    /* "brlapi.pyx":1004
 * 				value = value.encode('UTF-8')
 * 			size = len(value)
 * 			c_value = <void*>c_brlapi.malloc(size)             # <<<<<<<<<<<<<<
 * 			values8 = <uint8_t *>c_value
 * 			string = value
*/
    __pyx_v_c_value = ((void *)malloc(__pyx_v_size));

    /* "brlapi.pyx":1005
 * 			size = len(value)
 * 			c_value = <void*>c_brlapi.malloc(size)
 * 			values8 = <uint8_t *>c_value             # <<<<<<<<<<<<<<
 * 			string = value
 * 			c_brlapi.memcpy(<void*>values8,<void*>string,size)
*/
    __pyx_v_values8 = ((uint8_t *)__pyx_v_c_value);

    /* "brlapi.pyx":1006
 * 			c_value = <void*>c_brlapi.malloc(size)
 * 			values8 = <uint8_t *>c_value
 * 			string = value             # <<<<<<<<<<<<<<
 * 			c_brlapi.memcpy(<void*>values8,<void*>string,size)
 * 		elif props.type == PARAM_TYPE_BOOLEAN or props.type == PARAM_TYPE_UINT8:
*/
    __pyx_t_11 = __Pyx_PyObject_AsWritableString(__pyx_v_value); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 1006, __pyx_L1_error)
    __pyx_v_string = __pyx_t_11;

    /* "brlapi.pyx":1007
 * 			values8 = <uint8_t *>c_value
 * 			string = value
 * 			c_brlapi.memcpy(<void*>values8,<void*>string,size)             # <<<<<<<<<<<<<<
 * 		elif props.type == PARAM_TYPE_BOOLEAN or props.type == PARAM_TYPE_UINT8:
 * 			if props.isArray:
*/
    (void)(memcpy(((void *)__pyx_v_values8), ((void *)__pyx_v_string), __pyx_v_size));

    /* "brlapi.pyx":1000
 * 					raise ValueError("Integer value expected")
 * 
 * 		if props.type == PARAM_TYPE_STRING:             # <<<<<<<<<<<<<<
 * 			if type(value) == unicode:
 * 				value = value.encode('UTF-8')
*/
    goto __pyx_L22;
  }

  /* "brlapi.pyx":1008
 * 			string = value
 * 			c_brlapi.memcpy(<void*>values8,<void*>string,size)
 * 		elif props.type == PARAM_TYPE_BOOLEAN or props.type == PARAM_TYPE_UINT8:             # <<<<<<<<<<<<<<
 * 			if props.isArray:
 * 				size = 1 * len(value)
*/
  __pyx_t_7 = __Pyx_PyLong_From_brlapi_param_type_t(__pyx_v_props->type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_BOOLEAN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_7, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!__pyx_t_9) {
  } else {
    __pyx_t_4 = __pyx_t_9;
    goto __pyx_L24_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_PyLong_From_brlapi_param_type_t(__pyx_v_props->type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_UINT8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = __pyx_t_9;
  __pyx_L24_bool_binop_done:;
  if (__pyx_t_4) {

    /* "brlapi.pyx":1009
 * 			c_brlapi.memcpy(<void*>values8,<void*>string,size)
 * 		elif props.type == PARAM_TYPE_BOOLEAN or props.type == PARAM_TYPE_UINT8:
 * 			if props.isArray:             # <<<<<<<<<<<<<<
 * 				size = 1 * len(value)
 * 				c_value = <void*>c_brlapi.malloc(size)
*/
    __pyx_t_4 = (__pyx_v_props->isArray != 0);
    if (__pyx_t_4) {

      /* "brlapi.pyx":1010
 * 		elif props.type == PARAM_TYPE_BOOLEAN or props.type == PARAM_TYPE_UINT8:
 * 			if props.isArray:
 * 				size = 1 * len(value)             # <<<<<<<<<<<<<<
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values8 = <uint8_t *>c_value
*/
      __pyx_t_10 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1010, __pyx_L1_error)
      __pyx_v_size = (1 * __pyx_t_10);

      /* "brlapi.pyx":1011
 * 			if props.isArray:
 * 				size = 1 * len(value)
 * 				c_value = <void*>c_brlapi.malloc(size)             # <<<<<<<<<<<<<<
 * 				values8 = <uint8_t *>c_value
 * 				for i in len(value):
*/
      __pyx_v_c_value = ((void *)malloc(__pyx_v_size));

      /* "brlapi.pyx":1012
 * 				size = 1 * len(value)
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values8 = <uint8_t *>c_value             # <<<<<<<<<<<<<<
 * 				for i in len(value):
 * 					values8[i] = value[i]
*/
      __pyx_v_values8 = ((uint8_t *)__pyx_v_c_value);

      /* "brlapi.pyx":1013
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values8 = <uint8_t *>c_value
 * 				for i in len(value):             # <<<<<<<<<<<<<<
 * 					values8[i] = value[i]
 * 			else:
*/
      __pyx_t_10 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1013, __pyx_L1_error)
      __pyx_t_7 = PyLong_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1013, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
        __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6);
        __pyx_t_10 = 0;
        __pyx_t_12 = NULL;
      } else {
        __pyx_t_10 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1013, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1013, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      for (;;) {
        if (likely(!__pyx_t_12)) {
          if (likely(PyList_CheckExact(__pyx_t_6))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1013, __pyx_L1_error)
              #endif
              if (__pyx_t_10 >= __pyx_temp) break;
            }
            __pyx_t_7 = __Pyx_PyList_GetItemRefFast(__pyx_t_6, __pyx_t_10, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_10;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1013, __pyx_L1_error)
              #endif
              if (__pyx_t_10 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_10));
            #else
            __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_10);
            #endif
            ++__pyx_t_10;
          }
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1013, __pyx_L1_error)
        } else {
          __pyx_t_7 = __pyx_t_12(__pyx_t_6);
          if (unlikely(!__pyx_t_7)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1013, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "brlapi.pyx":1014
 * 				values8 = <uint8_t *>c_value
 * 				for i in len(value):
 * 					values8[i] = value[i]             # <<<<<<<<<<<<<<
 * 			else:
 * 				size = 1
*/
        __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_value, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1014, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_13 = __Pyx_PyLong_As_uint8_t(__pyx_t_7); if (unlikely((__pyx_t_13 == ((uint8_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1014, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1014, __pyx_L1_error)
        (__pyx_v_values8[__pyx_t_14]) = __pyx_t_13;

        /* "brlapi.pyx":1013
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values8 = <uint8_t *>c_value
 * 				for i in len(value):             # <<<<<<<<<<<<<<
 * 					values8[i] = value[i]
 * 			else:
*/
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "brlapi.pyx":1009
 * 			c_brlapi.memcpy(<void*>values8,<void*>string,size)
 * 		elif props.type == PARAM_TYPE_BOOLEAN or props.type == PARAM_TYPE_UINT8:
 * 			if props.isArray:             # <<<<<<<<<<<<<<
 * 				size = 1 * len(value)
 * 				c_value = <void*>c_brlapi.malloc(size)
*/
      goto __pyx_L26;
    }

    /* "brlapi.pyx":1016
 * 					values8[i] = value[i]
 * 			else:
 * 				size = 1             # <<<<<<<<<<<<<<
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values8 = <uint8_t *>c_value
*/
    /*else*/ {
      __pyx_v_size = 1;

      /* "brlapi.pyx":1017
 * 			else:
 * 				size = 1
 * 				c_value = <void*>c_brlapi.malloc(size)             # <<<<<<<<<<<<<<
 * 				values8 = <uint8_t *>c_value
 * 				values8[0] = value
*/
      __pyx_v_c_value = ((void *)malloc(__pyx_v_size));

      /* "brlapi.pyx":1018
 * 				size = 1
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values8 = <uint8_t *>c_value             # <<<<<<<<<<<<<<
 * 				values8[0] = value
 * 		elif props.type == PARAM_TYPE_UINT16:
*/
      __pyx_v_values8 = ((uint8_t *)__pyx_v_c_value);

      /* "brlapi.pyx":1019
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values8 = <uint8_t *>c_value
 * 				values8[0] = value             # <<<<<<<<<<<<<<
 * 		elif props.type == PARAM_TYPE_UINT16:
 * 			if props.isArray:
*/
      __pyx_t_13 = __Pyx_PyLong_As_uint8_t(__pyx_v_value); if (unlikely((__pyx_t_13 == ((uint8_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1019, __pyx_L1_error)
      (__pyx_v_values8[0]) = __pyx_t_13;
    }
    __pyx_L26:;

    /* "brlapi.pyx":1008
 * 			string = value
 * 			c_brlapi.memcpy(<void*>values8,<void*>string,size)
 * 		elif props.type == PARAM_TYPE_BOOLEAN or props.type == PARAM_TYPE_UINT8:             # <<<<<<<<<<<<<<
 * 			if props.isArray:
 * 				size = 1 * len(value)
*/
    goto __pyx_L22;
  }

  /* "brlapi.pyx":1020
 * 				values8 = <uint8_t *>c_value
 * 				values8[0] = value
 * 		elif props.type == PARAM_TYPE_UINT16:             # <<<<<<<<<<<<<<
 * 			if props.isArray:
 * 				size = 2 * len(value)
*/
  __pyx_t_6 = __Pyx_PyLong_From_brlapi_param_type_t(__pyx_v_props->type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_UINT16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1020, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1020, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_4) {

    /* "brlapi.pyx":1021
 * 				values8[0] = value
 * 		elif props.type == PARAM_TYPE_UINT16:
 * 			if props.isArray:             # <<<<<<<<<<<<<<
 * 				size = 2 * len(value)
 * 				c_value = <void*>c_brlapi.malloc(size)
*/
    __pyx_t_4 = (__pyx_v_props->isArray != 0);
    if (__pyx_t_4) {

      /* "brlapi.pyx":1022
 * 		elif props.type == PARAM_TYPE_UINT16:
 * 			if props.isArray:
 * 				size = 2 * len(value)             # <<<<<<<<<<<<<<
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values16 = <uint16_t *>c_value
*/
      __pyx_t_10 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1022, __pyx_L1_error)
      __pyx_v_size = (2 * __pyx_t_10);

      /* "brlapi.pyx":1023
 * 			if props.isArray:
 * 				size = 2 * len(value)
 * 				c_value = <void*>c_brlapi.malloc(size)             # <<<<<<<<<<<<<<
 * 				values16 = <uint16_t *>c_value
 * 				for i in len(value):
*/
      __pyx_v_c_value = ((void *)malloc(__pyx_v_size));

      /* "brlapi.pyx":1024
 * 				size = 2 * len(value)
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values16 = <uint16_t *>c_value             # <<<<<<<<<<<<<<
 * 				for i in len(value):
 * 					values16[i] = value[i]
*/
      __pyx_v_values16 = ((uint16_t *)__pyx_v_c_value);

      /* "brlapi.pyx":1025
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values16 = <uint16_t *>c_value
 * 				for i in len(value):             # <<<<<<<<<<<<<<
 * 					values16[i] = value[i]
 * 			else:
*/
      __pyx_t_10 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1025, __pyx_L1_error)
      __pyx_t_5 = PyLong_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1025, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
        __pyx_t_7 = __pyx_t_5; __Pyx_INCREF(__pyx_t_7);
        __pyx_t_10 = 0;
        __pyx_t_12 = NULL;
      } else {
        __pyx_t_10 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1025, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1025, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      for (;;) {
        if (likely(!__pyx_t_12)) {
          if (likely(PyList_CheckExact(__pyx_t_7))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1025, __pyx_L1_error)
              #endif
              if (__pyx_t_10 >= __pyx_temp) break;
            }
            __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_7, __pyx_t_10, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_10;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1025, __pyx_L1_error)
              #endif
              if (__pyx_t_10 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_10));
            #else
            __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_10);
            #endif
            ++__pyx_t_10;
          }
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1025, __pyx_L1_error)
        } else {
          __pyx_t_5 = __pyx_t_12(__pyx_t_7);
          if (unlikely(!__pyx_t_5)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1025, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "brlapi.pyx":1026
 * 				values16 = <uint16_t *>c_value
 * 				for i in len(value):
 * 					values16[i] = value[i]             # <<<<<<<<<<<<<<
 * 			else:
 * 				size = 2
*/
        __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_value, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1026, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_15 = __Pyx_PyLong_As_uint16_t(__pyx_t_5); if (unlikely((__pyx_t_15 == ((uint16_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1026, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1026, __pyx_L1_error)
        (__pyx_v_values16[__pyx_t_14]) = __pyx_t_15;

        /* "brlapi.pyx":1025
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values16 = <uint16_t *>c_value
 * 				for i in len(value):             # <<<<<<<<<<<<<<
 * 					values16[i] = value[i]
 * 			else:
*/
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "brlapi.pyx":1021
 * 				values8[0] = value
 * 		elif props.type == PARAM_TYPE_UINT16:
 * 			if props.isArray:             # <<<<<<<<<<<<<<
 * 				size = 2 * len(value)
 * 				c_value = <void*>c_brlapi.malloc(size)
*/
      goto __pyx_L30;
    }

    /* "brlapi.pyx":1028
 * 					values16[i] = value[i]
 * 			else:
 * 				size = 2             # <<<<<<<<<<<<<<
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values16 = <uint16_t *>c_value
*/
    /*else*/ {
      __pyx_v_size = 2;

      /* "brlapi.pyx":1029
 * 			else:
 * 				size = 2
 * 				c_value = <void*>c_brlapi.malloc(size)             # <<<<<<<<<<<<<<
 * 				values16 = <uint16_t *>c_value
 * 				values16[0] = value
*/
      __pyx_v_c_value = ((void *)malloc(__pyx_v_size));

      /* "brlapi.pyx":1030
 * 				size = 2
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values16 = <uint16_t *>c_value             # <<<<<<<<<<<<<<
 * 				values16[0] = value
 * 		elif props.type == PARAM_TYPE_UINT32:
*/
      __pyx_v_values16 = ((uint16_t *)__pyx_v_c_value);

      /* "brlapi.pyx":1031
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values16 = <uint16_t *>c_value
 * 				values16[0] = value             # <<<<<<<<<<<<<<
 * 		elif props.type == PARAM_TYPE_UINT32:
 * 			if props.isArray:
*/
      __pyx_t_15 = __Pyx_PyLong_As_uint16_t(__pyx_v_value); if (unlikely((__pyx_t_15 == ((uint16_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1031, __pyx_L1_error)
      (__pyx_v_values16[0]) = __pyx_t_15;
    }
    __pyx_L30:;

    /* "brlapi.pyx":1020
 * 				values8 = <uint8_t *>c_value
 * 				values8[0] = value
 * 		elif props.type == PARAM_TYPE_UINT16:             # <<<<<<<<<<<<<<
 * 			if props.isArray:
 * 				size = 2 * len(value)
*/
    goto __pyx_L22;
  }

  /* "brlapi.pyx":1032
 * 				values16 = <uint16_t *>c_value
 * 				values16[0] = value
 * 		elif props.type == PARAM_TYPE_UINT32:             # <<<<<<<<<<<<<<
 * 			if props.isArray:
 * 				size = 4 * len(value)
*/
  __pyx_t_7 = __Pyx_PyLong_From_brlapi_param_type_t(__pyx_v_props->type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_UINT32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1032, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1032, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_4) {

    /* "brlapi.pyx":1033
 * 				values16[0] = value
 * 		elif props.type == PARAM_TYPE_UINT32:
 * 			if props.isArray:             # <<<<<<<<<<<<<<
 * 				size = 4 * len(value)
 * 				c_value = <void*>c_brlapi.malloc(size)
*/
    __pyx_t_4 = (__pyx_v_props->isArray != 0);
    if (__pyx_t_4) {

      /* "brlapi.pyx":1034
 * 		elif props.type == PARAM_TYPE_UINT32:
 * 			if props.isArray:
 * 				size = 4 * len(value)             # <<<<<<<<<<<<<<
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values32 = <uint32_t *>c_value
*/
      __pyx_t_10 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1034, __pyx_L1_error)
      __pyx_v_size = (4 * __pyx_t_10);

      /* "brlapi.pyx":1035
 * 			if props.isArray:
 * 				size = 4 * len(value)
 * 				c_value = <void*>c_brlapi.malloc(size)             # <<<<<<<<<<<<<<
 * 				values32 = <uint32_t *>c_value
 * 				for i in len(value):
*/
      __pyx_v_c_value = ((void *)malloc(__pyx_v_size));

      /* "brlapi.pyx":1036
 * 				size = 4 * len(value)
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values32 = <uint32_t *>c_value             # <<<<<<<<<<<<<<
 * 				for i in len(value):
 * 					values32[i] = value[i]
*/
      __pyx_v_values32 = ((uint32_t *)__pyx_v_c_value);

      /* "brlapi.pyx":1037
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values32 = <uint32_t *>c_value
 * 				for i in len(value):             # <<<<<<<<<<<<<<
 * 					values32[i] = value[i]
 * 			else:
*/
      __pyx_t_10 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1037, __pyx_L1_error)
      __pyx_t_6 = PyLong_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1037, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
        __pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5);
        __pyx_t_10 = 0;
        __pyx_t_12 = NULL;
      } else {
        __pyx_t_10 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1037, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1037, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      for (;;) {
        if (likely(!__pyx_t_12)) {
          if (likely(PyList_CheckExact(__pyx_t_5))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1037, __pyx_L1_error)
              #endif
              if (__pyx_t_10 >= __pyx_temp) break;
            }
            __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_10, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_10;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1037, __pyx_L1_error)
              #endif
              if (__pyx_t_10 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_6 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_10));
            #else
            __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_10);
            #endif
            ++__pyx_t_10;
          }
          if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1037, __pyx_L1_error)
        } else {
          __pyx_t_6 = __pyx_t_12(__pyx_t_5);
          if (unlikely(!__pyx_t_6)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1037, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "brlapi.pyx":1038
 * 				values32 = <uint32_t *>c_value
 * 				for i in len(value):
 * 					values32[i] = value[i]             # <<<<<<<<<<<<<<
 * 			else:
 * 				size = 4
*/
        __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_value, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1038, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_16 = __Pyx_PyLong_As_uint32_t(__pyx_t_6); if (unlikely((__pyx_t_16 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1038, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1038, __pyx_L1_error)
        (__pyx_v_values32[__pyx_t_14]) = __pyx_t_16;

        /* "brlapi.pyx":1037
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values32 = <uint32_t *>c_value
 * 				for i in len(value):             # <<<<<<<<<<<<<<
 * 					values32[i] = value[i]
 * 			else:
*/
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "brlapi.pyx":1033
 * 				values16[0] = value
 * 		elif props.type == PARAM_TYPE_UINT32:
 * 			if props.isArray:             # <<<<<<<<<<<<<<
 * 				size = 4 * len(value)
 * 				c_value = <void*>c_brlapi.malloc(size)
*/
      goto __pyx_L34;
    }

    /* "brlapi.pyx":1040
 * 					values32[i] = value[i]
 * 			else:
 * 				size = 4             # <<<<<<<<<<<<<<
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values32 = <uint32_t *>c_value
*/
    /*else*/ {
      __pyx_v_size = 4;

      /* "brlapi.pyx":1041
 * 			else:
 * 				size = 4
 * 				c_value = <void*>c_brlapi.malloc(size)             # <<<<<<<<<<<<<<
 * 				values32 = <uint32_t *>c_value
 * 				values32[0] = value
*/
      __pyx_v_c_value = ((void *)malloc(__pyx_v_size));

      /* "brlapi.pyx":1042
 * 				size = 4
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values32 = <uint32_t *>c_value             # <<<<<<<<<<<<<<
 * 				values32[0] = value
 * 		elif props.type == PARAM_TYPE_UINT64:
*/
      __pyx_v_values32 = ((uint32_t *)__pyx_v_c_value);

      /* "brlapi.pyx":1043
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values32 = <uint32_t *>c_value
 * 				values32[0] = value             # <<<<<<<<<<<<<<
 * 		elif props.type == PARAM_TYPE_UINT64:
 * 			if props.isArray:
*/
      __pyx_t_16 = __Pyx_PyLong_As_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_16 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1043, __pyx_L1_error)
      (__pyx_v_values32[0]) = __pyx_t_16;
    }
    __pyx_L34:;

    /* "brlapi.pyx":1032
 * 				values16 = <uint16_t *>c_value
 * 				values16[0] = value
 * 		elif props.type == PARAM_TYPE_UINT32:             # <<<<<<<<<<<<<<
 * 			if props.isArray:
 * 				size = 4 * len(value)
*/
    goto __pyx_L22;
  }

  /* "brlapi.pyx":1044
 * 				values32 = <uint32_t *>c_value
 * 				values32[0] = value
 * 		elif props.type == PARAM_TYPE_UINT64:             # <<<<<<<<<<<<<<
 * 			if props.isArray:
 * 				size = 4 * len(value)
*/
  __pyx_t_5 = __Pyx_PyLong_From_brlapi_param_type_t(__pyx_v_props->type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_UINT64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1044, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1044, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (likely(__pyx_t_4)) {

    /* "brlapi.pyx":1045
 * 				values32[0] = value
 * 		elif props.type == PARAM_TYPE_UINT64:
 * 			if props.isArray:             # <<<<<<<<<<<<<<
 * 				size = 4 * len(value)
 * 				c_value = <void*>c_brlapi.malloc(size)
*/
    __pyx_t_4 = (__pyx_v_props->isArray != 0);
    if (__pyx_t_4) {

      /* "brlapi.pyx":1046
 * 		elif props.type == PARAM_TYPE_UINT64:
 * 			if props.isArray:
 * 				size = 4 * len(value)             # <<<<<<<<<<<<<<
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values64 = <uint64_t *>c_value
*/
      __pyx_t_10 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1046, __pyx_L1_error)
      __pyx_v_size = (4 * __pyx_t_10);

      /* "brlapi.pyx":1047
 * 			if props.isArray:
 * 				size = 4 * len(value)
 * 				c_value = <void*>c_brlapi.malloc(size)             # <<<<<<<<<<<<<<
 * 				values64 = <uint64_t *>c_value
 * 				for i in len(value):
*/
      __pyx_v_c_value = ((void *)malloc(__pyx_v_size));

      /* "brlapi.pyx":1048
 * 				size = 4 * len(value)
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values64 = <uint64_t *>c_value             # <<<<<<<<<<<<<<
 * 				for i in len(value):
 * 					values64[i] = value[i]
*/
      __pyx_v_values64 = ((uint64_t *)__pyx_v_c_value);

      /* "brlapi.pyx":1049
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values64 = <uint64_t *>c_value
 * 				for i in len(value):             # <<<<<<<<<<<<<<
 * 					values64[i] = value[i]
 * 			else:
*/
      __pyx_t_10 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1049, __pyx_L1_error)
      __pyx_t_7 = PyLong_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1049, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
        __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6);
        __pyx_t_10 = 0;
        __pyx_t_12 = NULL;
      } else {
        __pyx_t_10 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1049, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1049, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      for (;;) {
        if (likely(!__pyx_t_12)) {
          if (likely(PyList_CheckExact(__pyx_t_6))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1049, __pyx_L1_error)
              #endif
              if (__pyx_t_10 >= __pyx_temp) break;
            }
            __pyx_t_7 = __Pyx_PyList_GetItemRefFast(__pyx_t_6, __pyx_t_10, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_10;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1049, __pyx_L1_error)
              #endif
              if (__pyx_t_10 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_10));
            #else
            __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_10);
            #endif
            ++__pyx_t_10;
          }
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1049, __pyx_L1_error)
        } else {
          __pyx_t_7 = __pyx_t_12(__pyx_t_6);
          if (unlikely(!__pyx_t_7)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1049, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "brlapi.pyx":1050
 * 				values64 = <uint64_t *>c_value
 * 				for i in len(value):
 * 					values64[i] = value[i]             # <<<<<<<<<<<<<<
 * 			else:
 * 				size = 8
*/
        __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_value, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1050, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_17 = __Pyx_PyLong_As_uint64_t(__pyx_t_7); if (unlikely((__pyx_t_17 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1050, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1050, __pyx_L1_error)
        (__pyx_v_values64[__pyx_t_14]) = __pyx_t_17;

        /* "brlapi.pyx":1049
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values64 = <uint64_t *>c_value
 * 				for i in len(value):             # <<<<<<<<<<<<<<
 * 					values64[i] = value[i]
 * 			else:
*/
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "brlapi.pyx":1045
 * 				values32[0] = value
 * 		elif props.type == PARAM_TYPE_UINT64:
 * 			if props.isArray:             # <<<<<<<<<<<<<<
 * 				size = 4 * len(value)
 * 				c_value = <void*>c_brlapi.malloc(size)
*/
      goto __pyx_L38;
    }

    /* "brlapi.pyx":1052
 * 					values64[i] = value[i]
 * 			else:
 * 				size = 8             # <<<<<<<<<<<<<<
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values64 = <uint64_t *>c_value
*/
    /*else*/ {
      __pyx_v_size = 8;

      /* "brlapi.pyx":1053
 * 			else:
 * 				size = 8
 * 				c_value = <void*>c_brlapi.malloc(size)             # <<<<<<<<<<<<<<
 * 				values64 = <uint64_t *>c_value
 * 				values64[0] = value
*/
      __pyx_v_c_value = ((void *)malloc(__pyx_v_size));

      /* "brlapi.pyx":1054
 * 				size = 8
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values64 = <uint64_t *>c_value             # <<<<<<<<<<<<<<
 * 				values64[0] = value
 * 		else:
*/
      __pyx_v_values64 = ((uint64_t *)__pyx_v_c_value);

      /* "brlapi.pyx":1055
 * 				c_value = <void*>c_brlapi.malloc(size)
 * 				values64 = <uint64_t *>c_value
 * 				values64[0] = value             # <<<<<<<<<<<<<<
 * 		else:
 * 			raise ValueError("Unsupported parameter type")
*/
      __pyx_t_17 = __Pyx_PyLong_As_uint64_t(__pyx_v_value); if (unlikely((__pyx_t_17 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1055, __pyx_L1_error)
      (__pyx_v_values64[0]) = __pyx_t_17;
    }
    __pyx_L38:;

    /* "brlapi.pyx":1044
 * 				values32 = <uint32_t *>c_value
 * 				values32[0] = value
 * 		elif props.type == PARAM_TYPE_UINT64:             # <<<<<<<<<<<<<<
 * 			if props.isArray:
 * 				size = 4 * len(value)
*/
    goto __pyx_L22;
  }

  /* "brlapi.pyx":1057
 * 				values64[0] = value
 * 		else:
 * 			raise ValueError("Unsupported parameter type")             # <<<<<<<<<<<<<<
 * 
 * 		with nogil:
*/
  /*else*/ {
    __pyx_t_7 = NULL;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Unsupported_parameter_type};
      __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1057, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __PYX_ERR(0, 1057, __pyx_L1_error)
  }
  __pyx_L22:;

  /* "brlapi.pyx":1059
 * 			raise ValueError("Unsupported parameter type")
 * 
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__setParameter(self.h, c_param, c_subparam, c_flags, c_value, size)
 * 		if retval == -1:
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":1060
 * 
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__setParameter(self.h, c_param, c_subparam, c_flags, c_value, size)             # <<<<<<<<<<<<<<
 * 		if retval == -1:
 * 			c_brlapi.free(c_value)
*/
        __pyx_v_retval = brlapi__setParameter(__pyx_v_self->h, __pyx_v_c_param, __pyx_v_c_subparam, __pyx_v_c_flags, __pyx_v_c_value, __pyx_v_size);
      }

      /* "brlapi.pyx":1059
 * 			raise ValueError("Unsupported parameter type")
 * 
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__setParameter(self.h, c_param, c_subparam, c_flags, c_value, size)
 * 		if retval == -1:
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L44;
        }
        __pyx_L44:;
      }
  }

  /* "brlapi.pyx":1061
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__setParameter(self.h, c_param, c_subparam, c_flags, c_value, size)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			c_brlapi.free(c_value)
 * 			raise OperationError()
*/
  __pyx_t_4 = (__pyx_v_retval == -1L);
  if (unlikely(__pyx_t_4)) {

    /* "brlapi.pyx":1062
 * 			retval = c_brlapi.brlapi__setParameter(self.h, c_param, c_subparam, c_flags, c_value, size)
 * 		if retval == -1:
 * 			c_brlapi.free(c_value)             # <<<<<<<<<<<<<<
 * 			raise OperationError()
 * 		c_brlapi.free(c_value)
*/
    free(__pyx_v_c_value);

    /* "brlapi.pyx":1063
 * 		if retval == -1:
 * 			c_brlapi.free(c_value)
 * 			raise OperationError()             # <<<<<<<<<<<<<<
 * 		c_brlapi.free(c_value)
 * 
*/
    __pyx_t_7 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_7);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1063, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __PYX_ERR(0, 1063, __pyx_L1_error)

    /* "brlapi.pyx":1061
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__setParameter(self.h, c_param, c_subparam, c_flags, c_value, size)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			c_brlapi.free(c_value)
 * 			raise OperationError()
*/
  }

  /* "brlapi.pyx":1064
 * 			c_brlapi.free(c_value)
 * 			raise OperationError()
 * 		c_brlapi.free(c_value)             # <<<<<<<<<<<<<<
 * 
 * 	def watchParameter(self, param, subparam, flags, func):
*/
  free(__pyx_v_c_value);

  /* "brlapi.pyx":952
 * 
 * 
 * 	def setParameter(self, param, subparam, flags, value):             # <<<<<<<<<<<<<<
 * 		"""Set the value of a parameter.
 * 		See brlapi_setParameter(3).
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("brlapi.Connection.setParameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":1066
 * 		c_brlapi.free(c_value)
 * 
 * 	def watchParameter(self, param, subparam, flags, func):             # <<<<<<<<<<<<<<
 * 		"""Set a parameter change callback.
 * 		See brlapi_watchParameter(3).
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_47watchParameter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_46watchParameter, "Connection.watchParameter(self, param, subparam, flags, func)\n\nSet a parameter change callback.\nSee brlapi_watchParameter(3).\n\nThis registers a parameter change callback: whenever the given\nparameter changes, the given function is called.\n\nThis returns an entry object, to be passed to unwatchParameter.");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_47watchParameter = {"watchParameter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_47watchParameter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_46watchParameter};
static PyObject *__pyx_pw_6brlapi_10Connection_47watchParameter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_param = 0;
  PyObject *__pyx_v_subparam = 0;
  PyObject *__pyx_v_flags = 0;
  PyObject *__pyx_v_func = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("watchParameter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_param,&__pyx_mstate_global->__pyx_n_u_subparam,&__pyx_mstate_global->__pyx_n_u_flags,&__pyx_mstate_global->__pyx_n_u_func,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1066, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1066, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1066, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1066, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1066, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "watchParameter", 0) < (0)) __PYX_ERR(0, 1066, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("watchParameter", 1, 4, 4, i); __PYX_ERR(0, 1066, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1066, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1066, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1066, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1066, __pyx_L3_error)
    }
    __pyx_v_param = values[0];
    __pyx_v_subparam = values[1];
    __pyx_v_flags = values[2];
    __pyx_v_func = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("watchParameter", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 1066, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.Connection.watchParameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_10Connection_46watchParameter(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self), __pyx_v_param, __pyx_v_subparam, __pyx_v_flags, __pyx_v_func);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":1083
 * 		c_flags = flags
 * 
 * 		def cfunc(param):             # <<<<<<<<<<<<<<
 * 			cdef c_brlapi.brlapi_python_callbackData_t *callbackData
 * 			callbackData = <c_brlapi.brlapi_python_callbackData_t*> <uintptr_t> param
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_14watchParameter_1cfunc(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6brlapi_10Connection_14watchParameter_1cfunc = {"cfunc", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_14watchParameter_1cfunc, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6brlapi_10Connection_14watchParameter_1cfunc(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_param = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cfunc (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_param,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1083, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1083, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "cfunc", 0) < (0)) __PYX_ERR(0, 1083, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("cfunc", 1, 1, 1, i); __PYX_ERR(0, 1083, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1083, __pyx_L3_error)
    }
    __pyx_v_param = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cfunc", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1083, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.Connection.watchParameter.cfunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_10Connection_14watchParameter_cfunc(__pyx_self, __pyx_v_param);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_10Connection_14watchParameter_cfunc(PyObject *__pyx_self, PyObject *__pyx_v_param) {
  struct __pyx_obj_6brlapi___pyx_scope_struct__watchParameter *__pyx_cur_scope;
  struct __pyx_obj_6brlapi___pyx_scope_struct__watchParameter *__pyx_outer_scope;
  brlapi_python_callbackData_t *__pyx_v_callbackData;
  brlapi_param_t __pyx_v_parameter;
  brlapi_param_subparam_t __pyx_v_subparam;
  brlapi_param_flags_t __pyx_v_flags;
  PyObject *__pyx_v_data = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  uintptr_t __pyx_t_1;
  brlapi_param_t __pyx_t_2;
  brlapi_param_subparam_t __pyx_t_3;
  brlapi_param_flags_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  size_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cfunc", 0);
  __pyx_outer_scope = (struct __pyx_obj_6brlapi___pyx_scope_struct__watchParameter *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "brlapi.pyx":1085
 * 		def cfunc(param):
 * 			cdef c_brlapi.brlapi_python_callbackData_t *callbackData
 * 			callbackData = <c_brlapi.brlapi_python_callbackData_t*> <uintptr_t> param             # <<<<<<<<<<<<<<
 * 
 * 			parameter = callbackData.parameter
*/
  __pyx_t_1 = __Pyx_PyLong_As_size_t(__pyx_v_param); if (unlikely((__pyx_t_1 == ((uintptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1085, __pyx_L1_error)
  __pyx_v_callbackData = ((brlapi_python_callbackData_t *)((uintptr_t)__pyx_t_1));

  /* "brlapi.pyx":1087
 * 			callbackData = <c_brlapi.brlapi_python_callbackData_t*> <uintptr_t> param
 * 
 * 			parameter = callbackData.parameter             # <<<<<<<<<<<<<<
 * 			subparam = callbackData.subparam
 * 			flags = callbackData.flags
*/
  __pyx_t_2 = __pyx_v_callbackData->parameter;
  __pyx_v_parameter = __pyx_t_2;

  /* "brlapi.pyx":1088
 * 
 * 			parameter = callbackData.parameter
 * 			subparam = callbackData.subparam             # <<<<<<<<<<<<<<
 * 			flags = callbackData.flags
 * 			data = _parameterToPython(callbackData.parameter, callbackData.data, callbackData.len)
*/
  __pyx_t_3 = __pyx_v_callbackData->subparam;
  __pyx_v_subparam = __pyx_t_3;

  /* "brlapi.pyx":1089
 * 			parameter = callbackData.parameter
 * 			subparam = callbackData.subparam
 * 			flags = callbackData.flags             # <<<<<<<<<<<<<<
 * 			data = _parameterToPython(callbackData.parameter, callbackData.data, callbackData.len)
 * 
*/
  __pyx_t_4 = __pyx_v_callbackData->flags;
  __pyx_v_flags = __pyx_t_4;

  /* "brlapi.pyx":1090
 * 			subparam = callbackData.subparam
 * 			flags = callbackData.flags
 * 			data = _parameterToPython(callbackData.parameter, callbackData.data, callbackData.len)             # <<<<<<<<<<<<<<
 * 
 * 			func(parameter, subparam, flags, data)
*/
  __pyx_t_5 = __pyx_f_6brlapi__parameterToPython(__pyx_v_callbackData->parameter, __pyx_v_callbackData->data, __pyx_v_callbackData->len); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_data = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "brlapi.pyx":1092
 * 			data = _parameterToPython(callbackData.parameter, callbackData.data, callbackData.len)
 * 
 * 			func(parameter, subparam, flags, data)             # <<<<<<<<<<<<<<
 * 
 * 		descr = c_brlapi.brlapi_python_watchParameter(self.h, c_param, c_subparam, c_flags, cfunc)
*/
  __pyx_t_6 = NULL;
  if (unlikely(!__pyx_cur_scope->__pyx_v_func)) { __Pyx_RaiseClosureNameError("func"); __PYX_ERR(0, 1092, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_func);
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_func; 
  __pyx_t_8 = __Pyx_PyLong_From_brlapi_param_t(__pyx_v_parameter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyLong_From_uint64_t(__pyx_v_subparam); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = __Pyx_PyLong_From_uint32_t(__pyx_v_flags); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_11 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_6, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_v_data};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_11, (5-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "brlapi.pyx":1083
 * 		c_flags = flags
 * 
 * 		def cfunc(param):             # <<<<<<<<<<<<<<
 * 			cdef c_brlapi.brlapi_python_callbackData_t *callbackData
 * 			callbackData = <c_brlapi.brlapi_python_callbackData_t*> <uintptr_t> param
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("brlapi.Connection.watchParameter.cfunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":1066
 * 		c_brlapi.free(c_value)
 * 
 * 	def watchParameter(self, param, subparam, flags, func):             # <<<<<<<<<<<<<<
 * 		"""Set a parameter change callback.
 * 		See brlapi_watchParameter(3).
*/

static PyObject *__pyx_pf_6brlapi_10Connection_46watchParameter(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_param, PyObject *__pyx_v_subparam, PyObject *__pyx_v_flags, PyObject *__pyx_v_func) {
  struct __pyx_obj_6brlapi___pyx_scope_struct__watchParameter *__pyx_cur_scope;
  brlapi_param_t __pyx_v_c_param;
  brlapi_param_subparam_t __pyx_v_c_subparam;
  brlapi_param_flags_t __pyx_v_c_flags;
  brlapi_python_paramCallbackDescriptor_t *__pyx_v_descr;
  PyObject *__pyx_v_cfunc = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  brlapi_param_t __pyx_t_1;
  brlapi_param_subparam_t __pyx_t_2;
  brlapi_param_flags_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  brlapi_python_paramCallbackDescriptor_t *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("watchParameter", 0);
  __pyx_cur_scope = (struct __pyx_obj_6brlapi___pyx_scope_struct__watchParameter *)__pyx_tp_new_6brlapi___pyx_scope_struct__watchParameter(__pyx_mstate_global->__pyx_ptype_6brlapi___pyx_scope_struct__watchParameter, __pyx_mstate_global->__pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6brlapi___pyx_scope_struct__watchParameter *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1066, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_func = __pyx_v_func;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_func);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_func);

  /* "brlapi.pyx":1079
 * 		cdef c_brlapi.brlapi_python_paramCallbackDescriptor_t *descr
 * 
 * 		c_param = param             # <<<<<<<<<<<<<<
 * 		c_subparam = subparam
 * 		c_flags = flags
*/
  __pyx_t_1 = __Pyx_PyLong_As_brlapi_param_t(__pyx_v_param); if (unlikely((__pyx_t_1 == ((brlapi_param_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1079, __pyx_L1_error)
  __pyx_v_c_param = __pyx_t_1;

  /* "brlapi.pyx":1080
 * 
 * 		c_param = param
 * 		c_subparam = subparam             # <<<<<<<<<<<<<<
 * 		c_flags = flags
 * 
*/
  __pyx_t_2 = __Pyx_PyLong_As_uint64_t(__pyx_v_subparam); if (unlikely((__pyx_t_2 == ((brlapi_param_subparam_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1080, __pyx_L1_error)
  __pyx_v_c_subparam = __pyx_t_2;

  /* "brlapi.pyx":1081
 * 		c_param = param
 * 		c_subparam = subparam
 * 		c_flags = flags             # <<<<<<<<<<<<<<
 * 
 * 		def cfunc(param):
*/
  __pyx_t_3 = __Pyx_PyLong_As_uint32_t(__pyx_v_flags); if (unlikely((__pyx_t_3 == ((brlapi_param_flags_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1081, __pyx_L1_error)
  __pyx_v_c_flags = __pyx_t_3;

  /* "brlapi.pyx":1083
 * 		c_flags = flags
 * 
 * 		def cfunc(param):             # <<<<<<<<<<<<<<
 * 			cdef c_brlapi.brlapi_python_callbackData_t *callbackData
 * 			callbackData = <c_brlapi.brlapi_python_callbackData_t*> <uintptr_t> param
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_14watchParameter_1cfunc, 0, __pyx_mstate_global->__pyx_n_u_watchParameter_locals_cfunc, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_cfunc = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "brlapi.pyx":1094
 * 			func(parameter, subparam, flags, data)
 * 
 * 		descr = c_brlapi.brlapi_python_watchParameter(self.h, c_param, c_subparam, c_flags, cfunc)             # <<<<<<<<<<<<<<
 * 		return <uintptr_t>descr
 * 
*/
  __pyx_t_5 = brlapi_python_watchParameter(__pyx_v_self->h, __pyx_v_c_param, __pyx_v_c_subparam, __pyx_v_c_flags, __pyx_v_cfunc); if (unlikely(__pyx_t_5 == ((void *)NULL))) __PYX_ERR(0, 1094, __pyx_L1_error)
  __pyx_v_descr = __pyx_t_5;

  /* "brlapi.pyx":1095
 * 
 * 		descr = c_brlapi.brlapi_python_watchParameter(self.h, c_param, c_subparam, c_flags, cfunc)
 * 		return <uintptr_t>descr             # <<<<<<<<<<<<<<
 * 
 * 	def unwatchParameter(self, entry):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyLong_FromSize_t(((uintptr_t)__pyx_v_descr)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "brlapi.pyx":1066
 * 		c_brlapi.free(c_value)
 * 
 * 	def watchParameter(self, param, subparam, flags, func):             # <<<<<<<<<<<<<<
 * 		"""Set a parameter change callback.
 * 		See brlapi_watchParameter(3).
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("brlapi.Connection.watchParameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cfunc);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "brlapi.pyx":1097
 * 		return <uintptr_t>descr
 * 
 * 	def unwatchParameter(self, entry):             # <<<<<<<<<<<<<<
 * 		"""Clear a parameter change callback.
 * 		See brlapi_unwatchParameter(3).
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_49unwatchParameter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_48unwatchParameter, "Connection.unwatchParameter(self, entry)\n\nClear a parameter change callback.\nSee brlapi_unwatchParameter(3).\n\nThis unregisters a parameter change callback: the callback\nfunction previously registered with brlapi_watchParameter\nwill not be called any more.");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_49unwatchParameter = {"unwatchParameter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_49unwatchParameter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_48unwatchParameter};
static PyObject *__pyx_pw_6brlapi_10Connection_49unwatchParameter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_entry = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unwatchParameter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_entry,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1097, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1097, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "unwatchParameter", 0) < (0)) __PYX_ERR(0, 1097, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("unwatchParameter", 1, 1, 1, i); __PYX_ERR(0, 1097, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1097, __pyx_L3_error)
    }
    __pyx_v_entry = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("unwatchParameter", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1097, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.Connection.unwatchParameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_10Connection_48unwatchParameter(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self), __pyx_v_entry);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_10Connection_48unwatchParameter(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_entry) {
  uintptr_t __pyx_v_descr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  uintptr_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unwatchParameter", 0);

  /* "brlapi.pyx":1106
 * 		cdef uintptr_t descr
 * 
 * 		descr = entry             # <<<<<<<<<<<<<<
 * 		c_brlapi.brlapi_python_unwatchParameter(self.h, <c_brlapi.brlapi_python_paramCallbackDescriptor_t *>descr)
 * 
*/
  __pyx_t_1 = __Pyx_PyLong_As_size_t(__pyx_v_entry); if (unlikely((__pyx_t_1 == ((uintptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1106, __pyx_L1_error)
  __pyx_v_descr = __pyx_t_1;

  /* "brlapi.pyx":1107
 * 
 * 		descr = entry
 * 		c_brlapi.brlapi_python_unwatchParameter(self.h, <c_brlapi.brlapi_python_paramCallbackDescriptor_t *>descr)             # <<<<<<<<<<<<<<
 * 
 * 	def pause(self, timeout_ms):
*/
  (void)(brlapi_python_unwatchParameter(__pyx_v_self->h, ((brlapi_python_paramCallbackDescriptor_t *)__pyx_v_descr)));

  /* "brlapi.pyx":1097
 * 		return <uintptr_t>descr
 * 
 * 	def unwatchParameter(self, entry):             # <<<<<<<<<<<<<<
 * 		"""Clear a parameter change callback.
 * 		See brlapi_unwatchParameter(3).
*/

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

/* "brlapi.pyx":1109
 * 		c_brlapi.brlapi_python_unwatchParameter(self.h, <c_brlapi.brlapi_python_paramCallbackDescriptor_t *>descr)
 * 
 * 	def pause(self, timeout_ms):             # <<<<<<<<<<<<<<
 * 		"""Wait until an event is received from the BrlAPI server.
 * 		See brlapi_pause(3).
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_51pause(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_50pause, "Connection.pause(self, timeout_ms)\n\nWait until an event is received from the BrlAPI server.\nSee brlapi_pause(3).");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_51pause = {"pause", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_51pause, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_50pause};
static PyObject *__pyx_pw_6brlapi_10Connection_51pause(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_timeout_ms = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pause (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_timeout_ms,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1109, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1109, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "pause", 0) < (0)) __PYX_ERR(0, 1109, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("pause", 1, 1, 1, i); __PYX_ERR(0, 1109, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1109, __pyx_L3_error)
    }
    __pyx_v_timeout_ms = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pause", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1109, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.Connection.pause", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_10Connection_50pause(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self), __pyx_v_timeout_ms);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_10Connection_50pause(struct __pyx_obj_6brlapi_Connection *__pyx_v_self, PyObject *__pyx_v_timeout_ms) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pause", 0);

  /* "brlapi.pyx":1113
 * 		See brlapi_pause(3).
 * 		"""
 * 		c_brlapi.brlapi__pause(self.h, timeout_ms)             # <<<<<<<<<<<<<<
 * 
 * 	def sync(self):
*/
  __pyx_t_1 = __Pyx_PyLong_As_int(__pyx_v_timeout_ms); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1113, __pyx_L1_error)
  (void)(brlapi__pause(__pyx_v_self->h, __pyx_t_1));

  /* "brlapi.pyx":1109
 * 		c_brlapi.brlapi_python_unwatchParameter(self.h, <c_brlapi.brlapi_python_paramCallbackDescriptor_t *>descr)
 * 
 * 	def pause(self, timeout_ms):             # <<<<<<<<<<<<<<
 * 		"""Wait until an event is received from the BrlAPI server.
 * 		See brlapi_pause(3).
*/

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

/* "brlapi.pyx":1115
 * 		c_brlapi.brlapi__pause(self.h, timeout_ms)
 * 
 * 	def sync(self):             # <<<<<<<<<<<<<<
 * 		"""Synchronize against any pending exception, and raise it.
 * 		See brlapi_sync(3).
*/

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_53sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_52sync, "Connection.sync(self)\n\nSynchronize against any pending exception, and raise it.\nSee brlapi_sync(3).");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_53sync = {"sync", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_53sync, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_52sync};
static PyObject *__pyx_pw_6brlapi_10Connection_53sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sync (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("sync", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("sync", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_6brlapi_10Connection_52sync(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_6brlapi_10Connection_52sync(struct __pyx_obj_6brlapi_Connection *__pyx_v_self) {
  int __pyx_v_retval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sync", 0);

  /* "brlapi.pyx":1121
 * 		cdef int retval
 * 
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__sync(self.h)
 * 		if retval == -1:
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "brlapi.pyx":1122
 * 
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__sync(self.h)             # <<<<<<<<<<<<<<
 * 		if retval == -1:
 * 			raise OperationError()
*/
        __pyx_v_retval = brlapi__sync(__pyx_v_self->h);
      }

      /* "brlapi.pyx":1121
 * 		cdef int retval
 * 
 * 		with nogil:             # <<<<<<<<<<<<<<
 * 			retval = c_brlapi.brlapi__sync(self.h)
 * 		if retval == -1:
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "brlapi.pyx":1123
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__sync(self.h)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
*/
  __pyx_t_1 = (__pyx_v_retval == -1L);
  if (unlikely(__pyx_t_1)) {

    /* "brlapi.pyx":1124
 * 			retval = c_brlapi.brlapi__sync(self.h)
 * 		if retval == -1:
 * 			raise OperationError()             # <<<<<<<<<<<<<<
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1124, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1124, __pyx_L1_error)

    /* "brlapi.pyx":1123
 * 		with nogil:
 * 			retval = c_brlapi.brlapi__sync(self.h)
 * 		if retval == -1:             # <<<<<<<<<<<<<<
 * 			raise OperationError()
*/
  }

  /* "brlapi.pyx":1115
 * 		c_brlapi.brlapi__pause(self.h, timeout_ms)
 * 
 * 	def sync(self):             # <<<<<<<<<<<<<<
 * 		"""Synchronize against any pending exception, and raise it.
 * 		See brlapi_sync(3).
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("brlapi.Connection.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_55__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_54__reduce_cython__, "Connection.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_55__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_55__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_54__reduce_cython__};
static PyObject *__pyx_pw_6brlapi_10Connection_55__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_6brlapi_10Connection_54__reduce_cython__(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_6brlapi_10Connection_54__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6brlapi_Connection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.h cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.h cannot be converted to a Python object for pickling"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_h_cannot_be_converted_to_a, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("brlapi.Connection.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_6brlapi_10Connection_57__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6brlapi_10Connection_56__setstate_cython__, "Connection.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_6brlapi_10Connection_57__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_57__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_56__setstate_cython__};
static PyObject *__pyx_pw_6brlapi_10Connection_57__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("brlapi.Connection.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6brlapi_10Connection_56__setstate_cython__(((struct __pyx_obj_6brlapi_Connection *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6brlapi_10Connection_56__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6brlapi_Connection *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "self.h cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.h cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_h_cannot_be_converted_to_a, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("brlapi.Connection.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* #### Code section: module_exttypes ### */

static PyObject *__pyx_tp_new_6brlapi_WriteStruct(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_6brlapi_WriteStruct(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6brlapi_WriteStruct) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static PyObject *__pyx_getprop_6brlapi_11WriteStruct_displayNumber(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6brlapi_11WriteStruct_13displayNumber_1__get__(o);
}

static int __pyx_setprop_6brlapi_11WriteStruct_displayNumber(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6brlapi_11WriteStruct_13displayNumber_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6brlapi_11WriteStruct_regionBegin(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6brlapi_11WriteStruct_11regionBegin_1__get__(o);
}

static int __pyx_setprop_6brlapi_11WriteStruct_regionBegin(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6brlapi_11WriteStruct_11regionBegin_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6brlapi_11WriteStruct_regionSize(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6brlapi_11WriteStruct_10regionSize_1__get__(o);
}

static int __pyx_setprop_6brlapi_11WriteStruct_regionSize(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6brlapi_11WriteStruct_10regionSize_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6brlapi_11WriteStruct_text(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6brlapi_11WriteStruct_4text_1__get__(o);
}

static int __pyx_setprop_6brlapi_11WriteStruct_text(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6brlapi_11WriteStruct_4text_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6brlapi_11WriteStruct_cursor(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6brlapi_11WriteStruct_6cursor_1__get__(o);
}

static int __pyx_setprop_6brlapi_11WriteStruct_cursor(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6brlapi_11WriteStruct_6cursor_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6brlapi_11WriteStruct_charset(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6brlapi_11WriteStruct_7charset_1__get__(o);
}

static int __pyx_setprop_6brlapi_11WriteStruct_charset(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6brlapi_11WriteStruct_7charset_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6brlapi_11WriteStruct_attrAnd(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6brlapi_11WriteStruct_7attrAnd_1__get__(o);
}

static int __pyx_setprop_6brlapi_11WriteStruct_attrAnd(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6brlapi_11WriteStruct_7attrAnd_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6brlapi_11WriteStruct_attrOr(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6brlapi_11WriteStruct_6attrOr_1__get__(o);
}

static int __pyx_setprop_6brlapi_11WriteStruct_attrOr(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6brlapi_11WriteStruct_6attrOr_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_6brlapi_WriteStruct[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_11WriteStruct_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_11WriteStruct_2__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_11WriteStruct_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_11WriteStruct_4__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6brlapi_WriteStruct[] = {
  {"displayNumber", __pyx_getprop_6brlapi_11WriteStruct_displayNumber, __pyx_setprop_6brlapi_11WriteStruct_displayNumber, PyDoc_STR("Display number DISPLAY_DEFAULT == unspecified"), 0},
  {"regionBegin", __pyx_getprop_6brlapi_11WriteStruct_regionBegin, __pyx_setprop_6brlapi_11WriteStruct_regionBegin, PyDoc_STR("Region of display to update, 1st character of display is 1"), 0},
  {"regionSize", __pyx_getprop_6brlapi_11WriteStruct_regionSize, __pyx_setprop_6brlapi_11WriteStruct_regionSize, PyDoc_STR("Number of characters held in text, attrAnd and attrOr. For multibytes text, this is the number of multibyte characters. Combining and double-width characters count for 1"), 0},
  {"text", __pyx_getprop_6brlapi_11WriteStruct_text, __pyx_setprop_6brlapi_11WriteStruct_text, PyDoc_STR("Text to display"), 0},
  {"cursor", __pyx_getprop_6brlapi_11WriteStruct_cursor, __pyx_setprop_6brlapi_11WriteStruct_cursor, PyDoc_STR("CURSOR_LEAVE == don't touch, CURSOR_OFF == turn off, 1 = 1st char of display, ..."), 0},
  {"charset", __pyx_getprop_6brlapi_11WriteStruct_charset, __pyx_setprop_6brlapi_11WriteStruct_charset, PyDoc_STR("Character set of the text"), 0},
  {"attrAnd", __pyx_getprop_6brlapi_11WriteStruct_attrAnd, __pyx_setprop_6brlapi_11WriteStruct_attrAnd, PyDoc_STR("And attributes; applied first"), 0},
  {"attrOr", __pyx_getprop_6brlapi_11WriteStruct_attrOr, __pyx_setprop_6brlapi_11WriteStruct_attrOr, PyDoc_STR("Or attributes; applied after ANDing"), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6brlapi_WriteStruct_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6brlapi_WriteStruct},
  {Py_tp_doc, (void *)PyDoc_STR("WriteStruct()\n\nStructure containing arguments to be given to Connection.write()\nSee brlapi_writeArguments_t(3).\n\nThis is DEPRECATED. Use the named parameters of write() instead.")},
  {Py_tp_methods, (void *)__pyx_methods_6brlapi_WriteStruct},
  {Py_tp_getset, (void *)__pyx_getsets_6brlapi_WriteStruct},
  {Py_tp_init, (void *)__pyx_pw_6brlapi_11WriteStruct_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6brlapi_WriteStruct},
  {0, 0},
};
static PyType_Spec __pyx_type_6brlapi_WriteStruct_spec = {
  "brlapi.WriteStruct",
  sizeof(struct __pyx_obj_6brlapi_WriteStruct),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_6brlapi_WriteStruct_slots,
};
#else

static PyTypeObject __pyx_type_6brlapi_WriteStruct = {
  PyVarObject_HEAD_INIT(0, 0)
  "brlapi.""WriteStruct", /*tp_name*/
  sizeof(struct __pyx_obj_6brlapi_WriteStruct), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6brlapi_WriteStruct, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("WriteStruct()\n\nStructure containing arguments to be given to Connection.write()\nSee brlapi_writeArguments_t(3).\n\nThis is DEPRECATED. Use the named parameters of write() instead."), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6brlapi_WriteStruct, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6brlapi_WriteStruct, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6brlapi_11WriteStruct_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6brlapi_WriteStruct, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_6brlapi_Connection(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  return o;
}

#if CYTHON_USE_TP_FINALIZE

static void __pyx_tp_finalize_6brlapi_Connection(PyObject *o) {
  PyObject *etype, *eval, *etb;
  PyErr_Fetch(&etype, &eval, &etb);
  __pyx_pw_6brlapi_10Connection_5__del__(o);
  PyErr_Restore(etype, eval, etb);
}
#endif

static void __pyx_tp_dealloc_6brlapi_Connection(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6brlapi_Connection) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static PyObject *__pyx_getprop_6brlapi_10Connection_host(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6brlapi_10Connection_4host_1__get__(o);
}

static PyObject *__pyx_getprop_6brlapi_10Connection_auth(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6brlapi_10Connection_4auth_1__get__(o);
}

static PyObject *__pyx_getprop_6brlapi_10Connection_fileDescriptor(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6brlapi_10Connection_14fileDescriptor_1__get__(o);
}

static PyObject *__pyx_getprop_6brlapi_10Connection_displaySize(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6brlapi_10Connection_11displaySize_1__get__(o);
}

static PyObject *__pyx_getprop_6brlapi_10Connection_driverName(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6brlapi_10Connection_10driverName_1__get__(o);
}

static PyObject *__pyx_getprop_6brlapi_10Connection_modelIdentifier(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6brlapi_10Connection_15modelIdentifier_1__get__(o);
}

static PyMethodDef __pyx_methods_6brlapi_Connection[] = {
  {"closeConnection", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_3closeConnection, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_2closeConnection},
  {"enterTtyMode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_7enterTtyMode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_6enterTtyMode},
  {"enterTtyModeWithPath", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_9enterTtyModeWithPath, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_8enterTtyModeWithPath},
  {"leaveTtyMode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_11leaveTtyMode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_10leaveTtyMode},
  {"setFocus", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_13setFocus, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_12setFocus},
  {"write", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_15write, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_14write},
  {"writeDots", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_17writeDots, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_16writeDots},
  {"writeText", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_19writeText, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_18writeText},
  {"readKey", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_21readKey, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_20readKey},
  {"readKeyWithTimeout", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_23readKeyWithTimeout, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_22readKeyWithTimeout},
  {"expandKeyCode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_25expandKeyCode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_24expandKeyCode},
  {"ignoreKeys", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_27ignoreKeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_26ignoreKeys},
  {"acceptKeys", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_29acceptKeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_28acceptKeys},
  {"ignoreAllKeys", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_31ignoreAllKeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_30ignoreAllKeys},
  {"acceptAllKeys", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_33acceptAllKeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_32acceptAllKeys},
  {"ignoreKeyRanges", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_35ignoreKeyRanges, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_34ignoreKeyRanges},
  {"acceptKeyRanges", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_37acceptKeyRanges, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_36acceptKeyRanges},
  {"enterRawMode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_39enterRawMode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_38enterRawMode},
  {"leaveRawMode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_41leaveRawMode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_40leaveRawMode},
  {"getParameter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_43getParameter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_42getParameter},
  {"setParameter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_45setParameter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_44setParameter},
  {"watchParameter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_47watchParameter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_46watchParameter},
  {"unwatchParameter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_49unwatchParameter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_48unwatchParameter},
  {"pause", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_51pause, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_50pause},
  {"sync", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_53sync, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_52sync},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_55__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_54__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6brlapi_10Connection_57__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6brlapi_10Connection_56__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6brlapi_Connection[] = {
  {"host", __pyx_getprop_6brlapi_10Connection_host, 0, PyDoc_STR("To get authorized to connect, libbrlapi has to tell the BrlAPI server a secret key, for security reasons. This is the path to the file which holds it; it will hence have to be readable by the application."), 0},
  {"auth", __pyx_getprop_6brlapi_10Connection_auth, 0, PyDoc_STR("This tells where the BrlAPI server resides : it might be listening on another computer, on any TCP port. It should look like \"foo:1\", which means TCP port number BRLAPI_SOCKETPORTNUM+1 on computer called \"foo\"."), 0},
  {"fileDescriptor", __pyx_getprop_6brlapi_10Connection_fileDescriptor, 0, PyDoc_STR("Returns the Unix file descriptor that the connection uses"), 0},
  {"displaySize", __pyx_getprop_6brlapi_10Connection_displaySize, 0, PyDoc_STR("Get the size of the braille display\n\t\tSee brlapi_getDisplaySize(3)."), 0},
  {"driverName", __pyx_getprop_6brlapi_10Connection_driverName, 0, PyDoc_STR("Get the complete name of the driver used by BrlTTY\n\t\tSee brlapi_getDriverName(3)."), 0},
  {"modelIdentifier", __pyx_getprop_6brlapi_10Connection_modelIdentifier, 0, PyDoc_STR("Get the identifier for the model of the braille display\n\t\tSee brlapi_getModelIdentifier(3)."), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6brlapi_Connection_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6brlapi_Connection},
  {Py_tp_doc, (void *)PyDoc_STR("Connection(host=None, auth=None)\n\nClass which manages the bridge between your program and BrlAPI")},
  {Py_tp_methods, (void *)__pyx_methods_6brlapi_Connection},
  {Py_tp_getset, (void *)__pyx_getsets_6brlapi_Connection},
  {Py_tp_init, (void *)__pyx_pw_6brlapi_10Connection_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6brlapi_Connection},
  #if CYTHON_USE_TP_FINALIZE
  {Py_tp_finalize, (void *)__pyx_tp_finalize_6brlapi_Connection},
  #endif
  {0, 0},
};
static PyType_Spec __pyx_type_6brlapi_Connection_spec = {
  "brlapi.Connection",
  sizeof(struct __pyx_obj_6brlapi_Connection),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_6brlapi_Connection_slots,
};
#else

static PyTypeObject __pyx_type_6brlapi_Connection = {
  PyVarObject_HEAD_INIT(0, 0)
  "brlapi.""Connection", /*tp_name*/
  sizeof(struct __pyx_obj_6brlapi_Connection), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6brlapi_Connection, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("Connection(host=None, auth=None)\n\nClass which manages the bridge between your program and BrlAPI"), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6brlapi_Connection, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6brlapi_Connection, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6brlapi_10Connection_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6brlapi_Connection, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  __pyx_tp_finalize_6brlapi_Connection, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_6brlapi___pyx_scope_struct__watchParameter(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_mstate_global->__pyx_freecount_6brlapi___pyx_scope_struct__watchParameter > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_6brlapi___pyx_scope_struct__watchParameter, sizeof(struct __pyx_obj_6brlapi___pyx_scope_struct__watchParameter))))
  {
    o = (PyObject*)__pyx_mstate_global->__pyx_freelist_6brlapi___pyx_scope_struct__watchParameter[--__pyx_mstate_global->__pyx_freecount_6brlapi___pyx_scope_struct__watchParameter];
    #if CYTHON_USE_TYPE_SPECS
    Py_DECREF(Py_TYPE(o));
    #endif
    memset(o, 0, sizeof(struct __pyx_obj_6brlapi___pyx_scope_struct__watchParameter));
    #if CYTHON_COMPILING_IN_LIMITED_API
    (void) PyObject_Init(o, t);
    #else
    (void) PyObject_INIT(o, t);
    #endif
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = __Pyx_AllocateExtensionType(t, 1);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6brlapi___pyx_scope_struct__watchParameter(PyObject *o) {
  struct __pyx_obj_6brlapi___pyx_scope_struct__watchParameter *p = (struct __pyx_obj_6brlapi___pyx_scope_struct__watchParameter *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6brlapi___pyx_scope_struct__watchParameter) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_func);
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_mstate_global->__pyx_freecount_6brlapi___pyx_scope_struct__watchParameter < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_6brlapi___pyx_scope_struct__watchParameter, sizeof(struct __pyx_obj_6brlapi___pyx_scope_struct__watchParameter))))
  {
    __pyx_mstate_global->__pyx_freelist_6brlapi___pyx_scope_struct__watchParameter[__pyx_mstate_global->__pyx_freecount_6brlapi___pyx_scope_struct__watchParameter++] = ((struct __pyx_obj_6brlapi___pyx_scope_struct__watchParameter *)o);
  } else
  #endif
  {
    PyTypeObject *tp = Py_TYPE(o);
    #if CYTHON_USE_TYPE_SLOTS
    (*tp->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
    #if CYTHON_USE_TYPE_SPECS
    Py_DECREF(tp);
    #endif
  }
}

static int __pyx_tp_traverse_6brlapi___pyx_scope_struct__watchParameter(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6brlapi___pyx_scope_struct__watchParameter *p = (struct __pyx_obj_6brlapi___pyx_scope_struct__watchParameter *)o;
  {
    e = __Pyx_call_type_traverse(o, 1, v, a);
    if (e) return e;
  }
  if (p->__pyx_v_func) {
    e = (*v)(p->__pyx_v_func, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6brlapi___pyx_scope_struct__watchParameter(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6brlapi___pyx_scope_struct__watchParameter *p = (struct __pyx_obj_6brlapi___pyx_scope_struct__watchParameter *)o;
  tmp = ((PyObject*)p->__pyx_v_func);
  p->__pyx_v_func = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6brlapi___pyx_scope_struct__watchParameter_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6brlapi___pyx_scope_struct__watchParameter},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6brlapi___pyx_scope_struct__watchParameter},
  {Py_tp_clear, (void *)__pyx_tp_clear_6brlapi___pyx_scope_struct__watchParameter},
  {Py_tp_new, (void *)__pyx_tp_new_6brlapi___pyx_scope_struct__watchParameter},
  {0, 0},
};
static PyType_Spec __pyx_type_6brlapi___pyx_scope_struct__watchParameter_spec = {
  "brlapi.__pyx_scope_struct__watchParameter",
  sizeof(struct __pyx_obj_6brlapi___pyx_scope_struct__watchParameter),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6brlapi___pyx_scope_struct__watchParameter_slots,
};
#else

static PyTypeObject __pyx_type_6brlapi___pyx_scope_struct__watchParameter = {
  PyVarObject_HEAD_INIT(0, 0)
  "brlapi.""__pyx_scope_struct__watchParameter", /*tp_name*/
  sizeof(struct __pyx_obj_6brlapi___pyx_scope_struct__watchParameter), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6brlapi___pyx_scope_struct__watchParameter, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6brlapi___pyx_scope_struct__watchParameter, /*tp_traverse*/
  __pyx_tp_clear_6brlapi___pyx_scope_struct__watchParameter, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6brlapi___pyx_scope_struct__watchParameter, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};
/* #### Code section: initfunc_declarations ### */
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/
/* #### Code section: init_module ### */

static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_6brlapi_WriteStruct = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6brlapi_WriteStruct_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_6brlapi_WriteStruct)) __PYX_ERR(0, 294, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6brlapi_WriteStruct_spec, __pyx_mstate->__pyx_ptype_6brlapi_WriteStruct) < (0)) __PYX_ERR(0, 294, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_6brlapi_WriteStruct = &__pyx_type_6brlapi_WriteStruct;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_6brlapi_WriteStruct) < (0)) __PYX_ERR(0, 294, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_6brlapi_WriteStruct);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_6brlapi_WriteStruct->tp_dictoffset && __pyx_mstate->__pyx_ptype_6brlapi_WriteStruct->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_6brlapi_WriteStruct->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_WriteStruct, (PyObject *) __pyx_mstate->__pyx_ptype_6brlapi_WriteStruct) < (0)) __PYX_ERR(0, 294, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_6brlapi_WriteStruct) < (0)) __PYX_ERR(0, 294, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_6brlapi_Connection = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6brlapi_Connection_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_6brlapi_Connection)) __PYX_ERR(0, 432, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6brlapi_Connection_spec, __pyx_mstate->__pyx_ptype_6brlapi_Connection) < (0)) __PYX_ERR(0, 432, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_6brlapi_Connection = &__pyx_type_6brlapi_Connection;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_6brlapi_Connection) < (0)) __PYX_ERR(0, 432, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_6brlapi_Connection);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_6brlapi_Connection->tp_dictoffset && __pyx_mstate->__pyx_ptype_6brlapi_Connection->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_6brlapi_Connection->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_6brlapi_Connection, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 432, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_6brlapi_10Connection___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_6brlapi_10Connection___init__.doc = __pyx_doc_6brlapi_10Connection___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6brlapi_10Connection___init__;
    }
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_6brlapi_Connection, "__del__"); if (unlikely(!wrapper)) __PYX_ERR(0, 432, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_6brlapi_10Connection_4__del__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_6brlapi_10Connection_4__del__.doc = __pyx_doc_6brlapi_10Connection_4__del__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6brlapi_10Connection_4__del__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Connection, (PyObject *) __pyx_mstate->__pyx_ptype_6brlapi_Connection) < (0)) __PYX_ERR(0, 432, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_6brlapi_Connection) < (0)) __PYX_ERR(0, 432, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_6brlapi___pyx_scope_struct__watchParameter = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6brlapi___pyx_scope_struct__watchParameter_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_6brlapi___pyx_scope_struct__watchParameter)) __PYX_ERR(0, 1066, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6brlapi___pyx_scope_struct__watchParameter_spec, __pyx_mstate->__pyx_ptype_6brlapi___pyx_scope_struct__watchParameter) < (0)) __PYX_ERR(0, 1066, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_6brlapi___pyx_scope_struct__watchParameter = &__pyx_type_6brlapi___pyx_scope_struct__watchParameter;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_6brlapi___pyx_scope_struct__watchParameter) < (0)) __PYX_ERR(0, 1066, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_6brlapi___pyx_scope_struct__watchParameter);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_6brlapi___pyx_scope_struct__watchParameter->tp_dictoffset && __pyx_mstate->__pyx_ptype_6brlapi___pyx_scope_struct__watchParameter->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_6brlapi___pyx_scope_struct__watchParameter->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_2_5(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_5(PyTypeObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  0, 0,
  #else
  sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_5(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_5); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_brlapi(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_brlapi},
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE},
  #endif
  #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE
  {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
  #endif
  {0, NULL}
};
#endif

#ifdef __cplusplus
namespace {
  struct PyModuleDef __pyx_moduledef =
  #else
  static struct PyModuleDef __pyx_moduledef =
  #endif
  {
      PyModuleDef_HEAD_INIT,
      "brlapi",
      __pyx_k_This_module_implements_a_set_of, /* m_doc */
    #if CYTHON_USE_MODULE_STATE
      sizeof(__pyx_mstatetype), /* m_size */
    #else
      (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */
    #endif
      __pyx_methods /* m_methods */,
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      __pyx_moduledef_slots, /* m_slots */
    #else
      NULL, /* m_reload */
    #endif
    #if CYTHON_USE_MODULE_STATE
      __pyx_m_traverse, /* m_traverse */
      __pyx_m_clear, /* m_clear */
      NULL /* m_free */
    #else
      NULL, /* m_traverse */
      NULL, /* m_clear */
      NULL /* m_free */
    #endif
  };
  #ifdef __cplusplus
} /* anonymous namespace */
#endif

/* PyModInitFuncType */
#ifndef CYTHON_NO_PYINIT_EXPORT
  #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#else
  #ifdef __cplusplus
  #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
  #else
  #define __Pyx_PyMODINIT_FUNC PyObject *
  #endif
#endif

__Pyx_PyMODINIT_FUNC PyInit_brlapi(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_brlapi(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
/* ModuleCreationPEP489 */
#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
      || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) {
    {
        PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think
        if (!module) {
            PyErr_Clear(); // just try the 3.8-3.12 version
            module = PyImport_ImportModule("_xxsubinterpreters");
            if (!module) goto bad;
        }
        PyObject *current = PyObject_CallMethod(module, "get_current", NULL);
        Py_DECREF(module);
        if (!current) goto bad;
        if (PyTuple_Check(current)) {
            PyObject *new_current = PySequence_GetItem(current, 0);
            Py_DECREF(current);
            current = new_current;
            if (!new_current) goto bad;
        }
        long long as_c_int = PyLong_AsLongLong(current);
        Py_DECREF(current);
        return as_c_int;
    }
  bad:
    PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n");
    return -1;
}
#endif
#if !CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    static PY_INT64_T main_interpreter_id = -1;
#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
    PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
#elif CYTHON_COMPILING_IN_GRAAL
    PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
      || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
    PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId();
#elif CYTHON_COMPILING_IN_LIMITED_API
    PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get());
#else
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
#endif
    if (unlikely(current_id == -1)) {
        return -1;
    }
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return 0;
    } else if (unlikely(main_interpreter_id != current_id)) {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
#endif
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
{
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    CYTHON_UNUSED_VAR(def);
    #if !CYTHON_USE_MODULE_STATE
    if (__Pyx_check_single_interpreter())
        return NULL;
    #endif
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_brlapi(PyObject *__pyx_pyinit_module)
#endif
{
  int stringtab_initialized = 0;
  #if CYTHON_USE_MODULE_STATE
  int pystate_addmodule_run = 0;
  #endif
  __pyx_mstatetype *__pyx_mstate = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'brlapi' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #else
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_t_1 = __pyx_pyinit_module;
  Py_INCREF(__pyx_t_1);
  #else
  __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #if CYTHON_USE_MODULE_STATE
  {
    int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef);
    __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "brlapi" pseudovariable */
    if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    pystate_addmodule_run = 1;
  }
  #else
  __pyx_m = __pyx_t_1;
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED);
  #endif
  __pyx_mstate = __pyx_mstate_global;
  CYTHON_UNUSED_VAR(__pyx_t_1);
  __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_mstate->__pyx_d);
  __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /* ImportRefnannyAPI */
  #if CYTHON_REFNANNY
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
    PyErr_Clear();
    __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
    if (!__Pyx_RefNanny)
        Py_FatalError("failed to import 'refnanny' module");
  }
  #endif
  
__Pyx_RefNannySetupContext("PyInit_brlapi", 0);
  __Pyx_init_runtime_version();
  if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Library function declarations ---*/
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  stringtab_initialized = 1;
  if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__pyx_module_is_main_brlapi) {
    if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "brlapi")) {
      if (unlikely((PyDict_SetItemString(modules, "brlapi", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code(__pyx_mstate);
  (void)__Pyx_modinit_variable_export_code(__pyx_mstate);
  (void)__Pyx_modinit_function_export_code(__pyx_mstate);
  if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_variable_import_code(__pyx_mstate);
  (void)__Pyx_modinit_function_import_code(__pyx_mstate);
  /*--- Execution code ---*/

  /* "brlapi.pyx":133
 * cimport c_brlapi
 * from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t, uintptr_t
 * import errno             # <<<<<<<<<<<<<<
 * 
 * include "constants.auto.pyx"
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_errno, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_errno, __pyx_t_2) < (0)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":1
 * TTY_DEFAULT = -1             # <<<<<<<<<<<<<<
 * DISPLAY_DEFAULT = -1
 * CURSOR_LEAVE = -1
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_TTY_DEFAULT, __pyx_mstate_global->__pyx_int_neg_1) < (0)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "constants.auto.pyx":2
 * TTY_DEFAULT = -1
 * DISPLAY_DEFAULT = -1             # <<<<<<<<<<<<<<
 * CURSOR_LEAVE = -1
 * CURSOR_OFF = 0
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DISPLAY_DEFAULT, __pyx_mstate_global->__pyx_int_neg_1) < (0)) __PYX_ERR(3, 2, __pyx_L1_error)

  /* "constants.auto.pyx":3
 * TTY_DEFAULT = -1
 * DISPLAY_DEFAULT = -1
 * CURSOR_LEAVE = -1             # <<<<<<<<<<<<<<
 * CURSOR_OFF = 0
 * rangeType_all = 0
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_CURSOR_LEAVE, __pyx_mstate_global->__pyx_int_neg_1) < (0)) __PYX_ERR(3, 3, __pyx_L1_error)

  /* "constants.auto.pyx":4
 * DISPLAY_DEFAULT = -1
 * CURSOR_LEAVE = -1
 * CURSOR_OFF = 0             # <<<<<<<<<<<<<<
 * rangeType_all = 0
 * rangeType_type = 1
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_CURSOR_OFF, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(3, 4, __pyx_L1_error)

  /* "constants.auto.pyx":5
 * CURSOR_LEAVE = -1
 * CURSOR_OFF = 0
 * rangeType_all = 0             # <<<<<<<<<<<<<<
 * rangeType_type = 1
 * rangeType_command = 2
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_rangeType_all, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(3, 5, __pyx_L1_error)

  /* "constants.auto.pyx":6
 * CURSOR_OFF = 0
 * rangeType_all = 0
 * rangeType_type = 1             # <<<<<<<<<<<<<<
 * rangeType_command = 2
 * rangeType_key = 3
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_rangeType_type, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(3, 6, __pyx_L1_error)

  /* "constants.auto.pyx":7
 * rangeType_all = 0
 * rangeType_type = 1
 * rangeType_command = 2             # <<<<<<<<<<<<<<
 * rangeType_key = 3
 * rangeType_code = 4
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_rangeType_command, __pyx_mstate_global->__pyx_int_2) < (0)) __PYX_ERR(3, 7, __pyx_L1_error)

  /* "constants.auto.pyx":8
 * rangeType_type = 1
 * rangeType_command = 2
 * rangeType_key = 3             # <<<<<<<<<<<<<<
 * rangeType_code = 4
 * PARAMF_LOCAL = 0X00
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_rangeType_key, __pyx_mstate_global->__pyx_int_3) < (0)) __PYX_ERR(3, 8, __pyx_L1_error)

  /* "constants.auto.pyx":9
 * rangeType_command = 2
 * rangeType_key = 3
 * rangeType_code = 4             # <<<<<<<<<<<<<<
 * PARAMF_LOCAL = 0X00
 * PARAMF_GLOBAL = 0X01
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_rangeType_code, __pyx_mstate_global->__pyx_int_4) < (0)) __PYX_ERR(3, 9, __pyx_L1_error)

  /* "constants.auto.pyx":10
 * rangeType_key = 3
 * rangeType_code = 4
 * PARAMF_LOCAL = 0X00             # <<<<<<<<<<<<<<
 * PARAMF_GLOBAL = 0X01
 * PARAMF_SELF = 0X02
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAMF_LOCAL, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(3, 10, __pyx_L1_error)

  /* "constants.auto.pyx":11
 * rangeType_code = 4
 * PARAMF_LOCAL = 0X00
 * PARAMF_GLOBAL = 0X01             # <<<<<<<<<<<<<<
 * PARAMF_SELF = 0X02
 * ## Success
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAMF_GLOBAL, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(3, 11, __pyx_L1_error)

  /* "constants.auto.pyx":12
 * PARAMF_LOCAL = 0X00
 * PARAMF_GLOBAL = 0X01
 * PARAMF_SELF = 0X02             # <<<<<<<<<<<<<<
 * ## Success
 * ERROR_SUCCESS = 0
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAMF_SELF, __pyx_mstate_global->__pyx_int_2) < (0)) __PYX_ERR(3, 12, __pyx_L1_error)

  /* "constants.auto.pyx":14
 * PARAMF_SELF = 0X02
 * ## Success
 * ERROR_SUCCESS = 0             # <<<<<<<<<<<<<<
 * ## Not enough memory
 * ERROR_NOMEM = 1
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ERROR_SUCCESS, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(3, 14, __pyx_L1_error)

  /* "constants.auto.pyx":16
 * ERROR_SUCCESS = 0
 * ## Not enough memory
 * ERROR_NOMEM = 1             # <<<<<<<<<<<<<<
 * ## A connection is already running in this tty
 * ERROR_TTYBUSY = 2
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ERROR_NOMEM, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "constants.auto.pyx":18
 * ERROR_NOMEM = 1
 * ## A connection is already running in this tty
 * ERROR_TTYBUSY = 2             # <<<<<<<<<<<<<<
 * ## A connection is already using RAW or suspend mode
 * ERROR_DEVICEBUSY = 3
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ERROR_TTYBUSY, __pyx_mstate_global->__pyx_int_2) < (0)) __PYX_ERR(3, 18, __pyx_L1_error)

  /* "constants.auto.pyx":20
 * ERROR_TTYBUSY = 2
 * ## A connection is already using RAW or suspend mode
 * ERROR_DEVICEBUSY = 3             # <<<<<<<<<<<<<<
 * ## Not implemented in protocol
 * ERROR_UNKNOWN_INSTRUCTION = 4
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ERROR_DEVICEBUSY, __pyx_mstate_global->__pyx_int_3) < (0)) __PYX_ERR(3, 20, __pyx_L1_error)

  /* "constants.auto.pyx":22
 * ERROR_DEVICEBUSY = 3
 * ## Not implemented in protocol
 * ERROR_UNKNOWN_INSTRUCTION = 4             # <<<<<<<<<<<<<<
 * ## Forbiden in current mode
 * ERROR_ILLEGAL_INSTRUCTION = 5
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ERROR_UNKNOWN_INSTRUCTION, __pyx_mstate_global->__pyx_int_4) < (0)) __PYX_ERR(3, 22, __pyx_L1_error)

  /* "constants.auto.pyx":24
 * ERROR_UNKNOWN_INSTRUCTION = 4
 * ## Forbiden in current mode
 * ERROR_ILLEGAL_INSTRUCTION = 5             # <<<<<<<<<<<<<<
 * ## Out of range or have no sense
 * ERROR_INVALID_PARAMETER = 6
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ERROR_ILLEGAL_INSTRUCTION, __pyx_mstate_global->__pyx_int_5) < (0)) __PYX_ERR(3, 24, __pyx_L1_error)

  /* "constants.auto.pyx":26
 * ERROR_ILLEGAL_INSTRUCTION = 5
 * ## Out of range or have no sense
 * ERROR_INVALID_PARAMETER = 6             # <<<<<<<<<<<<<<
 * ## Invalid size
 * ERROR_INVALID_PACKET = 7
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ERROR_INVALID_PARAMETER, __pyx_mstate_global->__pyx_int_6) < (0)) __PYX_ERR(3, 26, __pyx_L1_error)

  /* "constants.auto.pyx":28
 * ERROR_INVALID_PARAMETER = 6
 * ## Invalid size
 * ERROR_INVALID_PACKET = 7             # <<<<<<<<<<<<<<
 * ## Connection refused
 * ERROR_CONNREFUSED = 8
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ERROR_INVALID_PACKET, __pyx_mstate_global->__pyx_int_7) < (0)) __PYX_ERR(3, 28, __pyx_L1_error)

  /* "constants.auto.pyx":30
 * ERROR_INVALID_PACKET = 7
 * ## Connection refused
 * ERROR_CONNREFUSED = 8             # <<<<<<<<<<<<<<
 * ## Operation not supported
 * ERROR_OPNOTSUPP = 9
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ERROR_CONNREFUSED, __pyx_mstate_global->__pyx_int_8) < (0)) __PYX_ERR(3, 30, __pyx_L1_error)

  /* "constants.auto.pyx":32
 * ERROR_CONNREFUSED = 8
 * ## Operation not supported
 * ERROR_OPNOTSUPP = 9             # <<<<<<<<<<<<<<
 * ## Getaddrinfo error
 * ERROR_GAIERR = 10
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ERROR_OPNOTSUPP, __pyx_mstate_global->__pyx_int_9) < (0)) __PYX_ERR(3, 32, __pyx_L1_error)

  /* "constants.auto.pyx":34
 * ERROR_OPNOTSUPP = 9
 * ## Getaddrinfo error
 * ERROR_GAIERR = 10             # <<<<<<<<<<<<<<
 * ## Libc error
 * ERROR_LIBCERR = 11
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ERROR_GAIERR, __pyx_mstate_global->__pyx_int_10) < (0)) __PYX_ERR(3, 34, __pyx_L1_error)

  /* "constants.auto.pyx":36
 * ERROR_GAIERR = 10
 * ## Libc error
 * ERROR_LIBCERR = 11             # <<<<<<<<<<<<<<
 * ## Couldn't find out the tty number
 * ERROR_UNKNOWNTTY = 12
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ERROR_LIBCERR, __pyx_mstate_global->__pyx_int_11) < (0)) __PYX_ERR(3, 36, __pyx_L1_error)

  /* "constants.auto.pyx":38
 * ERROR_LIBCERR = 11
 * ## Couldn't find out the tty number
 * ERROR_UNKNOWNTTY = 12             # <<<<<<<<<<<<<<
 * ## Bad protocol version
 * ERROR_PROTOCOL_VERSION = 13
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ERROR_UNKNOWNTTY, __pyx_mstate_global->__pyx_int_12) < (0)) __PYX_ERR(3, 38, __pyx_L1_error)

  /* "constants.auto.pyx":40
 * ERROR_UNKNOWNTTY = 12
 * ## Bad protocol version
 * ERROR_PROTOCOL_VERSION = 13             # <<<<<<<<<<<<<<
 * ## Unexpected end of file
 * ERROR_EOF = 14
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ERROR_PROTOCOL_VERSION, __pyx_mstate_global->__pyx_int_13) < (0)) __PYX_ERR(3, 40, __pyx_L1_error)

  /* "constants.auto.pyx":42
 * ERROR_PROTOCOL_VERSION = 13
 * ## Unexpected end of file
 * ERROR_EOF = 14             # <<<<<<<<<<<<<<
 * ## Key file empty
 * ERROR_EMPTYKEY = 15
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ERROR_EOF, __pyx_mstate_global->__pyx_int_14) < (0)) __PYX_ERR(3, 42, __pyx_L1_error)

  /* "constants.auto.pyx":44
 * ERROR_EOF = 14
 * ## Key file empty
 * ERROR_EMPTYKEY = 15             # <<<<<<<<<<<<<<
 * ## Packet returned by driver too large
 * ERROR_DRIVERERROR = 16
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ERROR_EMPTYKEY, __pyx_mstate_global->__pyx_int_15) < (0)) __PYX_ERR(3, 44, __pyx_L1_error)

  /* "constants.auto.pyx":46
 * ERROR_EMPTYKEY = 15
 * ## Packet returned by driver too large
 * ERROR_DRIVERERROR = 16             # <<<<<<<<<<<<<<
 * ## Authentication failed
 * ERROR_AUTHENTICATION = 17
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ERROR_DRIVERERROR, __pyx_mstate_global->__pyx_int_16) < (0)) __PYX_ERR(3, 46, __pyx_L1_error)

  /* "constants.auto.pyx":48
 * ERROR_DRIVERERROR = 16
 * ## Authentication failed
 * ERROR_AUTHENTICATION = 17             # <<<<<<<<<<<<<<
 * ## Parameter can not be changed
 * ERROR_READONLY_PARAMETER = 18
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ERROR_AUTHENTICATION, __pyx_mstate_global->__pyx_int_17) < (0)) __PYX_ERR(3, 48, __pyx_L1_error)

  /* "constants.auto.pyx":50
 * ERROR_AUTHENTICATION = 17
 * ## Parameter can not be changed
 * ERROR_READONLY_PARAMETER = 18             # <<<<<<<<<<<<<<
 * KEY_MAX = c_brlapi.BRLAPI_KEY_MAX
 * KEY_FLAGS_MASK = c_brlapi.BRLAPI_KEY_FLAGS_MASK
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ERROR_READONLY_PARAMETER, __pyx_mstate_global->__pyx_int_18) < (0)) __PYX_ERR(3, 50, __pyx_L1_error)

  /* "constants.auto.pyx":51
 * ## Parameter can not be changed
 * ERROR_READONLY_PARAMETER = 18
 * KEY_MAX = c_brlapi.BRLAPI_KEY_MAX             # <<<<<<<<<<<<<<
 * KEY_FLAGS_MASK = c_brlapi.BRLAPI_KEY_FLAGS_MASK
 * KEY_FLAGS_SHIFT = 32
*/
  __pyx_t_2 = __Pyx_PyLong_From_brlapi_keyCode_t(BRLAPI_KEY_MAX); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_MAX, __pyx_t_2) < (0)) __PYX_ERR(3, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":52
 * ERROR_READONLY_PARAMETER = 18
 * KEY_MAX = c_brlapi.BRLAPI_KEY_MAX
 * KEY_FLAGS_MASK = c_brlapi.BRLAPI_KEY_FLAGS_MASK             # <<<<<<<<<<<<<<
 * KEY_FLAGS_SHIFT = 32
 * KEY_TYPE_MASK = c_brlapi.BRLAPI_KEY_TYPE_MASK
*/
  __pyx_t_2 = __Pyx_PyLong_From_brlapi_keyCode_t(BRLAPI_KEY_FLAGS_MASK); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_FLAGS_MASK, __pyx_t_2) < (0)) __PYX_ERR(3, 52, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":53
 * KEY_MAX = c_brlapi.BRLAPI_KEY_MAX
 * KEY_FLAGS_MASK = c_brlapi.BRLAPI_KEY_FLAGS_MASK
 * KEY_FLAGS_SHIFT = 32             # <<<<<<<<<<<<<<
 * KEY_TYPE_MASK = c_brlapi.BRLAPI_KEY_TYPE_MASK
 * KEY_TYPE_SHIFT = 29
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_FLAGS_SHIFT, __pyx_mstate_global->__pyx_int_32) < (0)) __PYX_ERR(3, 53, __pyx_L1_error)

  /* "constants.auto.pyx":54
 * KEY_FLAGS_MASK = c_brlapi.BRLAPI_KEY_FLAGS_MASK
 * KEY_FLAGS_SHIFT = 32
 * KEY_TYPE_MASK = c_brlapi.BRLAPI_KEY_TYPE_MASK             # <<<<<<<<<<<<<<
 * KEY_TYPE_SHIFT = 29
 * KEY_TYPE_CMD = 0x0000000020000000
*/
  __pyx_t_2 = __Pyx_PyLong_From_brlapi_keyCode_t(BRLAPI_KEY_TYPE_MASK); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_TYPE_MASK, __pyx_t_2) < (0)) __PYX_ERR(3, 54, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":55
 * KEY_FLAGS_SHIFT = 32
 * KEY_TYPE_MASK = c_brlapi.BRLAPI_KEY_TYPE_MASK
 * KEY_TYPE_SHIFT = 29             # <<<<<<<<<<<<<<
 * KEY_TYPE_CMD = 0x0000000020000000
 * KEY_TYPE_SYM = 0x0000000000000000
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_TYPE_SHIFT, __pyx_mstate_global->__pyx_int_29) < (0)) __PYX_ERR(3, 55, __pyx_L1_error)

  /* "constants.auto.pyx":56
 * KEY_TYPE_MASK = c_brlapi.BRLAPI_KEY_TYPE_MASK
 * KEY_TYPE_SHIFT = 29
 * KEY_TYPE_CMD = 0x0000000020000000             # <<<<<<<<<<<<<<
 * KEY_TYPE_SYM = 0x0000000000000000
 * KEY_CODE_MASK = c_brlapi.BRLAPI_KEY_CODE_MASK
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_TYPE_CMD, __pyx_mstate_global->__pyx_int_536870912) < (0)) __PYX_ERR(3, 56, __pyx_L1_error)

  /* "constants.auto.pyx":57
 * KEY_TYPE_SHIFT = 29
 * KEY_TYPE_CMD = 0x0000000020000000
 * KEY_TYPE_SYM = 0x0000000000000000             # <<<<<<<<<<<<<<
 * KEY_CODE_MASK = c_brlapi.BRLAPI_KEY_CODE_MASK
 * KEY_CODE_SHIFT = 0
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_TYPE_SYM, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(3, 57, __pyx_L1_error)

  /* "constants.auto.pyx":58
 * KEY_TYPE_CMD = 0x0000000020000000
 * KEY_TYPE_SYM = 0x0000000000000000
 * KEY_CODE_MASK = c_brlapi.BRLAPI_KEY_CODE_MASK             # <<<<<<<<<<<<<<
 * KEY_CODE_SHIFT = 0
 * KEY_CMD_BLK_MASK = c_brlapi.BRLAPI_KEY_CMD_BLK_MASK
*/
  __pyx_t_2 = __Pyx_PyLong_From_brlapi_keyCode_t(BRLAPI_KEY_CODE_MASK); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CODE_MASK, __pyx_t_2) < (0)) __PYX_ERR(3, 58, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":59
 * KEY_TYPE_SYM = 0x0000000000000000
 * KEY_CODE_MASK = c_brlapi.BRLAPI_KEY_CODE_MASK
 * KEY_CODE_SHIFT = 0             # <<<<<<<<<<<<<<
 * KEY_CMD_BLK_MASK = c_brlapi.BRLAPI_KEY_CMD_BLK_MASK
 * KEY_CMD_BLK_SHIFT = 16
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CODE_SHIFT, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(3, 59, __pyx_L1_error)

  /* "constants.auto.pyx":60
 * KEY_CODE_MASK = c_brlapi.BRLAPI_KEY_CODE_MASK
 * KEY_CODE_SHIFT = 0
 * KEY_CMD_BLK_MASK = c_brlapi.BRLAPI_KEY_CMD_BLK_MASK             # <<<<<<<<<<<<<<
 * KEY_CMD_BLK_SHIFT = 16
 * KEY_CMD_ARG_MASK = c_brlapi.BRLAPI_KEY_CMD_ARG_MASK
*/
  __pyx_t_2 = __Pyx_PyLong_From_brlapi_keyCode_t(BRLAPI_KEY_CMD_BLK_MASK); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_MASK, __pyx_t_2) < (0)) __PYX_ERR(3, 60, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":61
 * KEY_CODE_SHIFT = 0
 * KEY_CMD_BLK_MASK = c_brlapi.BRLAPI_KEY_CMD_BLK_MASK
 * KEY_CMD_BLK_SHIFT = 16             # <<<<<<<<<<<<<<
 * KEY_CMD_ARG_MASK = c_brlapi.BRLAPI_KEY_CMD_ARG_MASK
 * KEY_CMD_ARG_SHIFT = 0
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT, __pyx_mstate_global->__pyx_int_16) < (0)) __PYX_ERR(3, 61, __pyx_L1_error)

  /* "constants.auto.pyx":62
 * KEY_CMD_BLK_MASK = c_brlapi.BRLAPI_KEY_CMD_BLK_MASK
 * KEY_CMD_BLK_SHIFT = 16
 * KEY_CMD_ARG_MASK = c_brlapi.BRLAPI_KEY_CMD_ARG_MASK             # <<<<<<<<<<<<<<
 * KEY_CMD_ARG_SHIFT = 0
 * KEY_SYM_BACKSPACE = 0x0000ff08
*/
  __pyx_t_2 = __Pyx_PyLong_From_brlapi_keyCode_t(BRLAPI_KEY_CMD_ARG_MASK); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_ARG_MASK, __pyx_t_2) < (0)) __PYX_ERR(3, 62, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":63
 * KEY_CMD_BLK_SHIFT = 16
 * KEY_CMD_ARG_MASK = c_brlapi.BRLAPI_KEY_CMD_ARG_MASK
 * KEY_CMD_ARG_SHIFT = 0             # <<<<<<<<<<<<<<
 * KEY_SYM_BACKSPACE = 0x0000ff08
 * KEY_SYM_TAB = 0x0000ff09
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_ARG_SHIFT, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(3, 63, __pyx_L1_error)

  /* "constants.auto.pyx":64
 * KEY_CMD_ARG_MASK = c_brlapi.BRLAPI_KEY_CMD_ARG_MASK
 * KEY_CMD_ARG_SHIFT = 0
 * KEY_SYM_BACKSPACE = 0x0000ff08             # <<<<<<<<<<<<<<
 * KEY_SYM_TAB = 0x0000ff09
 * KEY_SYM_LINEFEED = 0x0000ff0d
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_BACKSPACE, __pyx_mstate_global->__pyx_int_65288) < (0)) __PYX_ERR(3, 64, __pyx_L1_error)

  /* "constants.auto.pyx":65
 * KEY_CMD_ARG_SHIFT = 0
 * KEY_SYM_BACKSPACE = 0x0000ff08
 * KEY_SYM_TAB = 0x0000ff09             # <<<<<<<<<<<<<<
 * KEY_SYM_LINEFEED = 0x0000ff0d
 * KEY_SYM_ESCAPE = 0x0000ff1b
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_TAB, __pyx_mstate_global->__pyx_int_65289) < (0)) __PYX_ERR(3, 65, __pyx_L1_error)

  /* "constants.auto.pyx":66
 * KEY_SYM_BACKSPACE = 0x0000ff08
 * KEY_SYM_TAB = 0x0000ff09
 * KEY_SYM_LINEFEED = 0x0000ff0d             # <<<<<<<<<<<<<<
 * KEY_SYM_ESCAPE = 0x0000ff1b
 * KEY_SYM_HOME = 0x0000ff50
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_LINEFEED, __pyx_mstate_global->__pyx_int_65293) < (0)) __PYX_ERR(3, 66, __pyx_L1_error)

  /* "constants.auto.pyx":67
 * KEY_SYM_TAB = 0x0000ff09
 * KEY_SYM_LINEFEED = 0x0000ff0d
 * KEY_SYM_ESCAPE = 0x0000ff1b             # <<<<<<<<<<<<<<
 * KEY_SYM_HOME = 0x0000ff50
 * KEY_SYM_LEFT = 0x0000ff51
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_ESCAPE, __pyx_mstate_global->__pyx_int_65307) < (0)) __PYX_ERR(3, 67, __pyx_L1_error)

  /* "constants.auto.pyx":68
 * KEY_SYM_LINEFEED = 0x0000ff0d
 * KEY_SYM_ESCAPE = 0x0000ff1b
 * KEY_SYM_HOME = 0x0000ff50             # <<<<<<<<<<<<<<
 * KEY_SYM_LEFT = 0x0000ff51
 * KEY_SYM_UP = 0x0000ff52
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_HOME, __pyx_mstate_global->__pyx_int_65360) < (0)) __PYX_ERR(3, 68, __pyx_L1_error)

  /* "constants.auto.pyx":69
 * KEY_SYM_ESCAPE = 0x0000ff1b
 * KEY_SYM_HOME = 0x0000ff50
 * KEY_SYM_LEFT = 0x0000ff51             # <<<<<<<<<<<<<<
 * KEY_SYM_UP = 0x0000ff52
 * KEY_SYM_RIGHT = 0x0000ff53
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_LEFT, __pyx_mstate_global->__pyx_int_65361) < (0)) __PYX_ERR(3, 69, __pyx_L1_error)

  /* "constants.auto.pyx":70
 * KEY_SYM_HOME = 0x0000ff50
 * KEY_SYM_LEFT = 0x0000ff51
 * KEY_SYM_UP = 0x0000ff52             # <<<<<<<<<<<<<<
 * KEY_SYM_RIGHT = 0x0000ff53
 * KEY_SYM_DOWN = 0x0000ff54
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_UP, __pyx_mstate_global->__pyx_int_65362) < (0)) __PYX_ERR(3, 70, __pyx_L1_error)

  /* "constants.auto.pyx":71
 * KEY_SYM_LEFT = 0x0000ff51
 * KEY_SYM_UP = 0x0000ff52
 * KEY_SYM_RIGHT = 0x0000ff53             # <<<<<<<<<<<<<<
 * KEY_SYM_DOWN = 0x0000ff54
 * KEY_SYM_PAGE_UP = 0x0000ff55
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_RIGHT, __pyx_mstate_global->__pyx_int_65363) < (0)) __PYX_ERR(3, 71, __pyx_L1_error)

  /* "constants.auto.pyx":72
 * KEY_SYM_UP = 0x0000ff52
 * KEY_SYM_RIGHT = 0x0000ff53
 * KEY_SYM_DOWN = 0x0000ff54             # <<<<<<<<<<<<<<
 * KEY_SYM_PAGE_UP = 0x0000ff55
 * KEY_SYM_PAGE_DOWN = 0x0000ff56
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_DOWN, __pyx_mstate_global->__pyx_int_65364) < (0)) __PYX_ERR(3, 72, __pyx_L1_error)

  /* "constants.auto.pyx":73
 * KEY_SYM_RIGHT = 0x0000ff53
 * KEY_SYM_DOWN = 0x0000ff54
 * KEY_SYM_PAGE_UP = 0x0000ff55             # <<<<<<<<<<<<<<
 * KEY_SYM_PAGE_DOWN = 0x0000ff56
 * KEY_SYM_END = 0x0000ff57
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_PAGE_UP, __pyx_mstate_global->__pyx_int_65365) < (0)) __PYX_ERR(3, 73, __pyx_L1_error)

  /* "constants.auto.pyx":74
 * KEY_SYM_DOWN = 0x0000ff54
 * KEY_SYM_PAGE_UP = 0x0000ff55
 * KEY_SYM_PAGE_DOWN = 0x0000ff56             # <<<<<<<<<<<<<<
 * KEY_SYM_END = 0x0000ff57
 * KEY_SYM_INSERT = 0x0000ff63
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_PAGE_DOWN, __pyx_mstate_global->__pyx_int_65366) < (0)) __PYX_ERR(3, 74, __pyx_L1_error)

  /* "constants.auto.pyx":75
 * KEY_SYM_PAGE_UP = 0x0000ff55
 * KEY_SYM_PAGE_DOWN = 0x0000ff56
 * KEY_SYM_END = 0x0000ff57             # <<<<<<<<<<<<<<
 * KEY_SYM_INSERT = 0x0000ff63
 * ## the F1 key
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_END, __pyx_mstate_global->__pyx_int_65367) < (0)) __PYX_ERR(3, 75, __pyx_L1_error)

  /* "constants.auto.pyx":76
 * KEY_SYM_PAGE_DOWN = 0x0000ff56
 * KEY_SYM_END = 0x0000ff57
 * KEY_SYM_INSERT = 0x0000ff63             # <<<<<<<<<<<<<<
 * ## the F1 key
 * KEY_SYM_F1 = (0x0000ffbe + 0)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_INSERT, __pyx_mstate_global->__pyx_int_65379) < (0)) __PYX_ERR(3, 76, __pyx_L1_error)

  /* "constants.auto.pyx":78
 * KEY_SYM_INSERT = 0x0000ff63
 * ## the F1 key
 * KEY_SYM_F1 = (0x0000ffbe + 0)             # <<<<<<<<<<<<<<
 * ## the F2 key
 * KEY_SYM_F2 = (0x0000ffbe + 1)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F1, __pyx_mstate_global->__pyx_int_65470) < (0)) __PYX_ERR(3, 78, __pyx_L1_error)

  /* "constants.auto.pyx":80
 * KEY_SYM_F1 = (0x0000ffbe + 0)
 * ## the F2 key
 * KEY_SYM_F2 = (0x0000ffbe + 1)             # <<<<<<<<<<<<<<
 * ## the F3 key
 * KEY_SYM_F3 = (0x0000ffbe + 2)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F2, __pyx_mstate_global->__pyx_int_65471) < (0)) __PYX_ERR(3, 80, __pyx_L1_error)

  /* "constants.auto.pyx":82
 * KEY_SYM_F2 = (0x0000ffbe + 1)
 * ## the F3 key
 * KEY_SYM_F3 = (0x0000ffbe + 2)             # <<<<<<<<<<<<<<
 * ## the F4 key
 * KEY_SYM_F4 = (0x0000ffbe + 3)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F3, __pyx_mstate_global->__pyx_int_65472) < (0)) __PYX_ERR(3, 82, __pyx_L1_error)

  /* "constants.auto.pyx":84
 * KEY_SYM_F3 = (0x0000ffbe + 2)
 * ## the F4 key
 * KEY_SYM_F4 = (0x0000ffbe + 3)             # <<<<<<<<<<<<<<
 * ## the F5 key
 * KEY_SYM_F5 = (0x0000ffbe + 4)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F4, __pyx_mstate_global->__pyx_int_65473) < (0)) __PYX_ERR(3, 84, __pyx_L1_error)

  /* "constants.auto.pyx":86
 * KEY_SYM_F4 = (0x0000ffbe + 3)
 * ## the F5 key
 * KEY_SYM_F5 = (0x0000ffbe + 4)             # <<<<<<<<<<<<<<
 * ## the F6 key
 * KEY_SYM_F6 = (0x0000ffbe + 5)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F5, __pyx_mstate_global->__pyx_int_65474) < (0)) __PYX_ERR(3, 86, __pyx_L1_error)

  /* "constants.auto.pyx":88
 * KEY_SYM_F5 = (0x0000ffbe + 4)
 * ## the F6 key
 * KEY_SYM_F6 = (0x0000ffbe + 5)             # <<<<<<<<<<<<<<
 * ## the F7 key
 * KEY_SYM_F7 = (0x0000ffbe + 6)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F6, __pyx_mstate_global->__pyx_int_65475) < (0)) __PYX_ERR(3, 88, __pyx_L1_error)

  /* "constants.auto.pyx":90
 * KEY_SYM_F6 = (0x0000ffbe + 5)
 * ## the F7 key
 * KEY_SYM_F7 = (0x0000ffbe + 6)             # <<<<<<<<<<<<<<
 * ## the F8 key
 * KEY_SYM_F8 = (0x0000ffbe + 7)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F7, __pyx_mstate_global->__pyx_int_65476) < (0)) __PYX_ERR(3, 90, __pyx_L1_error)

  /* "constants.auto.pyx":92
 * KEY_SYM_F7 = (0x0000ffbe + 6)
 * ## the F8 key
 * KEY_SYM_F8 = (0x0000ffbe + 7)             # <<<<<<<<<<<<<<
 * ## the F9 key
 * KEY_SYM_F9 = (0x0000ffbe + 8)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F8, __pyx_mstate_global->__pyx_int_65477) < (0)) __PYX_ERR(3, 92, __pyx_L1_error)

  /* "constants.auto.pyx":94
 * KEY_SYM_F8 = (0x0000ffbe + 7)
 * ## the F9 key
 * KEY_SYM_F9 = (0x0000ffbe + 8)             # <<<<<<<<<<<<<<
 * ## the F10 key
 * KEY_SYM_F10 = (0x0000ffbe + 9)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F9, __pyx_mstate_global->__pyx_int_65478) < (0)) __PYX_ERR(3, 94, __pyx_L1_error)

  /* "constants.auto.pyx":96
 * KEY_SYM_F9 = (0x0000ffbe + 8)
 * ## the F10 key
 * KEY_SYM_F10 = (0x0000ffbe + 9)             # <<<<<<<<<<<<<<
 * ## the F11 key
 * KEY_SYM_F11 = (0x0000ffbe + 10)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F10, __pyx_mstate_global->__pyx_int_65479) < (0)) __PYX_ERR(3, 96, __pyx_L1_error)

  /* "constants.auto.pyx":98
 * KEY_SYM_F10 = (0x0000ffbe + 9)
 * ## the F11 key
 * KEY_SYM_F11 = (0x0000ffbe + 10)             # <<<<<<<<<<<<<<
 * ## the F12 key
 * KEY_SYM_F12 = (0x0000ffbe + 11)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F11, __pyx_mstate_global->__pyx_int_65480) < (0)) __PYX_ERR(3, 98, __pyx_L1_error)

  /* "constants.auto.pyx":100
 * KEY_SYM_F11 = (0x0000ffbe + 10)
 * ## the F12 key
 * KEY_SYM_F12 = (0x0000ffbe + 11)             # <<<<<<<<<<<<<<
 * ## the F13 key
 * KEY_SYM_F13 = (0x0000ffbe + 12)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F12, __pyx_mstate_global->__pyx_int_65481) < (0)) __PYX_ERR(3, 100, __pyx_L1_error)

  /* "constants.auto.pyx":102
 * KEY_SYM_F12 = (0x0000ffbe + 11)
 * ## the F13 key
 * KEY_SYM_F13 = (0x0000ffbe + 12)             # <<<<<<<<<<<<<<
 * ## the F14 key
 * KEY_SYM_F14 = (0x0000ffbe + 13)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F13, __pyx_mstate_global->__pyx_int_65482) < (0)) __PYX_ERR(3, 102, __pyx_L1_error)

  /* "constants.auto.pyx":104
 * KEY_SYM_F13 = (0x0000ffbe + 12)
 * ## the F14 key
 * KEY_SYM_F14 = (0x0000ffbe + 13)             # <<<<<<<<<<<<<<
 * ## the F15 key
 * KEY_SYM_F15 = (0x0000ffbe + 14)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F14, __pyx_mstate_global->__pyx_int_65483) < (0)) __PYX_ERR(3, 104, __pyx_L1_error)

  /* "constants.auto.pyx":106
 * KEY_SYM_F14 = (0x0000ffbe + 13)
 * ## the F15 key
 * KEY_SYM_F15 = (0x0000ffbe + 14)             # <<<<<<<<<<<<<<
 * ## the F16 key
 * KEY_SYM_F16 = (0x0000ffbe + 15)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F15, __pyx_mstate_global->__pyx_int_65484) < (0)) __PYX_ERR(3, 106, __pyx_L1_error)

  /* "constants.auto.pyx":108
 * KEY_SYM_F15 = (0x0000ffbe + 14)
 * ## the F16 key
 * KEY_SYM_F16 = (0x0000ffbe + 15)             # <<<<<<<<<<<<<<
 * ## the F17 key
 * KEY_SYM_F17 = (0x0000ffbe + 16)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F16, __pyx_mstate_global->__pyx_int_65485) < (0)) __PYX_ERR(3, 108, __pyx_L1_error)

  /* "constants.auto.pyx":110
 * KEY_SYM_F16 = (0x0000ffbe + 15)
 * ## the F17 key
 * KEY_SYM_F17 = (0x0000ffbe + 16)             # <<<<<<<<<<<<<<
 * ## the F18 key
 * KEY_SYM_F18 = (0x0000ffbe + 17)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F17, __pyx_mstate_global->__pyx_int_65486) < (0)) __PYX_ERR(3, 110, __pyx_L1_error)

  /* "constants.auto.pyx":112
 * KEY_SYM_F17 = (0x0000ffbe + 16)
 * ## the F18 key
 * KEY_SYM_F18 = (0x0000ffbe + 17)             # <<<<<<<<<<<<<<
 * ## the F19 key
 * KEY_SYM_F19 = (0x0000ffbe + 18)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F18, __pyx_mstate_global->__pyx_int_65487) < (0)) __PYX_ERR(3, 112, __pyx_L1_error)

  /* "constants.auto.pyx":114
 * KEY_SYM_F18 = (0x0000ffbe + 17)
 * ## the F19 key
 * KEY_SYM_F19 = (0x0000ffbe + 18)             # <<<<<<<<<<<<<<
 * ## the F20 key
 * KEY_SYM_F20 = (0x0000ffbe + 19)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F19, __pyx_mstate_global->__pyx_int_65488) < (0)) __PYX_ERR(3, 114, __pyx_L1_error)

  /* "constants.auto.pyx":116
 * KEY_SYM_F19 = (0x0000ffbe + 18)
 * ## the F20 key
 * KEY_SYM_F20 = (0x0000ffbe + 19)             # <<<<<<<<<<<<<<
 * ## the F21 key
 * KEY_SYM_F21 = (0x0000ffbe + 20)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F20, __pyx_mstate_global->__pyx_int_65489) < (0)) __PYX_ERR(3, 116, __pyx_L1_error)

  /* "constants.auto.pyx":118
 * KEY_SYM_F20 = (0x0000ffbe + 19)
 * ## the F21 key
 * KEY_SYM_F21 = (0x0000ffbe + 20)             # <<<<<<<<<<<<<<
 * ## the F22 key
 * KEY_SYM_F22 = (0x0000ffbe + 21)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F21, __pyx_mstate_global->__pyx_int_65490) < (0)) __PYX_ERR(3, 118, __pyx_L1_error)

  /* "constants.auto.pyx":120
 * KEY_SYM_F21 = (0x0000ffbe + 20)
 * ## the F22 key
 * KEY_SYM_F22 = (0x0000ffbe + 21)             # <<<<<<<<<<<<<<
 * ## the F23 key
 * KEY_SYM_F23 = (0x0000ffbe + 22)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F22, __pyx_mstate_global->__pyx_int_65491) < (0)) __PYX_ERR(3, 120, __pyx_L1_error)

  /* "constants.auto.pyx":122
 * KEY_SYM_F22 = (0x0000ffbe + 21)
 * ## the F23 key
 * KEY_SYM_F23 = (0x0000ffbe + 22)             # <<<<<<<<<<<<<<
 * ## the F24 key
 * KEY_SYM_F24 = (0x0000ffbe + 23)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F23, __pyx_mstate_global->__pyx_int_65492) < (0)) __PYX_ERR(3, 122, __pyx_L1_error)

  /* "constants.auto.pyx":124
 * KEY_SYM_F23 = (0x0000ffbe + 22)
 * ## the F24 key
 * KEY_SYM_F24 = (0x0000ffbe + 23)             # <<<<<<<<<<<<<<
 * ## the F25 key
 * KEY_SYM_F25 = (0x0000ffbe + 24)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F24, __pyx_mstate_global->__pyx_int_65493) < (0)) __PYX_ERR(3, 124, __pyx_L1_error)

  /* "constants.auto.pyx":126
 * KEY_SYM_F24 = (0x0000ffbe + 23)
 * ## the F25 key
 * KEY_SYM_F25 = (0x0000ffbe + 24)             # <<<<<<<<<<<<<<
 * ## the F26 key
 * KEY_SYM_F26 = (0x0000ffbe + 25)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F25, __pyx_mstate_global->__pyx_int_65494) < (0)) __PYX_ERR(3, 126, __pyx_L1_error)

  /* "constants.auto.pyx":128
 * KEY_SYM_F25 = (0x0000ffbe + 24)
 * ## the F26 key
 * KEY_SYM_F26 = (0x0000ffbe + 25)             # <<<<<<<<<<<<<<
 * ## the F27 key
 * KEY_SYM_F27 = (0x0000ffbe + 26)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F26, __pyx_mstate_global->__pyx_int_65495) < (0)) __PYX_ERR(3, 128, __pyx_L1_error)

  /* "constants.auto.pyx":130
 * KEY_SYM_F26 = (0x0000ffbe + 25)
 * ## the F27 key
 * KEY_SYM_F27 = (0x0000ffbe + 26)             # <<<<<<<<<<<<<<
 * ## the F28 key
 * KEY_SYM_F28 = (0x0000ffbe + 27)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F27, __pyx_mstate_global->__pyx_int_65496) < (0)) __PYX_ERR(3, 130, __pyx_L1_error)

  /* "constants.auto.pyx":132
 * KEY_SYM_F27 = (0x0000ffbe + 26)
 * ## the F28 key
 * KEY_SYM_F28 = (0x0000ffbe + 27)             # <<<<<<<<<<<<<<
 * ## the F29 key
 * KEY_SYM_F29 = (0x0000ffbe + 28)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F28, __pyx_mstate_global->__pyx_int_65497) < (0)) __PYX_ERR(3, 132, __pyx_L1_error)

  /* "constants.auto.pyx":134
 * KEY_SYM_F28 = (0x0000ffbe + 27)
 * ## the F29 key
 * KEY_SYM_F29 = (0x0000ffbe + 28)             # <<<<<<<<<<<<<<
 * ## the F30 key
 * KEY_SYM_F30 = (0x0000ffbe + 29)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F29, __pyx_mstate_global->__pyx_int_65498) < (0)) __PYX_ERR(3, 134, __pyx_L1_error)

  /* "constants.auto.pyx":136
 * KEY_SYM_F29 = (0x0000ffbe + 28)
 * ## the F30 key
 * KEY_SYM_F30 = (0x0000ffbe + 29)             # <<<<<<<<<<<<<<
 * ## the F31 key
 * KEY_SYM_F31 = (0x0000ffbe + 30)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F30, __pyx_mstate_global->__pyx_int_65499) < (0)) __PYX_ERR(3, 136, __pyx_L1_error)

  /* "constants.auto.pyx":138
 * KEY_SYM_F30 = (0x0000ffbe + 29)
 * ## the F31 key
 * KEY_SYM_F31 = (0x0000ffbe + 30)             # <<<<<<<<<<<<<<
 * ## the F32 key
 * KEY_SYM_F32 = (0x0000ffbe + 31)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F31, __pyx_mstate_global->__pyx_int_65500) < (0)) __PYX_ERR(3, 138, __pyx_L1_error)

  /* "constants.auto.pyx":140
 * KEY_SYM_F31 = (0x0000ffbe + 30)
 * ## the F32 key
 * KEY_SYM_F32 = (0x0000ffbe + 31)             # <<<<<<<<<<<<<<
 * ## the F33 key
 * KEY_SYM_F33 = (0x0000ffbe + 32)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F32, __pyx_mstate_global->__pyx_int_65501) < (0)) __PYX_ERR(3, 140, __pyx_L1_error)

  /* "constants.auto.pyx":142
 * KEY_SYM_F32 = (0x0000ffbe + 31)
 * ## the F33 key
 * KEY_SYM_F33 = (0x0000ffbe + 32)             # <<<<<<<<<<<<<<
 * ## the F34 key
 * KEY_SYM_F34 = (0x0000ffbe + 33)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F33, __pyx_mstate_global->__pyx_int_65502) < (0)) __PYX_ERR(3, 142, __pyx_L1_error)

  /* "constants.auto.pyx":144
 * KEY_SYM_F33 = (0x0000ffbe + 32)
 * ## the F34 key
 * KEY_SYM_F34 = (0x0000ffbe + 33)             # <<<<<<<<<<<<<<
 * ## the F35 key
 * KEY_SYM_F35 = (0x0000ffbe + 34)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F34, __pyx_mstate_global->__pyx_int_65503) < (0)) __PYX_ERR(3, 144, __pyx_L1_error)

  /* "constants.auto.pyx":146
 * KEY_SYM_F34 = (0x0000ffbe + 33)
 * ## the F35 key
 * KEY_SYM_F35 = (0x0000ffbe + 34)             # <<<<<<<<<<<<<<
 * KEY_SYM_DELETE = 0x0000ffff
 * KEY_SYM_UNICODE = 0x01000000
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_F35, __pyx_mstate_global->__pyx_int_65504) < (0)) __PYX_ERR(3, 146, __pyx_L1_error)

  /* "constants.auto.pyx":147
 * ## the F35 key
 * KEY_SYM_F35 = (0x0000ffbe + 34)
 * KEY_SYM_DELETE = 0x0000ffff             # <<<<<<<<<<<<<<
 * KEY_SYM_UNICODE = 0x01000000
 * ## Version of the server: uint32_t
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_DELETE, __pyx_mstate_global->__pyx_int_65535) < (0)) __PYX_ERR(3, 147, __pyx_L1_error)

  /* "constants.auto.pyx":148
 * KEY_SYM_F35 = (0x0000ffbe + 34)
 * KEY_SYM_DELETE = 0x0000ffff
 * KEY_SYM_UNICODE = 0x01000000             # <<<<<<<<<<<<<<
 * ## Version of the server: uint32_t
 * PARAM_SERVER_VERSION = 0
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_SYM_UNICODE, __pyx_mstate_global->__pyx_int_16777216) < (0)) __PYX_ERR(3, 148, __pyx_L1_error)

  /* "constants.auto.pyx":150
 * KEY_SYM_UNICODE = 0x01000000
 * ## Version of the server: uint32_t
 * PARAM_SERVER_VERSION = 0             # <<<<<<<<<<<<<<
 * ## Priority of the client: uint32_t (from 0 through 100, default is 50)
 * PARAM_CLIENT_PRIORITY = 1
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_SERVER_VERSION, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(3, 150, __pyx_L1_error)

  /* "constants.auto.pyx":152
 * PARAM_SERVER_VERSION = 0
 * ## Priority of the client: uint32_t (from 0 through 100, default is 50)
 * PARAM_CLIENT_PRIORITY = 1             # <<<<<<<<<<<<<<
 * ## Full name of the driver: string
 * PARAM_DRIVER_NAME = 2
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_CLIENT_PRIORITY, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(3, 152, __pyx_L1_error)

  /* "constants.auto.pyx":154
 * PARAM_CLIENT_PRIORITY = 1
 * ## Full name of the driver: string
 * PARAM_DRIVER_NAME = 2             # <<<<<<<<<<<<<<
 * ## Code (short name) of the driver: string
 * PARAM_DRIVER_CODE = 3
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_DRIVER_NAME, __pyx_mstate_global->__pyx_int_2) < (0)) __PYX_ERR(3, 154, __pyx_L1_error)

  /* "constants.auto.pyx":156
 * PARAM_DRIVER_NAME = 2
 * ## Code (short name) of the driver: string
 * PARAM_DRIVER_CODE = 3             # <<<<<<<<<<<<<<
 * ## Version of the driver: string
 * PARAM_DRIVER_VERSION = 4
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_DRIVER_CODE, __pyx_mstate_global->__pyx_int_3) < (0)) __PYX_ERR(3, 156, __pyx_L1_error)

  /* "constants.auto.pyx":158
 * PARAM_DRIVER_CODE = 3
 * ## Version of the driver: string
 * PARAM_DRIVER_VERSION = 4             # <<<<<<<<<<<<<<
 * ## Model of the device: string
 * PARAM_DEVICE_MODEL = 5
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_DRIVER_VERSION, __pyx_mstate_global->__pyx_int_4) < (0)) __PYX_ERR(3, 158, __pyx_L1_error)

  /* "constants.auto.pyx":160
 * PARAM_DRIVER_VERSION = 4
 * ## Model of the device: string
 * PARAM_DEVICE_MODEL = 5             # <<<<<<<<<<<<<<
 * ## Number of dots in a cell: uint8_t
 * PARAM_DEVICE_CELL_SIZE = 31
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_DEVICE_MODEL, __pyx_mstate_global->__pyx_int_5) < (0)) __PYX_ERR(3, 160, __pyx_L1_error)

  /* "constants.auto.pyx":162
 * PARAM_DEVICE_MODEL = 5
 * ## Number of dots in a cell: uint8_t
 * PARAM_DEVICE_CELL_SIZE = 31             # <<<<<<<<<<<<<<
 * ## Dimensions of the braille display: { uint32_t columns; uint32_t rows; }
 * PARAM_DISPLAY_SIZE = 6
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_DEVICE_CELL_SIZE, __pyx_mstate_global->__pyx_int_31) < (0)) __PYX_ERR(3, 162, __pyx_L1_error)

  /* "constants.auto.pyx":164
 * PARAM_DEVICE_CELL_SIZE = 31
 * ## Dimensions of the braille display: { uint32_t columns; uint32_t rows; }
 * PARAM_DISPLAY_SIZE = 6             # <<<<<<<<<<<<<<
 * ## Identifier of the device: string
 * PARAM_DEVICE_IDENTIFIER = 7
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_DISPLAY_SIZE, __pyx_mstate_global->__pyx_int_6) < (0)) __PYX_ERR(3, 164, __pyx_L1_error)

  /* "constants.auto.pyx":166
 * PARAM_DISPLAY_SIZE = 6
 * ## Identifier of the device: string
 * PARAM_DEVICE_IDENTIFIER = 7             # <<<<<<<<<<<<<<
 * ## Speed of the device: uint32_t
 * PARAM_DEVICE_SPEED = 8
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_DEVICE_IDENTIFIER, __pyx_mstate_global->__pyx_int_7) < (0)) __PYX_ERR(3, 166, __pyx_L1_error)

  /* "constants.auto.pyx":168
 * PARAM_DEVICE_IDENTIFIER = 7
 * ## Speed of the device: uint32_t
 * PARAM_DEVICE_SPEED = 8             # <<<<<<<<<<<<<<
 * ## Device is online: boolean
 * PARAM_DEVICE_ONLINE = 9
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_DEVICE_SPEED, __pyx_mstate_global->__pyx_int_8) < (0)) __PYX_ERR(3, 168, __pyx_L1_error)

  /* "constants.auto.pyx":170
 * PARAM_DEVICE_SPEED = 8
 * ## Device is online: boolean
 * PARAM_DEVICE_ONLINE = 9             # <<<<<<<<<<<<<<
 * ## Pass dot combinations (rather than characters): boolean
 * PARAM_RETAIN_DOTS = 10
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_DEVICE_ONLINE, __pyx_mstate_global->__pyx_int_9) < (0)) __PYX_ERR(3, 170, __pyx_L1_error)

  /* "constants.auto.pyx":172
 * PARAM_DEVICE_ONLINE = 9
 * ## Pass dot combinations (rather than characters): boolean
 * PARAM_RETAIN_DOTS = 10             # <<<<<<<<<<<<<<
 * ## Number of dots used to render a computer braille character: uint8_t (8 or 6)
 * PARAM_COMPUTER_BRAILLE_CELL_SIZE = 11
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_RETAIN_DOTS, __pyx_mstate_global->__pyx_int_10) < (0)) __PYX_ERR(3, 172, __pyx_L1_error)

  /* "constants.auto.pyx":174
 * PARAM_RETAIN_DOTS = 10
 * ## Number of dots used to render a computer braille character: uint8_t (8 or 6)
 * PARAM_COMPUTER_BRAILLE_CELL_SIZE = 11             # <<<<<<<<<<<<<<
 * ## Whether braille is literary (rather than computer): boolean
 * PARAM_LITERARY_BRAILLE = 12
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_COMPUTER_BRAILLE_CELL_SIZE, __pyx_mstate_global->__pyx_int_11) < (0)) __PYX_ERR(3, 174, __pyx_L1_error)

  /* "constants.auto.pyx":176
 * PARAM_COMPUTER_BRAILLE_CELL_SIZE = 11
 * ## Whether braille is literary (rather than computer): boolean
 * PARAM_LITERARY_BRAILLE = 12             # <<<<<<<<<<<<<<
 * ## Representation of the cursor: uint8_t (ISO 11548-1)
 * PARAM_CURSOR_DOTS = 13
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_LITERARY_BRAILLE, __pyx_mstate_global->__pyx_int_12) < (0)) __PYX_ERR(3, 176, __pyx_L1_error)

  /* "constants.auto.pyx":178
 * PARAM_LITERARY_BRAILLE = 12
 * ## Representation of the cursor: uint8_t (ISO 11548-1)
 * PARAM_CURSOR_DOTS = 13             # <<<<<<<<<<<<<<
 * ## Blinking period of the cursor: uint32_t (milliseconds)
 * PARAM_CURSOR_BLINK_PERIOD = 14
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_CURSOR_DOTS, __pyx_mstate_global->__pyx_int_13) < (0)) __PYX_ERR(3, 178, __pyx_L1_error)

  /* "constants.auto.pyx":180
 * PARAM_CURSOR_DOTS = 13
 * ## Blinking period of the cursor: uint32_t (milliseconds)
 * PARAM_CURSOR_BLINK_PERIOD = 14             # <<<<<<<<<<<<<<
 * ## Portion of the blinking period that the cursor is visible: uint8_t (from 0 through 100)
 * PARAM_CURSOR_BLINK_PERCENTAGE = 15
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_CURSOR_BLINK_PERIOD, __pyx_mstate_global->__pyx_int_14) < (0)) __PYX_ERR(3, 180, __pyx_L1_error)

  /* "constants.auto.pyx":182
 * PARAM_CURSOR_BLINK_PERIOD = 14
 * ## Portion of the blinking period that the cursor is visible: uint8_t (from 0 through 100)
 * PARAM_CURSOR_BLINK_PERCENTAGE = 15             # <<<<<<<<<<<<<<
 * ## Cells rendered by the client: uint8_t[] (ISO 11548-1), one cell per element
 * PARAM_RENDERED_CELLS = 16
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_CURSOR_BLINK_PERCENTAGE, __pyx_mstate_global->__pyx_int_15) < (0)) __PYX_ERR(3, 182, __pyx_L1_error)

  /* "constants.auto.pyx":184
 * PARAM_CURSOR_BLINK_PERCENTAGE = 15
 * ## Cells rendered by the client: uint8_t[] (ISO 11548-1), one cell per element
 * PARAM_RENDERED_CELLS = 16             # <<<<<<<<<<<<<<
 * ## Whether to skip identical screen lines: boolean
 * PARAM_SKIP_IDENTICAL_LINES = 17
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_RENDERED_CELLS, __pyx_mstate_global->__pyx_int_16) < (0)) __PYX_ERR(3, 184, __pyx_L1_error)

  /* "constants.auto.pyx":186
 * PARAM_RENDERED_CELLS = 16
 * ## Whether to skip identical screen lines: boolean
 * PARAM_SKIP_IDENTICAL_LINES = 17             # <<<<<<<<<<<<<<
 * ## Whether to use audible alerts: boolean
 * PARAM_AUDIBLE_ALERTS = 18
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_SKIP_IDENTICAL_LINES, __pyx_mstate_global->__pyx_int_17) < (0)) __PYX_ERR(3, 186, __pyx_L1_error)

  /* "constants.auto.pyx":188
 * PARAM_SKIP_IDENTICAL_LINES = 17
 * ## Whether to use audible alerts: boolean
 * PARAM_AUDIBLE_ALERTS = 18             # <<<<<<<<<<<<<<
 * ## Content of the clipboard: UTF-8 string
 * PARAM_CLIPBOARD_CONTENT = 19
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_AUDIBLE_ALERTS, __pyx_mstate_global->__pyx_int_18) < (0)) __PYX_ERR(3, 188, __pyx_L1_error)

  /* "constants.auto.pyx":190
 * PARAM_AUDIBLE_ALERTS = 18
 * ## Content of the clipboard: UTF-8 string
 * PARAM_CLIPBOARD_CONTENT = 19             # <<<<<<<<<<<<<<
 * ## Commands bound by the driver: uint64_t[], one command keycode per element
 * PARAM_BOUND_COMMAND_KEYCODES = 20
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_CLIPBOARD_CONTENT, __pyx_mstate_global->__pyx_int_19) < (0)) __PYX_ERR(3, 190, __pyx_L1_error)

  /* "constants.auto.pyx":192
 * PARAM_CLIPBOARD_CONTENT = 19
 * ## Commands bound by the driver: uint64_t[], one command keycode per element
 * PARAM_BOUND_COMMAND_KEYCODES = 20             # <<<<<<<<<<<<<<
 * ## Name for a command keycode (specified via the subparam argument): string (usually a few characters)
 * PARAM_COMMAND_KEYCODE_NAME = 21
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_BOUND_COMMAND_KEYCODES, __pyx_mstate_global->__pyx_int_20) < (0)) __PYX_ERR(3, 192, __pyx_L1_error)

  /* "constants.auto.pyx":194
 * PARAM_BOUND_COMMAND_KEYCODES = 20
 * ## Name for a command keycode (specified via the subparam argument): string (usually a few characters)
 * PARAM_COMMAND_KEYCODE_NAME = 21             # <<<<<<<<<<<<<<
 * ## Description for a command keycode (specified via the subparam argument): string (usually a few words)
 * PARAM_COMMAND_KEYCODE_SUMMARY = 22
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_COMMAND_KEYCODE_NAME, __pyx_mstate_global->__pyx_int_21) < (0)) __PYX_ERR(3, 194, __pyx_L1_error)

  /* "constants.auto.pyx":196
 * PARAM_COMMAND_KEYCODE_NAME = 21
 * ## Description for a command keycode (specified via the subparam argument): string (usually a few words)
 * PARAM_COMMAND_KEYCODE_SUMMARY = 22             # <<<<<<<<<<<<<<
 * ## Keycodes defined by the driver: uint64_t[], one keycode per element
 * PARAM_DEFINED_DRIVER_KEYCODES = 23
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_COMMAND_KEYCODE_SUMMARY, __pyx_mstate_global->__pyx_int_22) < (0)) __PYX_ERR(3, 196, __pyx_L1_error)

  /* "constants.auto.pyx":198
 * PARAM_COMMAND_KEYCODE_SUMMARY = 22
 * ## Keycodes defined by the driver: uint64_t[], one keycode per element
 * PARAM_DEFINED_DRIVER_KEYCODES = 23             # <<<<<<<<<<<<<<
 * ## Name for a driver keycode (specified via the subparam argument): string (usually a few characters)
 * PARAM_DRIVER_KEYCODE_NAME = 24
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_DEFINED_DRIVER_KEYCODES, __pyx_mstate_global->__pyx_int_23) < (0)) __PYX_ERR(3, 198, __pyx_L1_error)

  /* "constants.auto.pyx":200
 * PARAM_DEFINED_DRIVER_KEYCODES = 23
 * ## Name for a driver keycode (specified via the subparam argument): string (usually a few characters)
 * PARAM_DRIVER_KEYCODE_NAME = 24             # <<<<<<<<<<<<<<
 * ## Description for a driver keycode (specified via the subparam argument): string (usually a few words)
 * PARAM_DRIVER_KEYCODE_SUMMARY = 25
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_DRIVER_KEYCODE_NAME, __pyx_mstate_global->__pyx_int_24) < (0)) __PYX_ERR(3, 200, __pyx_L1_error)

  /* "constants.auto.pyx":202
 * PARAM_DRIVER_KEYCODE_NAME = 24
 * ## Description for a driver keycode (specified via the subparam argument): string (usually a few words)
 * PARAM_DRIVER_KEYCODE_SUMMARY = 25             # <<<<<<<<<<<<<<
 * ## Set of Unicode rows that are defined for computer braille (from U+0000 through U+10FFFF): uint8_t[544], one bit per row, eight rows per element
 * PARAM_COMPUTER_BRAILLE_ROWS_MASK = 26
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_DRIVER_KEYCODE_SUMMARY, __pyx_mstate_global->__pyx_int_25) < (0)) __PYX_ERR(3, 202, __pyx_L1_error)

  /* "constants.auto.pyx":204
 * PARAM_DRIVER_KEYCODE_SUMMARY = 25
 * ## Set of Unicode rows that are defined for computer braille (from U+0000 through U+10FFFF): uint8_t[544], one bit per row, eight rows per element
 * PARAM_COMPUTER_BRAILLE_ROWS_MASK = 26             # <<<<<<<<<<<<<<
 * ## Computer braille cells for a Unicode row (specified via the subparam argument): uint8_t[256] (ISO 11548-1), one cell per element
 * PARAM_COMPUTER_BRAILLE_ROW_CELLS = 27
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_COMPUTER_BRAILLE_ROWS_MASK, __pyx_mstate_global->__pyx_int_26) < (0)) __PYX_ERR(3, 204, __pyx_L1_error)

  /* "constants.auto.pyx":206
 * PARAM_COMPUTER_BRAILLE_ROWS_MASK = 26
 * ## Computer braille cells for a Unicode row (specified via the subparam argument): uint8_t[256] (ISO 11548-1), one cell per element
 * PARAM_COMPUTER_BRAILLE_ROW_CELLS = 27             # <<<<<<<<<<<<<<
 * ## Name of the computer braille table: string
 * PARAM_COMPUTER_BRAILLE_TABLE = 28
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_COMPUTER_BRAILLE_ROW_CELLS, __pyx_mstate_global->__pyx_int_27) < (0)) __PYX_ERR(3, 206, __pyx_L1_error)

  /* "constants.auto.pyx":208
 * PARAM_COMPUTER_BRAILLE_ROW_CELLS = 27
 * ## Name of the computer braille table: string
 * PARAM_COMPUTER_BRAILLE_TABLE = 28             # <<<<<<<<<<<<<<
 * ## Name of the literary braille table: string
 * PARAM_LITERARY_BRAILLE_TABLE = 29
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_COMPUTER_BRAILLE_TABLE, __pyx_mstate_global->__pyx_int_28) < (0)) __PYX_ERR(3, 208, __pyx_L1_error)

  /* "constants.auto.pyx":210
 * PARAM_COMPUTER_BRAILLE_TABLE = 28
 * ## Name of the literary braille table: string
 * PARAM_LITERARY_BRAILLE_TABLE = 29             # <<<<<<<<<<<<<<
 * ## Locale to use for messages: string
 * PARAM_MESSAGE_LOCALE = 30
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_LITERARY_BRAILLE_TABLE, __pyx_mstate_global->__pyx_int_29) < (0)) __PYX_ERR(3, 210, __pyx_L1_error)

  /* "constants.auto.pyx":212
 * PARAM_LITERARY_BRAILLE_TABLE = 29
 * ## Locale to use for messages: string
 * PARAM_MESSAGE_LOCALE = 30             # <<<<<<<<<<<<<<
 * ## Value of a driver-specific property: uint32_t
 * PARAM_DRIVER_PROPERTY_VALUE = 32
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_MESSAGE_LOCALE, __pyx_mstate_global->__pyx_int_30) < (0)) __PYX_ERR(3, 212, __pyx_L1_error)

  /* "constants.auto.pyx":214
 * PARAM_MESSAGE_LOCALE = 30
 * ## Value of a driver-specific property: uint32_t
 * PARAM_DRIVER_PROPERTY_VALUE = 32             # <<<<<<<<<<<<<<
 * ## Number of parameters
 * PARAM_COUNT = 33
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_DRIVER_PROPERTY_VALUE, __pyx_mstate_global->__pyx_int_32) < (0)) __PYX_ERR(3, 214, __pyx_L1_error)

  /* "constants.auto.pyx":216
 * PARAM_DRIVER_PROPERTY_VALUE = 32
 * ## Number of parameters
 * PARAM_COUNT = 33             # <<<<<<<<<<<<<<
 * ## Parameter is a string of UTF-8 characters
 * PARAM_TYPE_STRING = 0
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_COUNT, __pyx_mstate_global->__pyx_int_33) < (0)) __PYX_ERR(3, 216, __pyx_L1_error)

  /* "constants.auto.pyx":218
 * PARAM_COUNT = 33
 * ## Parameter is a string of UTF-8 characters
 * PARAM_TYPE_STRING = 0             # <<<<<<<<<<<<<<
 * ## Parameter is one or more booleans represented by a uint8_t
 * PARAM_TYPE_BOOLEAN = 1
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_STRING, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(3, 218, __pyx_L1_error)

  /* "constants.auto.pyx":220
 * PARAM_TYPE_STRING = 0
 * ## Parameter is one or more booleans represented by a uint8_t
 * PARAM_TYPE_BOOLEAN = 1             # <<<<<<<<<<<<<<
 * ## Parameter is one or more 8-bit unsigned integers
 * PARAM_TYPE_UINT8 = 2
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_BOOLEAN, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(3, 220, __pyx_L1_error)

  /* "constants.auto.pyx":222
 * PARAM_TYPE_BOOLEAN = 1
 * ## Parameter is one or more 8-bit unsigned integers
 * PARAM_TYPE_UINT8 = 2             # <<<<<<<<<<<<<<
 * ## Parameter is one or more 16-bit unsigned integers
 * PARAM_TYPE_UINT16 = 3
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_UINT8, __pyx_mstate_global->__pyx_int_2) < (0)) __PYX_ERR(3, 222, __pyx_L1_error)

  /* "constants.auto.pyx":224
 * PARAM_TYPE_UINT8 = 2
 * ## Parameter is one or more 16-bit unsigned integers
 * PARAM_TYPE_UINT16 = 3             # <<<<<<<<<<<<<<
 * ## Parameter is one or more 32-bit unsigned integers
 * PARAM_TYPE_UINT32 = 4
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_UINT16, __pyx_mstate_global->__pyx_int_3) < (0)) __PYX_ERR(3, 224, __pyx_L1_error)

  /* "constants.auto.pyx":226
 * PARAM_TYPE_UINT16 = 3
 * ## Parameter is one or more 32-bit unsigned integers
 * PARAM_TYPE_UINT32 = 4             # <<<<<<<<<<<<<<
 * ## Parameter is one or more 64-bit unsigned integers
 * PARAM_TYPE_UINT64 = 5
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_UINT32, __pyx_mstate_global->__pyx_int_4) < (0)) __PYX_ERR(3, 226, __pyx_L1_error)

  /* "constants.auto.pyx":228
 * PARAM_TYPE_UINT32 = 4
 * ## Parameter is one or more 64-bit unsigned integers
 * PARAM_TYPE_UINT64 = 5             # <<<<<<<<<<<<<<
 * ## Parameter is one or more key codes
 * PARAM_TYPE_KEYCODE = 5
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_UINT64, __pyx_mstate_global->__pyx_int_5) < (0)) __PYX_ERR(3, 228, __pyx_L1_error)

  /* "constants.auto.pyx":230
 * PARAM_TYPE_UINT64 = 5
 * ## Parameter is one or more key codes
 * PARAM_TYPE_KEYCODE = 5             # <<<<<<<<<<<<<<
 * ## do nothing
 * KEY_CMD_NOOP = 0
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PARAM_TYPE_KEYCODE, __pyx_mstate_global->__pyx_int_5) < (0)) __PYX_ERR(3, 230, __pyx_L1_error)

  /* "constants.auto.pyx":232
 * PARAM_TYPE_KEYCODE = 5
 * ## do nothing
 * KEY_CMD_NOOP = 0             # <<<<<<<<<<<<<<
 * ## go up one line
 * KEY_CMD_LNUP = 1
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_NOOP, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(3, 232, __pyx_L1_error)

  /* "constants.auto.pyx":234
 * KEY_CMD_NOOP = 0
 * ## go up one line
 * KEY_CMD_LNUP = 1             # <<<<<<<<<<<<<<
 * ## go down one line
 * KEY_CMD_LNDN = 2
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_LNUP, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(3, 234, __pyx_L1_error)

  /* "constants.auto.pyx":236
 * KEY_CMD_LNUP = 1
 * ## go down one line
 * KEY_CMD_LNDN = 2             # <<<<<<<<<<<<<<
 * ## go up several lines
 * KEY_CMD_WINUP = 3
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_LNDN, __pyx_mstate_global->__pyx_int_2) < (0)) __PYX_ERR(3, 236, __pyx_L1_error)

  /* "constants.auto.pyx":238
 * KEY_CMD_LNDN = 2
 * ## go up several lines
 * KEY_CMD_WINUP = 3             # <<<<<<<<<<<<<<
 * ## go down several lines
 * KEY_CMD_WINDN = 4
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_WINUP, __pyx_mstate_global->__pyx_int_3) < (0)) __PYX_ERR(3, 238, __pyx_L1_error)

  /* "constants.auto.pyx":240
 * KEY_CMD_WINUP = 3
 * ## go down several lines
 * KEY_CMD_WINDN = 4             # <<<<<<<<<<<<<<
 * ## go up to nearest line with different content
 * KEY_CMD_PRDIFLN = 5
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_WINDN, __pyx_mstate_global->__pyx_int_4) < (0)) __PYX_ERR(3, 240, __pyx_L1_error)

  /* "constants.auto.pyx":242
 * KEY_CMD_WINDN = 4
 * ## go up to nearest line with different content
 * KEY_CMD_PRDIFLN = 5             # <<<<<<<<<<<<<<
 * ## go down to nearest line with different content
 * KEY_CMD_NXDIFLN = 6
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_PRDIFLN, __pyx_mstate_global->__pyx_int_5) < (0)) __PYX_ERR(3, 242, __pyx_L1_error)

  /* "constants.auto.pyx":244
 * KEY_CMD_PRDIFLN = 5
 * ## go down to nearest line with different content
 * KEY_CMD_NXDIFLN = 6             # <<<<<<<<<<<<<<
 * ## go up to nearest line with different highlighting
 * KEY_CMD_ATTRUP = 7
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_NXDIFLN, __pyx_mstate_global->__pyx_int_6) < (0)) __PYX_ERR(3, 244, __pyx_L1_error)

  /* "constants.auto.pyx":246
 * KEY_CMD_NXDIFLN = 6
 * ## go up to nearest line with different highlighting
 * KEY_CMD_ATTRUP = 7             # <<<<<<<<<<<<<<
 * ## go down to nearest line with different highlighting
 * KEY_CMD_ATTRDN = 8
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_ATTRUP, __pyx_mstate_global->__pyx_int_7) < (0)) __PYX_ERR(3, 246, __pyx_L1_error)

  /* "constants.auto.pyx":248
 * KEY_CMD_ATTRUP = 7
 * ## go down to nearest line with different highlighting
 * KEY_CMD_ATTRDN = 8             # <<<<<<<<<<<<<<
 * ## go to top line
 * KEY_CMD_TOP = 9
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_ATTRDN, __pyx_mstate_global->__pyx_int_8) < (0)) __PYX_ERR(3, 248, __pyx_L1_error)

  /* "constants.auto.pyx":250
 * KEY_CMD_ATTRDN = 8
 * ## go to top line
 * KEY_CMD_TOP = 9             # <<<<<<<<<<<<<<
 * ## go to bottom line
 * KEY_CMD_BOT = 10
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_TOP, __pyx_mstate_global->__pyx_int_9) < (0)) __PYX_ERR(3, 250, __pyx_L1_error)

  /* "constants.auto.pyx":252
 * KEY_CMD_TOP = 9
 * ## go to bottom line
 * KEY_CMD_BOT = 10             # <<<<<<<<<<<<<<
 * ## go to beginning of top line
 * KEY_CMD_TOP_LEFT = 11
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BOT, __pyx_mstate_global->__pyx_int_10) < (0)) __PYX_ERR(3, 252, __pyx_L1_error)

  /* "constants.auto.pyx":254
 * KEY_CMD_BOT = 10
 * ## go to beginning of top line
 * KEY_CMD_TOP_LEFT = 11             # <<<<<<<<<<<<<<
 * ## go to beginning of bottom line
 * KEY_CMD_BOT_LEFT = 12
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_TOP_LEFT, __pyx_mstate_global->__pyx_int_11) < (0)) __PYX_ERR(3, 254, __pyx_L1_error)

  /* "constants.auto.pyx":256
 * KEY_CMD_TOP_LEFT = 11
 * ## go to beginning of bottom line
 * KEY_CMD_BOT_LEFT = 12             # <<<<<<<<<<<<<<
 * ## go up to first line of paragraph
 * KEY_CMD_PRPGRPH = 13
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BOT_LEFT, __pyx_mstate_global->__pyx_int_12) < (0)) __PYX_ERR(3, 256, __pyx_L1_error)

  /* "constants.auto.pyx":258
 * KEY_CMD_BOT_LEFT = 12
 * ## go up to first line of paragraph
 * KEY_CMD_PRPGRPH = 13             # <<<<<<<<<<<<<<
 * ## go down to first line of next paragraph
 * KEY_CMD_NXPGRPH = 14
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_PRPGRPH, __pyx_mstate_global->__pyx_int_13) < (0)) __PYX_ERR(3, 258, __pyx_L1_error)

  /* "constants.auto.pyx":260
 * KEY_CMD_PRPGRPH = 13
 * ## go down to first line of next paragraph
 * KEY_CMD_NXPGRPH = 14             # <<<<<<<<<<<<<<
 * ## go up to previous command prompt
 * KEY_CMD_PRPROMPT = 15
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_NXPGRPH, __pyx_mstate_global->__pyx_int_14) < (0)) __PYX_ERR(3, 260, __pyx_L1_error)

  /* "constants.auto.pyx":262
 * KEY_CMD_NXPGRPH = 14
 * ## go up to previous command prompt
 * KEY_CMD_PRPROMPT = 15             # <<<<<<<<<<<<<<
 * ## go down to next command prompt
 * KEY_CMD_NXPROMPT = 16
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_PRPROMPT, __pyx_mstate_global->__pyx_int_15) < (0)) __PYX_ERR(3, 262, __pyx_L1_error)

  /* "constants.auto.pyx":264
 * KEY_CMD_PRPROMPT = 15
 * ## go down to next command prompt
 * KEY_CMD_NXPROMPT = 16             # <<<<<<<<<<<<<<
 * ## search backward for clipboard text
 * KEY_CMD_PRSEARCH = 17
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_NXPROMPT, __pyx_mstate_global->__pyx_int_16) < (0)) __PYX_ERR(3, 264, __pyx_L1_error)

  /* "constants.auto.pyx":266
 * KEY_CMD_NXPROMPT = 16
 * ## search backward for clipboard text
 * KEY_CMD_PRSEARCH = 17             # <<<<<<<<<<<<<<
 * ## search forward for clipboard text
 * KEY_CMD_NXSEARCH = 18
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_PRSEARCH, __pyx_mstate_global->__pyx_int_17) < (0)) __PYX_ERR(3, 266, __pyx_L1_error)

  /* "constants.auto.pyx":268
 * KEY_CMD_PRSEARCH = 17
 * ## search forward for clipboard text
 * KEY_CMD_NXSEARCH = 18             # <<<<<<<<<<<<<<
 * ## go left one character
 * KEY_CMD_CHRLT = 19
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_NXSEARCH, __pyx_mstate_global->__pyx_int_18) < (0)) __PYX_ERR(3, 268, __pyx_L1_error)

  /* "constants.auto.pyx":270
 * KEY_CMD_NXSEARCH = 18
 * ## go left one character
 * KEY_CMD_CHRLT = 19             # <<<<<<<<<<<<<<
 * ## go right one character
 * KEY_CMD_CHRRT = 20
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CHRLT, __pyx_mstate_global->__pyx_int_19) < (0)) __PYX_ERR(3, 270, __pyx_L1_error)

  /* "constants.auto.pyx":272
 * KEY_CMD_CHRLT = 19
 * ## go right one character
 * KEY_CMD_CHRRT = 20             # <<<<<<<<<<<<<<
 * ## go left half a braille window
 * KEY_CMD_HWINLT = 21
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CHRRT, __pyx_mstate_global->__pyx_int_20) < (0)) __PYX_ERR(3, 272, __pyx_L1_error)

  /* "constants.auto.pyx":274
 * KEY_CMD_CHRRT = 20
 * ## go left half a braille window
 * KEY_CMD_HWINLT = 21             # <<<<<<<<<<<<<<
 * ## go right half a braille window
 * KEY_CMD_HWINRT = 22
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_HWINLT, __pyx_mstate_global->__pyx_int_21) < (0)) __PYX_ERR(3, 274, __pyx_L1_error)

  /* "constants.auto.pyx":276
 * KEY_CMD_HWINLT = 21
 * ## go right half a braille window
 * KEY_CMD_HWINRT = 22             # <<<<<<<<<<<<<<
 * ## go backward one braille window
 * KEY_CMD_FWINLT = 23
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_HWINRT, __pyx_mstate_global->__pyx_int_22) < (0)) __PYX_ERR(3, 276, __pyx_L1_error)

  /* "constants.auto.pyx":278
 * KEY_CMD_HWINRT = 22
 * ## go backward one braille window
 * KEY_CMD_FWINLT = 23             # <<<<<<<<<<<<<<
 * ## go forward one braille window
 * KEY_CMD_FWINRT = 24
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_FWINLT, __pyx_mstate_global->__pyx_int_23) < (0)) __PYX_ERR(3, 278, __pyx_L1_error)

  /* "constants.auto.pyx":280
 * KEY_CMD_FWINLT = 23
 * ## go forward one braille window
 * KEY_CMD_FWINRT = 24             # <<<<<<<<<<<<<<
 * ## go backward skipping blank braille windows
 * KEY_CMD_FWINLTSKIP = 25
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_FWINRT, __pyx_mstate_global->__pyx_int_24) < (0)) __PYX_ERR(3, 280, __pyx_L1_error)

  /* "constants.auto.pyx":282
 * KEY_CMD_FWINRT = 24
 * ## go backward skipping blank braille windows
 * KEY_CMD_FWINLTSKIP = 25             # <<<<<<<<<<<<<<
 * ## go forward skipping blank braille windows
 * KEY_CMD_FWINRTSKIP = 26
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_FWINLTSKIP, __pyx_mstate_global->__pyx_int_25) < (0)) __PYX_ERR(3, 282, __pyx_L1_error)

  /* "constants.auto.pyx":284
 * KEY_CMD_FWINLTSKIP = 25
 * ## go forward skipping blank braille windows
 * KEY_CMD_FWINRTSKIP = 26             # <<<<<<<<<<<<<<
 * ## go to beginning of line
 * KEY_CMD_LNBEG = 27
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_FWINRTSKIP, __pyx_mstate_global->__pyx_int_26) < (0)) __PYX_ERR(3, 284, __pyx_L1_error)

  /* "constants.auto.pyx":286
 * KEY_CMD_FWINRTSKIP = 26
 * ## go to beginning of line
 * KEY_CMD_LNBEG = 27             # <<<<<<<<<<<<<<
 * ## go to end of line
 * KEY_CMD_LNEND = 28
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_LNBEG, __pyx_mstate_global->__pyx_int_27) < (0)) __PYX_ERR(3, 286, __pyx_L1_error)

  /* "constants.auto.pyx":288
 * KEY_CMD_LNBEG = 27
 * ## go to end of line
 * KEY_CMD_LNEND = 28             # <<<<<<<<<<<<<<
 * ## go to screen cursor
 * KEY_CMD_HOME = 29
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_LNEND, __pyx_mstate_global->__pyx_int_28) < (0)) __PYX_ERR(3, 288, __pyx_L1_error)

  /* "constants.auto.pyx":290
 * KEY_CMD_LNEND = 28
 * ## go to screen cursor
 * KEY_CMD_HOME = 29             # <<<<<<<<<<<<<<
 * ## go back after cursor tracking
 * KEY_CMD_BACK = 30
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_HOME, __pyx_mstate_global->__pyx_int_29) < (0)) __PYX_ERR(3, 290, __pyx_L1_error)

  /* "constants.auto.pyx":292
 * KEY_CMD_HOME = 29
 * ## go back after cursor tracking
 * KEY_CMD_BACK = 30             # <<<<<<<<<<<<<<
 * ## go to screen cursor or go back after cursor tracking
 * KEY_CMD_RETURN = 31
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BACK, __pyx_mstate_global->__pyx_int_30) < (0)) __PYX_ERR(3, 292, __pyx_L1_error)

  /* "constants.auto.pyx":294
 * KEY_CMD_BACK = 30
 * ## go to screen cursor or go back after cursor tracking
 * KEY_CMD_RETURN = 31             # <<<<<<<<<<<<<<
 * ## set screen image frozen/live
 * KEY_CMD_FREEZE = 32
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_RETURN, __pyx_mstate_global->__pyx_int_31) < (0)) __PYX_ERR(3, 294, __pyx_L1_error)

  /* "constants.auto.pyx":296
 * KEY_CMD_RETURN = 31
 * ## set screen image frozen/live
 * KEY_CMD_FREEZE = 32             # <<<<<<<<<<<<<<
 * ## set display mode attributes/text
 * KEY_CMD_DISPMD = 33
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_FREEZE, __pyx_mstate_global->__pyx_int_32) < (0)) __PYX_ERR(3, 296, __pyx_L1_error)

  /* "constants.auto.pyx":298
 * KEY_CMD_FREEZE = 32
 * ## set display mode attributes/text
 * KEY_CMD_DISPMD = 33             # <<<<<<<<<<<<<<
 * ## set text style 6-dot/8-dot
 * KEY_CMD_SIXDOTS = 34
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_DISPMD, __pyx_mstate_global->__pyx_int_33) < (0)) __PYX_ERR(3, 298, __pyx_L1_error)

  /* "constants.auto.pyx":300
 * KEY_CMD_DISPMD = 33
 * ## set text style 6-dot/8-dot
 * KEY_CMD_SIXDOTS = 34             # <<<<<<<<<<<<<<
 * ## set sliding braille window on/off
 * KEY_CMD_SLIDEWIN = 35
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SIXDOTS, __pyx_mstate_global->__pyx_int_34) < (0)) __PYX_ERR(3, 300, __pyx_L1_error)

  /* "constants.auto.pyx":302
 * KEY_CMD_SIXDOTS = 34
 * ## set sliding braille window on/off
 * KEY_CMD_SLIDEWIN = 35             # <<<<<<<<<<<<<<
 * ## set skipping of lines with identical content on/off
 * KEY_CMD_SKPIDLNS = 36
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SLIDEWIN, __pyx_mstate_global->__pyx_int_35) < (0)) __PYX_ERR(3, 302, __pyx_L1_error)

  /* "constants.auto.pyx":304
 * KEY_CMD_SLIDEWIN = 35
 * ## set skipping of lines with identical content on/off
 * KEY_CMD_SKPIDLNS = 36             # <<<<<<<<<<<<<<
 * ## set skipping of blank braille windows on/off
 * KEY_CMD_SKPBLNKWINS = 37
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SKPIDLNS, __pyx_mstate_global->__pyx_int_36) < (0)) __PYX_ERR(3, 304, __pyx_L1_error)

  /* "constants.auto.pyx":306
 * KEY_CMD_SKPIDLNS = 36
 * ## set skipping of blank braille windows on/off
 * KEY_CMD_SKPBLNKWINS = 37             # <<<<<<<<<<<<<<
 * ## set screen cursor visibility on/off
 * KEY_CMD_CSRVIS = 38
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SKPBLNKWINS, __pyx_mstate_global->__pyx_int_37) < (0)) __PYX_ERR(3, 306, __pyx_L1_error)

  /* "constants.auto.pyx":308
 * KEY_CMD_SKPBLNKWINS = 37
 * ## set screen cursor visibility on/off
 * KEY_CMD_CSRVIS = 38             # <<<<<<<<<<<<<<
 * ## set hidden screen cursor on/off
 * KEY_CMD_CSRHIDE = 39
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CSRVIS, __pyx_mstate_global->__pyx_int_38) < (0)) __PYX_ERR(3, 308, __pyx_L1_error)

  /* "constants.auto.pyx":310
 * KEY_CMD_CSRVIS = 38
 * ## set hidden screen cursor on/off
 * KEY_CMD_CSRHIDE = 39             # <<<<<<<<<<<<<<
 * ## set track screen cursor on/off
 * KEY_CMD_CSRTRK = 40
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CSRHIDE, __pyx_mstate_global->__pyx_int_39) < (0)) __PYX_ERR(3, 310, __pyx_L1_error)

  /* "constants.auto.pyx":312
 * KEY_CMD_CSRHIDE = 39
 * ## set track screen cursor on/off
 * KEY_CMD_CSRTRK = 40             # <<<<<<<<<<<<<<
 * ## set screen cursor style block/underline
 * KEY_CMD_CSRSIZE = 41
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CSRTRK, __pyx_mstate_global->__pyx_int_40) < (0)) __PYX_ERR(3, 312, __pyx_L1_error)

  /* "constants.auto.pyx":314
 * KEY_CMD_CSRTRK = 40
 * ## set screen cursor style block/underline
 * KEY_CMD_CSRSIZE = 41             # <<<<<<<<<<<<<<
 * ## set screen cursor blinking on/off
 * KEY_CMD_CSRBLINK = 42
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CSRSIZE, __pyx_mstate_global->__pyx_int_41) < (0)) __PYX_ERR(3, 314, __pyx_L1_error)

  /* "constants.auto.pyx":316
 * KEY_CMD_CSRSIZE = 41
 * ## set screen cursor blinking on/off
 * KEY_CMD_CSRBLINK = 42             # <<<<<<<<<<<<<<
 * ## set attribute underlining on/off
 * KEY_CMD_ATTRVIS = 43
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CSRBLINK, __pyx_mstate_global->__pyx_int_42) < (0)) __PYX_ERR(3, 316, __pyx_L1_error)

  /* "constants.auto.pyx":318
 * KEY_CMD_CSRBLINK = 42
 * ## set attribute underlining on/off
 * KEY_CMD_ATTRVIS = 43             # <<<<<<<<<<<<<<
 * ## set attribute blinking on/off
 * KEY_CMD_ATTRBLINK = 44
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_ATTRVIS, __pyx_mstate_global->__pyx_int_43) < (0)) __PYX_ERR(3, 318, __pyx_L1_error)

  /* "constants.auto.pyx":320
 * KEY_CMD_ATTRVIS = 43
 * ## set attribute blinking on/off
 * KEY_CMD_ATTRBLINK = 44             # <<<<<<<<<<<<<<
 * ## set capital letter blinking on/off
 * KEY_CMD_CAPBLINK = 45
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_ATTRBLINK, __pyx_mstate_global->__pyx_int_44) < (0)) __PYX_ERR(3, 320, __pyx_L1_error)

  /* "constants.auto.pyx":322
 * KEY_CMD_ATTRBLINK = 44
 * ## set capital letter blinking on/off
 * KEY_CMD_CAPBLINK = 45             # <<<<<<<<<<<<<<
 * ## set alert tunes on/off
 * KEY_CMD_TUNES = 46
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CAPBLINK, __pyx_mstate_global->__pyx_int_45) < (0)) __PYX_ERR(3, 322, __pyx_L1_error)

  /* "constants.auto.pyx":324
 * KEY_CMD_CAPBLINK = 45
 * ## set alert tunes on/off
 * KEY_CMD_TUNES = 46             # <<<<<<<<<<<<<<
 * ## set autorepeat on/off
 * KEY_CMD_AUTOREPEAT = 47
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_TUNES, __pyx_mstate_global->__pyx_int_46) < (0)) __PYX_ERR(3, 324, __pyx_L1_error)

  /* "constants.auto.pyx":326
 * KEY_CMD_TUNES = 46
 * ## set autorepeat on/off
 * KEY_CMD_AUTOREPEAT = 47             # <<<<<<<<<<<<<<
 * ## set autospeak on/off
 * KEY_CMD_AUTOSPEAK = 48
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_AUTOREPEAT, __pyx_mstate_global->__pyx_int_47) < (0)) __PYX_ERR(3, 326, __pyx_L1_error)

  /* "constants.auto.pyx":328
 * KEY_CMD_AUTOREPEAT = 47
 * ## set autospeak on/off
 * KEY_CMD_AUTOSPEAK = 48             # <<<<<<<<<<<<<<
 * ## enter/leave help display
 * KEY_CMD_HELP = 49
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_AUTOSPEAK, __pyx_mstate_global->__pyx_int_48) < (0)) __PYX_ERR(3, 328, __pyx_L1_error)

  /* "constants.auto.pyx":330
 * KEY_CMD_AUTOSPEAK = 48
 * ## enter/leave help display
 * KEY_CMD_HELP = 49             # <<<<<<<<<<<<<<
 * ## enter/leave status display
 * KEY_CMD_INFO = 50
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_HELP, __pyx_mstate_global->__pyx_int_49) < (0)) __PYX_ERR(3, 330, __pyx_L1_error)

  /* "constants.auto.pyx":332
 * KEY_CMD_HELP = 49
 * ## enter/leave status display
 * KEY_CMD_INFO = 50             # <<<<<<<<<<<<<<
 * ## enter/leave command learn mode
 * KEY_CMD_LEARN = 51
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_INFO, __pyx_mstate_global->__pyx_int_50) < (0)) __PYX_ERR(3, 332, __pyx_L1_error)

  /* "constants.auto.pyx":334
 * KEY_CMD_INFO = 50
 * ## enter/leave command learn mode
 * KEY_CMD_LEARN = 51             # <<<<<<<<<<<<<<
 * ## enter/leave preferences menu
 * KEY_CMD_PREFMENU = 52
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_LEARN, __pyx_mstate_global->__pyx_int_51) < (0)) __PYX_ERR(3, 334, __pyx_L1_error)

  /* "constants.auto.pyx":336
 * KEY_CMD_LEARN = 51
 * ## enter/leave preferences menu
 * KEY_CMD_PREFMENU = 52             # <<<<<<<<<<<<<<
 * ## save preferences to disk
 * KEY_CMD_PREFSAVE = 53
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_PREFMENU, __pyx_mstate_global->__pyx_int_52) < (0)) __PYX_ERR(3, 336, __pyx_L1_error)

  /* "constants.auto.pyx":338
 * KEY_CMD_PREFMENU = 52
 * ## save preferences to disk
 * KEY_CMD_PREFSAVE = 53             # <<<<<<<<<<<<<<
 * ## restore preferences from disk
 * KEY_CMD_PREFLOAD = 54
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_PREFSAVE, __pyx_mstate_global->__pyx_int_53) < (0)) __PYX_ERR(3, 338, __pyx_L1_error)

  /* "constants.auto.pyx":340
 * KEY_CMD_PREFSAVE = 53
 * ## restore preferences from disk
 * KEY_CMD_PREFLOAD = 54             # <<<<<<<<<<<<<<
 * ## go up to first item
 * KEY_CMD_MENU_FIRST_ITEM = 55
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_PREFLOAD, __pyx_mstate_global->__pyx_int_54) < (0)) __PYX_ERR(3, 340, __pyx_L1_error)

  /* "constants.auto.pyx":342
 * KEY_CMD_PREFLOAD = 54
 * ## go up to first item
 * KEY_CMD_MENU_FIRST_ITEM = 55             # <<<<<<<<<<<<<<
 * ## go down to last item
 * KEY_CMD_MENU_LAST_ITEM = 56
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_MENU_FIRST_ITEM, __pyx_mstate_global->__pyx_int_55) < (0)) __PYX_ERR(3, 342, __pyx_L1_error)

  /* "constants.auto.pyx":344
 * KEY_CMD_MENU_FIRST_ITEM = 55
 * ## go down to last item
 * KEY_CMD_MENU_LAST_ITEM = 56             # <<<<<<<<<<<<<<
 * ## go up to previous item
 * KEY_CMD_MENU_PREV_ITEM = 57
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_MENU_LAST_ITEM, __pyx_mstate_global->__pyx_int_56) < (0)) __PYX_ERR(3, 344, __pyx_L1_error)

  /* "constants.auto.pyx":346
 * KEY_CMD_MENU_LAST_ITEM = 56
 * ## go up to previous item
 * KEY_CMD_MENU_PREV_ITEM = 57             # <<<<<<<<<<<<<<
 * ## go down to next item
 * KEY_CMD_MENU_NEXT_ITEM = 58
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_MENU_PREV_ITEM, __pyx_mstate_global->__pyx_int_57) < (0)) __PYX_ERR(3, 346, __pyx_L1_error)

  /* "constants.auto.pyx":348
 * KEY_CMD_MENU_PREV_ITEM = 57
 * ## go down to next item
 * KEY_CMD_MENU_NEXT_ITEM = 58             # <<<<<<<<<<<<<<
 * ## select previous choice
 * KEY_CMD_MENU_PREV_SETTING = 59
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_MENU_NEXT_ITEM, __pyx_mstate_global->__pyx_int_58) < (0)) __PYX_ERR(3, 348, __pyx_L1_error)

  /* "constants.auto.pyx":350
 * KEY_CMD_MENU_NEXT_ITEM = 58
 * ## select previous choice
 * KEY_CMD_MENU_PREV_SETTING = 59             # <<<<<<<<<<<<<<
 * ## select next choice
 * KEY_CMD_MENU_NEXT_SETTING = 60
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_MENU_PREV_SETTING, __pyx_mstate_global->__pyx_int_59) < (0)) __PYX_ERR(3, 350, __pyx_L1_error)

  /* "constants.auto.pyx":352
 * KEY_CMD_MENU_PREV_SETTING = 59
 * ## select next choice
 * KEY_CMD_MENU_NEXT_SETTING = 60             # <<<<<<<<<<<<<<
 * ## stop speaking
 * KEY_CMD_MUTE = 61
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_MENU_NEXT_SETTING, __pyx_mstate_global->__pyx_int_60) < (0)) __PYX_ERR(3, 352, __pyx_L1_error)

  /* "constants.auto.pyx":354
 * KEY_CMD_MENU_NEXT_SETTING = 60
 * ## stop speaking
 * KEY_CMD_MUTE = 61             # <<<<<<<<<<<<<<
 * ## go to current speaking position
 * KEY_CMD_SPKHOME = 62
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_MUTE, __pyx_mstate_global->__pyx_int_61) < (0)) __PYX_ERR(3, 354, __pyx_L1_error)

  /* "constants.auto.pyx":356
 * KEY_CMD_MUTE = 61
 * ## go to current speaking position
 * KEY_CMD_SPKHOME = 62             # <<<<<<<<<<<<<<
 * ## speak current line
 * KEY_CMD_SAY_LINE = 63
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPKHOME, __pyx_mstate_global->__pyx_int_62) < (0)) __PYX_ERR(3, 356, __pyx_L1_error)

  /* "constants.auto.pyx":358
 * KEY_CMD_SPKHOME = 62
 * ## speak current line
 * KEY_CMD_SAY_LINE = 63             # <<<<<<<<<<<<<<
 * ## speak from top of screen through current line
 * KEY_CMD_SAY_ABOVE = 64
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SAY_LINE, __pyx_mstate_global->__pyx_int_63) < (0)) __PYX_ERR(3, 358, __pyx_L1_error)

  /* "constants.auto.pyx":360
 * KEY_CMD_SAY_LINE = 63
 * ## speak from top of screen through current line
 * KEY_CMD_SAY_ABOVE = 64             # <<<<<<<<<<<<<<
 * ## speak from current line through bottom of screen
 * KEY_CMD_SAY_BELOW = 65
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SAY_ABOVE, __pyx_mstate_global->__pyx_int_64) < (0)) __PYX_ERR(3, 360, __pyx_L1_error)

  /* "constants.auto.pyx":362
 * KEY_CMD_SAY_ABOVE = 64
 * ## speak from current line through bottom of screen
 * KEY_CMD_SAY_BELOW = 65             # <<<<<<<<<<<<<<
 * ## decrease speaking rate
 * KEY_CMD_SAY_SLOWER = 66
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SAY_BELOW, __pyx_mstate_global->__pyx_int_65) < (0)) __PYX_ERR(3, 362, __pyx_L1_error)

  /* "constants.auto.pyx":364
 * KEY_CMD_SAY_BELOW = 65
 * ## decrease speaking rate
 * KEY_CMD_SAY_SLOWER = 66             # <<<<<<<<<<<<<<
 * ## increase speaking rate
 * KEY_CMD_SAY_FASTER = 67
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SAY_SLOWER, __pyx_mstate_global->__pyx_int_66) < (0)) __PYX_ERR(3, 364, __pyx_L1_error)

  /* "constants.auto.pyx":366
 * KEY_CMD_SAY_SLOWER = 66
 * ## increase speaking rate
 * KEY_CMD_SAY_FASTER = 67             # <<<<<<<<<<<<<<
 * ## decrease speaking volume
 * KEY_CMD_SAY_SOFTER = 68
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SAY_FASTER, __pyx_mstate_global->__pyx_int_67) < (0)) __PYX_ERR(3, 366, __pyx_L1_error)

  /* "constants.auto.pyx":368
 * KEY_CMD_SAY_FASTER = 67
 * ## decrease speaking volume
 * KEY_CMD_SAY_SOFTER = 68             # <<<<<<<<<<<<<<
 * ## increase speaking volume
 * KEY_CMD_SAY_LOUDER = 69
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SAY_SOFTER, __pyx_mstate_global->__pyx_int_68) < (0)) __PYX_ERR(3, 368, __pyx_L1_error)

  /* "constants.auto.pyx":370
 * KEY_CMD_SAY_SOFTER = 68
 * ## increase speaking volume
 * KEY_CMD_SAY_LOUDER = 69             # <<<<<<<<<<<<<<
 * ## switch to the previous virtual terminal
 * KEY_CMD_SWITCHVT_PREV = 70
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SAY_LOUDER, __pyx_mstate_global->__pyx_int_69) < (0)) __PYX_ERR(3, 370, __pyx_L1_error)

  /* "constants.auto.pyx":372
 * KEY_CMD_SAY_LOUDER = 69
 * ## switch to the previous virtual terminal
 * KEY_CMD_SWITCHVT_PREV = 70             # <<<<<<<<<<<<<<
 * ## switch to the next virtual terminal
 * KEY_CMD_SWITCHVT_NEXT = 71
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SWITCHVT_PREV, __pyx_mstate_global->__pyx_int_70) < (0)) __PYX_ERR(3, 372, __pyx_L1_error)

  /* "constants.auto.pyx":374
 * KEY_CMD_SWITCHVT_PREV = 70
 * ## switch to the next virtual terminal
 * KEY_CMD_SWITCHVT_NEXT = 71             # <<<<<<<<<<<<<<
 * ## bring screen cursor to current line
 * KEY_CMD_CSRJMP_VERT = 72
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SWITCHVT_NEXT, __pyx_mstate_global->__pyx_int_71) < (0)) __PYX_ERR(3, 374, __pyx_L1_error)

  /* "constants.auto.pyx":376
 * KEY_CMD_SWITCHVT_NEXT = 71
 * ## bring screen cursor to current line
 * KEY_CMD_CSRJMP_VERT = 72             # <<<<<<<<<<<<<<
 * ## insert the clipboard content before the screen cursor
 * KEY_CMD_PASTE = 73
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CSRJMP_VERT, __pyx_mstate_global->__pyx_int_72) < (0)) __PYX_ERR(3, 376, __pyx_L1_error)

  /* "constants.auto.pyx":378
 * KEY_CMD_CSRJMP_VERT = 72
 * ## insert the clipboard content before the screen cursor
 * KEY_CMD_PASTE = 73             # <<<<<<<<<<<<<<
 * ## restart braille driver
 * KEY_CMD_RESTARTBRL = 74
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_PASTE, __pyx_mstate_global->__pyx_int_73) < (0)) __PYX_ERR(3, 378, __pyx_L1_error)

  /* "constants.auto.pyx":380
 * KEY_CMD_PASTE = 73
 * ## restart braille driver
 * KEY_CMD_RESTARTBRL = 74             # <<<<<<<<<<<<<<
 * ## restart speech driver
 * KEY_CMD_RESTARTSPEECH = 75
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_RESTARTBRL, __pyx_mstate_global->__pyx_int_74) < (0)) __PYX_ERR(3, 380, __pyx_L1_error)

  /* "constants.auto.pyx":382
 * KEY_CMD_RESTARTBRL = 74
 * ## restart speech driver
 * KEY_CMD_RESTARTSPEECH = 75             # <<<<<<<<<<<<<<
 * ## braille display temporarily unavailable
 * KEY_CMD_OFFLINE = 76
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_RESTARTSPEECH, __pyx_mstate_global->__pyx_int_75) < (0)) __PYX_ERR(3, 382, __pyx_L1_error)

  /* "constants.auto.pyx":384
 * KEY_CMD_RESTARTSPEECH = 75
 * ## braille display temporarily unavailable
 * KEY_CMD_OFFLINE = 76             # <<<<<<<<<<<<<<
 * ## cycle the Shift sticky input modifier (next, on, off)
 * KEY_CMD_SHIFT = 77
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_OFFLINE, __pyx_mstate_global->__pyx_int_76) < (0)) __PYX_ERR(3, 384, __pyx_L1_error)

  /* "constants.auto.pyx":386
 * KEY_CMD_OFFLINE = 76
 * ## cycle the Shift sticky input modifier (next, on, off)
 * KEY_CMD_SHIFT = 77             # <<<<<<<<<<<<<<
 * ## cycle the Upper sticky input modifier (next, on, off)
 * KEY_CMD_UPPER = 78
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SHIFT, __pyx_mstate_global->__pyx_int_77) < (0)) __PYX_ERR(3, 386, __pyx_L1_error)

  /* "constants.auto.pyx":388
 * KEY_CMD_SHIFT = 77
 * ## cycle the Upper sticky input modifier (next, on, off)
 * KEY_CMD_UPPER = 78             # <<<<<<<<<<<<<<
 * ## cycle the Control sticky input modifier (next, on, off)
 * KEY_CMD_CONTROL = 79
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_UPPER, __pyx_mstate_global->__pyx_int_78) < (0)) __PYX_ERR(3, 388, __pyx_L1_error)

  /* "constants.auto.pyx":390
 * KEY_CMD_UPPER = 78
 * ## cycle the Control sticky input modifier (next, on, off)
 * KEY_CMD_CONTROL = 79             # <<<<<<<<<<<<<<
 * ## cycle the Meta (Left Alt) sticky input modifier (next, on, off)
 * KEY_CMD_META = 80
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CONTROL, __pyx_mstate_global->__pyx_int_79) < (0)) __PYX_ERR(3, 390, __pyx_L1_error)

  /* "constants.auto.pyx":392
 * KEY_CMD_CONTROL = 79
 * ## cycle the Meta (Left Alt) sticky input modifier (next, on, off)
 * KEY_CMD_META = 80             # <<<<<<<<<<<<<<
 * ## show current date and time
 * KEY_CMD_TIME = 81
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_META, __pyx_mstate_global->__pyx_int_80) < (0)) __PYX_ERR(3, 392, __pyx_L1_error)

  /* "constants.auto.pyx":394
 * KEY_CMD_META = 80
 * ## show current date and time
 * KEY_CMD_TIME = 81             # <<<<<<<<<<<<<<
 * ## go to previous menu level
 * KEY_CMD_MENU_PREV_LEVEL = 82
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_TIME, __pyx_mstate_global->__pyx_int_81) < (0)) __PYX_ERR(3, 394, __pyx_L1_error)

  /* "constants.auto.pyx":396
 * KEY_CMD_TIME = 81
 * ## go to previous menu level
 * KEY_CMD_MENU_PREV_LEVEL = 82             # <<<<<<<<<<<<<<
 * ## set autospeak selected line on/off
 * KEY_CMD_ASPK_SEL_LINE = 83
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_MENU_PREV_LEVEL, __pyx_mstate_global->__pyx_int_82) < (0)) __PYX_ERR(3, 396, __pyx_L1_error)

  /* "constants.auto.pyx":398
 * KEY_CMD_MENU_PREV_LEVEL = 82
 * ## set autospeak selected line on/off
 * KEY_CMD_ASPK_SEL_LINE = 83             # <<<<<<<<<<<<<<
 * ## set autospeak selected character on/off
 * KEY_CMD_ASPK_SEL_CHAR = 84
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_ASPK_SEL_LINE, __pyx_mstate_global->__pyx_int_83) < (0)) __PYX_ERR(3, 398, __pyx_L1_error)

  /* "constants.auto.pyx":400
 * KEY_CMD_ASPK_SEL_LINE = 83
 * ## set autospeak selected character on/off
 * KEY_CMD_ASPK_SEL_CHAR = 84             # <<<<<<<<<<<<<<
 * ## set autospeak inserted characters on/off
 * KEY_CMD_ASPK_INS_CHARS = 85
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_ASPK_SEL_CHAR, __pyx_mstate_global->__pyx_int_84) < (0)) __PYX_ERR(3, 400, __pyx_L1_error)

  /* "constants.auto.pyx":402
 * KEY_CMD_ASPK_SEL_CHAR = 84
 * ## set autospeak inserted characters on/off
 * KEY_CMD_ASPK_INS_CHARS = 85             # <<<<<<<<<<<<<<
 * ## set autospeak deleted characters on/off
 * KEY_CMD_ASPK_DEL_CHARS = 86
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_ASPK_INS_CHARS, __pyx_mstate_global->__pyx_int_85) < (0)) __PYX_ERR(3, 402, __pyx_L1_error)

  /* "constants.auto.pyx":404
 * KEY_CMD_ASPK_INS_CHARS = 85
 * ## set autospeak deleted characters on/off
 * KEY_CMD_ASPK_DEL_CHARS = 86             # <<<<<<<<<<<<<<
 * ## set autospeak replaced characters on/off
 * KEY_CMD_ASPK_REP_CHARS = 87
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_ASPK_DEL_CHARS, __pyx_mstate_global->__pyx_int_86) < (0)) __PYX_ERR(3, 404, __pyx_L1_error)

  /* "constants.auto.pyx":406
 * KEY_CMD_ASPK_DEL_CHARS = 86
 * ## set autospeak replaced characters on/off
 * KEY_CMD_ASPK_REP_CHARS = 87             # <<<<<<<<<<<<<<
 * ## set autospeak completed words on/off
 * KEY_CMD_ASPK_CMP_WORDS = 88
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_ASPK_REP_CHARS, __pyx_mstate_global->__pyx_int_87) < (0)) __PYX_ERR(3, 406, __pyx_L1_error)

  /* "constants.auto.pyx":408
 * KEY_CMD_ASPK_REP_CHARS = 87
 * ## set autospeak completed words on/off
 * KEY_CMD_ASPK_CMP_WORDS = 88             # <<<<<<<<<<<<<<
 * ## speak current character
 * KEY_CMD_SPEAK_CURR_CHAR = 89
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_ASPK_CMP_WORDS, __pyx_mstate_global->__pyx_int_88) < (0)) __PYX_ERR(3, 408, __pyx_L1_error)

  /* "constants.auto.pyx":410
 * KEY_CMD_ASPK_CMP_WORDS = 88
 * ## speak current character
 * KEY_CMD_SPEAK_CURR_CHAR = 89             # <<<<<<<<<<<<<<
 * ## go to and speak previous character
 * KEY_CMD_SPEAK_PREV_CHAR = 90
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPEAK_CURR_CHAR, __pyx_mstate_global->__pyx_int_89) < (0)) __PYX_ERR(3, 410, __pyx_L1_error)

  /* "constants.auto.pyx":412
 * KEY_CMD_SPEAK_CURR_CHAR = 89
 * ## go to and speak previous character
 * KEY_CMD_SPEAK_PREV_CHAR = 90             # <<<<<<<<<<<<<<
 * ## go to and speak next character
 * KEY_CMD_SPEAK_NEXT_CHAR = 91
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPEAK_PREV_CHAR, __pyx_mstate_global->__pyx_int_90) < (0)) __PYX_ERR(3, 412, __pyx_L1_error)

  /* "constants.auto.pyx":414
 * KEY_CMD_SPEAK_PREV_CHAR = 90
 * ## go to and speak next character
 * KEY_CMD_SPEAK_NEXT_CHAR = 91             # <<<<<<<<<<<<<<
 * ## speak current whitespace-delimited word
 * KEY_CMD_SPEAK_CURR_WORD = 92
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPEAK_NEXT_CHAR, __pyx_mstate_global->__pyx_int_91) < (0)) __PYX_ERR(3, 414, __pyx_L1_error)

  /* "constants.auto.pyx":416
 * KEY_CMD_SPEAK_NEXT_CHAR = 91
 * ## speak current whitespace-delimited word
 * KEY_CMD_SPEAK_CURR_WORD = 92             # <<<<<<<<<<<<<<
 * ## go to and speak previous whitespace-delimited word
 * KEY_CMD_SPEAK_PREV_WORD = 93
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPEAK_CURR_WORD, __pyx_mstate_global->__pyx_int_92) < (0)) __PYX_ERR(3, 416, __pyx_L1_error)

  /* "constants.auto.pyx":418
 * KEY_CMD_SPEAK_CURR_WORD = 92
 * ## go to and speak previous whitespace-delimited word
 * KEY_CMD_SPEAK_PREV_WORD = 93             # <<<<<<<<<<<<<<
 * ## go to and speak next whitespace-delimited word
 * KEY_CMD_SPEAK_NEXT_WORD = 94
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPEAK_PREV_WORD, __pyx_mstate_global->__pyx_int_93) < (0)) __PYX_ERR(3, 418, __pyx_L1_error)

  /* "constants.auto.pyx":420
 * KEY_CMD_SPEAK_PREV_WORD = 93
 * ## go to and speak next whitespace-delimited word
 * KEY_CMD_SPEAK_NEXT_WORD = 94             # <<<<<<<<<<<<<<
 * ## speak current line
 * KEY_CMD_SPEAK_CURR_LINE = 95
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPEAK_NEXT_WORD, __pyx_mstate_global->__pyx_int_94) < (0)) __PYX_ERR(3, 420, __pyx_L1_error)

  /* "constants.auto.pyx":422
 * KEY_CMD_SPEAK_NEXT_WORD = 94
 * ## speak current line
 * KEY_CMD_SPEAK_CURR_LINE = 95             # <<<<<<<<<<<<<<
 * ## go to and speak previous line
 * KEY_CMD_SPEAK_PREV_LINE = 96
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPEAK_CURR_LINE, __pyx_mstate_global->__pyx_int_95) < (0)) __PYX_ERR(3, 422, __pyx_L1_error)

  /* "constants.auto.pyx":424
 * KEY_CMD_SPEAK_CURR_LINE = 95
 * ## go to and speak previous line
 * KEY_CMD_SPEAK_PREV_LINE = 96             # <<<<<<<<<<<<<<
 * ## go to and speak next line
 * KEY_CMD_SPEAK_NEXT_LINE = 97
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPEAK_PREV_LINE, __pyx_mstate_global->__pyx_int_96) < (0)) __PYX_ERR(3, 424, __pyx_L1_error)

  /* "constants.auto.pyx":426
 * KEY_CMD_SPEAK_PREV_LINE = 96
 * ## go to and speak next line
 * KEY_CMD_SPEAK_NEXT_LINE = 97             # <<<<<<<<<<<<<<
 * ## go to and speak first non-blank character on line
 * KEY_CMD_SPEAK_FRST_CHAR = 98
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPEAK_NEXT_LINE, __pyx_mstate_global->__pyx_int_97) < (0)) __PYX_ERR(3, 426, __pyx_L1_error)

  /* "constants.auto.pyx":428
 * KEY_CMD_SPEAK_NEXT_LINE = 97
 * ## go to and speak first non-blank character on line
 * KEY_CMD_SPEAK_FRST_CHAR = 98             # <<<<<<<<<<<<<<
 * ## go to and speak last non-blank character on line
 * KEY_CMD_SPEAK_LAST_CHAR = 99
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPEAK_FRST_CHAR, __pyx_mstate_global->__pyx_int_98) < (0)) __PYX_ERR(3, 428, __pyx_L1_error)

  /* "constants.auto.pyx":430
 * KEY_CMD_SPEAK_FRST_CHAR = 98
 * ## go to and speak last non-blank character on line
 * KEY_CMD_SPEAK_LAST_CHAR = 99             # <<<<<<<<<<<<<<
 * ## go to and speak first non-blank line on screen
 * KEY_CMD_SPEAK_FRST_LINE = 100
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPEAK_LAST_CHAR, __pyx_mstate_global->__pyx_int_99) < (0)) __PYX_ERR(3, 430, __pyx_L1_error)

  /* "constants.auto.pyx":432
 * KEY_CMD_SPEAK_LAST_CHAR = 99
 * ## go to and speak first non-blank line on screen
 * KEY_CMD_SPEAK_FRST_LINE = 100             # <<<<<<<<<<<<<<
 * ## go to and speak last non-blank line on screen
 * KEY_CMD_SPEAK_LAST_LINE = 101
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPEAK_FRST_LINE, __pyx_mstate_global->__pyx_int_100) < (0)) __PYX_ERR(3, 432, __pyx_L1_error)

  /* "constants.auto.pyx":434
 * KEY_CMD_SPEAK_FRST_LINE = 100
 * ## go to and speak last non-blank line on screen
 * KEY_CMD_SPEAK_LAST_LINE = 101             # <<<<<<<<<<<<<<
 * ## describe current character
 * KEY_CMD_DESC_CURR_CHAR = 102
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPEAK_LAST_LINE, __pyx_mstate_global->__pyx_int_101) < (0)) __PYX_ERR(3, 434, __pyx_L1_error)

  /* "constants.auto.pyx":436
 * KEY_CMD_SPEAK_LAST_LINE = 101
 * ## describe current character
 * KEY_CMD_DESC_CURR_CHAR = 102             # <<<<<<<<<<<<<<
 * ## spell current whitespace-delimited word
 * KEY_CMD_SPELL_CURR_WORD = 103
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_DESC_CURR_CHAR, __pyx_mstate_global->__pyx_int_102) < (0)) __PYX_ERR(3, 436, __pyx_L1_error)

  /* "constants.auto.pyx":438
 * KEY_CMD_DESC_CURR_CHAR = 102
 * ## spell current whitespace-delimited word
 * KEY_CMD_SPELL_CURR_WORD = 103             # <<<<<<<<<<<<<<
 * ## bring screen cursor to speech cursor
 * KEY_CMD_ROUTE_CURR_LOCN = 104
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPELL_CURR_WORD, __pyx_mstate_global->__pyx_int_103) < (0)) __PYX_ERR(3, 438, __pyx_L1_error)

  /* "constants.auto.pyx":440
 * KEY_CMD_SPELL_CURR_WORD = 103
 * ## bring screen cursor to speech cursor
 * KEY_CMD_ROUTE_CURR_LOCN = 104             # <<<<<<<<<<<<<<
 * ## speak speech cursor location
 * KEY_CMD_SPEAK_CURR_LOCN = 105
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_ROUTE_CURR_LOCN, __pyx_mstate_global->__pyx_int_104) < (0)) __PYX_ERR(3, 440, __pyx_L1_error)

  /* "constants.auto.pyx":442
 * KEY_CMD_ROUTE_CURR_LOCN = 104
 * ## speak speech cursor location
 * KEY_CMD_SPEAK_CURR_LOCN = 105             # <<<<<<<<<<<<<<
 * ## set speech cursor visibility on/off
 * KEY_CMD_SHOW_CURR_LOCN = 106
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPEAK_CURR_LOCN, __pyx_mstate_global->__pyx_int_105) < (0)) __PYX_ERR(3, 442, __pyx_L1_error)

  /* "constants.auto.pyx":444
 * KEY_CMD_SPEAK_CURR_LOCN = 105
 * ## set speech cursor visibility on/off
 * KEY_CMD_SHOW_CURR_LOCN = 106             # <<<<<<<<<<<<<<
 * ## save clipboard to disk
 * KEY_CMD_CLIP_SAVE = 107
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SHOW_CURR_LOCN, __pyx_mstate_global->__pyx_int_106) < (0)) __PYX_ERR(3, 444, __pyx_L1_error)

  /* "constants.auto.pyx":446
 * KEY_CMD_SHOW_CURR_LOCN = 106
 * ## save clipboard to disk
 * KEY_CMD_CLIP_SAVE = 107             # <<<<<<<<<<<<<<
 * ## restore clipboard from disk
 * KEY_CMD_CLIP_RESTORE = 108
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CLIP_SAVE, __pyx_mstate_global->__pyx_int_107) < (0)) __PYX_ERR(3, 446, __pyx_L1_error)

  /* "constants.auto.pyx":448
 * KEY_CMD_CLIP_SAVE = 107
 * ## restore clipboard from disk
 * KEY_CMD_CLIP_RESTORE = 108             # <<<<<<<<<<<<<<
 * ## set braille typing mode dots/text
 * KEY_CMD_BRLUCDOTS = 109
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CLIP_RESTORE, __pyx_mstate_global->__pyx_int_108) < (0)) __PYX_ERR(3, 448, __pyx_L1_error)

  /* "constants.auto.pyx":450
 * KEY_CMD_CLIP_RESTORE = 108
 * ## set braille typing mode dots/text
 * KEY_CMD_BRLUCDOTS = 109             # <<<<<<<<<<<<<<
 * ## set braille keyboard enabled/disabled
 * KEY_CMD_BRLKBD = 110
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BRLUCDOTS, __pyx_mstate_global->__pyx_int_109) < (0)) __PYX_ERR(3, 450, __pyx_L1_error)

  /* "constants.auto.pyx":452
 * KEY_CMD_BRLUCDOTS = 109
 * ## set braille keyboard enabled/disabled
 * KEY_CMD_BRLKBD = 110             # <<<<<<<<<<<<<<
 * ## clear all sticky input modifiers
 * KEY_CMD_UNSTICK = 111
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BRLKBD, __pyx_mstate_global->__pyx_int_110) < (0)) __PYX_ERR(3, 452, __pyx_L1_error)

  /* "constants.auto.pyx":454
 * KEY_CMD_BRLKBD = 110
 * ## clear all sticky input modifiers
 * KEY_CMD_UNSTICK = 111             # <<<<<<<<<<<<<<
 * ## cycle the AltGr (Right Alt) sticky input modifier (next, on, off)
 * KEY_CMD_ALTGR = 112
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_UNSTICK, __pyx_mstate_global->__pyx_int_111) < (0)) __PYX_ERR(3, 454, __pyx_L1_error)

  /* "constants.auto.pyx":456
 * KEY_CMD_UNSTICK = 111
 * ## cycle the AltGr (Right Alt) sticky input modifier (next, on, off)
 * KEY_CMD_ALTGR = 112             # <<<<<<<<<<<<<<
 * ## cycle the GUI (Windows) sticky input modifier (next, on, off)
 * KEY_CMD_GUI = 113
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_ALTGR, __pyx_mstate_global->__pyx_int_112) < (0)) __PYX_ERR(3, 456, __pyx_L1_error)

  /* "constants.auto.pyx":458
 * KEY_CMD_ALTGR = 112
 * ## cycle the GUI (Windows) sticky input modifier (next, on, off)
 * KEY_CMD_GUI = 113             # <<<<<<<<<<<<<<
 * ## stop the braille driver
 * KEY_CMD_BRL_STOP = 114
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_GUI, __pyx_mstate_global->__pyx_int_113) < (0)) __PYX_ERR(3, 458, __pyx_L1_error)

  /* "constants.auto.pyx":460
 * KEY_CMD_GUI = 113
 * ## stop the braille driver
 * KEY_CMD_BRL_STOP = 114             # <<<<<<<<<<<<<<
 * ## start the braille driver
 * KEY_CMD_BRL_START = 115
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BRL_STOP, __pyx_mstate_global->__pyx_int_114) < (0)) __PYX_ERR(3, 460, __pyx_L1_error)

  /* "constants.auto.pyx":462
 * KEY_CMD_BRL_STOP = 114
 * ## start the braille driver
 * KEY_CMD_BRL_START = 115             # <<<<<<<<<<<<<<
 * ## stop the speech driver
 * KEY_CMD_SPK_STOP = 116
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BRL_START, __pyx_mstate_global->__pyx_int_115) < (0)) __PYX_ERR(3, 462, __pyx_L1_error)

  /* "constants.auto.pyx":464
 * KEY_CMD_BRL_START = 115
 * ## stop the speech driver
 * KEY_CMD_SPK_STOP = 116             # <<<<<<<<<<<<<<
 * ## start the speech driver
 * KEY_CMD_SPK_START = 117
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPK_STOP, __pyx_mstate_global->__pyx_int_116) < (0)) __PYX_ERR(3, 464, __pyx_L1_error)

  /* "constants.auto.pyx":466
 * KEY_CMD_SPK_STOP = 116
 * ## start the speech driver
 * KEY_CMD_SPK_START = 117             # <<<<<<<<<<<<<<
 * ## stop the screen driver
 * KEY_CMD_SCR_STOP = 118
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPK_START, __pyx_mstate_global->__pyx_int_117) < (0)) __PYX_ERR(3, 466, __pyx_L1_error)

  /* "constants.auto.pyx":468
 * KEY_CMD_SPK_START = 117
 * ## stop the screen driver
 * KEY_CMD_SCR_STOP = 118             # <<<<<<<<<<<<<<
 * ## start the screen driver
 * KEY_CMD_SCR_START = 119
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SCR_STOP, __pyx_mstate_global->__pyx_int_118) < (0)) __PYX_ERR(3, 468, __pyx_L1_error)

  /* "constants.auto.pyx":470
 * KEY_CMD_SCR_STOP = 118
 * ## start the screen driver
 * KEY_CMD_SCR_START = 119             # <<<<<<<<<<<<<<
 * ## bind to the previous virtual terminal
 * KEY_CMD_SELECTVT_PREV = 120
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SCR_START, __pyx_mstate_global->__pyx_int_119) < (0)) __PYX_ERR(3, 470, __pyx_L1_error)

  /* "constants.auto.pyx":472
 * KEY_CMD_SCR_START = 119
 * ## bind to the previous virtual terminal
 * KEY_CMD_SELECTVT_PREV = 120             # <<<<<<<<<<<<<<
 * ## bind to the next virtual terminal
 * KEY_CMD_SELECTVT_NEXT = 121
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SELECTVT_PREV, __pyx_mstate_global->__pyx_int_120) < (0)) __PYX_ERR(3, 472, __pyx_L1_error)

  /* "constants.auto.pyx":474
 * KEY_CMD_SELECTVT_PREV = 120
 * ## bind to the next virtual terminal
 * KEY_CMD_SELECTVT_NEXT = 121             # <<<<<<<<<<<<<<
 * ## go backward to nearest non-blank braille window
 * KEY_CMD_PRNBWIN = 122
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SELECTVT_NEXT, __pyx_mstate_global->__pyx_int_121) < (0)) __PYX_ERR(3, 474, __pyx_L1_error)

  /* "constants.auto.pyx":476
 * KEY_CMD_SELECTVT_NEXT = 121
 * ## go backward to nearest non-blank braille window
 * KEY_CMD_PRNBWIN = 122             # <<<<<<<<<<<<<<
 * ## go forward to nearest non-blank braille window
 * KEY_CMD_NXNBWIN = 123
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_PRNBWIN, __pyx_mstate_global->__pyx_int_122) < (0)) __PYX_ERR(3, 476, __pyx_L1_error)

  /* "constants.auto.pyx":478
 * KEY_CMD_PRNBWIN = 122
 * ## go forward to nearest non-blank braille window
 * KEY_CMD_NXNBWIN = 123             # <<<<<<<<<<<<<<
 * ## set touch navigation on/off
 * KEY_CMD_TOUCH_NAV = 124
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_NXNBWIN, __pyx_mstate_global->__pyx_int_123) < (0)) __PYX_ERR(3, 478, __pyx_L1_error)

  /* "constants.auto.pyx":480
 * KEY_CMD_NXNBWIN = 123
 * ## set touch navigation on/off
 * KEY_CMD_TOUCH_NAV = 124             # <<<<<<<<<<<<<<
 * ## speak indent of current line
 * KEY_CMD_SPEAK_INDENT = 125
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_TOUCH_NAV, __pyx_mstate_global->__pyx_int_124) < (0)) __PYX_ERR(3, 480, __pyx_L1_error)

  /* "constants.auto.pyx":482
 * KEY_CMD_TOUCH_NAV = 124
 * ## speak indent of current line
 * KEY_CMD_SPEAK_INDENT = 125             # <<<<<<<<<<<<<<
 * ## set autospeak indent of current line on/off
 * KEY_CMD_ASPK_INDENT = 126
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPEAK_INDENT, __pyx_mstate_global->__pyx_int_125) < (0)) __PYX_ERR(3, 482, __pyx_L1_error)

  /* "constants.auto.pyx":484
 * KEY_CMD_SPEAK_INDENT = 125
 * ## set autospeak indent of current line on/off
 * KEY_CMD_ASPK_INDENT = 126             # <<<<<<<<<<<<<<
 * ## refresh braille display
 * KEY_CMD_REFRESH = 127
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_ASPK_INDENT, __pyx_mstate_global->__pyx_int_126) < (0)) __PYX_ERR(3, 484, __pyx_L1_error)

  /* "constants.auto.pyx":486
 * KEY_CMD_ASPK_INDENT = 126
 * ## refresh braille display
 * KEY_CMD_REFRESH = 127             # <<<<<<<<<<<<<<
 * ## show various device status indicators
 * KEY_CMD_INDICATORS = 128
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_REFRESH, __pyx_mstate_global->__pyx_int_127) < (0)) __PYX_ERR(3, 486, __pyx_L1_error)

  /* "constants.auto.pyx":488
 * KEY_CMD_REFRESH = 127
 * ## show various device status indicators
 * KEY_CMD_INDICATORS = 128             # <<<<<<<<<<<<<<
 * ## clear the text selection
 * KEY_CMD_TXTSEL_CLEAR = 129
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_INDICATORS, __pyx_mstate_global->__pyx_int_128) < (0)) __PYX_ERR(3, 488, __pyx_L1_error)

  /* "constants.auto.pyx":490
 * KEY_CMD_INDICATORS = 128
 * ## clear the text selection
 * KEY_CMD_TXTSEL_CLEAR = 129             # <<<<<<<<<<<<<<
 * ## select all of the text
 * KEY_CMD_TXTSEL_ALL = 130
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_TXTSEL_CLEAR, __pyx_mstate_global->__pyx_int_129) < (0)) __PYX_ERR(3, 490, __pyx_L1_error)

  /* "constants.auto.pyx":492
 * KEY_CMD_TXTSEL_CLEAR = 129
 * ## select all of the text
 * KEY_CMD_TXTSEL_ALL = 130             # <<<<<<<<<<<<<<
 * ## copy selected text to host clipboard
 * KEY_CMD_HOST_COPY = 131
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_TXTSEL_ALL, __pyx_mstate_global->__pyx_int_130) < (0)) __PYX_ERR(3, 492, __pyx_L1_error)

  /* "constants.auto.pyx":494
 * KEY_CMD_TXTSEL_ALL = 130
 * ## copy selected text to host clipboard
 * KEY_CMD_HOST_COPY = 131             # <<<<<<<<<<<<<<
 * ## cut selected text to host clipboard
 * KEY_CMD_HOST_CUT = 132
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_HOST_COPY, __pyx_mstate_global->__pyx_int_131) < (0)) __PYX_ERR(3, 494, __pyx_L1_error)

  /* "constants.auto.pyx":496
 * KEY_CMD_HOST_COPY = 131
 * ## cut selected text to host clipboard
 * KEY_CMD_HOST_CUT = 132             # <<<<<<<<<<<<<<
 * ## insert the host clipboard text before the screen cursor
 * KEY_CMD_HOST_PASTE = 133
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_HOST_CUT, __pyx_mstate_global->__pyx_int_132) < (0)) __PYX_ERR(3, 496, __pyx_L1_error)

  /* "constants.auto.pyx":498
 * KEY_CMD_HOST_CUT = 132
 * ## insert the host clipboard text before the screen cursor
 * KEY_CMD_HOST_PASTE = 133             # <<<<<<<<<<<<<<
 * ## show the window title
 * KEY_CMD_GUI_TITLE = 134
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_HOST_PASTE, __pyx_mstate_global->__pyx_int_133) < (0)) __PYX_ERR(3, 498, __pyx_L1_error)

  /* "constants.auto.pyx":500
 * KEY_CMD_HOST_PASTE = 133
 * ## show the window title
 * KEY_CMD_GUI_TITLE = 134             # <<<<<<<<<<<<<<
 * ## open the braille actions window
 * KEY_CMD_GUI_BRL_ACTIONS = 135
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_GUI_TITLE, __pyx_mstate_global->__pyx_int_134) < (0)) __PYX_ERR(3, 500, __pyx_L1_error)

  /* "constants.auto.pyx":502
 * KEY_CMD_GUI_TITLE = 134
 * ## open the braille actions window
 * KEY_CMD_GUI_BRL_ACTIONS = 135             # <<<<<<<<<<<<<<
 * ## go to the home screen
 * KEY_CMD_GUI_HOME = 136
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_GUI_BRL_ACTIONS, __pyx_mstate_global->__pyx_int_135) < (0)) __PYX_ERR(3, 502, __pyx_L1_error)

  /* "constants.auto.pyx":504
 * KEY_CMD_GUI_BRL_ACTIONS = 135
 * ## go to the home screen
 * KEY_CMD_GUI_HOME = 136             # <<<<<<<<<<<<<<
 * ## go back to the previous screen
 * KEY_CMD_GUI_BACK = 137
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_GUI_HOME, __pyx_mstate_global->__pyx_int_136) < (0)) __PYX_ERR(3, 504, __pyx_L1_error)

  /* "constants.auto.pyx":506
 * KEY_CMD_GUI_HOME = 136
 * ## go back to the previous screen
 * KEY_CMD_GUI_BACK = 137             # <<<<<<<<<<<<<<
 * ## open the device settings window
 * KEY_CMD_GUI_DEV_SETTINGS = 138
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_GUI_BACK, __pyx_mstate_global->__pyx_int_137) < (0)) __PYX_ERR(3, 506, __pyx_L1_error)

  /* "constants.auto.pyx":508
 * KEY_CMD_GUI_BACK = 137
 * ## open the device settings window
 * KEY_CMD_GUI_DEV_SETTINGS = 138             # <<<<<<<<<<<<<<
 * ## open the device options window
 * KEY_CMD_GUI_DEV_OPTIONS = 139
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_GUI_DEV_SETTINGS, __pyx_mstate_global->__pyx_int_138) < (0)) __PYX_ERR(3, 508, __pyx_L1_error)

  /* "constants.auto.pyx":510
 * KEY_CMD_GUI_DEV_SETTINGS = 138
 * ## open the device options window
 * KEY_CMD_GUI_DEV_OPTIONS = 139             # <<<<<<<<<<<<<<
 * ## open the application list window
 * KEY_CMD_GUI_APP_LIST = 140
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_GUI_DEV_OPTIONS, __pyx_mstate_global->__pyx_int_139) < (0)) __PYX_ERR(3, 510, __pyx_L1_error)

  /* "constants.auto.pyx":512
 * KEY_CMD_GUI_DEV_OPTIONS = 139
 * ## open the application list window
 * KEY_CMD_GUI_APP_LIST = 140             # <<<<<<<<<<<<<<
 * ## open the application-specific menu
 * KEY_CMD_GUI_APP_MENU = 141
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_GUI_APP_LIST, __pyx_mstate_global->__pyx_int_140) < (0)) __PYX_ERR(3, 512, __pyx_L1_error)

  /* "constants.auto.pyx":514
 * KEY_CMD_GUI_APP_LIST = 140
 * ## open the application-specific menu
 * KEY_CMD_GUI_APP_MENU = 141             # <<<<<<<<<<<<<<
 * ## open the application alerts window
 * KEY_CMD_GUI_APP_ALERTS = 142
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_GUI_APP_MENU, __pyx_mstate_global->__pyx_int_141) < (0)) __PYX_ERR(3, 514, __pyx_L1_error)

  /* "constants.auto.pyx":516
 * KEY_CMD_GUI_APP_MENU = 141
 * ## open the application alerts window
 * KEY_CMD_GUI_APP_ALERTS = 142             # <<<<<<<<<<<<<<
 * ## return to the active screen area
 * KEY_CMD_GUI_AREA_ACTV = 143
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_GUI_APP_ALERTS, __pyx_mstate_global->__pyx_int_142) < (0)) __PYX_ERR(3, 516, __pyx_L1_error)

  /* "constants.auto.pyx":518
 * KEY_CMD_GUI_APP_ALERTS = 142
 * ## return to the active screen area
 * KEY_CMD_GUI_AREA_ACTV = 143             # <<<<<<<<<<<<<<
 * ## switch to the previous screen area
 * KEY_CMD_GUI_AREA_PREV = 144
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_GUI_AREA_ACTV, __pyx_mstate_global->__pyx_int_143) < (0)) __PYX_ERR(3, 518, __pyx_L1_error)

  /* "constants.auto.pyx":520
 * KEY_CMD_GUI_AREA_ACTV = 143
 * ## switch to the previous screen area
 * KEY_CMD_GUI_AREA_PREV = 144             # <<<<<<<<<<<<<<
 * ## switch to the next screen area
 * KEY_CMD_GUI_AREA_NEXT = 145
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_GUI_AREA_PREV, __pyx_mstate_global->__pyx_int_144) < (0)) __PYX_ERR(3, 520, __pyx_L1_error)

  /* "constants.auto.pyx":522
 * KEY_CMD_GUI_AREA_PREV = 144
 * ## switch to the next screen area
 * KEY_CMD_GUI_AREA_NEXT = 145             # <<<<<<<<<<<<<<
 * ## move to the first item in the screen area
 * KEY_CMD_GUI_ITEM_FRST = 146
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_GUI_AREA_NEXT, __pyx_mstate_global->__pyx_int_145) < (0)) __PYX_ERR(3, 522, __pyx_L1_error)

  /* "constants.auto.pyx":524
 * KEY_CMD_GUI_AREA_NEXT = 145
 * ## move to the first item in the screen area
 * KEY_CMD_GUI_ITEM_FRST = 146             # <<<<<<<<<<<<<<
 * ## move to the previous item in the screen area
 * KEY_CMD_GUI_ITEM_PREV = 147
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_GUI_ITEM_FRST, __pyx_mstate_global->__pyx_int_146) < (0)) __PYX_ERR(3, 524, __pyx_L1_error)

  /* "constants.auto.pyx":526
 * KEY_CMD_GUI_ITEM_FRST = 146
 * ## move to the previous item in the screen area
 * KEY_CMD_GUI_ITEM_PREV = 147             # <<<<<<<<<<<<<<
 * ## move to the next item in the screen area
 * KEY_CMD_GUI_ITEM_NEXT = 148
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_GUI_ITEM_PREV, __pyx_mstate_global->__pyx_int_147) < (0)) __PYX_ERR(3, 526, __pyx_L1_error)

  /* "constants.auto.pyx":528
 * KEY_CMD_GUI_ITEM_PREV = 147
 * ## move to the next item in the screen area
 * KEY_CMD_GUI_ITEM_NEXT = 148             # <<<<<<<<<<<<<<
 * ## move to the last item in the screen area
 * KEY_CMD_GUI_ITEM_LAST = 149
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_GUI_ITEM_NEXT, __pyx_mstate_global->__pyx_int_148) < (0)) __PYX_ERR(3, 528, __pyx_L1_error)

  /* "constants.auto.pyx":530
 * KEY_CMD_GUI_ITEM_NEXT = 148
 * ## move to the last item in the screen area
 * KEY_CMD_GUI_ITEM_LAST = 149             # <<<<<<<<<<<<<<
 * ## decrease speaking pitch
 * KEY_CMD_SAY_LOWER = 150
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_GUI_ITEM_LAST, __pyx_mstate_global->__pyx_int_149) < (0)) __PYX_ERR(3, 530, __pyx_L1_error)

  /* "constants.auto.pyx":532
 * KEY_CMD_GUI_ITEM_LAST = 149
 * ## decrease speaking pitch
 * KEY_CMD_SAY_LOWER = 150             # <<<<<<<<<<<<<<
 * ## increase speaking pitch
 * KEY_CMD_SAY_HIGHER = 151
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SAY_LOWER, __pyx_mstate_global->__pyx_int_150) < (0)) __PYX_ERR(3, 532, __pyx_L1_error)

  /* "constants.auto.pyx":534
 * KEY_CMD_SAY_LOWER = 150
 * ## increase speaking pitch
 * KEY_CMD_SAY_HIGHER = 151             # <<<<<<<<<<<<<<
 * ## speak from top of screen through bottom of screen
 * KEY_CMD_SAY_ALL = 152
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SAY_HIGHER, __pyx_mstate_global->__pyx_int_151) < (0)) __PYX_ERR(3, 534, __pyx_L1_error)

  /* "constants.auto.pyx":536
 * KEY_CMD_SAY_HIGHER = 151
 * ## speak from top of screen through bottom of screen
 * KEY_CMD_SAY_ALL = 152             # <<<<<<<<<<<<<<
 * ## set contracted/computer braille
 * KEY_CMD_CONTRACTED = 153
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SAY_ALL, __pyx_mstate_global->__pyx_int_152) < (0)) __PYX_ERR(3, 536, __pyx_L1_error)

  /* "constants.auto.pyx":538
 * KEY_CMD_SAY_ALL = 152
 * ## set contracted/computer braille
 * KEY_CMD_CONTRACTED = 153             # <<<<<<<<<<<<<<
 * ## set six/eight dot computer braille
 * KEY_CMD_COMPBRL6 = 154
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CONTRACTED, __pyx_mstate_global->__pyx_int_153) < (0)) __PYX_ERR(3, 538, __pyx_L1_error)

  /* "constants.auto.pyx":540
 * KEY_CMD_CONTRACTED = 153
 * ## set six/eight dot computer braille
 * KEY_CMD_COMPBRL6 = 154             # <<<<<<<<<<<<<<
 * ## reset preferences to defaults
 * KEY_CMD_PREFRESET = 155
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_COMPBRL6, __pyx_mstate_global->__pyx_int_154) < (0)) __PYX_ERR(3, 540, __pyx_L1_error)

  /* "constants.auto.pyx":542
 * KEY_CMD_COMPBRL6 = 154
 * ## reset preferences to defaults
 * KEY_CMD_PREFRESET = 155             # <<<<<<<<<<<<<<
 * ## set autospeak empty line on/off
 * KEY_CMD_ASPK_EMP_LINE = 156
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_PREFRESET, __pyx_mstate_global->__pyx_int_155) < (0)) __PYX_ERR(3, 542, __pyx_L1_error)

  /* "constants.auto.pyx":544
 * KEY_CMD_PREFRESET = 155
 * ## set autospeak empty line on/off
 * KEY_CMD_ASPK_EMP_LINE = 156             # <<<<<<<<<<<<<<
 * ## cycle speech punctuation level
 * KEY_CMD_SPK_PUNCT_LEVEL = 157
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_ASPK_EMP_LINE, __pyx_mstate_global->__pyx_int_156) < (0)) __PYX_ERR(3, 544, __pyx_L1_error)

  /* "constants.auto.pyx":546
 * KEY_CMD_ASPK_EMP_LINE = 156
 * ## cycle speech punctuation level
 * KEY_CMD_SPK_PUNCT_LEVEL = 157             # <<<<<<<<<<<<<<
 * ## insert the clipboard content before the screen cursor using the alternate paste mode
 * KEY_CMD_PASTE_ALTMODE = 158
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPK_PUNCT_LEVEL, __pyx_mstate_global->__pyx_int_157) < (0)) __PYX_ERR(3, 546, __pyx_L1_error)

  /* "constants.auto.pyx":548
 * KEY_CMD_SPK_PUNCT_LEVEL = 157
 * ## insert the clipboard content before the screen cursor using the alternate paste mode
 * KEY_CMD_PASTE_ALTMODE = 158             # <<<<<<<<<<<<<<
 * ## speak current partial (identifier or symbols) word
 * KEY_CMD_SPEAK_CURR_PWRD = 159
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_PASTE_ALTMODE, __pyx_mstate_global->__pyx_int_158) < (0)) __PYX_ERR(3, 548, __pyx_L1_error)

  /* "constants.auto.pyx":550
 * KEY_CMD_PASTE_ALTMODE = 158
 * ## speak current partial (identifier or symbols) word
 * KEY_CMD_SPEAK_CURR_PWRD = 159             # <<<<<<<<<<<<<<
 * ## go to and speak previous partial (identifier or symbols) word
 * KEY_CMD_SPEAK_PREV_PWRD = 160
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPEAK_CURR_PWRD, __pyx_mstate_global->__pyx_int_159) < (0)) __PYX_ERR(3, 550, __pyx_L1_error)

  /* "constants.auto.pyx":552
 * KEY_CMD_SPEAK_CURR_PWRD = 159
 * ## go to and speak previous partial (identifier or symbols) word
 * KEY_CMD_SPEAK_PREV_PWRD = 160             # <<<<<<<<<<<<<<
 * ## go to and speak next partial (identifier or symbols) word
 * KEY_CMD_SPEAK_NEXT_PWRD = 161
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPEAK_PREV_PWRD, __pyx_mstate_global->__pyx_int_160) < (0)) __PYX_ERR(3, 552, __pyx_L1_error)

  /* "constants.auto.pyx":554
 * KEY_CMD_SPEAK_PREV_PWRD = 160
 * ## go to and speak next partial (identifier or symbols) word
 * KEY_CMD_SPEAK_NEXT_PWRD = 161             # <<<<<<<<<<<<<<
 * ## spell current partial (identifier or symbols) word
 * KEY_CMD_SPELL_CURR_PWRD = 162
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPEAK_NEXT_PWRD, __pyx_mstate_global->__pyx_int_161) < (0)) __PYX_ERR(3, 554, __pyx_L1_error)

  /* "constants.auto.pyx":556
 * KEY_CMD_SPEAK_NEXT_PWRD = 161
 * ## spell current partial (identifier or symbols) word
 * KEY_CMD_SPELL_CURR_PWRD = 162             # <<<<<<<<<<<<<<
 * ## spell current line
 * KEY_CMD_SPELL_CURR_LINE = 163
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPELL_CURR_PWRD, __pyx_mstate_global->__pyx_int_162) < (0)) __PYX_ERR(3, 556, __pyx_L1_error)

  /* "constants.auto.pyx":558
 * KEY_CMD_SPELL_CURR_PWRD = 162
 * ## spell current line
 * KEY_CMD_SPELL_CURR_LINE = 163             # <<<<<<<<<<<<<<
 * ## clear the clipboard
 * KEY_CMD_CLIP_CLEAR = 164
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SPELL_CURR_LINE, __pyx_mstate_global->__pyx_int_163) < (0)) __PYX_ERR(3, 558, __pyx_L1_error)

  /* "constants.auto.pyx":560
 * KEY_CMD_SPELL_CURR_LINE = 163
 * ## clear the clipboard
 * KEY_CMD_CLIP_CLEAR = 164             # <<<<<<<<<<<<<<
 * ## show current clipboard content
 * KEY_CMD_CLIP_SHOW = 165
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CLIP_CLEAR, __pyx_mstate_global->__pyx_int_164) < (0)) __PYX_ERR(3, 560, __pyx_L1_error)

  /* "constants.auto.pyx":562
 * KEY_CMD_CLIP_CLEAR = 164
 * ## show current clipboard content
 * KEY_CMD_CLIP_SHOW = 165             # <<<<<<<<<<<<<<
 * ## bring screen cursor to character
 * KEY_CMD_ROUTE = (1 << KEY_CMD_BLK_SHIFT)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CLIP_SHOW, __pyx_mstate_global->__pyx_int_165) < (0)) __PYX_ERR(3, 562, __pyx_L1_error)

  /* "constants.auto.pyx":564
 * KEY_CMD_CLIP_SHOW = 165
 * ## bring screen cursor to character
 * KEY_CMD_ROUTE = (1 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## start new clipboard at character
 * KEY_CMD_CLIP_NEW = (2 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_ROUTE, __pyx_t_3) < (0)) __PYX_ERR(3, 564, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":566
 * KEY_CMD_ROUTE = (1 << KEY_CMD_BLK_SHIFT)
 * ## start new clipboard at character
 * KEY_CMD_CLIP_NEW = (2 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## deprecated definition of CLIP_NEW - start new clipboard at character
 * KEY_CMD_CUTBEGIN = (2 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_2, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CLIP_NEW, __pyx_t_2) < (0)) __PYX_ERR(3, 566, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":568
 * KEY_CMD_CLIP_NEW = (2 << KEY_CMD_BLK_SHIFT)
 * ## deprecated definition of CLIP_NEW - start new clipboard at character
 * KEY_CMD_CUTBEGIN = (2 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## append to clipboard from character
 * KEY_CMD_CLIP_ADD = (3 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_2, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CUTBEGIN, __pyx_t_3) < (0)) __PYX_ERR(3, 568, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":570
 * KEY_CMD_CUTBEGIN = (2 << KEY_CMD_BLK_SHIFT)
 * ## append to clipboard from character
 * KEY_CMD_CLIP_ADD = (3 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## deprecated definition of CLIP_ADD - append to clipboard from character
 * KEY_CMD_CUTAPPEND = (3 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_3, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CLIP_ADD, __pyx_t_2) < (0)) __PYX_ERR(3, 570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":572
 * KEY_CMD_CLIP_ADD = (3 << KEY_CMD_BLK_SHIFT)
 * ## deprecated definition of CLIP_ADD - append to clipboard from character
 * KEY_CMD_CUTAPPEND = (3 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## rectangular copy to character
 * KEY_CMD_COPY_RECT = (4 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_3, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CUTAPPEND, __pyx_t_3) < (0)) __PYX_ERR(3, 572, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":574
 * KEY_CMD_CUTAPPEND = (3 << KEY_CMD_BLK_SHIFT)
 * ## rectangular copy to character
 * KEY_CMD_COPY_RECT = (4 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## deprecated definition of COPY_RECT - rectangular copy to character
 * KEY_CMD_CUTRECT = (4 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_COPY_RECT, __pyx_t_2) < (0)) __PYX_ERR(3, 574, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":576
 * KEY_CMD_COPY_RECT = (4 << KEY_CMD_BLK_SHIFT)
 * ## deprecated definition of COPY_RECT - rectangular copy to character
 * KEY_CMD_CUTRECT = (4 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## linear copy to character
 * KEY_CMD_COPY_LINE = (5 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CUTRECT, __pyx_t_3) < (0)) __PYX_ERR(3, 576, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":578
 * KEY_CMD_CUTRECT = (4 << KEY_CMD_BLK_SHIFT)
 * ## linear copy to character
 * KEY_CMD_COPY_LINE = (5 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## deprecated definition of COPY_LINE - linear copy to character
 * KEY_CMD_CUTLINE = (5 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_5, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_COPY_LINE, __pyx_t_2) < (0)) __PYX_ERR(3, 578, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":580
 * KEY_CMD_COPY_LINE = (5 << KEY_CMD_BLK_SHIFT)
 * ## deprecated definition of COPY_LINE - linear copy to character
 * KEY_CMD_CUTLINE = (5 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## switch to specific virtual terminal
 * KEY_CMD_SWITCHVT = (6 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_5, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CUTLINE, __pyx_t_3) < (0)) __PYX_ERR(3, 580, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":582
 * KEY_CMD_CUTLINE = (5 << KEY_CMD_BLK_SHIFT)
 * ## switch to specific virtual terminal
 * KEY_CMD_SWITCHVT = (6 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## go up to nearest line with less indent than character
 * KEY_CMD_PRINDENT = (7 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_6, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SWITCHVT, __pyx_t_2) < (0)) __PYX_ERR(3, 582, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":584
 * KEY_CMD_SWITCHVT = (6 << KEY_CMD_BLK_SHIFT)
 * ## go up to nearest line with less indent than character
 * KEY_CMD_PRINDENT = (7 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## go down to nearest line with less indent than character
 * KEY_CMD_NXINDENT = (8 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_7, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_PRINDENT, __pyx_t_3) < (0)) __PYX_ERR(3, 584, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":586
 * KEY_CMD_PRINDENT = (7 << KEY_CMD_BLK_SHIFT)
 * ## go down to nearest line with less indent than character
 * KEY_CMD_NXINDENT = (8 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## describe character
 * KEY_CMD_DESCCHAR = (9 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_8, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_NXINDENT, __pyx_t_2) < (0)) __PYX_ERR(3, 586, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":588
 * KEY_CMD_NXINDENT = (8 << KEY_CMD_BLK_SHIFT)
 * ## describe character
 * KEY_CMD_DESCCHAR = (9 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## place left end of braille window at character
 * KEY_CMD_SETLEFT = (10 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_9, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_DESCCHAR, __pyx_t_3) < (0)) __PYX_ERR(3, 588, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":590
 * KEY_CMD_DESCCHAR = (9 << KEY_CMD_BLK_SHIFT)
 * ## place left end of braille window at character
 * KEY_CMD_SETLEFT = (10 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## remember current braille window position
 * KEY_CMD_SETMARK = (11 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_10, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SETLEFT, __pyx_t_2) < (0)) __PYX_ERR(3, 590, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":592
 * KEY_CMD_SETLEFT = (10 << KEY_CMD_BLK_SHIFT)
 * ## remember current braille window position
 * KEY_CMD_SETMARK = (11 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## go to remembered braille window position
 * KEY_CMD_GOTOMARK = (12 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_11, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SETMARK, __pyx_t_3) < (0)) __PYX_ERR(3, 592, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":594
 * KEY_CMD_SETMARK = (11 << KEY_CMD_BLK_SHIFT)
 * ## go to remembered braille window position
 * KEY_CMD_GOTOMARK = (12 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## go to selected line
 * KEY_CMD_GOTOLINE = (13 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_12, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_GOTOMARK, __pyx_t_2) < (0)) __PYX_ERR(3, 594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":596
 * KEY_CMD_GOTOMARK = (12 << KEY_CMD_BLK_SHIFT)
 * ## go to selected line
 * KEY_CMD_GOTOLINE = (13 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## go up to nearest line with different character
 * KEY_CMD_PRDIFCHAR = (14 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_13, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_GOTOLINE, __pyx_t_3) < (0)) __PYX_ERR(3, 596, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":598
 * KEY_CMD_GOTOLINE = (13 << KEY_CMD_BLK_SHIFT)
 * ## go up to nearest line with different character
 * KEY_CMD_PRDIFCHAR = (14 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## go down to nearest line with different character
 * KEY_CMD_NXDIFCHAR = (15 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_14, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_PRDIFCHAR, __pyx_t_2) < (0)) __PYX_ERR(3, 598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":600
 * KEY_CMD_PRDIFCHAR = (14 << KEY_CMD_BLK_SHIFT)
 * ## go down to nearest line with different character
 * KEY_CMD_NXDIFCHAR = (15 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## copy characters to clipboard
 * KEY_CMD_CLIP_COPY = (16 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_15, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_NXDIFCHAR, __pyx_t_3) < (0)) __PYX_ERR(3, 600, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":602
 * KEY_CMD_NXDIFCHAR = (15 << KEY_CMD_BLK_SHIFT)
 * ## copy characters to clipboard
 * KEY_CMD_CLIP_COPY = (16 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## deprecated definition of CLIP_COPY - copy characters to clipboard
 * KEY_CMD_COPYCHARS = (16 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_16, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CLIP_COPY, __pyx_t_2) < (0)) __PYX_ERR(3, 602, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":604
 * KEY_CMD_CLIP_COPY = (16 << KEY_CMD_BLK_SHIFT)
 * ## deprecated definition of CLIP_COPY - copy characters to clipboard
 * KEY_CMD_COPYCHARS = (16 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## append characters to clipboard
 * KEY_CMD_CLIP_APPEND = (17 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_16, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_COPYCHARS, __pyx_t_3) < (0)) __PYX_ERR(3, 604, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":606
 * KEY_CMD_COPYCHARS = (16 << KEY_CMD_BLK_SHIFT)
 * ## append characters to clipboard
 * KEY_CMD_CLIP_APPEND = (17 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## deprecated definition of CLIP_APPEND - append characters to clipboard
 * KEY_CMD_APNDCHARS = (17 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_17, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CLIP_APPEND, __pyx_t_2) < (0)) __PYX_ERR(3, 606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":608
 * KEY_CMD_CLIP_APPEND = (17 << KEY_CMD_BLK_SHIFT)
 * ## deprecated definition of CLIP_APPEND - append characters to clipboard
 * KEY_CMD_APNDCHARS = (17 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## insert a clipboard history entry before the screen cursor
 * KEY_CMD_PASTE_HISTORY = (18 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_17, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_APNDCHARS, __pyx_t_3) < (0)) __PYX_ERR(3, 608, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":610
 * KEY_CMD_APNDCHARS = (17 << KEY_CMD_BLK_SHIFT)
 * ## insert a clipboard history entry before the screen cursor
 * KEY_CMD_PASTE_HISTORY = (18 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## set text table
 * KEY_CMD_SET_TEXT_TABLE = (19 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_18, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_PASTE_HISTORY, __pyx_t_2) < (0)) __PYX_ERR(3, 610, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":612
 * KEY_CMD_PASTE_HISTORY = (18 << KEY_CMD_BLK_SHIFT)
 * ## set text table
 * KEY_CMD_SET_TEXT_TABLE = (19 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## set attributes table
 * KEY_CMD_SET_ATTRIBUTES_TABLE = (20 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_19, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SET_TEXT_TABLE, __pyx_t_3) < (0)) __PYX_ERR(3, 612, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":614
 * KEY_CMD_SET_TEXT_TABLE = (19 << KEY_CMD_BLK_SHIFT)
 * ## set attributes table
 * KEY_CMD_SET_ATTRIBUTES_TABLE = (20 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## set contraction table
 * KEY_CMD_SET_CONTRACTION_TABLE = (21 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SET_ATTRIBUTES_TABLE, __pyx_t_2) < (0)) __PYX_ERR(3, 614, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":616
 * KEY_CMD_SET_ATTRIBUTES_TABLE = (20 << KEY_CMD_BLK_SHIFT)
 * ## set contraction table
 * KEY_CMD_SET_CONTRACTION_TABLE = (21 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## set keyboard table
 * KEY_CMD_SET_KEYBOARD_TABLE = (22 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_21, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SET_CONTRACTION_TABLE, __pyx_t_3) < (0)) __PYX_ERR(3, 616, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":618
 * KEY_CMD_SET_CONTRACTION_TABLE = (21 << KEY_CMD_BLK_SHIFT)
 * ## set keyboard table
 * KEY_CMD_SET_KEYBOARD_TABLE = (22 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## set language profile
 * KEY_CMD_SET_LANGUAGE_PROFILE = (23 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_22, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SET_KEYBOARD_TABLE, __pyx_t_2) < (0)) __PYX_ERR(3, 618, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":620
 * KEY_CMD_SET_KEYBOARD_TABLE = (22 << KEY_CMD_BLK_SHIFT)
 * ## set language profile
 * KEY_CMD_SET_LANGUAGE_PROFILE = (23 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## bring screen cursor to line
 * KEY_CMD_ROUTE_LINE = (24 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_23, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SET_LANGUAGE_PROFILE, __pyx_t_3) < (0)) __PYX_ERR(3, 620, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":622
 * KEY_CMD_SET_LANGUAGE_PROFILE = (23 << KEY_CMD_BLK_SHIFT)
 * ## bring screen cursor to line
 * KEY_CMD_ROUTE_LINE = (24 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## refresh braille line
 * KEY_CMD_REFRESH_LINE = (25 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_24, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_ROUTE_LINE, __pyx_t_2) < (0)) __PYX_ERR(3, 622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":624
 * KEY_CMD_ROUTE_LINE = (24 << KEY_CMD_BLK_SHIFT)
 * ## refresh braille line
 * KEY_CMD_REFRESH_LINE = (25 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## start text selection
 * KEY_CMD_TXTSEL_START = (26 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_25, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_REFRESH_LINE, __pyx_t_3) < (0)) __PYX_ERR(3, 624, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":626
 * KEY_CMD_REFRESH_LINE = (25 << KEY_CMD_BLK_SHIFT)
 * ## start text selection
 * KEY_CMD_TXTSEL_START = (26 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## set text selection
 * KEY_CMD_TXTSEL_SET = (27 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_26, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_TXTSEL_START, __pyx_t_2) < (0)) __PYX_ERR(3, 626, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":628
 * KEY_CMD_TXTSEL_START = (26 << KEY_CMD_BLK_SHIFT)
 * ## set text selection
 * KEY_CMD_TXTSEL_SET = (27 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## bring speech cursor to character
 * KEY_CMD_ROUTE_SPEECH = (28 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_27, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_TXTSEL_SET, __pyx_t_3) < (0)) __PYX_ERR(3, 628, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":630
 * KEY_CMD_TXTSEL_SET = (27 << KEY_CMD_BLK_SHIFT)
 * ## bring speech cursor to character
 * KEY_CMD_ROUTE_SPEECH = (28 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## insert a clipboard history entry before the screen cursor using the alternate paste mode
 * KEY_CMD_PASTE_HISTORY_ALTMODE = (29 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_28, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_ROUTE_SPEECH, __pyx_t_2) < (0)) __PYX_ERR(3, 630, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":632
 * KEY_CMD_ROUTE_SPEECH = (28 << KEY_CMD_BLK_SHIFT)
 * ## insert a clipboard history entry before the screen cursor using the alternate paste mode
 * KEY_CMD_PASTE_HISTORY_ALTMODE = (29 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## bind to specific virtual terminal
 * KEY_CMD_SELECTVT = (30 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_29, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_PASTE_HISTORY_ALTMODE, __pyx_t_3) < (0)) __PYX_ERR(3, 632, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":634
 * KEY_CMD_PASTE_HISTORY_ALTMODE = (29 << KEY_CMD_BLK_SHIFT)
 * ## bind to specific virtual terminal
 * KEY_CMD_SELECTVT = (30 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## render an alert
 * KEY_CMD_ALERT = (31 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_30, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_SELECTVT, __pyx_t_2) < (0)) __PYX_ERR(3, 634, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":636
 * KEY_CMD_SELECTVT = (30 << KEY_CMD_BLK_SHIFT)
 * ## render an alert
 * KEY_CMD_ALERT = (31 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## type braille dots
 * KEY_CMD_PASSDOTS = (34 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_31, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_ALERT, __pyx_t_3) < (0)) __PYX_ERR(3, 636, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":638
 * KEY_CMD_ALERT = (31 << KEY_CMD_BLK_SHIFT)
 * ## type braille dots
 * KEY_CMD_PASSDOTS = (34 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## AT (set 2) keyboard scan code
 * KEY_CMD_PASSAT = (35 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_34, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_PASSDOTS, __pyx_t_2) < (0)) __PYX_ERR(3, 638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":640
 * KEY_CMD_PASSDOTS = (34 << KEY_CMD_BLK_SHIFT)
 * ## AT (set 2) keyboard scan code
 * KEY_CMD_PASSAT = (35 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## XT (set 1) keyboard scan code
 * KEY_CMD_PASSXT = (36 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_35, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_PASSAT, __pyx_t_3) < (0)) __PYX_ERR(3, 640, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":642
 * KEY_CMD_PASSAT = (35 << KEY_CMD_BLK_SHIFT)
 * ## XT (set 1) keyboard scan code
 * KEY_CMD_PASSXT = (36 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## PS/2 (set 3) keyboard scan code
 * KEY_CMD_PASSPS2 = (37 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_36, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_PASSXT, __pyx_t_2) < (0)) __PYX_ERR(3, 642, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":644
 * KEY_CMD_PASSXT = (36 << KEY_CMD_BLK_SHIFT)
 * ## PS/2 (set 3) keyboard scan code
 * KEY_CMD_PASSPS2 = (37 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## switch to command context
 * KEY_CMD_CONTEXT = (38 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_37, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_PASSPS2, __pyx_t_3) < (0)) __PYX_ERR(3, 644, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":646
 * KEY_CMD_PASSPS2 = (37 << KEY_CMD_BLK_SHIFT)
 * ## switch to command context
 * KEY_CMD_CONTEXT = (38 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## current reading location
 * KEY_CMD_TOUCH_AT = (39 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_38, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_CONTEXT, __pyx_t_2) < (0)) __PYX_ERR(3, 646, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":648
 * KEY_CMD_CONTEXT = (38 << KEY_CMD_BLK_SHIFT)
 * ## current reading location
 * KEY_CMD_TOUCH_AT = (39 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## execute command macro
 * KEY_CMD_MACRO = (40 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_39, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_TOUCH_AT, __pyx_t_3) < (0)) __PYX_ERR(3, 648, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":650
 * KEY_CMD_TOUCH_AT = (39 << KEY_CMD_BLK_SHIFT)
 * ## execute command macro
 * KEY_CMD_MACRO = (40 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## run host command
 * KEY_CMD_HOSTCMD = (41 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_40, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_MACRO, __pyx_t_2) < (0)) __PYX_ERR(3, 650, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":652
 * KEY_CMD_MACRO = (40 << KEY_CMD_BLK_SHIFT)
 * ## run host command
 * KEY_CMD_HOSTCMD = (41 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## describe color of character
 * KEY_CMD_COLOR = (42 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_41, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_HOSTCMD, __pyx_t_3) < (0)) __PYX_ERR(3, 652, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":654
 * KEY_CMD_HOSTCMD = (41 << KEY_CMD_BLK_SHIFT)
 * ## describe color of character
 * KEY_CMD_COLOR = (42 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## start new clipboard with smart copy (URL, email, etc) at character
 * KEY_CMD_COPY_SMART_NEW = (43 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_42, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_COLOR, __pyx_t_2) < (0)) __PYX_ERR(3, 654, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":656
 * KEY_CMD_COLOR = (42 << KEY_CMD_BLK_SHIFT)
 * ## start new clipboard with smart copy (URL, email, etc) at character
 * KEY_CMD_COPY_SMART_NEW = (43 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## append to clipboard with smart copy (URL, email, etc) at character
 * KEY_CMD_COPY_SMART_ADD = (44 << KEY_CMD_BLK_SHIFT)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_43, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_COPY_SMART_NEW, __pyx_t_3) < (0)) __PYX_ERR(3, 656, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "constants.auto.pyx":658
 * KEY_CMD_COPY_SMART_NEW = (43 << KEY_CMD_BLK_SHIFT)
 * ## append to clipboard with smart copy (URL, email, etc) at character
 * KEY_CMD_COPY_SMART_ADD = (44 << KEY_CMD_BLK_SHIFT)             # <<<<<<<<<<<<<<
 * ## enable feature
 * KEY_FLG_TOGGLE_ON = 0x0100
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_CMD_BLK_SHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_44, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_CMD_COPY_SMART_ADD, __pyx_t_2) < (0)) __PYX_ERR(3, 658, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "constants.auto.pyx":660
 * KEY_CMD_COPY_SMART_ADD = (44 << KEY_CMD_BLK_SHIFT)
 * ## enable feature
 * KEY_FLG_TOGGLE_ON = 0x0100             # <<<<<<<<<<<<<<
 * ## disable feature
 * KEY_FLG_TOGGLE_OFF = 0x0200
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_FLG_TOGGLE_ON, __pyx_mstate_global->__pyx_int_256) < (0)) __PYX_ERR(3, 660, __pyx_L1_error)

  /* "constants.auto.pyx":662
 * KEY_FLG_TOGGLE_ON = 0x0100
 * ## disable feature
 * KEY_FLG_TOGGLE_OFF = 0x0200             # <<<<<<<<<<<<<<
 * ## mask for all toggle flags
 * KEY_FLG_TOGGLE_MASK = (KEY_FLG_TOGGLE_ON | KEY_FLG_TOGGLE_OFF)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_FLG_TOGGLE_OFF, __pyx_mstate_global->__pyx_int_512) < (0)) __PYX_ERR(3, 662, __pyx_L1_error)

  /* "constants.auto.pyx":664
 * KEY_FLG_TOGGLE_OFF = 0x0200
 * ## mask for all toggle flags
 * KEY_FLG_TOGGLE_MASK = (KEY_FLG_TOGGLE_ON | KEY_FLG_TOGGLE_OFF)             # <<<<<<<<<<<<<<
 * ## bring screen cursor into braille window after function
 * KEY_FLG_MOTION_ROUTE = 0x0400
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEY_FLG_TOGGLE_ON); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KEY_FLG_TOGGLE_OFF); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyNumber_Or(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_FLG_TOGGLE_MASK, __pyx_t_4) < (0)) __PYX_ERR(3, 664, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "constants.auto.pyx":666
 * KEY_FLG_TOGGLE_MASK = (KEY_FLG_TOGGLE_ON | KEY_FLG_TOGGLE_OFF)
 * ## bring screen cursor into braille window after function
 * KEY_FLG_MOTION_ROUTE = 0x0400             # <<<<<<<<<<<<<<
 * ## scale arg=0X00-0XFF to screen height
 * KEY_FLG_MOTION_SCALED = 0x0800
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_FLG_MOTION_ROUTE, __pyx_mstate_global->__pyx_int_1024) < (0)) __PYX_ERR(3, 666, __pyx_L1_error)

  /* "constants.auto.pyx":668
 * KEY_FLG_MOTION_ROUTE = 0x0400
 * ## scale arg=0X00-0XFF to screen height
 * KEY_FLG_MOTION_SCALED = 0x0800             # <<<<<<<<<<<<<<
 * ## go to beginning of line
 * KEY_FLG_MOTION_TOLEFT = 0x1000
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_FLG_MOTION_SCALED, __pyx_mstate_global->__pyx_int_2048) < (0)) __PYX_ERR(3, 668, __pyx_L1_error)

  /* "constants.auto.pyx":670
 * KEY_FLG_MOTION_SCALED = 0x0800
 * ## go to beginning of line
 * KEY_FLG_MOTION_TOLEFT = 0x1000             # <<<<<<<<<<<<<<
 * ## shift key pressed
 * KEY_FLG_INPUT_SHIFT = 0x0100
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_FLG_MOTION_TOLEFT, __pyx_mstate_global->__pyx_int_4096) < (0)) __PYX_ERR(3, 670, __pyx_L1_error)

  /* "constants.auto.pyx":672
 * KEY_FLG_MOTION_TOLEFT = 0x1000
 * ## shift key pressed
 * KEY_FLG_INPUT_SHIFT = 0x0100             # <<<<<<<<<<<<<<
 * ## convert to uppercase
 * KEY_FLG_INPUT_UPPER = 0x0200
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_FLG_INPUT_SHIFT, __pyx_mstate_global->__pyx_int_256) < (0)) __PYX_ERR(3, 672, __pyx_L1_error)

  /* "constants.auto.pyx":674
 * KEY_FLG_INPUT_SHIFT = 0x0100
 * ## convert to uppercase
 * KEY_FLG_INPUT_UPPER = 0x0200             # <<<<<<<<<<<<<<
 * ## control key pressed
 * KEY_FLG_INPUT_CONTROL = 0x0400
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_FLG_INPUT_UPPER, __pyx_mstate_global->__pyx_int_512) < (0)) __PYX_ERR(3, 674, __pyx_L1_error)

  /* "constants.auto.pyx":676
 * KEY_FLG_INPUT_UPPER = 0x0200
 * ## control key pressed
 * KEY_FLG_INPUT_CONTROL = 0x0400             # <<<<<<<<<<<<<<
 * ## meta (left alt) key pressed
 * KEY_FLG_INPUT_META = 0x0800
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_FLG_INPUT_CONTROL, __pyx_mstate_global->__pyx_int_1024) < (0)) __PYX_ERR(3, 676, __pyx_L1_error)

  /* "constants.auto.pyx":678
 * KEY_FLG_INPUT_CONTROL = 0x0400
 * ## meta (left alt) key pressed
 * KEY_FLG_INPUT_META = 0x0800             # <<<<<<<<<<<<<<
 * ## altgr (right alt) key pressed
 * KEY_FLG_INPUT_ALTGR = 0x1000
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_FLG_INPUT_META, __pyx_mstate_global->__pyx_int_2048) < (0)) __PYX_ERR(3, 678, __pyx_L1_error)

  /* "constants.auto.pyx":680
 * KEY_FLG_INPUT_META = 0x0800
 * ## altgr (right alt) key pressed
 * KEY_FLG_INPUT_ALTGR = 0x1000             # <<<<<<<<<<<<<<
 * ## gui (windows) key pressed
 * KEY_FLG_INPUT_GUI = 0x2000
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_FLG_INPUT_ALTGR, __pyx_mstate_global->__pyx_int_4096) < (0)) __PYX_ERR(3, 680, __pyx_L1_error)

  /* "constants.auto.pyx":682
 * KEY_FLG_INPUT_ALTGR = 0x1000
 * ## gui (windows) key pressed
 * KEY_FLG_INPUT_GUI = 0x2000             # <<<<<<<<<<<<<<
 * ## prefix with escape
 * KEY_FLG_INPUT_ESCAPED = 0x4000
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_FLG_INPUT_GUI, __pyx_mstate_global->__pyx_int_8192) < (0)) __PYX_ERR(3, 682, __pyx_L1_error)

  /* "constants.auto.pyx":684
 * KEY_FLG_INPUT_GUI = 0x2000
 * ## prefix with escape
 * KEY_FLG_INPUT_ESCAPED = 0x4000             # <<<<<<<<<<<<<<
 * ## capslock key pressed
 * KEY_FLG_INPUT_CAPSLOCK = 0x8000
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_FLG_INPUT_ESCAPED, __pyx_mstate_global->__pyx_int_16384) < (0)) __PYX_ERR(3, 684, __pyx_L1_error)

  /* "constants.auto.pyx":686
 * KEY_FLG_INPUT_ESCAPED = 0x4000
 * ## capslock key pressed
 * KEY_FLG_INPUT_CAPSLOCK = 0x8000             # <<<<<<<<<<<<<<
 * ## it is a release scan code
 * KEY_FLG_KBD_RELEASE = 0x0100
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_FLG_INPUT_CAPSLOCK, __pyx_mstate_global->__pyx_int_32768) < (0)) __PYX_ERR(3, 686, __pyx_L1_error)

  /* "constants.auto.pyx":688
 * KEY_FLG_INPUT_CAPSLOCK = 0x8000
 * ## it is a release scan code
 * KEY_FLG_KBD_RELEASE = 0x0100             # <<<<<<<<<<<<<<
 * ## it is an emulation 0 scan code
 * KEY_FLG_KBD_EMUL0 = 0x0200
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_FLG_KBD_RELEASE, __pyx_mstate_global->__pyx_int_256) < (0)) __PYX_ERR(3, 688, __pyx_L1_error)

  /* "constants.auto.pyx":690
 * KEY_FLG_KBD_RELEASE = 0x0100
 * ## it is an emulation 0 scan code
 * KEY_FLG_KBD_EMUL0 = 0x0200             # <<<<<<<<<<<<<<
 * ## it is an emulation 1 scan code
 * KEY_FLG_KBD_EMUL1 = 0x0400
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_FLG_KBD_EMUL0, __pyx_mstate_global->__pyx_int_512) < (0)) __PYX_ERR(3, 690, __pyx_L1_error)

  /* "constants.auto.pyx":692
 * KEY_FLG_KBD_EMUL0 = 0x0200
 * ## it is an emulation 1 scan code
 * KEY_FLG_KBD_EMUL1 = 0x0400             # <<<<<<<<<<<<<<
 * ## upper-left dot of standard braille cell
 * DOT1 = 1
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KEY_FLG_KBD_EMUL1, __pyx_mstate_global->__pyx_int_1024) < (0)) __PYX_ERR(3, 692, __pyx_L1_error)

  /* "constants.auto.pyx":694
 * KEY_FLG_KBD_EMUL1 = 0x0400
 * ## upper-left dot of standard braille cell
 * DOT1 = 1             # <<<<<<<<<<<<<<
 * ## middle-left dot of standard braille cell
 * DOT2 = 2
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DOT1, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(3, 694, __pyx_L1_error)

  /* "constants.auto.pyx":696
 * DOT1 = 1
 * ## middle-left dot of standard braille cell
 * DOT2 = 2             # <<<<<<<<<<<<<<
 * ## lower-left dot of standard braille cell
 * DOT3 = 4
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DOT2, __pyx_mstate_global->__pyx_int_2) < (0)) __PYX_ERR(3, 696, __pyx_L1_error)

  /* "constants.auto.pyx":698
 * DOT2 = 2
 * ## lower-left dot of standard braille cell
 * DOT3 = 4             # <<<<<<<<<<<<<<
 * ## upper-right dot of standard braille cell
 * DOT4 = 8
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DOT3, __pyx_mstate_global->__pyx_int_4) < (0)) __PYX_ERR(3, 698, __pyx_L1_error)

  /* "constants.auto.pyx":700
 * DOT3 = 4
 * ## upper-right dot of standard braille cell
 * DOT4 = 8             # <<<<<<<<<<<<<<
 * ## middle-right dot of standard braille cell
 * DOT5 = 16
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DOT4, __pyx_mstate_global->__pyx_int_8) < (0)) __PYX_ERR(3, 700, __pyx_L1_error)

  /* "constants.auto.pyx":702
 * DOT4 = 8
 * ## middle-right dot of standard braille cell
 * DOT5 = 16             # <<<<<<<<<<<<<<
 * ## lower-right dot of standard braille cell
 * DOT6 = 32
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DOT5, __pyx_mstate_global->__pyx_int_16) < (0)) __PYX_ERR(3, 702, __pyx_L1_error)

  /* "constants.auto.pyx":704
 * DOT5 = 16
 * ## lower-right dot of standard braille cell
 * DOT6 = 32             # <<<<<<<<<<<<<<
 * ## lower-left dot of computer braille cell
 * DOT7 = 64
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DOT6, __pyx_mstate_global->__pyx_int_32) < (0)) __PYX_ERR(3, 704, __pyx_L1_error)

  /* "constants.auto.pyx":706
 * DOT6 = 32
 * ## lower-left dot of computer braille cell
 * DOT7 = 64             # <<<<<<<<<<<<<<
 * ## lower-right dot of computer braille cell
 * DOT8 = 128
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DOT7, __pyx_mstate_global->__pyx_int_64) < (0)) __PYX_ERR(3, 706, __pyx_L1_error)

  /* "constants.auto.pyx":708
 * DOT7 = 64
 * ## lower-right dot of computer braille cell
 * DOT8 = 128             # <<<<<<<<<<<<<<
 * ## chord (space bar on braille keyboard)
 * DOTC = 256
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DOT8, __pyx_mstate_global->__pyx_int_128) < (0)) __PYX_ERR(3, 708, __pyx_L1_error)

  /* "constants.auto.pyx":710
 * DOT8 = 128
 * ## chord (space bar on braille keyboard)
 * DOTC = 256             # <<<<<<<<<<<<<<
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DOTC, __pyx_mstate_global->__pyx_int_256) < (0)) __PYX_ERR(3, 710, __pyx_L1_error)

  /* "brlapi.pyx":137
 * include "constants.auto.pyx"
 * 
 * def getLibraryVersion():             # <<<<<<<<<<<<<<
 * 	"""Get the BrlAPI version as a three-element list (major, minor, revision).
 * 	See brlapi_getLibraryVersion(3)."""
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_1getLibraryVersion, 0, __pyx_mstate_global->__pyx_n_u_getLibraryVersion, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_getLibraryVersion, __pyx_t_4) < (0)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "brlapi.pyx":147
 * 	return (major, minor, revision)
 * 
 * def expandKeyCode(code):             # <<<<<<<<<<<<<<
 * 	"""Expand a keycode into its individual components.
 * 	See brlapi_expandKeyCode(3)."""
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_3expandKeyCode, 0, __pyx_mstate_global->__pyx_n_u_expandKeyCode, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_expandKeyCode, __pyx_t_4) < (0)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "brlapi.pyx":163
 * 		}
 * 
 * def describeKeyCode(code):             # <<<<<<<<<<<<<<
 * 	"""Describe the individual components of a keycode symbolically.
 * 	See brlapi_describeKeyCode(3)."""
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_5describeKeyCode, 0, __pyx_mstate_global->__pyx_n_u_describeKeyCode, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_describeKeyCode, __pyx_t_4) < (0)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "brlapi.pyx":231
 * 	return ret
 * 
 * class OperationError(Exception):             # <<<<<<<<<<<<<<
 * 	"""Error while performing some operation"""
 * 	def __init__(self):
*/
  __pyx_t_4 = PyTuple_Pack(1, ((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_mstate_global->__pyx_n_u_OperationError, __pyx_mstate_global->__pyx_n_u_OperationError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_kp_u_Error_while_performing_some_oper); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_3 != __pyx_t_4) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 231, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "brlapi.pyx":233
 * class OperationError(Exception):
 * 	"""Error while performing some operation"""
 * 	def __init__(self):             # <<<<<<<<<<<<<<
 * 		cdef char *exception
 * 		exception = c_brlapi.brlapi_protocolException()
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_14OperationError_1__init__, 0, __pyx_mstate_global->__pyx_n_u_OperationError___init, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_4) < (0)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "brlapi.pyx":249
 * 				self.errfun = b""
 * 
 * 	def __str__(self):             # <<<<<<<<<<<<<<
 * 		cdef c_brlapi.brlapi_error_t error
 * 		cdef c_brlapi.size_t size
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_14OperationError_3__str__, 0, __pyx_mstate_global->__pyx_n_u_OperationError___str, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_str, __pyx_t_4) < (0)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "brlapi.pyx":231
 * 	return ret
 * 
 * class OperationError(Exception):             # <<<<<<<<<<<<<<
 * 	"""Error while performing some operation"""
 * 	def __init__(self):
*/
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_OperationError, __pyx_t_3, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_OperationError, __pyx_t_4) < (0)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":267
 * 		return ret
 * 
 * class ConnectionError(OperationError):             # <<<<<<<<<<<<<<
 * 	"""Error while connecting to BrlTTY"""
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_OperationError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_Pack(1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_3, __pyx_mstate_global->__pyx_n_u_ConnectionError, __pyx_mstate_global->__pyx_n_u_ConnectionError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_kp_u_Error_while_connecting_to_BrlTTY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__pyx_t_3 != __pyx_t_2) {
    if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 267, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "brlapi.pyx":270
 * 	"""Error while connecting to BrlTTY"""
 * 
 * 	def __init__(self, host, auth):             # <<<<<<<<<<<<<<
 * 		OperationError.__init__(self)
 * 		self.host = host
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_15ConnectionError_1__init__, 0, __pyx_mstate_global->__pyx_n_u_ConnectionError___init, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_2) < (0)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "brlapi.pyx":275
 * 		self.auth = auth
 * 
 * 	def __str__(self):             # <<<<<<<<<<<<<<
 * 		msg = "couldn't connect to %s with key %s: %s" % (self.host,self.auth,OperationError.__str__(self))
 * 		msg = msg + "\n(brlerrno %d, libcerrno %d, gaierrno %d)" % (self.brlerrno, self.libcerrno, self.gaierrno)
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_15ConnectionError_3__str__, 0, __pyx_mstate_global->__pyx_n_u_ConnectionError___str, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_str, __pyx_t_2) < (0)) __PYX_ERR(0, 275, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "brlapi.pyx":286
 * 		return msg
 * 
 * 	def host(self):             # <<<<<<<<<<<<<<
 * 		"""Host of BRLTTY server"""
 * 		return self.settings.host
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_15ConnectionError_5host, 0, __pyx_mstate_global->__pyx_n_u_ConnectionError_host, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_host, __pyx_t_2) < (0)) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "brlapi.pyx":290
 * 		return self.settings.host
 * 
 * 	def auth(self):             # <<<<<<<<<<<<<<
 * 		"""Authentication method used"""
 * 		return self.settings.auth
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_15ConnectionError_7auth, 0, __pyx_mstate_global->__pyx_n_u_ConnectionError_auth, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_auth, __pyx_t_2) < (0)) __PYX_ERR(0, 290, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "brlapi.pyx":267
 * 		return ret
 * 
 * class ConnectionError(OperationError):             # <<<<<<<<<<<<<<
 * 	"""Error while connecting to BrlTTY"""
 * 
*/
  __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ConnectionError, __pyx_t_3, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ConnectionError, __pyx_t_2) < (0)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.props must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_11WriteStruct_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_WriteStruct___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_3) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.props must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.props must be explicitly requested with @auto_pickle(True)"
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_11WriteStruct_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_WriteStruct___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_3) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":470
 * 			raise ConnectionError(self.settings.host, self.settings.auth)
 * 
 * 	def closeConnection(self):             # <<<<<<<<<<<<<<
 * 		"""Close the BrlAPI connection"""
 * 		if self.fd != -1:
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_3closeConnection, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_closeConnection, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_closeConnection, __pyx_t_3) < (0)) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":538
 * 				return identifier
 * 
 * 	def enterTtyMode(self, tty = TTY_DEFAULT, driver = None):             # <<<<<<<<<<<<<<
 * 		"""Ask for some tty, with some key mechanism
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_TTY_DEFAULT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_mstate_global->__pyx_k__4 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_TTY_DEFAULT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyTuple_Pack(2, __pyx_t_3, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_7enterTtyMode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_enterTtyMode, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_enterTtyMode, __pyx_t_3) < (0)) __PYX_ERR(0, 538, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":565
 * 			return retval
 * 
 * 	def enterTtyModeWithPath(self, path = [], driver = None):             # <<<<<<<<<<<<<<
 * 		"""Ask for some tty, with some key mechanism
 * 
*/
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_mstate_global->__pyx_k__5 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyTuple_Pack(2, __pyx_t_3, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_9enterTtyModeWithPath, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_enterTtyModeWithPath, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_enterTtyModeWithPath, __pyx_t_3) < (0)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":601
 * 			return retval
 * 
 * 	def leaveTtyMode(self):             # <<<<<<<<<<<<<<
 * 		"""Stop controlling the tty
 * 		See brlapi_leaveTtyMode(3)."""
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_11leaveTtyMode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_leaveTtyMode, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_leaveTtyMode, __pyx_t_3) < (0)) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":612
 * 			return retval
 * 
 * 	def setFocus(self, tty):             # <<<<<<<<<<<<<<
 * 		"""Tell the current tty to brltty.
 * 		See brlapi_setFocus(3).
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_13setFocus, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_setFocus, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_setFocus, __pyx_t_3) < (0)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":631
 * 	# it once it's no longer being used. New code should supply attributes
 * 	# by specifying the remaining parameters, as needed, by name.
 * 	def write(self, WriteStruct writeArguments = None,             # <<<<<<<<<<<<<<
 * 			displayNumber = None,
 * 			regionBegin = None,
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_15write, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_write, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[0]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_write, __pyx_t_3) < (0)) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":669
 * 			return retval
 * 
 * 	def writeDots(self, dots):             # <<<<<<<<<<<<<<
 * 		"""Write the given dots array to the display.
 * 		See brlapi_writeDots(3).
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_17writeDots, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_writeDots, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_writeDots, __pyx_t_3) < (0)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":691
 * 			return retval
 * 
 * 	def writeText(self, text, cursor = CURSOR_OFF):             # <<<<<<<<<<<<<<
 * 		"""Write the given \0-terminated string to the braille display.
 * 		See brlapi_writeText(3).
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CURSOR_OFF); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_mstate_global->__pyx_k__7 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CURSOR_OFF); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_19writeText, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_writeText, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_writeText, __pyx_t_3) < (0)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":710
 * 		return self.write(w)
 * 
 * 	def readKey(self, wait = True):             # <<<<<<<<<<<<<<
 * 		"""Read a key from the braille keyboard.
 * 		See brlapi_readKey(3).
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_21readKey, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_readKey, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[1]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_readKey, __pyx_t_3) < (0)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":739
 * 				return code
 * 
 * 	def readKeyWithTimeout(self, timeout_ms = -1):             # <<<<<<<<<<<<<<
 * 		"""Read a key from the braille keyboard.
 * 		See brlapi_readKeyWithtimeout(3).
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_23readKeyWithTimeout, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_readKeyWithTimeout, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[2]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_readKeyWithTimeout, __pyx_t_3) < (0)) __PYX_ERR(0, 739, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":760
 * 				return code
 * 
 * 	def expandKeyCode(self, code):             # <<<<<<<<<<<<<<
 * 		"""Expand a keycode into its individual components.
 * 		This is a stub to maintain backward compatibility.
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_25expandKeyCode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_expandKeyCode, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_expandKeyCode, __pyx_t_3) < (0)) __PYX_ERR(0, 760, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":766
 * 		return expandKeyCode(code)
 * 
 * 	def ignoreKeys(self, key_type, set):             # <<<<<<<<<<<<<<
 * 		"""Ignore some key presses from the braille keyboard.
 * 		See brlapi_ignoreKeys(3).
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_27ignoreKeys, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_ignoreKeys, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_ignoreKeys, __pyx_t_3) < (0)) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":790
 * 			return retval
 * 
 * 	def acceptKeys(self, key_type, set):             # <<<<<<<<<<<<<<
 * 		"""Accept some key presses from the braille keyboard.
 * 		See brlapi_ignoreKeys(3).
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_29acceptKeys, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_acceptKeys, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_acceptKeys, __pyx_t_3) < (0)) __PYX_ERR(0, 790, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":814
 * 			return retval
 * 
 * 	def ignoreAllKeys(self):             # <<<<<<<<<<<<<<
 * 		"""Ignore all key presses from the braille keyboard.
 * 		See brlapi_ignoreAllKeys(3).
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_31ignoreAllKeys, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_ignoreAllKeys, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_ignoreAllKeys, __pyx_t_3) < (0)) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":827
 * 			return retval
 * 
 * 	def acceptAllKeys(self):             # <<<<<<<<<<<<<<
 * 		"""Accept all key presses from the braille keyboard.
 * 		See brlapi_acceptAllKeys(3).
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_33acceptAllKeys, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_acceptAllKeys, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_acceptAllKeys, __pyx_t_3) < (0)) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":842
 * 			return retval
 * 
 * 	def ignoreKeyRanges(self, keys):             # <<<<<<<<<<<<<<
 * 		"""Ignore some key presses from the braille keyboard.
 * 		See brlapi_ignoreKeyRanges(3).
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_35ignoreKeyRanges, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_ignoreKeyRanges, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_ignoreKeyRanges, __pyx_t_3) < (0)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":865
 * 			return retval
 * 
 * 	def acceptKeyRanges(self, keys):             # <<<<<<<<<<<<<<
 * 		"""Accept some key presses from the braille keyboard.
 * 		See brlapi_acceptKeyRanges(3).
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_37acceptKeyRanges, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_acceptKeyRanges, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_acceptKeyRanges, __pyx_t_3) < (0)) __PYX_ERR(0, 865, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":888
 * 			return retval
 * 
 * 	def enterRawMode(self, driver):             # <<<<<<<<<<<<<<
 * 		"""Switch to Raw mode
 * 		See brlapi_enterRawMode(3).
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_39enterRawMode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_enterRawMode, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_enterRawMode, __pyx_t_3) < (0)) __PYX_ERR(0, 888, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":905
 * 			return retval
 * 
 * 	def leaveRawMode(self):             # <<<<<<<<<<<<<<
 * 		"""leave Raw mode
 * 		See brlapi_leaveRawMode(3)."""
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_41leaveRawMode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_leaveRawMode, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_leaveRawMode, __pyx_t_3) < (0)) __PYX_ERR(0, 905, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":916
 * 			return retval
 * 
 * 	def getParameter(self, param, subparam = 0, flags = 0):             # <<<<<<<<<<<<<<
 * 		"""Get the value of a parameter.
 * 		See brlapi_getParameter(3).
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_43getParameter, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_getParameter, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[3]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_getParameter, __pyx_t_3) < (0)) __PYX_ERR(0, 916, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":952
 * 
 * 
 * 	def setParameter(self, param, subparam, flags, value):             # <<<<<<<<<<<<<<
 * 		"""Set the value of a parameter.
 * 		See brlapi_setParameter(3).
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_45setParameter, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_setParameter, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_setParameter, __pyx_t_3) < (0)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":1066
 * 		c_brlapi.free(c_value)
 * 
 * 	def watchParameter(self, param, subparam, flags, func):             # <<<<<<<<<<<<<<
 * 		"""Set a parameter change callback.
 * 		See brlapi_watchParameter(3).
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_47watchParameter, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_watchParameter, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_watchParameter, __pyx_t_3) < (0)) __PYX_ERR(0, 1066, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":1097
 * 		return <uintptr_t>descr
 * 
 * 	def unwatchParameter(self, entry):             # <<<<<<<<<<<<<<
 * 		"""Clear a parameter change callback.
 * 		See brlapi_unwatchParameter(3).
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_49unwatchParameter, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_unwatchParameter, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_unwatchParameter, __pyx_t_3) < (0)) __PYX_ERR(0, 1097, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":1109
 * 		c_brlapi.brlapi_python_unwatchParameter(self.h, <c_brlapi.brlapi_python_paramCallbackDescriptor_t *>descr)
 * 
 * 	def pause(self, timeout_ms):             # <<<<<<<<<<<<<<
 * 		"""Wait until an event is received from the BrlAPI server.
 * 		See brlapi_pause(3).
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_51pause, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_pause, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_pause, __pyx_t_3) < (0)) __PYX_ERR(0, 1109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":1115
 * 		c_brlapi.brlapi__pause(self.h, timeout_ms)
 * 
 * 	def sync(self):             # <<<<<<<<<<<<<<
 * 		"""Synchronize against any pending exception, and raise it.
 * 		See brlapi_sync(3).
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_53sync, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection_sync, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6brlapi_Connection, __pyx_mstate_global->__pyx_n_u_sync, __pyx_t_3) < (0)) __PYX_ERR(0, 1115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.h cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_55__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_3) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.h cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.h cannot be converted to a Python object for pickling"
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6brlapi_10Connection_57__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Connection___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_brlapi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_3);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_3) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "brlapi.pyx":1
 * """             # <<<<<<<<<<<<<<
 * This module implements a set of bindings for BrlAPI, a braille bridge for applications.
 * 
*/
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_3) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /*--- Wrapped vars code ---*/

  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);
  if (__pyx_m) {
    if (__pyx_mstate->__pyx_d && stringtab_initialized) {
      __Pyx_AddTraceback("init brlapi", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    #if !CYTHON_USE_MODULE_STATE
    Py_CLEAR(__pyx_m);
    #else
    Py_DECREF(__pyx_m);
    if (pystate_addmodule_run) {
      PyObject *tp, *value, *tb;
      PyErr_Fetch(&tp, &value, &tb);
      PyState_RemoveModule(&__pyx_moduledef);
      PyErr_Restore(tp, value, tb);
    }
    #endif
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init brlapi");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #else
  return __pyx_m;
  #endif
}
/* #### Code section: pystring_table ### */
/* #### Code section: cached_builtins ### */

static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) {
  CYTHON_UNUSED_VAR(__pyx_mstate);

  /* Cached unbound methods */
  __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items;
  __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
  __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values;
  return 0;
}
/* #### Code section: cached_constants ### */

static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "brlapi.pyx":631
 * 	# it once it's no longer being used. New code should supply attributes
 * 	# by specifying the remaining parameters, as needed, by name.
 * 	def write(self, WriteStruct writeArguments = None,             # <<<<<<<<<<<<<<
 * 			displayNumber = None,
 * 			regionBegin = None,
*/
  __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(9, Py_None, Py_None, Py_None, Py_None, Py_None, Py_None, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]);

  /* "brlapi.pyx":710
 * 		return self.write(w)
 * 
 * 	def readKey(self, wait = True):             # <<<<<<<<<<<<<<
 * 		"""Read a key from the braille keyboard.
 * 		See brlapi_readKey(3).
*/
  __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]);

  /* "brlapi.pyx":739
 * 				return code
 * 
 * 	def readKeyWithTimeout(self, timeout_ms = -1):             # <<<<<<<<<<<<<<
 * 		"""Read a key from the braille keyboard.
 * 		See brlapi_readKeyWithtimeout(3).
*/
  __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_int_neg_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]);

  /* "brlapi.pyx":916
 * 			return retval
 * 
 * 	def getParameter(self, param, subparam = 0, flags = 0):             # <<<<<<<<<<<<<<
 * 		"""Get the value of a parameter.
 * 		See brlapi_getParameter(3).
*/
  __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]);
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_tuple;
    for (Py_ssize_t i=0; i<4; ++i) {
      #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
      #if PY_VERSION_HEX < 0x030E0000
      if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
      #else
      if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
      #endif
      {
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
      }
      #else
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
      #endif
    }
  }
  #endif
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}
/* #### Code section: init_constants ### */

static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) {
  CYTHON_UNUSED_VAR(__pyx_mstate);
  {
    const struct { const unsigned int length: 10; } index[] = {{0},{73},{22},{22},{23},{32},{37},{22},{23},{26},{179},{98},{21},{5},{26},{2},{1},{1},{8},{10},{11},{20},{7},{6},{11},{2},{9},{12},{58},{15},{10},{5},{12},{10},{10},{15},{24},{23},{20},{20},{28},{30},{24},{26},{21},{26},{23},{23},{31},{24},{23},{24},{26},{21},{23},{23},{16},{18},{29},{19},{23},{15},{27},{25},{16},{20},{20},{15},{4},{4},{4},{4},{4},{4},{4},{4},{4},{12},{5},{6},{20},{17},{16},{17},{14},{9},{12},{25},{20},{23},{13},{11},{15},{22},{24},{13},{13},{16},{25},{13},{13},{17},{16},{17},{22},{22},{21},{19},{22},{22},{21},{21},{17},{14},{14},{15},{18},{17},{12},{16},{17},{11},{16},{14},{17},{17},{16},{16},{13},{13},{16},{19},{18},{17},{16},{20},{17},{17},{13},{16},{15},{18},{15},{17},{17},{17},{22},{22},{16},{15},{19},{15},{14},{14},{17},{16},{15},{15},{16},{22},{14},{14},{14},{18},{14},{18},{16},{16},{11},{22},{20},{20},{21},{21},{21},{16},{23},{23},{24},{16},{21},{21},{21},{21},{17},{12},{12},{15},{17},{16},{18},{14},{14},{18},{12},{13},{13},{12},{13},{12},{13},{23},{22},{22},{25},{22},{23},{25},{12},{12},{12},{17},{15},{16},{15},{15},{16},{16},{15},{14},{16},{15},{14},{13},{21},{21},{29},{17},{15},{16},{16},{17},{16},{16},{15},{15},{16},{16},{15},{20},{18},{21},{14},{13},{23},{18},{20},{17},{15},{17},{18},{18},{16},{18},{17},{18},{18},{17},{16},{16},{21},{21},{15},{15},{28},{29},{26},{28},{22},{13},{22},{15},{19},{16},{16},{23},{23},{23},{23},{23},{23},{23},{20},{23},{23},{23},{23},{23},{23},{23},{23},{23},{23},{23},{23},{23},{15},{23},{17},{16},{16},{21},{21},{12},{11},{16},{16},{17},{13},{18},{20},{18},{20},{15},{13},{13},{13},{13},{14},{14},{15},{19},{22},{21},{21},{17},{18},{19},{19},{17},{17},{19},{20},{21},{21},{19},{18},{17},{7},{17},{14},{12},{11},{14},{10},{11},{11},{11},{11},{11},{11},{11},{11},{11},{11},{10},{11},{11},{11},{11},{11},{11},{11},{11},{11},{11},{10},{11},{11},{11},{11},{11},{11},{10},{10},{10},{10},{10},{10},{12},{14},{12},{16},{17},{15},{13},{11},{15},{10},{12},{13},{14},{12},{14},{23},{22},{13},{12},{11},{20},{28},{21},{23},{26},{29},{32},{32},{32},{28},{11},{29},{25},{17},{29},{22},{23},{18},{19},{18},{18},{17},{25},{28},{17},{27},{20},{22},{28},{20},{20},{17},{20},{26},{18},{18},{17},{17},{17},{17},{16},{20},{11},{11},{29},{31},{13},{15},{10},{7},{8},{18},{7},{6},{4},{6},{8},{3},{6},{8},{7},{6},{3},{7},{7},{5},{10},{12},{5},{6},{6},{7},{7},{6},{12},{6},{5},{7},{17},{18},{15},{4},{7},{6},{1},{4},{6},{5},{15},{8},{13},{11},{3},{7},{4},{6},{1},{3},{6},{12},{12},{20},{5},{6},{5},{5},{6},{9},{13},{4},{5},{4},{8},{8},{17},{12},{12},{4},{1},{13},{15},{10},{8},{13},{5},{8},{4},{6},{12},{12},{9},{8},{5},{13},{5},{10},{15},{3},{8},{6},{5},{9},{4},{5},{3},{11},{5},{11},{12},{13},{14},{17},{13},{14},{7},{18},{10},{17},{13},{11},{10},{7},{3},{6},{8},{4},{3},{8},{12},{12},{10},{12},{19},{8},{4},{7},{3},{6},{8},{4},{8},{4},{10},{3},{4},{16},{5},{6},{8},{8},{8},{7},{1},{4},{14},{29},{5},{14},{9},{9},{1},{1},{0},{5},{1},{33},{123},{105},{155},{110},{96},{40},{40},{112},{167},{122},{820},{52},{92},{34},{9},{115},{47},{15},{29},{134},{11},{199},{40},{13},{24},{71},{135},{25},{67},{90},{65}};
    #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (4759 bytes) */
const char* const cstring = "(\265/\375`\225/m\224\000*\241\344!G\360\260\350\001\314\300\314\316O\207\315\211\217\026\"\255\330\232\270!E\322\200]![\225\233\335v+\224\204E\276\025\267\274\226\306\235\022\354\262\"\267m\303m\306,\007(\202\240\234\276?,\200\324\016j~o\236\254\316ej#\362\001\337\001\024\002\371\373<\017\223\272\020\225]P\\4e\235a<\215\332\343(o\036\014\030z\034o^\211\217X\353\314\301\034\202Ys\320\313\\\336c\2275\010\206[\336Z@\260|XQI\021\361\220\343\337\210\273\314\221(\374\211\333\343\376\215\347\353O9\377M\225\246\374]\006\332*Q\327\272\266\312\264k\245\336\306\344k\253\257|\014\257\246\250\312\024\277Wm\241.\236\\\237\373Tj\222\321\265\352\375\232\236\245W\241]\257.\357r\236\370\257|Y\366\365\373\222\364e+\345\325\277\2464\235$\277\211\232$\031\332\272.\31408\177\244\016\267\0367\317\3336\326\\\276\006\303G\275\215\252\2533\232\367\352\277\260\3224\231T\324\372W}\214R\243)\265\r\251\325,UfWi\033P\357O\231\276~\0244u\266RTU\375\205\317\215k\0252W\375Te<\231J\365\023\0304\021\336\246\253j\272Z\265Vtl\341\320\361Q\375\033\203o\251\374\202_\221\351ou\024\032\3157e|\226\377fi\2362\332_[6\332\272J\325Uh\346\364]\243)m\274\215\366\313\326YS\232b\310\257g\357|\014\325Li($\332Q\264\357Wm\225\362\036\235\361\264\320\352W\256\257\235\346L\272\256\375,eZ\253\266\302XiY\341 fQ5\325\277z\031\363\364)4\245\371\256M\373\235\346k\376\247\340\t\024m\251\232\353<\265\325\373\250^\345?\352\245\232\267IW\0335\235Q\375\352TG\232\n5Q4=M\032\031\232\232\252j^S\376\227~u\3435\337:{\014\177\246\351(\024\n\271\326\226\214\226\246\037\305\371\247G\237\220\353\257l\274\366ST[M\355\233Z\n\355\332ZAKu\257jh/\265V\352\322jJOSj~\355\376\024\265P\312\237f\237\321\320\324\374\2754?\352i~\013\177\002z\334\331$\242\270\247C\017\314\336\267a\0238\206\243\374\215<n\304d\367\345\375\341Q\370\221\310.\314\"\212{\340\250\3051\223\260\230s\307uVQQQi\001\301\362aEE\344!%D\013\010\226\017+*)\036D\035\007f\360\024r.oX\334&\324\216\371H\244\220\177\241)\357\254E\036\276\321\224I.\357,\342\215\217\"i\223\360\327\201\234""\30778\362\230\235\301\021\203\230,m\243\307K\033\367N|\003G\221t\371>\374\205'N\237\304\314y\337\307y#\321e\307x\233{]&\341\221\004\342\217\3238\034\345o\2049\271G\036\347\371\313[o]\270\2711,\221\274\222\356N\341\227G\337\027\216\360\336\302/\004\365\310s\026w\326\034\016\277N\243\274\022\027\232R\266\310\361\356\272p\333\272$j\2228\002\301\257\363\270\0301\014\301\021\363/\303x\035\2517l\342@0\354\266\016E>\362\375\345\322\307=\216?S\346^\211\004z\234\347\215\263\026A\030\022g=\202\331\304\267\367mo4\205<$\211\236\313\346\037\350\235\272\234ug\"\265\336v\346Hy\304\307Ms\025\336\346\242)E\346\274\3226m\276e\375\205\\\346\033\326<&s\220E4\351\360\013\303\022\014\336\373\224A\224\030j\234A\216\303\244\350}\232\177Z\304[\3105\346\233\344\266\221\033\271|:t\3716<\332\034\347\220\217\036\2148\202\234\313Hs\276\305\315e\220\3746\247\303\023)\272\210\273\363J\333ec\023I\322[\343\322\306\201\242&q\256\363\207I\316\264\221\340)\004]\300q\357\274m\343F}`\310\341\2547\371\205[\310C-\212\342\270y\010\212\241)\233Bp\033y\237\tk\236]6,\222\234\367a\230m\324|\203\036\371aR\003@f\036\0009Z\216\023\327\244\363\002\250\201\361\302\360\257?\275\247\375n\361\r\335\030e\023d4`+0\377\032)e^\031\026/\213\002o\307\335\255\0106\344c\306b5[\242\322\232\260\\\246\277\275\305\333\342\345\34584\230\030yG\254\307\013\362%]\274.`\336\021\034\026n\244d\002d\\\354@L\004\362\262d\0372\220\030\007\363\200\261^('-\250-Y\004l\207\005\3012\t\262T\354%\246\202\205>\357\007\204\025\361t$8a?\236\034V\013\201cO8\001\000\314:-\213-\360\231\275\310bb%1\276\241\344-\361\314\260+rI\334\216\313\265\245\027\027\273\022\\\220\313[\217\225\300\202f\275E\261*\034\001\000f\"\031\211\214s\010yC\000\3140+b=\354\000OGI\016\020\016\253\375h\025\260\003:\263\227\030\216\235`\030vz\341\227\3505\3413\003\371\350\020\311\321\301\351p\335\2548dbMO\022!\031-+,)*,\242\365\337\374\325\177\222\\W\325?[}5cx\365\227\375DG\252\033O\222\\={\213\265\256R\357\325\025I\256\322\325JMm:J\222\252\325\233d\252\236\255T\212\232=\205\201""\232\335\206$E\375\\\311u5\311U\3650.\265\1777j\352R}Y\343=Y\326\264@W?g\230{\245\226\253O\245Rj\272\252\255\322\306&-}*-\325O\332|\257\"IR\3554e\211\266f\312\376;WSv\231\363\354\3457\273\214\026Y\332\220_\246U\376\217\252\3729C\226\246\272\3764E\2263-\0315L\241X\375\0375\177+U\3232\224\232\275\245R{\315\332M)t\2378\237\361\372\337x\220\374\245\311\335\270ZVXRTXD\034\364F\022\350i\276A\234\2770\034\201\036\346\\\326\231\003\263\336;\233\274o\3740\014\211\342\241\026\301\360\323\331\353<\316\343\272\314q\241\267\351,\222\343>\205\372\373<\254G\244\026Q\001,v\023p\322~rX/\016\256\211\207\r\020\314\344:(\3416\370xsp\2027\201\2106\204e\215\374\025\301\241\340\006\213\230\003\030\213\367C\342\034A\362\222\340\364\001\255\201\377\352/\013\356\003\221\027\304\201\n \266T\261\250\254\366(-\252\231w&\345\375\220\234\310@\230\010\366_+\257\223\027\330n\"\327\004\273\r@\356\202\027\010+:\257\010-n\017\264,N^\022\\\270.\004Df#\004f!\237\031\310\300\214\0044+9\020\352\2749\263\020 \306\227\312u\360\371nwe\264\005Nb\035\350\005\315\3006X5p>X\n\275\003\343B8/a\020\322\001\322s@\275}\320a\250\006\003\336\315\306\304\234^\t9^b\032`\031:\357K\253\001\247\277(\230\332r\026@D3\262\302\222p<:3\220\005\000\035\037\33468\301\274(\034\016n\014\360\210\261`\035HLT\240^\224\370\272n\220\220a\3101\3119\371\320z\266\006[\240\343\262\332\n\355\310\006`A\334\032\374:\271);\242\331\024\220\254\214\t\210}\200y`\027\020\274\023\332\216\025\371P\000Cy]8iIB:\356\n\222K\276\260\023:\256\002\021\217O\200\331\201\227\224\323\333\227\0003\220[\266\0242\3533tb\033\246*yq7\006D\312\323Z\350\254\n\013\223sr\340=P\200\000nE%m\tlC\034\217\365\245_\036\251\225\360a&bY\001\2642-\024vdE\340xj:Fr\340\027\005\003!\263\216\003\303\215\013\024b\240\230\010\267\036\355\007\326de\3140L\002\354\302\013\364Bq\301\266\323\356\234\027\226\200g&\300\306\013\345\245\235\320\322\360\2517U\276%\351\205 \343\235\230\007PK\342\351\274\006X'\260\014 \031J,\005\202a\020\271'.\210\026\206%\3401c\265\233'\247\263#\236\031\350\204""\r\361t\230\344\300\261\025\010/\204\316+bC<r0+\022\340\343|x\254l\001\220\020\373\361\230\271n\336\233\365]W\357*\346\375p\2402\025\231I\314\364\262\321\256\264$-\367\314\270~5\313K\003\243\000K\275^^\025\020\274\010<f\001\205\016\250\023x\242\252'\031S\"2\222$\311t\203a\020@p\036\025\r\210\253\351\003\303t\202D\214D\231\016\260\020b\244DD\244 %%\0055\322\034d\320\202\212i\333\312v\252\201$\030J\203@F\303^\362X\373\212M\347`\304\300\003i[\305\306\356\212\326\245\367\260\317dT_I\002=A\365Y\310\212\256ct.\330\2657;\224\315M$H\\\030^m\276\216\002\370\3331\335\260\203%\024g \327\005\030\330 Era\304o\2159\345\361\326\315;\263\365\201A\035K\337\356+\003\332\002m\n\3151J\335\275\024\361#:\336'\340\261\236\300\326\307\225\313.k\222[Z\373TU\221['qOR\000b\316\343+P\310\217\212\307\000\016U\t\323\254\344pi{xu.\002\216\351\333\246\0202I\371\231\010) \364\010zH\250\237\344\021k\365+H@\310\215\274%W\273;\0335\2462%2u\006\034\034\001\255\006U\264\374\264\224`\221\305W\317\346!)7\212\363\263\340\207\004\r\250\352~f4DY\033\273\265\214O)w\362?\236Dm'|P\376V\262\234\261\226\203*W\3107S\352M\216\3400\243\364\361?\332P\340\017\365\367\025v\251\257\034&8\242\205\356\272\177\362g\320 \305X\2519\367o\274\354\231h\250\243L\017j\330\213\324\355\301\275B\034\360Y<\222\207\374\245h,\346\246\010\347\013\202\246t\013\003\006\370(\235f-\006Q$\2178\036a\274\256;s\275=J\246U\316\233\277\3753\030\030\335D\331\322\026\200\237\270=\324\250\025\312A\020\375\3552\003\004\272\234\346@\211$\220\375\353\263A\334\002\244TP-\341\nj\006{k\341\221\215g\254\216/\031GzA>\366}\344\321\354\357\250\224i\325S\331\351\367\374?o\211\255\037\320\265\222\024\371\007\236\311\212\354\016\345\003\036\246\264p\027\321Q\367\340\303%`\213\376\254\":\223;\204\3176\352_\373\361\177\205\030\366\313aUO\022\315m\354\334\020\251\225r\247\004\223\213\311\352\020\004\t\033\007<\207\305\034Z\017_\251\340\255\272\244\226F\242\222\017\376\265z\206\000I1\013\277o\2133\021\2730\362\034\"1K\355bi\261\245o\363\323H\367\206&\336\216\2754""\204E\306g\336\031\335\323\222\270\312U\321fJ6d\254\263|\003\025\372>\266\003\r\"f\030A\024\332\332\034F\225\2044\016\246\023\037\245Dc\305P\300\177\307\010\212#I\311\346\007\223\263N\003\001\260\322\353\365\027o\241LN\214\010\313\036\206L\364\232k\007\226<Cy\025\036\210>\366\241\021%\302\370t23(\312\\\004\216\326!\034\203\025\000\210%_\026Xw\211\202\220\313\261\003r*C\371\317\314\210d\213)ff\r\377\306\321\031\320\253\310\207j\207\376\016\374\367J8=2\303\020\322\326;\350\006\300\364\300>\221C`\366\367!\2360\000,!\001\210\373\345\214\223\335L\203\342\270=9\027\332l]p\016\370G\033H\005ch8p\003\272\2060\003\004\216\373\255n\263\330\324\035\023\010\377\r\367\213\260#\004S6\006\264\223\3566\332Z)\025K\244\2151\234\350\003\266\352\265g\244\202\352\274-\007\363L\243\206\245\351\377+@\334\034\202\273\321\010\336\360\006\232o:\006;\325DUajO*v\224\215\354A\323\303\346\251\246=d\337\300\226\237\315\354w\204\007AB\202.#}_7w\375\254\334\224S\2429\217\231w\237?\326M\221\353Um\240\247\030\305\037\275\367\3143\304\002\346K\347\342g:F\211\377\230^\240}\023\310My\314\343+z\364\355_\361v\232\307\nw\300\250\010~\224\336\330X\261+\250\031\254e\327y!\236\315\026\3330\023\307\351zXX\014WL1Bh\201*4|m\210$N\033\007x\320\243\037\334v\310-\352\335-\225<*\206\271\3748\267\233S!\254\341W\310\267(\003\237\016F\224T\3660\2077\177\177\316<\213\310Y\r,\237\315\337\034oZ/\376\206\317\352\243\354\004I\331(bX\273rb\324k\353\343H\205\251\216\351\027\025I\271\344\007\330\356|\210\236\205Gz\213^\300\263\253\2073\235l1\2540\257\314\323bc\"d\3716\313\376\001zX\331\205\370!\360\354\002.j\\\003\305\"jb\332Q\252\237\022\226P2\222\245P\004\n(\303\301\320#\031\177&\362\332\214\007\207\030\212@\210?\343\207\370?A^~\370\315\n.\304\006\335v\226S4\"\232\303\357\325\271dAN\177K\001'\010~K\325}\014^\005(`\241\343\010\032\321\322n\267UT2\334e\031t\221Z\375\207\245&\321\023\365>\215\344u)\354\200Q6\340\275\024^\021\tel\004\344\030\007\210\000Vm\025\232\212#\017)uA\323\257\030!\315x\313\016\370\223:\203b\307\330\237""\n<l6\304\306\353{\202\000\301\0342\233\000+\372\"\254\335\301'\304v\026\202\235\242^\351B\360\n'\362ir\343\016!w\352\231\335\226\307[|~\017\303A\344\236\343\221w\372J\245w\277!\226\224c\021\237\037Y\035,\353\030\002\022q\3027\312=>=\027\316\325E\360\000uh@\314\231\200\244h4\272m6\374&\366\021p@D\217\302\2205\266\2670\211\205Q_I7\307]\372p\316\241&\000\275`\030\014v\255\301wQ\270\227\252\277\271\003\030<Y4\004W|W\210\326\324\364Q\230/.\303\301%\340,\340\206\305^PQ\372\023}t\014z\362\225\0325\346\350\026\300\365\215\260+_\023 \2732(\\\000\246>\213\266\215T\3125&\265\373\t\201`\222g\0029\256\244\033\3459\300\370 \214\272 h\303\207\270\210\231\335\241\0348B\244g)\346_\240&\221\303b\301\351j\314H\002\303\300\314S\273n\210-\267\267Q\323\250\007e\t\312\262\035\262\227;\224\037\036\000\367I\325a\273\213v!?\305\246\213g\3317\007\266\\\006B{\264Bs\202\321\250!\002!-\204\0203\010\217\210&\263}\324\033d\355\362\235}\347\375\272\3416\205\300\241\001r\240o\326uH)\016\227\217\351\274\236'aR\201\330\253PM4\325\240\030\036\375\351>\213V`\007\250[@\345\337X\237\342\352\265\355b5\330\177\271Nu\366q\243\036\334\\\302\264x\274?\264\247\366)\006\201bAPR\343k\310~\030\305y:\247\305\257H\020\261w\021.\204\353\363 \202\221;n\251\237(\342~\312\000\247\243\264\036\2511\261\277N\274LGi\014s\330\326\254\240i\303f\261b\014\035?\201\373\226j\323\242\032\000\331i\025\001\363\263\234mE\235\307\215I\307\315k\030Hx\321\322\210}cG\035\213@\220\371\\n\225\360DB,\014f \230\220\021\r\234\001\2127Qdz\024\214H\027\006|y\3123\257\020\035x\200\316\025\023i\363\367u.\212\277\001\n\216(\004\034\272'\361ia\031\030Z\266\204\023k\3008\352\254\035\335U\242\233C2G7\031[\302\241\212\232`\237Xp\"\363!o\375\354%\267@\311%\226xd\260\260\226M\325\032\026\345hR\202\030m\332\004\341\251\350\225\377\373\207\340`0\260v0p\020mc1 }\003\303\270_5\312\370t\233\317\037\2107\004\234\202\340\202\311\341\310\232\276K\361z\220\177\001\017)(\024P0\343,\275\303\3613\252Q<h\250\241\277\347\267\254\375t\311\255\275J\270\210c.\035\237""\212\343p\033\366\215%\03448\t\303qP\306\250\311Y\237\213'\331\315\3712\266\005\342\233\246\t\244\301\341\257@\227H\201Z\201| j\227\254\315\206d\364H\303\212\037y\331\244\326\004\014\372\362\233\036\030\252\266\031\026\241PJ\215\215X:\361\220\320\270Z\")\013\t\270b\327\026\350kX\373\300#3\024\270\350#\314\201\250\235I\275\031\326\342\n\360/w\006!?\2424\246\352\347\001\020\n\2645G\205m\336T\316\217\0236\006}\203\205t\321zd1\231\3504#wD\250\2575\334\330\225\246\235A\237\203Q\227\022\315HZm\357\217I=\023I($M,\260'\3616\265\363\224\377\206\312\017j\333\335\366\030E\030\273\207\037\310\262x\240\t\343\336\262\010&Q8\221A6\342\325d\020\024\367\271\321\360\001q|j\034\234\242t\330\206=\326\272\245P\331\234\300N\027\t\352\247\247\021\001{\207\346G\305b\2569\333\254g\005\211&\330s\301\331\301\2138\347:\035\005\\\345\333\014\267\244\330\216\301G`\324s&tW\233q\361\024\315-\033rW\303\223[\001ku\316\213\261\023\345R\006\220\344O2x\325\256F\360\222p\3707\030\330\001\004\227\243\215%\214:\353\317?4\225\177\271\371o\371\356\221\035\255UU\210\373@cv\251=M\021\273\263e\"\201\215\n\266\314\376P(\325D'\340\317\223l\334I\203\2423x\033\264\220y*]\027\251\375\253\362\020_\031\315G\200/2wH\342t\302\030G\276j\0161V\340\n\221\326L\005\200l\003\315\317\203\203\t\303\030j\305b\017\265\275\241x\020\213@o.=\320\247&\014<^\353\350\230\262d\312J \210\036\377{\375J\242\335\334Y\004\255\036\n\307Y\022\300)\023\221\200\210/P\016\013^\343\037\357\227$\264a-\201<o\316\372\226\346\240\020\2343*\2506\214\320!6\331#x\014\036,I\225\251u\273\026\214\366\225\310]\324\344\324\213\324{Ev\t\310\204F\242\037+\351\204O'OP\357\223\263Y\244\313\"\204\3324]\001";
    PyObject *data = __Pyx_DecompressString(cstring, 4759, 3);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (4870 bytes) */
const char* const cstring = "BZh91AY&SYS)\325&\000\0016\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376@@@@@@@@@@@@@\000@\000`\024n>\025s\325y\331yv\335\272\032\000\363S\334\245\333\320\035\trna\353\246\203\335\342\367\203\333z\365\335\234\266g\274\347og\327\235\\@|\367\337xJ\022\0044'\251\202bfI\224\003\324mF\t\352\237\242\231\242=\r#\004\3652z#CA\211\220\310di\246\230jf\246@\320 \322\032\024\311\222`\230\203S\324\365\0365M\001\243&\206\203C@\000\000\000\000\320\000\000\000i\243I\251\242$\311\352\232~\251\247\351'\2504\311\243\324\000\032\000\r\000h\3022h\000\001\246\232\032b\000\000\002BA\0214\251\376\243T\366\024\321\247\252?T\375H\362\020l\232A\243C@\006\200\000\r\000\001\352\036\232A\240\006\200\032A\024\000\000\000\003@\000\000l\247\232\247\222\000\000\000\r\000\036\240\000h\006\200\t\021\010h\"b\t\246&M&*y\352\214(\375D\364\2324\000\320\000\000\000\000\032\0004\000\036\240\236N\264\324\312\317=N\255\211\236\\\352\357N\204\211^o\2441\373S\332\211\352\365(\206\340\236\301\217[\241\352\222!7-\352\273\026t\264\377\255\203\023l\033i\010llK\220\227T\2511\014\250\3066\210\305\030\004\211\021\0214\306&\234hM\240\221\300\016m\212\350\325\224+\334\300\322m&&\204\274\307Z\304\303\034\313\002\310\000\250V\312A\210h\265\276l\261\023c\274\013e\217cL\030\306e\014\201\337\031_\374\030\206!\211L\003\0245x\216\360U\254\214l\031\264@\322Y\346G!h\263F\257'\377\016?\313\355\277\237!\033\231\253\017\022C\224\323$qw\242\262\253\002\007\200p'\032\370\356\rMp\265Z\3030d\255B\025\377\262R\302\264l\300\317\020\325kIXl\014\3175\375\245\265E\326'!\344'\225\315}\241\204dvY\030%\324\266T:\342\353\230\306\265\234\370P\360\3074\205\264#\030\334\006\217\025\230N\225\251%[@\262\262)Q\272\273\344Q+\252\")\002!h%(\322\371\206\"\033\362\002X\261\270jB\230\377\311\204\212\003k,\005\301\267\365\203\014\341,\260Dj\325\010\212VfK\206\307\321\323\372\377\257\333\364\375\317[\372\236\214O\243\205\017\276\177\205\232HU\344\272\204Ke\017\347J\\\355{\331a\211\243\370\322tO\3426C\021\031\302mV)\275\213\025v6""\204\301\304\320\303t\377W\315\306\"#\005\2748\033@&\325\326)P\036\314H\020X\303\355\255\344\205\033w\274\310m\354\357\345H#\177r\347\000]\315\224\271\335\007b%\227U\251=H\2763\347\326\265\327\311l\360\216:\367\316\320\036\3330\276\005&\221\350\255A\007\203\266I^Ybm\374\313A\2135UXd_\251\263\225\t\236a\033\322\302\025I,U\267\231\311\374\266\372\375\210,\242x\263\031\032\026\206\030iR@\276\226\3039\tpM\247\t\001\255\274q\256\214.\235\0210\2218\323\r_\010\215\376\226\372\337\274\362\336B\313<Q$\244\261\211P\205\303\243\347\273\274\337\323\024*\001\\\000\361\351JR\216\034\247*\236wy\246\006\342)\01019={)\316s\203X\361\214_\225\305\020K\261\272\272c8\263\245\303\314\342\300\213\245\304?\022\375^\225\233]\377\321\234\372\377\004\354\035\355E\205\224\203\364\233\027\2463u@\254\327\201h$\215\225\362\252\304\273Q\230\222(lQ\037\321-\003\304p\214\005!\221\276\262\225\200\304]\255f\031\333\232\322\305a\252P\327\030X46Q}\237s\177A\366\374^\317b0g\210\250G\214y\245s\340V\3011/\030\345!\271l\033\327/\177\306\026j\277\373\"?j\312\274\014r\330\037Q\034\260\311m\301^\031\323\315-\357\"*\226\244\"\240\341\301\343.6\337P\346\361\357\262)\017\274h\376\246\270`q$\272\314\323E\236\261`X`\222\025+MScc\246\006\215%\214\220SA\226\033\\L\010\246\250B=\002\332Q\274Y\266\207z{\214HR\222\267\350b\nyU\304\336\032\232\203l\260\3461[\371\270\251n\n\204\217\215jP`V\005J\377\177K|p:\374\326\274G\254X\342\001\361\312\364o<?k\026-\035\017\006\247\207\035\374\352\325B\305F\002J\210\"9Q\014\265\226\204O9\002\002\211\200\271\r\010\226\222J\254K\352\370\366\235\211.\303\313\313\311e\360$\037\017\021\2049\\\271\207\004\257\222\307v\024\300\267\032\036\307>\005\034\n\310c\344M\n^'\353\303|\370<\311u-2\341\325\014U4\256\257:c{(y\030\026L\316\277%\210a\216A\324\014/\221\235&\376l\256\321\217\232\350\023\242_\1771.7\200\345\304\226\242\300\353\212\205;\233\356\n\302\243\t\265\322\340c\312\215\0046\312\223\307\003U\263\230-\030\205\000\340fb\262\201\337J,\034\227g\311t\250\321C\021H\r\215\274L\032\006\354\222B""\016\213SH\274O&L\304\343ZVI\"\220M+X\221\320a_\213w\220\035\241\221\274\020fq8\307PK\212Q\244\016\204\233\365\254\246\235\252@\333Ll\220\342\274\274\214\321\333[y#%\221&g2\262\215\216\004b:\0106H\350i\265\366\237H\330\364\236\343\314\222\307Mo\347J\213k7,\223\316\321$\226jG/<\326\276{\346G`\243\177\036\355\014w5\327\312\346L\300\014\366\364\030_\021c\036\314 \357\266b\t\261W\306\312\250j\2404\333Y\007T\311|q961F<\343\006\303>&\365;\314\326`I\226H.\215@;;\273\375\335]k\033\346\272\030\036\035{[nS\003\245w\n\024\356\346\311\213t\220\3518B\260\321pc\260\265\263\343IU\322/3\222\233\205\021\221/Z\260\235\326\2272\232\311\223\321\303Z`\213mf\324k\005\325\264\235w\331\3068=\207\254\207\004\267\205\024T\345*\343\030\033:\030[\221\224\315\rrL)\201\033Ll\035\314\260{\3531\244\371\204D\273\223\001\335\301 \342\256E\324@\214&\220\272<\225\214\331 \3710\214z\232.\022\203\361\355\332\210H\312g\227F\215\032\3324Y'twww\371\342\356\352\360t7w\2050\026\335\246\275l\026\032P\\\340KOmTf\nf\240\314(jK\335\014cm\234\254(aAL\351\366\254\362cq\177zt8\374\274\r;OZ2={\023\305\265\264s:\275\323\311w\262]\203\013\023Oy0\246h\n\362\300\316B\371\332Pry\242\310!mk\306p\346\306\251fU,\025\313\361\325p\303\205\255Y3\240\315\206\37288H8S\252\227\013\253F\341P\361\343\366\345\375\212\2344$\240\034x\202HV\\YNf\226\313XP\210\n-\346eC\331EV\017\353\336\n\343f$\330\233\023B\tcd(\203\204ci3\233\314\377]\326\301\217\302\362;\246\300\345\355suz\335`\336\330b[zv\000A\320\311\356\003\026\023\013e]\352\t\215\001\312\235\260\232\2058E\213^\346~\005\r,\007h\302G\216P\226Tm\2010K/EZBL\236\210\257>\016\362\324\320\305[J\205\361Q.JVU\020\245&U$\2574I3\262\33418n(e!A\205\303#\315$\203\023\r\255lrk\023\004\243\235\014\256;\245N\243\033I\261\264\243@\321\006\345\255}E\021\26502\2150DI\223\300\300\251OF\331\307?\r\252+\234$\360\335h~zE\036\322F\270\305\032\301\2335b\033\216o\177\347\374\355\220wm\321\3074\202\365\204\332\364\037e\211\013\257rG\207\025\247\205u9L\203Y\244\264\226Jk4#,\241\026\247\273\r\312\2549\001""\001)S=\236\366\251\205\t\010>_|c\030}>7n\376!\342/g\261|\262\335\030S\274\"\250\034\323\355f-\336z\205\316$\216D\364D\234\217_Cm\267gC{Nm\343\225a\362\231\243\022bsF\362\254\214\244hl\322\326\230\232t\001\216\215\0130\260\230\234\274$\325{\314YOtz\354B\330\020\365K(\270\340H\276)\023+K\243J\243c\271\371\253\203\3229\211Q\223\227-\233(t\275\006\306\250\026\034\010i\220\210\204\334\017p\302I=\241\354\370[\357\352K\260~\336:\235\034\032F\213t\021O\035\271\313X86\331n3\213\0206<\0246\237\231\256<\3110r\332\2123\014\352\223[\230a\0357\307L\222NL\010)\213D6\231\265n\345\026n6;\203\315\013\203;k\013\026%\313\337\004\215\316k\253\265\027\336J@\261\335\330\364\377\257?\322\372\235\213\255/\003\313\217V\274F\323i\356I\352\267\354\0065m\323-:^\304\212\220\006\0048Z\224K\007\306`\202\006\000\241\005in\233\026\317\2309\234\371\260\247\222\262:\260s\017\222 \346J\371cl\351O{9\tJ\224\303\n\3107\340\347~q\231\266\340f\312\007[\301\022j\033\311\210\246\222A&\241\215Y\224\0207utP\276_c\370sn\336!\205\003Dq\337)\023\251\277W\274\337UC\031To\333b\327\307\021fo\271w\244\234\207\216x:i\246.\322Kio\202f\360\r,\253\353f\261T[\216|\314\005\000\254q\007\310\213qZ\210\032|C\202\007\355\000Jp\206(N'\203\314\2304h\302(\260\001\032&\245\204,\006\036%8\016k\255{\317M\001\245\312D\314 -\036\266\333\365* \341\266\3133>%\271\362c\177\005zUpm\022\216A\0321\372\rO\237m\333\204\275\010:\017A\353\331\364\235/\241\2072\253.\r-\306~\036\036V,\371BX\267*N\271H\024\300\3222\314\226\313\002HQG\t\003\263Q\34121\310\220\251\347\\\336\222\333\354e\243\tZ\231p\367\233\3611\r?\317P\nii_\245\2411\214Z\014\313\014A !\264b&9}\020\2538P\241\213)J\003\222\255[\2520/\201U\264\365i\200\3472@\3071\t\013\237d,\\l*-\215\275$\0131t\344\327^\n)\274,\0303xfP\265\014\345\033\016g\262s\230\243DZI\234\240\020c\344\322\n\315\210\013x\302\301\240-\211y\305\213u1\310\241\355\002\333k[\031\256\031\204\311iH\231\231\255'S\204!lh\254\255m\331,H\310\246\221\224\303\201;\342N\032\355-\305\216\271Y,\236\226\305L\031k\205\271c\006{\230""\336\031\001\341\027\226F\3764\310{L\005\330d1gj\024\314cu\227{\220\251\024\274~\365\343<\025\361\203Y\206\3715\231H\021-\034,[\215\ru!\034-\027\343h\316\206&\227\225\000\304\025\032T\327(\")\014\242u\020+e\255oa\307-\025d2h\307&\306\330b\016\205&c\032\347cJ\221]b\233\221\361\234\276\006\375\371\240{\0072\347\371\341\001S\335\216\026\034k\331\023\345Wx`\214\2566i$0\"\026S\275\315$\023V)v\370*QfS\007Q\030m\271\345:x\202#F\326\021E\240\251\237\023\234\234-\3102>GF\233\352\345Zt\361\372\306\242\207!\236}J\246J\374\221r\350\317\354n\275\300`J\006Z*\t\254\374%R\331R2\024.\204=\234\262\024\225\021TT\370\343\212\204{\322\010\202\2748/WA\341'\306E\025'\201\371\"\261\tn\r\312aP(\022\2311\344\325+\374\272\242\\\236\342\2256\232d\224\302\206g_\254s\235=r\216\301]\237E`B[\035\322\305\305\273\334\332ry\022B\326\330\3250\247\216\311\246\371\342f\323\250\276\320O\223!\005\251\367\213\312<\215\375\370j\2144\317\340\327vd'\360h<\366\307\007Hy'X\346)\253j\360\206\304\203\325\300\313!wy\227i\365=\333\357\315\2246\003 \034fA<\372%\014\\\355s<+\323BI~\215\347\007w\306\250\313\200x\036\013\201\367Du\372r\327\226\311\351\335N?:,\360\366\361-\322\212C\031z\006$\241\235\310\261\216\2653\302 \371\263U\243\030\372$\260\260J\225\246\273\256|\331U\014\020e8-\356\343\014\014\313\rFSp\010\260\362$X\352\276U\241\210\300k\352}\305[b\303\252D\021\023\262e\206a(\021Z\025\306Pd\n\334\325\0033*\256WXrt\367 \023*\354\335g_m\006\250\304\\\201\274\273\317y\030T\301H\333\\\030\322#I!\204eX\267*\364_\244^\357\226\026\336\352\210(\240*\255\364M\360`\257\260U\3145m\023SZ\322\265l\307\354,6\037\270?\263\324\225p\263\224d0\327\315\025=\265O\264L\241s\313\244:~>\257oo\r\241B\032\033M\256\340\300\257Y5X\347\353\033\237\272\254T\362\337w\035Q\355\342|\215\353\3311\341\364\024\t\337\254\217\336\214\365\247U)en\336z\202P\322\033Z\235\375\253\010\267\256\025.\265\260\200}\204\343\016\270\nF0\026\363\313g\225ND\321\304\252\253V\3003\022\354\320pi\201\\\333\210\304A\023\303\366sM\366[\260\023K\322Y \211h\216J\212GJ3""\\+\207\255\343)\311\225\244\002\353\245\371\337I\336c8\034\232\335\337S0\306\251\034\321\200\347\037\255$9\311\325:a\007\236\211\nX\201\266\350[W\360\3468\210\255g\024pf>\010A\234\273\313J\350$.\324B\013X\334\225\270E\214\275\266\323\317\332y\003H\275\266\235\303\326\252\3266\365|\025\266\272\235O8\367\207\301a\312G\010\311\311\235\007\300s\334\335\332\030\010ba\006I\001\021\257\320;\257\274\361h9?V\332\261MnF<\nD\t\242\274:\310\267I\326By0\024kd$\301S3\003\247\275?y\227I\022z\013\262\221\264,\3507Ul\3414\234|\371\340{\016\321\204\272\227\275\035Y<\325\343\331\023\266v\327q\246\351\273$\306\323~3B\373X\335\2501\261t@\212A1\301\303\327q\244\265\360\257\243\247\262Q\326\313\367D\013/?9\215g\325\242\3627V}6\354\244g\026\337\035\372\371n\260|\201\362&\271\036\336p\322\351z7\020\nMP}\350\206\266\230\364\3533\001\356\341\"\313hv_\236\356\303;\275V\377YIa\247S\220N\342\236\225\352\nD\317k\003ra\003\262\224\304`5lkCl9\255\372\345\3072\3315\307\034qk\237\030\234n\214I\210U\317\n^-2ERwD\260\302M0\224\306\350\246/n\356p\006\340\314\033\014\235\024\333\312w\236\014\320\317\017g\005\201\242\\\312\253\363f\025\265\275l-\226\315\321*\220P\246\234f d\276\n\310\254&6\270\354\331}`u\210\307\\\200<\353\236=k\201\235&\004\223m\246\236\355#M\021\203\300\272\277\334\343:}\030ME\367\205BT\305j\036\0076\2725\331\005ufG\212)f\"\337\314/\0375@\344\220<\340>rED}K\3440\325\305)y\t\322\330\243d\210Yc\214\0367\3545J\265\322\242\223\372:\275*Y]\271\203;\251!\177~\325\342\365\3241\241\253|~\256\363\341\3560m\013/a\211=\212\223!\364\344\\\322\017\307|\252E\226\342}(b\250\2063\350\345\274T\365K\370\363:@\223\026f\025dF#J\207\317\274\250\253N7\002&\020HA\351\314\027\006\202\225\336x\207@\035\200\303b\023\027\362\2616\223\004~\331\365\230\031\265\001\326\373P\301\263FG\350\260\006#\237\312\010~f\316\"\003\370Dcl7\234\345\3303\274\372\004\302\252\007\240\317\232^r\254\265\022\3028\3769\337T\225\077\077\3520^s\302\260\212\0361\274\361'\352\247\342/\274\014\323\006\323;\001\200\031\302\270c\037\304z;""\237Z\235\344w\231{+\342\311\036g\336G\277>\304R\250\364\030X\027\223\351\257\222\207\364h\0354&\317\247\276\241\272\243?\375E\243\325:\372|\316\323#\347Y\202\014~\027u\034/\3419\3501\242q\362\004\347\263\373\202@]\371#d\227\3741\326\013\035\210Ll2B9\220\026\316\340l~\205\304QE\210\220\257[\333\350\177\336\000\311\020\010\356%\202i\225\001\364\332\316\020:F\352>z\233\006\016\020CI\0060P\205\225\222\247\003\316\351\030D\002'V\014\264NC2\234\333\027\350\314R\241\265\000:\016A\370~ \335\035\264\273S\031\242\343L\306\210\343\331\306V\320].\357\231\221\376)\207\215\265\241\336\001\376\246.\007\217\026\354\336,\346\315\257s\364^9s\262\315s\350@\262\232\212\253t\323-X\001\262\032\316\033\253\025\223\"\326=;g\036\333\332^\3433D\363\211v\016\266\3274Xz\222\366\224\025_\232\352\251\320\351\267\262\366\006\350:\374\323\026\376\351S\237\256\300\253\355.\312\214\315\177s\227\314\274s0Hk\252\342\300K\326\327\2748\262g\311\323\3153szK\3055\256\347\334\255\333S\207\261\\\324\251\266\273\033\007\273G\205\312\325\223wh\332\307\320(\343\\{F\034\372\177\2715\323}\207Qo7\032D\274I\3316\373\276^Tf\024\275\2547\005\020\356L\246\357>\347u\275\377&\032Z\304\234\223\233\214\364\016\337\372\276\303\253/|\323\251\316O7\243\371:'\220\331\316\340\254n\327v\0340SWC\316\211\240XY\3179\267r<\373\305Uc\021\"\036\326\222?\342-R#\036\237\013\321\226\274<6\002\020g\246\332\3218\325\315DQ\217m\320\202\345\230u\360-Y \341K\332-c\031\004-\002 E\354\325-o\213\017\212\001\264\306\252eF\341[\034\217QZ\201z\214\200\030\234\034\250\"Pd&u3\202\234\265c\021KA\205\200\233\275\263\240\233\t\355\3658\217\207\203M\317\203M][t\340\264~\346\022\256\221w,L\033\260\242h\206\351\032\246\324)\260\320\254_\370\273\222)\302\204\202\231N\2510";
    PyObject *data = __Pyx_DecompressString(cstring, 4870, 2);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (4874 bytes) */
const char* const cstring = "x\332\335Z\313{\333F\222\267,\331\262%[\016m%\331u2Y\310qb;\017M\364\360c\262\331\231\201H\220\302\n\004 \000\324c&\023,\004B\022#\212\244\000\320\226f&\337\247#\2168\362\310#\217<\352\350\243\2178\362\250?\301\177\302V5@\240\001R\331\231\335\333~\237Ev\375\272Q\257\256\252.\260=\303\266\335C\253\341\326L\303\2555\033\314\276Q\253[\325EF\256[\206c1\346\241e\0361g\3156c\032\r\306\266\214*\363\205\303\030\215*Ss\231\232\3034\232.c\035\267\334\263\305\2315E\320\264]\004\335f\223\331k;g\213\213\213k\315&0j0\257\215z\333b\254\323\226e\272V5\205:1\314\331v\323f\336\034\202\006\214\331l4\000\2545\016\200\035\263f\327\2017=\337\262\354\375\246}\214\363N\363\330b\232\000\020\013\370\206k\035XvFb\nM$\316\360\016\023\351\r\266\325\353g\214\335n4\200\351\037\304\246k1\356\241\3412\3713\367\020\034\003vU\255zm\017\305X\260\320q\355\032\260\260qQ\203\2219\371\333\325W\253\3043\266\36530w\030\247\275g\326\r\307\001y\315}pH\255\016\3460\356Y\313r\026\031~\237x\265aYU4\260\005\353\350\007pO\030\307rq\300<1\032\340gb\235\016\217\203zO\230j\315F\367\274\266\360\351\242Qw\254E\271f\036\325\321! \r\264k\233.sl\035\203\302\310\331<d\014\370\266\352\373\213-\273\331r\230\343\266\3432{\304C\365\232Ys\321v\353\004\234\003na\336\324\334C\346\217F\333m\352-\344j=\325\354\266\365L\005\233\201\177\332\265\025\255\370\355\253J\303i\267ZM\033\037n\031\266ql\021\327\200\255\3373\317\376`T\253:X`\355\331u\243U[l\235\235\316<\205\261e\333\215&\354t\273^m<q\207[\216\006Uk\216\261W\267\254\006~~\303\034\030\265p\355\201YsB\260\372\r\003\233a\20601\353\020C\024\343q\217D\317k\213(\003\314\014F\016\267\260\271\207\033\303@\3340\255\310WO]\333\262\230}\33388\206$x\026\032~d\2351\254\232\347\371|EQ%E\0278v\213\213\306R\261\230\217B\263\331HF$43\344\242\256\327\0325W\327Gq\330\236Q\030\334}\230\305\016\233\216\233`\360\244mU\333\246\245\233\304\"\232\007r\265\\\007\302d\354\254a\232V\313e\353\365\r\353\314\031\301\001T\214\306\2015v\206\006\315z\323\261\3069`\021\334g\331\212\361\246\334\254ZYXs\317~\005""\336\006\237\313\006m\373\"\304\026d\022\310\316\247\037;\260\\y\030]\024\\;h4mk\324\270\020\037g\\<C\203P\223^[\243&\020x\324\204\226\321\246]\261\210\305\221h\234E\320>\255vl5\333\364V\302f\025\233f\333IC\343\254s\316\032&E\266\033o\014\327<\034\267\362\352\t\273\346ZY\272\320t\235,\246Y\247n\201We\201\335\325\013\\\221\255\010ZA\322\226\340o\031\376V\340o\025\376\236\303\337\013\370{\t\177\257\340/\317\345%QT\270bE\345\n\034/j\n'J\234\250q\212\002)\303V\264u \370<\253\361\222\030b\364z\002\024\270->\317\255U\324\335\210V\370-N!\343\020\340\312\262\266\273\301E\323\234T\014\007%\226\207A8\346\005\201+\261\202\316\213\252\246T\362\2114^\334b\005\276\240\313l~\203\323\262\230\302\226\021\014a\201_\313\307\014E\251\314\225\303\241$\213\222\246Vd9$eE\322\244\274$\350\240\244\032\313Q8\266 \211\302n\226\251Z\311\3479U\r\t8l\0223+\342\206(m\213x\270\3214m\002\330\254\347\313\005\235\0258EK\010\255\244\304\204,\026\362\353\254\242\306\200R\322\313\254\272A\323\352:_L\036W\345\r\030\310\372\266\244\024\324\024Z\340\004=\315\014Q\360>\270F\344R /\026`_3\220:\346i\205\223\307\240j$i\004L\t\3224e\r\200\r\032(\2104U\221ij\213O\244T4\210\036\231c5\032Q\001\210\271\255AD\304ca#\3455\244S^[\223\350!\034\013\324\224\"l\254\025(\252\222\207\274P)@W5V\321\322\200\024k\236g\345\224\225\371u\350J(\"y2/\360\262\316\026\ni\032\342RLCy8\265\2244\"\311\273)@\344\266S\264\302\251\350\260\024\246\302\321\227\006\326\245\344)I\220\022\031RY\006\263^$4\024\200\035\215&\0256\257q\205\024\"\t\t)\357\246\202\004\201T,\020@\341\362Z\nP\313\340\327\224G\022\224\266PM\307\021\320\353|\201\243\310\377\204\030\337\242r\014 \225\377\023\275BS\350\307\251H\313W\264\314\026T\2645\256\304\213\024\235\262\244\242\321v\02485Og\002\322\260FQR\371\201u\271\034K(*\034\227(W\334\346\305$`BJ\335\340e\032Q\2644E\317\227\240\234\321\n\"\r\036\214\315-Uxj\210\361\026\326#5\213\n\274\252e\2612'VR\030\324I\035Bak\004\024\251\200\211AY\341R+\351\234%4\344\022KJeJ\0338Q\240j\217\205UN\323x\261\224\302\327\241\326""\3234\257qepr\332\032\002\n\354\0300\2539\001\263\232k\274&\304B\3269!v?-|]R\265|\262\317H\246R7\004*Z\212\226A\247\204C*\030\326S[\0175\033\017b)I3^,J\3031\326\2148f\005\021B8!\n\324\004\025\351\202\230\324\3372\233Wb^\270\353z\221\007\017\022g\244`t\341(\212>\274\002\215v,5\201\336\035]NP\201\333\342\204Qx\204\213\306\306\343J\342?QJ\n\263\270S\340\213t\026\022@\020\0232}\n\212;\342\3326OM\313%E^\247H\005\312$\265Z\005\217\347\343yx\273\240\263\020vUM\016/\244\350C\005iY]\246\311\035z\261\306\245\010\354\031\312R!\003\256\363X\363w\307\202#O(\031_\020 \361\005\370\270(Hl\201\246\351\334G\032\316\030N\243\001\372\200\221\225\2643e%\345LYI9\023\310\2243e%\355\314PZ\226L\235(x\342\3019\201\247w\032\201&\201\2439i\225$/\024\211\212\025B\204\265Z\220\362\3515iQ\004I\363U\241\313f\327\244\304\001\004\020\004\232\\\343\204\344\300E\240\210[\244\320\310:_ZO#\264`BK\225Bf\205\264\235\006\324QD*\322\202\362J\272\205\t\201$S\240s\203#mK\313\322\251\322\030\203ti\204\210\240{) \351\243\007H\322\330\361k\340@U\327\330\265\244\206\342\334\260\261\200B?:\t\3435\211U\n\2433\002+\226*l\211\303V\276\310\247\347\260o\311<A\367\201\330\002\215n\271\312\357\320\331\251n@G'n@\370\322\020_\020(\032\336?8*\276Ig:z\356Spj_)\230V#\201\345m\2450\006\306\236?\r\34317F$\201GE\246s4\304HA\037\345@\340Q\016\244\244\217\256&\360\025\253Gm!\360\250-\244\320\217\362\016\217\205\021\336\004\036\345M\340\014oA\030\273\007C8\303d\010\247\231l\320\007=\276\356\310\0251\257\245\217+\362\026\224J4\002P\211\266\315k\371u*\321\":\235hC\220N4\215O\244S\014a\230z\231\321\244J~]g3\264\310&|*\"\027G\261\266\243\341K\033U\266\"$\365\006\022aT\361\037\"\264\251\025x\355\345\223\356\216\274n\017\tH\224\244\005\001\"j;\340|J\336\332\220\210S\265(\260%5\236\013)j\262\004\201,W\264\344U:\201\340m\014\312a~#\203&\357+\t\010\235:+\207\3574\t\030u\313\t0\3544\022d\214\"\261\265\010\301\333$\274tW\204\357\262\300\022\r(PNY\225\033Be\211T\301\370\200\2420PSH\324\214@\350\371\271D\013M*\225\004\216rX\014A[\222E\310N\224""\331\035\374Rw\313\244)We6\317\r\201\002\250\246%\224\264-\016\307Q\363H\206\304{C\252\270\224\214\276K\206\024\272\234\014W\222\341j2|\236\014_$\303\227\311\360U2\374]<L\330.'r\227\023\271\313\324\202D\356r\"w9\221\273\234\310]N\344.'r\227\023\271\t\257\225D\356J\"w%\221\273B\255M\344\256$r\0230\301\022U\022M\022Eb=\206E\t\307p\\E\257\300H\r\303\203\214\241\356\0259.\336;\031\017Oz_\t\020f%\222\nt%\361\303p\230\016\207\025\221\317GM%!\311\003\332\256\314\351\321[\017\031\017\243\220\020q\262\204\324nY\032\336\366\220_\311\323T\374\263\373\010L~u'?\315\025\365\222 \255\261BD@\256\307c\250IE2\324\331J\201\207\026 z\321\r\2615\251\"\222\237:\312,|\203JhJ4\227\027x8\027\261\211\225\024\0364\035\202r\330\201\220\337CD-\202\323\034\240\270\226\271\3613j\005he7\236\204J\301)\360\316\313\342\257\235z\036\017\032\374\225\342\212yE\332\016K\340\325\363\204\207z\305<i\202\206s\225X\373\360.\204\374\236\242C\321\312\203]\260\371\343'y\251\220\232\300&)\004\n\\\021b\252\020\375\326\233\361f\370\203p\326\300\010\345\261\003\341\213<\247\244`|Y\021R\210$b\330\246 l\301#\215\206\277tS\374CUP\217\0240\272O\231\211\3246Es#\213\241\325\004\207h\273\372\026+T\322S\321\357\310!&\300[\255\002\334\206\3330\036\2457\247\314\301\233\"\244\037\211\344\010S\240\320r\n\370\227\332`x\223ay\221\332\003\310\366\021\361\370\303P\344b\340F\022?ZM\362oM\202c\203\025)$r\002\205\250\320\257\213%\n\250\360\242\266\364\"\003\254,g\200\027\253\031\340\025$\354\331)\374\025j\246\253\213\326\251\253X\373\232\026_Nl\343\245\205J.;\251\341\350=Yzr\344\242,u;\226\271\022K\356\301\214F\265l8G\206}\320\306\333B\003/fj\315E\263i7\333n\255\001K]\327f\033U\374\222l\274\316\013/<\207W\235{\355}S\2576]\007>\355\332k\3136\365\375\272q\000\344\021p7\365\006\374s]\034\221+T\023\365\204\217\366^D\272\341%\222~\014+`\035\371\300\341Y\3132\365v\310\230\334\315\232\372\033\243\346\232F\275\276g\230G\005\3035Lr\341f\356\267\033\246yh\330\300X\327\311]\263~`\271\340\232c$\301\004(\235\272k\303r|0s\331g6\253\226\331<>\0067""\230m\333i\332U\260\324@\254jU-\307\264\311Gm\317\212\356\355\2525\247\245\326\376J\276\353\306\231\330\306\273\350\210 \370\221\251\203;\310\207\353\204\036\261\254#P\0259\322\367\211\364m\341\270\233C\300\3543p1\230G\034ma\301'\037\216u\212\273\007\332\247\256\024\321\355\304\365\350\020]\017?\207\267\314\340\021\001\366\314\260\317\266,\333\201G\351[G\035\035\026\006\217\216\227\263\265\324\335c\346\3021\271e\034\236Iz\315\321\343xA\277;\260\365d\0071\004\352p\\5\226\350kH\372\3561\276\357\326\365c\003\366\t>\177n\202B\240\227\021\356\245~\\k\020\244Ym\327AA\030\331M\035\275S\263p\3269\320\365\006\330\241\353M\033#\231\304U|]\337\002O\222K\315V\263\245\353-\333\202\031\013\007\315\026<\334\2024\214\354>i\033\365\220\215\215fj\240\275\016\261\226\020\270\1774Eb&\001\300\324\204@\333\243\213\322\321\373\3228\217\365\221\214\216\001\353\024\207\007\260Ok\360\331\010\207\030_`@\035\"\331\266\\\370\007ya[\257k\270\235\370\277\005\260\002D\027\260Njw13B\333`\004\201b\264\353.U0\3641\305\003\000\374\177*\216\0032\243&\003>\034\362\177%\206\311\213\245B\327]\313q\361\363\324MR\031r\030]\220\275\325%y\034\376o\225\360s\351E\370\275\262\034~\277X\r\277_\275\301\\O?\234\246\026\177\2507\241\0268\277_$\371O\356y\311\007\033\0252'\276\016\216\357\200O\317\310\177\353\270v>\361\376\316\265\351[\203\231\317\273K]\266\273\335c{\333}\266\2779\230\270\355}\354O\373'\347\271\367\363\327&o{\223\336\222\307\016\256\317\006\263\337\222\025\332\305\375\213\245\301\365\233\347\007\336\256o\014`E\316{\344\361\276\326\311u\036u\330\316\346\020Z\367\013\235\211\316\375\316R\207\035\200\240\311\371`\376\033\220\242\365\347\373;\027\233\203\231{\336\211?1\270~\343|\333+\300\000\236\372\314?\271\234\234\361\026@\364G\327&\357x \346\326P\376L0\263\330;\350o\366\253\027\217.XJ\376-o\302\373\3203\375\234\2770\024\363\244{\322\233\352\025\372\267.\246/N~]\020H\010n-\365\037\364\013\0277/\252o\277|7\027l\375\024\374\244\007\372\177\241\360)o-\230\373=L|\375N\0136\377\022\374\305\010\214=d\245y""\017\375\225\320\374yO\361N\006\323\263\336\367\276\332\231\210\220\340\336\217\301\217\300h/\3303\207ss]\253\267\332\373\333\305\347\027\225\267\213\201\254\006\352v\260\r\013\254\300\3729\370\371(\341u\035\034\030L<\354,\274g\210\033.\257O\016n\335\036L}\030|\370Ew\263[\355=\356\035\006/\224@\001\026\332`\022]\241\371\367\375U\377\227n\271\377\360b\345\242\361N\010v\200m+h9\201s\032\234\236\r\246f\274E\320\356\326=\317\001GMM\237\273\340\336\033w<\366rj\326[\n&>\013>[\355\263\357\037^\233\234\365\026B\013s\203\3119\317\270\234$ka;\363\376\311`\352\256\267\345\277\354,t\226\310\344\320\343\317z9P\252\332\177r\221\273jG\357\\\003\023p\355W\275\005p\303\311U\353>\370G\326\005\023\020J\260t\362\276\237\243\274\363]\177\002\242K\273\370,(\231\201Y\r\252\326\377\326;\177\363?\3677i\377<\351\376\022\272\347f\350\031\230\031L\336\3656/\341C\365'|\002\211\235'\335\\\367i\357Q\017&\247\317\337x5t\031\350\353=\367\247|\0268\376\263\216]\352\347\372\217!\346\237\276}\366\216d\2351\230\375\200\210\033\357\226\307]\366\375\3345\340|\204K&\317\277\367\210\314\212\367\004h\260\253\035>2\347\355\371\327\301RX\350\200v/\300?K\0030\3649\240\217\374\022\344,\337U\272\016\354\000\2503u.\371\344K\304'\246\316\327\221\207?\217\326`\304n\371K>\013\033\007\261z\0273\365\036F0:\016Mx\020<@\023\026.A\211-o\3053\206\352\022\245\276\364'\221\363\315\363*(\361\022\\\276\323\321\272\363\020\342\007=\265?\201\236\373\n\275\226YlA\344\206\001\354q\220\366\217}\263\223\033\334\300\034\333\364\215\313h\246D\3223F\207\034\202\007\340\241\301\215\231p\014\331\024\215\377\357\234\323\206l\016\246\356\000\217\217\241\002\302n\317x\237{\233h\373]O\357\224\260\340\342\360\317X-0\216f\357\373\013\260\367O\273Oz\037\203\331\323w\274\242\377y\360\341\323\336d\357y\377f\337\204\244\032*7\353-C\211\200 \305\375\232\363\232\235m(\336\2338<\002AS\267\274\033Q4b\350z\025\377\013\377\2443ABx\334\362\331\320\320H\"(\375?\211\271\347\375\035\002\224\026\003)\340Y\376s\264sTL\264<Te\341\377\227\230K\010\344\207\030""\372\227\231\032\370\354\342\207\267g\201\274\033\354\376)I\322(i\303\340\217\216$\310\231\207\331\234\271>\211G\337\203\340\376o{'\375)8\225n\277\375\364\335n\260\265\215\271\366\t\344\331\304\373\231k\327a\036\245}\t\345.7\230\230:/y\253\310\340\2267\207\0019\203\005\374\346\371!X\262Dj\013)Q70Z\241$\014\240\300\223<\234\303Cs0\031\226<\214\303\244H\373e(c\217\273F\266\310\234\223\234\374\332\337\014&\276\352}\335\337|\377h\\\316C!\316j\037l\357 \257\035\364s\\\001@\225\333\301\355OH\261\331\355\031h\341o|\203rU\356rxv\303\230hG\016\247\310\337\303\243\320\270\352$\271um\366_a'\347\241\246\300\323\227\244\364\316\303Y\220\033\314b\323S\350M\204E\332 k\207\205}\306{\014\336\271>}\376w82Np\360\01362\024\202m\001\213\364_\261\306\346\202\334\260\205*\366\027p\366\236\377\246ct\\\222\3463\237bK\3249\350VP\323\336I\330\321\274\204P\374\035\026\202A\312\300KRO\241\253\t&\026\301\254\007\363\203\334\375\301\007\271\301\314\354\340\356\334\340\316]\374ww\016\002`\250\353\274\277\321!\007\344Oa3\002\272<\352\222\323\373G\377\201\017E&\347\377[\227\264>\177\016\013T\316\377,|`\023\307\377\322\311\305\343O\240K\033\216\037B\230\023\237\346a[\023:^G6\300\027\273\013\335\325\256\333[\352\211\027\013W\357At\232\207\331\361+{\005\003\330}\322w\336\017\367y&\312\250`y?\330?\000\234\034lXa_\205\346b\236?\201\266\023\244C\342f{\221+u\232\273\006\225\334\nS\346.\024\006\033\2671,\335/B\267a\014\034\204\371r\363\334\204n\366\313\360\264\234\361\276\200\325\017R\007\344K\024\204\245\342\372\235\340\316o:\261\032_v\rp\316\325\215\316\340\372\007\376\355Py\314U#\372:\207\302r?\270\377\357PD`eXr U\353\260\016\234\362\003f3\264\302\030U?\366>\355\377\370\366\343ww\002\255\202\275\304\2117\353\177\217\265\n\003\351\243\340\243\337\242hl\030&1\204\331(\257.#jr:\230\376\244\363\037$\007\202\351O;\345^\216\306\356y\277\300FOAs\374\260\363m\367\344\022\212\344\214\277\020W\037\354\260o\222x\036\251>W\027\030\210\246\377\006B5\251\235";
    PyObject *data = __Pyx_DecompressString(cstring, 4874, 1);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #else /* compression: none (12437 bytes) */
const char* const bytes = "\nAuthentication failed. Please check you can read %s and it is not empty.\nBRLTTY is too busy...Boolean value expectedBoolean values expectedError while connecting to BrlTTYError while performing some operationInteger value expectedInteger values expected\nIs BRLTTY really running?Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.Pickling of struct members such as self.props must be explicitly requested with @auto_pickle(True)String value expectedUTF-8Unsupported parameter type: )?add_notebrlapi.pyx\n(brlerrno couldn't connect to disableenable, gaierrno gcisenabled, libcerrno self.h cannot be converted to a Python object for pickling(tree fragment) with key ASCIICURSOR_LEAVECURSOR_OFFConnectionConnectionErrorConnectionError.__init__ConnectionError.__str__ConnectionError.authConnectionError.hostConnection.__reduce_cython__Connection.__setstate_cython__Connection.acceptAllKeysConnection.acceptKeyRangesConnection.acceptKeysConnection.closeConnectionConnection.enterRawModeConnection.enterTtyModeConnection.enterTtyModeWithPathConnection.expandKeyCodeConnection.getParameterConnection.ignoreAllKeysConnection.ignoreKeyRangesConnection.ignoreKeysConnection.leaveRawModeConnection.leaveTtyModeConnection.pauseConnection.readKeyConnection.readKeyWithTimeoutConnection.setFocusConnection.setParameterConnection.syncConnection.unwatchParameterConnection.watchParameterConnection.writeConnection.writeDotsConnection.writeTextDISPLAY_DEFAULTDOT1DOT2DOT3DOT4DOT5DOT6DOT7DOT8DOTCECONNREFUSEDEINTRENOENTERROR_AUTHENTICATIONERROR_CONNREFUSEDERROR_DEVICEBUSYERROR_DRIVERERRORERROR_EMPTYKEYERROR_EOFERROR_GAIERRERROR_ILLEGAL_INSTRUCTIONERROR_INVALID_PACKETERROR_INVALID_PARAMETERERROR_LIBCERRERROR_NOMEMERROR_OPNOTSUPPERROR_PROTOCOL_VERSIONERROR_READONLY_PARAMETERERROR_SUCCESSERROR_TTYBUSYERROR_UNKNOWNTTYERROR_UNKNOWN_INSTRUCTIONKEY_CMD_ALERTKEY_CMD_ALTGRKEY_CMD_APNDCHAR""SKEY_CMD_ARG_MASKKEY_CMD_ARG_SHIFTKEY_CMD_ASPK_CMP_WORDSKEY_CMD_ASPK_DEL_CHARSKEY_CMD_ASPK_EMP_LINEKEY_CMD_ASPK_INDENTKEY_CMD_ASPK_INS_CHARSKEY_CMD_ASPK_REP_CHARSKEY_CMD_ASPK_SEL_CHARKEY_CMD_ASPK_SEL_LINEKEY_CMD_ATTRBLINKKEY_CMD_ATTRDNKEY_CMD_ATTRUPKEY_CMD_ATTRVISKEY_CMD_AUTOREPEATKEY_CMD_AUTOSPEAKKEY_CMD_BACKKEY_CMD_BLK_MASKKEY_CMD_BLK_SHIFTKEY_CMD_BOTKEY_CMD_BOT_LEFTKEY_CMD_BRLKBDKEY_CMD_BRLUCDOTSKEY_CMD_BRL_STARTKEY_CMD_BRL_STOPKEY_CMD_CAPBLINKKEY_CMD_CHRLTKEY_CMD_CHRRTKEY_CMD_CLIP_ADDKEY_CMD_CLIP_APPENDKEY_CMD_CLIP_CLEARKEY_CMD_CLIP_COPYKEY_CMD_CLIP_NEWKEY_CMD_CLIP_RESTOREKEY_CMD_CLIP_SAVEKEY_CMD_CLIP_SHOWKEY_CMD_COLORKEY_CMD_COMPBRL6KEY_CMD_CONTEXTKEY_CMD_CONTRACTEDKEY_CMD_CONTROLKEY_CMD_COPYCHARSKEY_CMD_COPY_LINEKEY_CMD_COPY_RECTKEY_CMD_COPY_SMART_ADDKEY_CMD_COPY_SMART_NEWKEY_CMD_CSRBLINKKEY_CMD_CSRHIDEKEY_CMD_CSRJMP_VERTKEY_CMD_CSRSIZEKEY_CMD_CSRTRKKEY_CMD_CSRVISKEY_CMD_CUTAPPENDKEY_CMD_CUTBEGINKEY_CMD_CUTLINEKEY_CMD_CUTRECTKEY_CMD_DESCCHARKEY_CMD_DESC_CURR_CHARKEY_CMD_DISPMDKEY_CMD_FREEZEKEY_CMD_FWINLTKEY_CMD_FWINLTSKIPKEY_CMD_FWINRTKEY_CMD_FWINRTSKIPKEY_CMD_GOTOLINEKEY_CMD_GOTOMARKKEY_CMD_GUIKEY_CMD_GUI_APP_ALERTSKEY_CMD_GUI_APP_LISTKEY_CMD_GUI_APP_MENUKEY_CMD_GUI_AREA_ACTVKEY_CMD_GUI_AREA_NEXTKEY_CMD_GUI_AREA_PREVKEY_CMD_GUI_BACKKEY_CMD_GUI_BRL_ACTIONSKEY_CMD_GUI_DEV_OPTIONSKEY_CMD_GUI_DEV_SETTINGSKEY_CMD_GUI_HOMEKEY_CMD_GUI_ITEM_FRSTKEY_CMD_GUI_ITEM_LASTKEY_CMD_GUI_ITEM_NEXTKEY_CMD_GUI_ITEM_PREVKEY_CMD_GUI_TITLEKEY_CMD_HELPKEY_CMD_HOMEKEY_CMD_HOSTCMDKEY_CMD_HOST_COPYKEY_CMD_HOST_CUTKEY_CMD_HOST_PASTEKEY_CMD_HWINLTKEY_CMD_HWINRTKEY_CMD_INDICATORSKEY_CMD_INFOKEY_CMD_LEARNKEY_CMD_LNBEGKEY_CMD_LNDNKEY_CMD_LNENDKEY_CMD_LNUPKEY_CMD_MACROKEY_CMD_MENU_FIRST_ITEMKEY_CMD_MENU_LAST_ITEMKEY_CMD_MENU_NEXT_ITEMKEY_CMD_MENU_NEXT_SETTINGKEY_CMD_MENU_PREV_ITEMKEY_CMD_MENU_PREV_LEVELKEY_CMD_MENU_PREV_SETTINGKEY_CMD_METAKEY_CMD_MUTEKEY_CMD_NOOPKEY_CMD_NXDIFCHARKEY_CMD_NXDIFLNKEY_CMD_NXINDENTKEY_CMD_NXNBWINKEY_CMD_NXPGRPHKEY_CMD_NXPROMPTKEY_CMD_NXSEARCHKEY_CMD_OFFLINEKEY_CMD""_PASSATKEY_CMD_PASSDOTSKEY_CMD_PASSPS2KEY_CMD_PASSXTKEY_CMD_PASTEKEY_CMD_PASTE_ALTMODEKEY_CMD_PASTE_HISTORYKEY_CMD_PASTE_HISTORY_ALTMODEKEY_CMD_PRDIFCHARKEY_CMD_PRDIFLNKEY_CMD_PREFLOADKEY_CMD_PREFMENUKEY_CMD_PREFRESETKEY_CMD_PREFSAVEKEY_CMD_PRINDENTKEY_CMD_PRNBWINKEY_CMD_PRPGRPHKEY_CMD_PRPROMPTKEY_CMD_PRSEARCHKEY_CMD_REFRESHKEY_CMD_REFRESH_LINEKEY_CMD_RESTARTBRLKEY_CMD_RESTARTSPEECHKEY_CMD_RETURNKEY_CMD_ROUTEKEY_CMD_ROUTE_CURR_LOCNKEY_CMD_ROUTE_LINEKEY_CMD_ROUTE_SPEECHKEY_CMD_SAY_ABOVEKEY_CMD_SAY_ALLKEY_CMD_SAY_BELOWKEY_CMD_SAY_FASTERKEY_CMD_SAY_HIGHERKEY_CMD_SAY_LINEKEY_CMD_SAY_LOUDERKEY_CMD_SAY_LOWERKEY_CMD_SAY_SLOWERKEY_CMD_SAY_SOFTERKEY_CMD_SCR_STARTKEY_CMD_SCR_STOPKEY_CMD_SELECTVTKEY_CMD_SELECTVT_NEXTKEY_CMD_SELECTVT_PREVKEY_CMD_SETLEFTKEY_CMD_SETMARKKEY_CMD_SET_ATTRIBUTES_TABLEKEY_CMD_SET_CONTRACTION_TABLEKEY_CMD_SET_KEYBOARD_TABLEKEY_CMD_SET_LANGUAGE_PROFILEKEY_CMD_SET_TEXT_TABLEKEY_CMD_SHIFTKEY_CMD_SHOW_CURR_LOCNKEY_CMD_SIXDOTSKEY_CMD_SKPBLNKWINSKEY_CMD_SKPIDLNSKEY_CMD_SLIDEWINKEY_CMD_SPEAK_CURR_CHARKEY_CMD_SPEAK_CURR_LINEKEY_CMD_SPEAK_CURR_LOCNKEY_CMD_SPEAK_CURR_PWRDKEY_CMD_SPEAK_CURR_WORDKEY_CMD_SPEAK_FRST_CHARKEY_CMD_SPEAK_FRST_LINEKEY_CMD_SPEAK_INDENTKEY_CMD_SPEAK_LAST_CHARKEY_CMD_SPEAK_LAST_LINEKEY_CMD_SPEAK_NEXT_CHARKEY_CMD_SPEAK_NEXT_LINEKEY_CMD_SPEAK_NEXT_PWRDKEY_CMD_SPEAK_NEXT_WORDKEY_CMD_SPEAK_PREV_CHARKEY_CMD_SPEAK_PREV_LINEKEY_CMD_SPEAK_PREV_PWRDKEY_CMD_SPEAK_PREV_WORDKEY_CMD_SPELL_CURR_LINEKEY_CMD_SPELL_CURR_PWRDKEY_CMD_SPELL_CURR_WORDKEY_CMD_SPKHOMEKEY_CMD_SPK_PUNCT_LEVELKEY_CMD_SPK_STARTKEY_CMD_SPK_STOPKEY_CMD_SWITCHVTKEY_CMD_SWITCHVT_NEXTKEY_CMD_SWITCHVT_PREVKEY_CMD_TIMEKEY_CMD_TOPKEY_CMD_TOP_LEFTKEY_CMD_TOUCH_ATKEY_CMD_TOUCH_NAVKEY_CMD_TUNESKEY_CMD_TXTSEL_ALLKEY_CMD_TXTSEL_CLEARKEY_CMD_TXTSEL_SETKEY_CMD_TXTSEL_STARTKEY_CMD_UNSTICKKEY_CMD_UPPERKEY_CMD_WINDNKEY_CMD_WINUPKEY_CODE_MASKKEY_CODE_SHIFTKEY_FLAGS_MASKKEY_FLAGS_SHIFTKEY_FLG_INPUT_ALTGRKEY_FLG_INPUT_CAPSLOCKKEY_FLG_INPUT_CONTROLKEY_FLG_INPUT_ESCAPEDKEY_FLG_INPUT_GUIKEY_FLG_INPUT_METAKE""Y_FLG_INPUT_SHIFTKEY_FLG_INPUT_UPPERKEY_FLG_KBD_EMUL0KEY_FLG_KBD_EMUL1KEY_FLG_KBD_RELEASEKEY_FLG_MOTION_ROUTEKEY_FLG_MOTION_SCALEDKEY_FLG_MOTION_TOLEFTKEY_FLG_TOGGLE_MASKKEY_FLG_TOGGLE_OFFKEY_FLG_TOGGLE_ONKEY_MAXKEY_SYM_BACKSPACEKEY_SYM_DELETEKEY_SYM_DOWNKEY_SYM_ENDKEY_SYM_ESCAPEKEY_SYM_F1KEY_SYM_F10KEY_SYM_F11KEY_SYM_F12KEY_SYM_F13KEY_SYM_F14KEY_SYM_F15KEY_SYM_F16KEY_SYM_F17KEY_SYM_F18KEY_SYM_F19KEY_SYM_F2KEY_SYM_F20KEY_SYM_F21KEY_SYM_F22KEY_SYM_F23KEY_SYM_F24KEY_SYM_F25KEY_SYM_F26KEY_SYM_F27KEY_SYM_F28KEY_SYM_F29KEY_SYM_F3KEY_SYM_F30KEY_SYM_F31KEY_SYM_F32KEY_SYM_F33KEY_SYM_F34KEY_SYM_F35KEY_SYM_F4KEY_SYM_F5KEY_SYM_F6KEY_SYM_F7KEY_SYM_F8KEY_SYM_F9KEY_SYM_HOMEKEY_SYM_INSERTKEY_SYM_LEFTKEY_SYM_LINEFEEDKEY_SYM_PAGE_DOWNKEY_SYM_PAGE_UPKEY_SYM_RIGHTKEY_SYM_TABKEY_SYM_UNICODEKEY_SYM_UPKEY_TYPE_CMDKEY_TYPE_MASKKEY_TYPE_SHIFTKEY_TYPE_SYMOperationErrorOperationError.__init__OperationError.__str__PARAMF_GLOBALPARAMF_LOCALPARAMF_SELFPARAM_AUDIBLE_ALERTSPARAM_BOUND_COMMAND_KEYCODESPARAM_CLIENT_PRIORITYPARAM_CLIPBOARD_CONTENTPARAM_COMMAND_KEYCODE_NAMEPARAM_COMMAND_KEYCODE_SUMMARYPARAM_COMPUTER_BRAILLE_CELL_SIZEPARAM_COMPUTER_BRAILLE_ROWS_MASKPARAM_COMPUTER_BRAILLE_ROW_CELLSPARAM_COMPUTER_BRAILLE_TABLEPARAM_COUNTPARAM_CURSOR_BLINK_PERCENTAGEPARAM_CURSOR_BLINK_PERIODPARAM_CURSOR_DOTSPARAM_DEFINED_DRIVER_KEYCODESPARAM_DEVICE_CELL_SIZEPARAM_DEVICE_IDENTIFIERPARAM_DEVICE_MODELPARAM_DEVICE_ONLINEPARAM_DEVICE_SPEEDPARAM_DISPLAY_SIZEPARAM_DRIVER_CODEPARAM_DRIVER_KEYCODE_NAMEPARAM_DRIVER_KEYCODE_SUMMARYPARAM_DRIVER_NAMEPARAM_DRIVER_PROPERTY_VALUEPARAM_DRIVER_VERSIONPARAM_LITERARY_BRAILLEPARAM_LITERARY_BRAILLE_TABLEPARAM_MESSAGE_LOCALEPARAM_RENDERED_CELLSPARAM_RETAIN_DOTSPARAM_SERVER_VERSIONPARAM_SKIP_IDENTICAL_LINESPARAM_TYPE_BOOLEANPARAM_TYPE_KEYCODEPARAM_TYPE_STRINGPARAM_TYPE_UINT16PARAM_TYPE_UINT32PARAM_TYPE_UINT64PARAM_TYPE_UINT8__Pyx_PyDict_NextRefTTY_DEFAULTWriteStructWriteStruct.__reduce_cython__WriteStruct.__setstate_cython__acceptAllKeysacceptKeyRangesacceptKeysandMaskargumenta""syncio.coroutinesattrAndattrOrauthbrlapibrlerrnobufc_dotsc_driverc_flagsc_keysc_nc_nttysc_paramc_setc_subparamc_timeout_msc_ttyc_ttysc_typec_udotsc_valuec_waitcallbackDatacentercfunccharset__class_getitem__cline_in_tracebackcloseConnectioncodecommandcursorddatadecodedescrdescribeKeyCodedispSizedisplayNumberdisplaySizedkc__doc__dotsdrivereekcencodeenterRawModeenterTtyModeenterTtyModeWithPathentryerrfunerrnoerrorerrorsexceptionexpandKeyCodeflagflagsfunc__func__gaierrnogetLibraryVersiongetParameter__getstate__hostiignoreAllKeysignoreKeyRangesignoreKeys__init___is_coroutineitemskey_typekeyslatin1leaveRawModeleaveTtyModelibcerrno__main__major__metaclass__minor__module____mro_entries__msg__name__orMaskparamparameterpathpausepop__prepare__props__pyx_state__qualname__rangeType_allrangeType_coderangeType_commandrangeType_keyrangeType_typereadKeyreadKeyWithTimeout__reduce____reduce_cython____reduce_ex__regionBeginregionSizereplaceretretvalrevisionselfsetsetFocussetParameter__set_name__setdefault__setstate____setstate_cython__settingssize__str__strstringsubparamsync__test__texttimeout_msttytypeunwatchParametervaluevaluesvalues16values32values64values8wwaitwatchParameterwatchParameter.<locals>.cfuncwritewriteArgumentswriteDotswriteTextxyUTF-8\000\200\001\360\014\000\007\010\330\n#\2401\240A\240W\250A\250W\260A\260Q\330\001\t\210\027\220\007\220q\200\021\360\024\000\003\t\210\003\2101\210A\330\002\013\320\013-\250W\260A\260T\270\022\2701\330\002\006\200g\210Y\220a\330\003\t\210\021\210\"\210I\220T\230\021\230\"\230A\230Q\330\003\t\210\021\210\"\210H\220D\230\001\230\022\2301\230A\330\007\010\330\003\024\320\024,\250A\250T\260\024\260X\270Q\330\n\017\210q\220\001\330\002\005\200W\210D\220\001\330\003\t\210\036\220q\340\003\n\210!\200\021\360\026\000\003\014\2101\330\002\010\210\003\2101\210A\330\002\n\320\n.\250g\260Q\260d\270\"\270A\330\002\006\200g\210Y\220a\330\003\010\210\001\210\025\210c\220\021\220!\330\007\010\330\003\024\320\024'\240q\250\004\250D\260\010\270\007\270q""\330\n\017\210q\220\001\330\002\005\200W\210D\220\001\330\003\t\210\036\220q\340\003\n\210!\200\021\330\002\010\320\0101\260\023\260D\270\006\270d\300&\310\016\320V^\320^_\320_`\330\002\010\210\004\210B\320\016>\270d\300+\310T\320Q]\320]a\320ab\330\002\005\200T\210\032\2203\220a\330\003\t\210\024\210R\210q\330\007\013\210:\220S\230\001\330\003\t\210\024\210R\320\017\\\320\\^\320^b\320bc\330\007\013\210:\220S\230\016\240e\2504\250{\270#\270U\300.\320PS\320SW\320Wb\320be\320ej\320jk\330\003\t\210\024\210R\210q\330\002\t\210\021\320\001\032\230!\360 \000\003\014\2101\340\002\003\330\010\t\330\004\025\320\025%\240Q\240d\250$\250h\3206R\320RS\320ST\330\003\006\200g\210T\220\022\2204\220}\240M\260\032\2703\270n\310L\320Xe\320ep\320ps\320sx\320xy\330\004\n\210.\230\001\330\010\017\210s\220!\330\004\007\200t\2101\330\005\014\210A\340\004\013\2101\320\001\036\320\0364\260A\360\032\000\003\013\210!\330\002\005\200T\210\021\330\003\016\210a\340\003\007\200t\2101\210H\220C\220q\330\004\r\210V\2207\230!\2301\330\003\016\210a\330\007\010\330\003\024\320\024)\250\021\250$\250d\260'\270\021\330\002\005\200W\210D\220\001\330\003\t\210\036\220q\340\003\n\210!\200\021\360\014\000\010\t\330\003\024\320\024*\250!\2504\250q\330\002\005\200W\210D\220\001\330\003\t\210\036\220q\340\003\n\210!\200\021\360\020\000\010\t\330\003\024\320\024*\250!\2504\250q\330\002\005\200W\210D\220\001\330\003\t\210\036\220q\340\003\n\210!\320\001,\250A\360\020\000\003\022\220\021\340\002\003\330\010\t\330\004\025\320\0250\260\001\260\024\260T\270\036\320Gc\320cd\320de\330\003\006\200g\210T\220\022\2204\220}\240M\260\032\2703\270n\310L\320Xe\320ep\320ps\320sx\320xy\330\004\n\210.\230\001\330\010\017\210s\220!\330\004\007\200{\220#\220Q\330\005\014\210A\340\004\013\2101\320\001'\240}\260A\360\032\000\003\006\200T\210\021\330\003\014\210A\330\003\r\210Q\340\003\r\210S\220\001\220\021\330\003\014\210N\230'\240\021\240(\250\"\250A\330\003\007\200w\210i\220q\330\004\n\210!\2105\220\004\220A\220Q\330\002\005\200T""\210\021\330\003\016\210a\340\003\007\200t\2101\210H\220C\220q\330\004\r\210V\2207\230!\2301\330\003\016\210a\330\007\010\330\003\024\320\0241\260\021\260$\260d\270(\300)\3101\330\002\006\200a\330\013\020\220\001\220\021\330\002\005\200W\210D\220\001\330\003\t\210\036\220q\340\003\n\210!\320\001$\240A\360\016\000\003\007\200k\220\021\330\002\003\200:\210Q\330\002\005\200U\210'\220\021\330\004\007\200u\210D\220\001\330\003\016\210b\220\002\220!\330\003\007\200s\210!\2106\220\022\2201\330\004\013\2105\220\002\220\"\220G\2301\230I\240R\240s\250!\2501\330\003\004\200O\2201\330\003\004\200N\220!\330\003\004\200H\210D\220\001\220\024\220Q\330\002\t\210\024\210V\2201\220A\200\021\360 \000\003\r\210A\330\002\017\210q\330\002\014\210A\340\007\010\330\003\023\320\0231\260\021\260!\340\002\005\200V\2103\210a\330\003\t\210\036\220q\340\002\005\200U\210&\220\003\2201\330\003\006\200d\210!\2107\220#\220X\230T\240\024\240Q\240g\250S\260\001\330\004\n\210*\220A\220Q\340\002\005\200U\210&\220\003\2201\330\003\006\200e\2101\330\004\007\200t\2101\210E\220\021\220$\220c\230\021\330\005\013\210:\220Q\220a\340\004\007\200t\2101\210G\2203\220a\330\005\013\210:\220Q\220a\340\002\005\200U\210&\220\003\320\023$\240A\330\005\n\210&\220\003\320\023%\240Q\330\005\n\210&\220\003\2201\330\003\006\200e\2101\330\004\007\200t\2101\210E\220\021\220$\220c\230\021\330\005\013\210:\220Q\220a\340\004\007\200t\2101\210G\2203\220a\330\005\013\210:\220Q\220a\340\002\005\200U\210&\220\003\2201\330\003\006\200d\210!\2107\220#\220Q\330\004\014\210E\220\027\230\001\230\021\330\003\n\210#\210Q\210a\330\003\r\210_\230G\2401\240A\330\003\r\210[\230\001\330\003\014\210A\330\013\022\220!\2207\230(\240'\250\027\260\001\330\007\014\210F\220#\320\025(\250\003\2505\260\006\260c\270\021\330\003\006\200e\2101\330\004\013\2102\210R\210s\220!\2201\330\004\016\210o\230W\240A\240Q\330\004\016\210k\230\021\330\004\010\210\005\210S\220\001\220\021\330\005\014\210A\210U\220%\220q\230\001\340\004\013\2101\330\004\016\210o\230W""\240A\240Q\330\004\016\210k\230\021\330\004\013\2101\210E\220\021\330\007\014\210F\220#\220Q\330\003\006\200e\2101\330\004\013\2102\210R\210s\220!\2201\330\004\016\210o\230W\240A\240Q\330\004\017\210|\2301\330\004\010\210\005\210S\220\001\220\021\330\005\r\210Q\210e\2205\230\001\230\021\340\004\013\2101\330\004\016\210o\230W\240A\240Q\330\004\017\210|\2301\330\004\014\210A\210U\220!\330\007\014\210F\220#\220Q\330\003\006\200e\2101\330\004\013\2102\210R\210s\220!\2201\330\004\016\210o\230W\240A\240Q\330\004\017\210|\2301\330\004\010\210\005\210S\220\001\220\021\330\005\r\210Q\210e\2205\230\001\230\021\340\004\013\2101\330\004\016\210o\230W\240A\240Q\330\004\017\210|\2301\330\004\014\210A\210U\220!\330\007\014\210F\220#\220Q\330\003\006\200e\2101\330\004\013\2102\210R\210s\220!\2201\330\004\016\210o\230W\240A\240Q\330\004\017\210|\2301\330\004\010\210\005\210S\220\001\220\021\330\005\r\210Q\210e\2205\230\001\230\021\340\004\013\2101\330\004\016\210o\230W\240A\240Q\330\004\017\210|\2301\330\004\014\210A\210U\220!\340\003\t\210\032\2201\220A\340\007\010\330\003\024\320\024)\250\021\250$\250d\260)\270<\300y\320PY\320YZ\330\002\005\200W\210D\220\001\330\013\020\220\001\220\021\330\003\t\210\036\220q\330\n\017\210q\220\001\200\021\360\032\000\003\r\210A\330\002\017\210q\330\002\014\210A\340\002\003\360\026\000\003\023\320\022/\250q\260\004\260D\270\t\300\034\310Y\320VW\330\002\t\210\033\220A\200\001\360\n\000\002\023\320\022)\250\021\250&\260\001\260\021\330\001\004\200G\2104\210q\330\002\010\210\016\220a\340\002\n\210!\330\002\006\200h\210e\2201\220C\220q\330\003\r\210S\220\005\220Q\220a\330\002\003\330\003\013\2103\210a\330\003\016\210c\220\021\330\003\017\210s\220!\330\003\014\210A\200\021\360\014\000\010\t\330\003\024\220M\240\021\240$\240a\330\002\005\200W\210D\220\001\330\003\t\210\036\220q\200\001\330\004\n\210+\220Q\320\001*\250+\260Q\360\"\000\003\r\210A\330\002\017\210q\330\002\014\210A\340\007\010\330\003\025\320\025/\250q\260\004\260D\270\t\300\034\310Y\320VW""\320WX\330\002\005\200X\210S\220\001\330\003\t\210\036\220q\340\002\003\330\003\t\320\t\033\2301\230I\240Y\250a\330\002\t\210\035\220a\330\013\020\220\001\220\021\330\003\t\210\021\340\n\017\210q\220\001\330\002\t\210\021\200\021\360\014\000\003\013\210!\330\007\010\330\003\024\320\024%\240Q\240d\250$\250a\330\002\005\200W\210D\220\001\330\003\t\210\036\220q\340\003\n\210!\200\021\360\010\000\013\031\230\001\230\024\230T\240\021\200\021\340\002\005\200T\210\024\210T\220\021\330\013#\2401\240D\250\001\330\003\007\200w\210a\200\021\360\010\000\003\006\200T\210\021\330\003\n\210$\210a\330\002\007\200|\2204\220q\330\002\007\200}\220D\230\001\330\002\007\200|\2204\220q\330\002\010\210\004\210A\330\002\007\200z\220\021\330\002\021\320\021#\2401\240A\240W\250F\260!\330\002\010\210\017\220w\230a\230t\2401\240A\330\n\034\230A\230Q\230g\240U\250$\250a\250q\330\002\010\210\003\2107\220!\2209\230G\2401\330\n\017\210q\220\001\330\002\t\210\021\200\021\340\002\t\210\024\210Y\220a\320\001.\250a\330\023\024\330\021\022\330\020\021\330\n\013\330\r\016\330\014\r\330\014\r\330\r\016\360\n\000\003\006\200T\210\021\330\003\024\220K\230q\330\002\005\200^\2203\220a\330\003\021\320\021\"\240!\330\002\005\200\\\220\023\220A\330\003\021\220\037\240\001\330\002\005\200[\220\003\2201\330\003\021\220\036\230q\330\002\005\200Q\330\003\021\220\030\230\021\330\002\005\200Q\330\003\021\220\033\230A\330\002\005\200Q\330\003\021\220\032\2301\330\002\005\200W\210C\210q\330\003\021\220\032\2301\330\002\005\200Q\330\003\021\220\033\230A\330\007\010\330\003\024\220N\240!\2404\240t\2501\250N\270!\330\002\005\200W\210D\220\001\330\003\t\210\036\220q\340\003\n\210!\200\021\360\010\000\010\t\330\003\024\320\024)\250\021\250$\250a\330\002\005\200W\210D\220\001\330\003\t\210\036\220q\340\003\n\210!\200\021\360\010\000\003\n\210\035\220a\220q\200\021\360\022\000\003\013\210!\330\n)\250\021\250$\250d\3202f\320fg\200\021\360\016\000\003\007\200d\210!\2108\2203\220a\330\003\014\210F\220'\230\021\230!\330\002\r""\210Q\330\007\010\330\003\024\320\024)\250\021\250$\250d\260!\330\002\005\200W\210D\220\001\330\003\t\210\036\220q\340\003\n\210!\200\021\360\016\000\004\007\200e\2104\210q\330\002\r\210R\210r\220\021\330\002\006\200d\210!\2106\220\023\220A\330\003\n\210$\210g\220Q\220a\330\002\006\200c\210\021\210&\220\002\220!\330\003\n\210%\210r\220\023\220G\2301\230I\240R\240s\250!\2507\260!\330\002\013\2101\330\002\014\320\014\035\230Q\330\007\010\330\003\024\320\024&\240a\240t\2504\250q\330\002\005\200W\210D\220\001\330\003\t\210\036\220q\340\003\n\210!\200\021\330\002\020\220\t\230\021\230!\330\002\006\200h\210a\330\002\006\200h\210a\200!\340\003\022\320\022;\270<\300q\340\003\017\210|\2301\330\003\016\210l\230!\330\003\013\210<\220q\330\003\n\320\n\034\230A\230\\\250\034\260\\\300\027\310\014\320TU\340\003\007\200q\210\013\220:\230W\240A\200\021\340\002\026\320\026/\250q\330\002\006\200a\330\003\007\200}\220A\330\013\020\220\001\220\021\340\003\007\200}\220A\330\003\007\320\007\033\230=\250\001\330\003\007\320\007\034\230M\250\021\330\003\007\320\007\033\230=\250\001\330\003\017\210}\230A\330\004\010\320\010\032\230-\240q\340\004\010\210\n\220!\200\001\360\n\000\002\023\320\022'\240q\250\006\250a\250q\330\001\004\200G\2104\210q\330\002\010\210\016\220a\340\002\003\330\003\013\2103\210a\330\003\016\210c\220\021\330\003\017\210s\220!\330\003\014\210C\210q";
    PyObject *data = NULL;
    CYTHON_UNUSED_VAR(__Pyx_DecompressString);
    #endif
    PyObject **stringtab = __pyx_mstate->__pyx_string_tab;
    Py_ssize_t pos = 0;
    for (int i = 0; i < 601; i++) {
      Py_ssize_t bytes_length = index[i].length;
      PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL);
      if (likely(string) && i >= 31) PyUnicode_InternInPlace(&string);
      if (unlikely(!string)) {
        Py_XDECREF(data);
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
      stringtab[i] = string;
      pos += bytes_length;
    }
    for (int i = 601; i < 636; i++) {
      Py_ssize_t bytes_length = index[i].length;
      PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length);
      stringtab[i] = string;
      pos += bytes_length;
      if (unlikely(!string)) {
        Py_XDECREF(data);
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
    }
    Py_XDECREF(data);
    for (Py_ssize_t i = 0; i < 636; i++) {
      if (unlikely(PyObject_Hash(stringtab[i]) == -1)) {
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
    }
    #if CYTHON_IMMORTAL_CONSTANTS
    {
      PyObject **table = stringtab + 601;
      for (Py_ssize_t i=0; i<35; ++i) {
        #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
        #if PY_VERSION_HEX < 0x030E0000
        if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
        #else
        if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
        #endif
        {
          Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
        }
        #else
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
        #endif
      }
    }
    #endif
  }
  {
    PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 0;
    int8_t const cint_constants_1[] = {0,-1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127};
    int16_t const cint_constants_2[] = {128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,256,512,1024,2048,4096,8192,16384};
    int32_t const cint_constants_4[] = {32768L,65288L,65289L,65293L,65307L,65360L,65361L,65362L,65363L,65364L,65365L,65366L,65367L,65379L,65470L,65471L,65472L,65473L,65474L,65475L,65476L,65477L,65478L,65479L,65480L,65481L,65482L,65483L,65484L,65485L,65486L,65487L,65488L,65489L,65490L,65491L,65492L,65493L,65494L,65495L,65496L,65497L,65498L,65499L,65500L,65501L,65502L,65503L,65504L,65535L,16777216L,536870912L};
    for (int i = 0; i < 226; i++) {
      numbertab[i] = PyLong_FromLong((i < 129 ? cint_constants_1[i - 0] : (i < 174 ? cint_constants_2[i - 129] : cint_constants_4[i - 174])));
      if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_number_tab;
    for (Py_ssize_t i=0; i<226; ++i) {
      #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
      #if PY_VERSION_HEX < 0x030E0000
      if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
      #else
      if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
      #endif
      {
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
      }
      #else
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
      #endif
    }
  }
  #endif
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: init_codeobjects ### */
typedef struct {
    unsigned int argcount : 4;
    unsigned int num_posonly_args : 1;
    unsigned int num_kwonly_args : 1;
    unsigned int nlocals : 5;
    unsigned int flags : 10;
    unsigned int first_line : 11;
} __Pyx_PyCode_New_function_description;
/* NewCodeObj.proto */
static PyObject* __Pyx_PyCode_New(
        const __Pyx_PyCode_New_function_description descr,
        PyObject * const *varnames,
        PyObject *filename,
        PyObject *funcname,
        PyObject *line_table,
        PyObject *tuple_dedup_map
);


static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
  PyObject* tuple_dedup_map = PyDict_New();
  if (unlikely(!tuple_dedup_map)) return -1;
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1083};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_param, __pyx_mstate->__pyx_n_u_callbackData, __pyx_mstate->__pyx_n_u_parameter, __pyx_mstate->__pyx_n_u_subparam, __pyx_mstate->__pyx_n_u_flags, __pyx_mstate->__pyx_n_u_data};
    __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_cfunc, __pyx_mstate->__pyx_kp_b_iso88591_q_1_l_q_A_TU_q_WA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 137};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_major, __pyx_mstate->__pyx_n_u_minor, __pyx_mstate->__pyx_n_u_revision};
    __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_getLibraryVersion, __pyx_mstate->__pyx_kp_b_iso88591_1AWAWAQ_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 147};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_code, __pyx_mstate->__pyx_n_u_ekc, __pyx_mstate->__pyx_n_u_retval};
    __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_expandKeyCode, __pyx_mstate->__pyx_kp_b_iso88591_q_aq_G4q_a_3a_c_s_Cq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 163};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_code, __pyx_mstate->__pyx_n_u_dkc, __pyx_mstate->__pyx_n_u_retval, __pyx_mstate->__pyx_n_u_flags, __pyx_mstate->__pyx_n_u_flag};
    __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_describeKeyCode, __pyx_mstate->__pyx_kp_b_iso88591_G4q_a_he1Cq_S_Qa_3a_c_s_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 233};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_exception};
    __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_q_a_A_A_M_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 249};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_error, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_buf, __pyx_mstate->__pyx_n_u_str_2, __pyx_mstate->__pyx_n_u_ret};
    __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_str, __pyx_mstate->__pyx_kp_b_iso88591_T_a_4q_D_4q_A_z_1AWF_wat1A_AQgU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 270};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_auth};
    __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_ha_ha, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 275};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_msg};
    __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_str, __pyx_mstate->__pyx_kp_b_iso88591_1_D_d_V____B_d_TQ_aab_T_3a_Rq_S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 286};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_kp_b_iso88591_Ya, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 290};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_auth, __pyx_mstate->__pyx_kp_b_iso88591_Ya, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 470};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_closeConnection, __pyx_mstate->__pyx_kp_b_iso88591_T_T_1D_wa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 538};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_tty, __pyx_mstate->__pyx_n_u_driver, __pyx_mstate->__pyx_n_u_retval, __pyx_mstate->__pyx_n_u_c_tty, __pyx_mstate->__pyx_n_u_c_driver};
    __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_enterTtyMode, __pyx_mstate->__pyx_kp_b_iso88591_4A_T_a_t1HCq_V7_1_a_d_WD_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 565};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_path, __pyx_mstate->__pyx_n_u_driver, __pyx_mstate->__pyx_n_u_retval, __pyx_mstate->__pyx_n_u_c_ttys, __pyx_mstate->__pyx_n_u_c_nttys, __pyx_mstate->__pyx_n_u_c_driver, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_enterTtyModeWithPath, __pyx_mstate->__pyx_kp_b_iso88591_A_T_A_Q_S_N_A_wiq_5_AQ_T_a_t1HC, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 601};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_retval};
    __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_leaveTtyMode, __pyx_mstate->__pyx_kp_b_iso88591_a_WD_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 612};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_tty, __pyx_mstate->__pyx_n_u_retval, __pyx_mstate->__pyx_n_u_c_tty};
    __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_setFocus, __pyx_mstate->__pyx_kp_b_iso88591_Qd_a_WD_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {10, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 631};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_writeArguments, __pyx_mstate->__pyx_n_u_displayNumber, __pyx_mstate->__pyx_n_u_regionBegin, __pyx_mstate->__pyx_n_u_regionSize, __pyx_mstate->__pyx_n_u_text, __pyx_mstate->__pyx_n_u_andMask, __pyx_mstate->__pyx_n_u_orMask, __pyx_mstate->__pyx_n_u_cursor, __pyx_mstate->__pyx_n_u_charset, __pyx_mstate->__pyx_n_u_retval};
    __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_write, __pyx_mstate->__pyx_kp_b_iso88591_a_T_Kq_3a_A_1_q_Q_Q_A_Q_1_WCq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 669};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_dots, __pyx_mstate->__pyx_n_u_retval, __pyx_mstate->__pyx_n_u_c_dots, __pyx_mstate->__pyx_n_u_c_udots, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_y, __pyx_mstate->__pyx_n_u_dispSize};
    __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_writeDots, __pyx_mstate->__pyx_kp_b_iso88591_e4q_Rr_d_6_A_gQa_c_r_G1IRs_7_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 691};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_text, __pyx_mstate->__pyx_n_u_cursor, __pyx_mstate->__pyx_n_u_w, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_y, __pyx_mstate->__pyx_n_u_dispSize};
    __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_writeText, __pyx_mstate->__pyx_kp_b_iso88591_A_k_Q_U_uD_b_s_6_1_5_G1IRs_1_O1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 710};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_wait, __pyx_mstate->__pyx_n_u_code, __pyx_mstate->__pyx_n_u_retval, __pyx_mstate->__pyx_n_u_c_wait};
    __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_readKey, __pyx_mstate->__pyx_kp_b_iso88591_1_Qd_h6RRSST_gT_4_M_3nLXeeppssx, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 739};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_timeout_ms, __pyx_mstate->__pyx_n_u_code, __pyx_mstate->__pyx_n_u_retval, __pyx_mstate->__pyx_n_u_c_timeout_ms};
    __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_readKeyWithTimeout, __pyx_mstate->__pyx_kp_b_iso88591_A_0_T_Gccdde_gT_4_M_3nLXeeppssx, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 760};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_code};
    __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_expandKeyCode, __pyx_mstate->__pyx_kp_b_iso88591_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 766};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_key_type, __pyx_mstate->__pyx_n_u_set, __pyx_mstate->__pyx_n_u_retval, __pyx_mstate->__pyx_n_u_c_type, __pyx_mstate->__pyx_n_u_c_set, __pyx_mstate->__pyx_n_u_c_n, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_ignoreKeys, __pyx_mstate->__pyx_kp_b_iso88591_1_1A_gQd_A_gYa_c_q_D_q_q_WD_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 790};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_key_type, __pyx_mstate->__pyx_n_u_set, __pyx_mstate->__pyx_n_u_retval, __pyx_mstate->__pyx_n_u_c_type, __pyx_mstate->__pyx_n_u_c_set, __pyx_mstate->__pyx_n_u_c_n, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_acceptKeys, __pyx_mstate->__pyx_kp_b_iso88591_1_1A_gQd_A_gYa_c_q_D_q_q_WD_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 814};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_retval};
    __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_ignoreAllKeys, __pyx_mstate->__pyx_kp_b_iso88591_4q_WD_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 827};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_retval};
    __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_acceptAllKeys, __pyx_mstate->__pyx_kp_b_iso88591_4q_WD_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 842};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_keys, __pyx_mstate->__pyx_n_u_retval, __pyx_mstate->__pyx_n_u_c_keys, __pyx_mstate->__pyx_n_u_c_n, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_ignoreKeyRanges, __pyx_mstate->__pyx_kp_b_iso88591_1A_WAT_1_gYa_IT_AQ_HD_1A_AT_XQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 865};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_keys, __pyx_mstate->__pyx_n_u_retval, __pyx_mstate->__pyx_n_u_c_keys, __pyx_mstate->__pyx_n_u_c_n, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_acceptKeyRanges, __pyx_mstate->__pyx_kp_b_iso88591_1A_WAT_1_gYa_IT_AQ_HD_1A_AT_XQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 888};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_driver, __pyx_mstate->__pyx_n_u_retval, __pyx_mstate->__pyx_n_u_c_driver};
    __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_enterRawMode, __pyx_mstate->__pyx_kp_b_iso88591_d_83a_F_Q_d_WD_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 905};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_retval};
    __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_leaveRawMode, __pyx_mstate->__pyx_kp_b_iso88591_a_WD_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 17, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 916};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_param, __pyx_mstate->__pyx_n_u_subparam, __pyx_mstate->__pyx_n_u_flags, __pyx_mstate->__pyx_n_u_c_param, __pyx_mstate->__pyx_n_u_c_subparam, __pyx_mstate->__pyx_n_u_c_flags, __pyx_mstate->__pyx_n_u_c_value, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_retval, __pyx_mstate->__pyx_n_u_values64, __pyx_mstate->__pyx_n_u_values32, __pyx_mstate->__pyx_n_u_values16, __pyx_mstate->__pyx_n_u_values8, __pyx_mstate->__pyx_n_u_string, __pyx_mstate->__pyx_n_u_ret, __pyx_mstate->__pyx_n_u_e};
    __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_getParameter, __pyx_mstate->__pyx_kp_b_iso88591_Q_A_q_A_q_D_YVWWX_XS_q_1IYa_a_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 18, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 952};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_param, __pyx_mstate->__pyx_n_u_subparam, __pyx_mstate->__pyx_n_u_flags, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_c_param, __pyx_mstate->__pyx_n_u_c_subparam, __pyx_mstate->__pyx_n_u_c_flags, __pyx_mstate->__pyx_n_u_c_value, __pyx_mstate->__pyx_n_u_values64, __pyx_mstate->__pyx_n_u_values32, __pyx_mstate->__pyx_n_u_values16, __pyx_mstate->__pyx_n_u_values8, __pyx_mstate->__pyx_n_u_string, __pyx_mstate->__pyx_n_u_props, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_retval};
    __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_setParameter, __pyx_mstate->__pyx_kp_b_iso88591_A_q_A_1_V3a_q_U_1_d_7_XT_QgS_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1066};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_param, __pyx_mstate->__pyx_n_u_subparam, __pyx_mstate->__pyx_n_u_flags, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_n_u_c_param, __pyx_mstate->__pyx_n_u_c_subparam, __pyx_mstate->__pyx_n_u_c_flags, __pyx_mstate->__pyx_n_u_descr, __pyx_mstate->__pyx_n_u_cfunc, __pyx_mstate->__pyx_n_u_cfunc};
    __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_watchParameter, __pyx_mstate->__pyx_kp_b_iso88591_A_q_A_q_D_YVW_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1097};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_entry, __pyx_mstate->__pyx_n_u_descr};
    __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_unwatchParameter, __pyx_mstate->__pyx_kp_b_iso88591_d2ffg, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1109};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_timeout_ms};
    __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_pause, __pyx_mstate->__pyx_kp_b_iso88591_T, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1115};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_retval};
    __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_brlapi_pyx, __pyx_mstate->__pyx_n_u_sync, __pyx_mstate->__pyx_kp_b_iso88591_M_a_WD_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad;
  }
  Py_DECREF(tuple_dedup_map);
  return 0;
  bad:
  Py_DECREF(tuple_dedup_map);
  return -1;
}
/* #### Code section: init_globals ### */

static int __Pyx_InitGlobals(void) {
  /* PythonCompatibility.init */
  if (likely(__Pyx_init_co_variables() == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CommonTypesMetaclass.init */
  if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CachedMethodType.init */
  #if CYTHON_COMPILING_IN_LIMITED_API
  {
      PyObject *typesModule=NULL;
      typesModule = PyImport_ImportModule("types");
      if (typesModule) {
          __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType");
          Py_DECREF(typesModule);
      }
  } // error handling follows
  #endif
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CythonFunctionShared.init */
  if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cleanup_globals ### */
/* #### Code section: cleanup_module ### */
/* #### Code section: main_method ### */
/* #### Code section: utility_code_pragmas ### */
#ifdef _MSC_VER
#pragma warning( push )
/* Warning 4127: conditional expression is constant
 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
 * compile-time, so this warning is not useful
 */
#pragma warning( disable : 4127 )
#endif



/* #### Code section: utility_code_def ### */

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* TupleAndListFromArray (used by fastcall) */
#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    Py_ssize_t i;
    if (n <= 0) {
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    for (i = 0; i < n; i++) {
        Py_INCREF(src[i]);
        if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) {
            Py_DECREF(res);
            return NULL;
        }
    }
    return res;
}
#elif CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
    PyObject *v;
    Py_ssize_t i;
    for (i = 0; i < length; i++) {
        v = dest[i] = src[i];
        Py_INCREF(v);
    }
}
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
    return res;
}
static CYTHON_INLINE PyObject *
__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return PyList_New(0);
    }
    res = PyList_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
    return res;
}
#endif

/* BytesEquals (used by UnicodeEquals) */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\
        !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS)
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals (used by fastcall) */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length, length2;
        int kind;
        void *data1, *data2;
        #if !CYTHON_COMPILING_IN_LIMITED_API
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        #endif
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(length < 0)) return -1;
        #endif
        length2 = __Pyx_PyUnicode_GET_LENGTH(s2);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(length2 < 0)) return -1;
        #endif
        if (length != length2) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    return (equals == Py_EQ);
return_ne:
    return (equals == Py_NE);
#endif
}

/* fastcall */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
{
    Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames);
    #if !CYTHON_ASSUME_SAFE_SIZE
    if (unlikely(n == -1)) return NULL;
    #endif
    for (i = 0; i < n; i++)
    {
        PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!namei)) return NULL;
        #endif
        if (s == namei) return kwvalues[i];
    }
    for (i = 0; i < n; i++)
    {
        PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!namei)) return NULL;
        #endif
        int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ);
        if (unlikely(eq != 0)) {
            if (unlikely(eq < 0)) return NULL;
            return kwvalues[i];
        }
    }
    return NULL;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
    Py_ssize_t i, nkwargs;
    PyObject *dict;
#if !CYTHON_ASSUME_SAFE_SIZE
    nkwargs = PyTuple_Size(kwnames);
    if (unlikely(nkwargs < 0)) return NULL;
#else
    nkwargs = PyTuple_GET_SIZE(kwnames);
#endif
    dict = PyDict_New();
    if (unlikely(!dict))
        return NULL;
    for (i=0; i<nkwargs; i++) {
#if !CYTHON_ASSUME_SAFE_MACROS
        PyObject *key = PyTuple_GetItem(kwnames, i);
        if (!key) goto bad;
#else
        PyObject *key = PyTuple_GET_ITEM(kwnames, i);
#endif
        if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
            goto bad;
    }
    return dict;
bad:
    Py_DECREF(dict);
    return NULL;
}
#endif
#endif

/* PyObjectCall (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallMethO (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
    self = __Pyx_CyOrPyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectFastCall (used by PyObjectCallOneArg) */
#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) {
    PyObject *argstuple;
    PyObject *result = 0;
    size_t i;
    argstuple = PyTuple_New((Py_ssize_t)nargs);
    if (unlikely(!argstuple)) return NULL;
    for (i = 0; i < nargs; i++) {
        Py_INCREF(args[i]);
        if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad;
    }
    result = __Pyx_PyObject_Call(func, argstuple, kwargs);
  bad:
    Py_DECREF(argstuple);
    return result;
}
#endif
#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API
  #if PY_VERSION_HEX < 0x03090000
    #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable)
  #elif CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) {
    PyTypeObject *tp = Py_TYPE(callable);
    #if defined(__Pyx_CyFunction_USED)
    if (__Pyx_CyFunction_CheckExact(callable)) {
        return __Pyx_CyFunction_func_vectorcall(callable);
    }
    #endif
    if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
        return NULL;
    }
    assert(PyCallable_Check(callable));
    Py_ssize_t offset = tp->tp_vectorcall_offset;
    assert(offset > 0);
    vectorcallfunc ptr;
    memcpy(&ptr, (char *) callable + offset, sizeof(ptr));
    return ptr;
}
  #else
    #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable)
  #endif
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) {
    Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
#if CYTHON_COMPILING_IN_CPYTHON
    if (nargs == 0 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
            return __Pyx_PyObject_CallMethO(func, NULL);
    }
    else if (nargs == 1 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
            return __Pyx_PyObject_CallMethO(func, args[0]);
    }
#endif
    if (kwargs == NULL) {
        #if CYTHON_VECTORCALL
          #if CYTHON_COMPILING_IN_LIMITED_API
            return PyObject_Vectorcall(func, args, _nargs, NULL);
          #else
            vectorcallfunc f = __Pyx_PyVectorcall_Function(func);
            if (f) {
                return f(func, args, _nargs, NULL);
            }
          #endif
        #endif
    }
    if (nargs == 0) {
        return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs);
    }
    #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
    #else
    return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
    #endif
}

/* PyObjectCallOneArg (used by CallUnboundCMethod0) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *args[2] = {NULL, arg};
    return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectGetAttrStr (used by UnpackUnboundCMethod) */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
    PyObject *result;
    PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
    if (unlikely(!selfless_args)) return NULL;
    result = PyObject_Call(method, selfless_args, kwargs);
    Py_DECREF(selfless_args);
    return result;
}
#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) {
        return _PyObject_Vectorcall
            (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames);
}
#else
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) {
    return
#if PY_VERSION_HEX < 0x03090000
    _PyObject_Vectorcall
#else
    PyObject_Vectorcall
#endif
        (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames);
}
#endif
static PyMethodDef __Pyx_UnboundCMethod_Def = {
     "CythonUnboundCMethod",
     __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
     METH_VARARGS | METH_KEYWORDS,
#else
     METH_FASTCALL | METH_KEYWORDS,
#endif
     NULL
};
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method, *result=NULL;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    result = method;
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    } else
#endif
#if CYTHON_COMPILING_IN_PYPY
#else
    if (PyCFunction_Check(method))
#endif
    {
        PyObject *self;
        int self_found;
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        self = PyObject_GetAttrString(method, "__self__");
        if (!self) {
            PyErr_Clear();
        }
#else
        self = PyCFunction_GET_SELF(method);
#endif
        self_found = (self && self != Py_None);
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        Py_XDECREF(self);
#endif
        if (self_found) {
            PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
            if (unlikely(!unbound_method)) return -1;
            Py_DECREF(method);
            result = unbound_method;
        }
    }
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    if (unlikely(target->method)) {
        Py_DECREF(result);
    } else
#endif
    target->method = result;
    return 0;
}

/* CallUnboundCMethod0 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        if (likely(cfunc->flag == METH_NOARGS))
            return __Pyx_CallCFunction(cfunc, self, NULL);
        if (likely(cfunc->flag == METH_FASTCALL))
            return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0);
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL);
        if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS)))
            return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL);
        if (cfunc->flag == METH_VARARGS)
            return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple);
        return __Pyx__CallUnboundCMethod0(cfunc, self);
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self);
    }
#endif
    PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    PyObject *result;
    if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
    result = __Pyx_PyObject_CallOneArg(cfunc->method, self);
    return result;
}

/* py_dict_items (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
    return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d);
}

/* py_dict_values (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
    return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d);
}

/* OwnedDictNext (used by ParseKeywordsImpl) */
#if CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) {
    PyObject *next = NULL;
    if (!*ppos) {
        if (pvalue) {
            PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p);
            if (unlikely(!dictview)) goto bad;
            *ppos = PyObject_GetIter(dictview);
            Py_DECREF(dictview);
        } else {
            *ppos = PyObject_GetIter(p);
        }
        if (unlikely(!*ppos)) goto bad;
    }
    next = PyIter_Next(*ppos);
    if (!next) {
        if (PyErr_Occurred()) goto bad;
        return 0;
    }
    if (pkey && pvalue) {
        *pkey = __Pyx_PySequence_ITEM(next, 0);
        if (unlikely(*pkey)) goto bad;
        *pvalue = __Pyx_PySequence_ITEM(next, 1);
        if (unlikely(*pvalue)) goto bad;
        Py_DECREF(next);
    } else if (pkey) {
        *pkey = next;
    } else {
        assert(pvalue);
        *pvalue = next;
    }
    return 1;
  bad:
    Py_XDECREF(next);
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
    PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef");
#else
    PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef);
#endif
    if (pkey) *pkey = NULL;
    if (pvalue) *pvalue = NULL;
    return 0;
}
#else // !CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) {
    int result = PyDict_Next(p, ppos, pkey, pvalue);
    if (likely(result == 1)) {
        if (pkey) Py_INCREF(*pkey);
        if (pvalue) Py_INCREF(*pvalue);
    }
    return result;
}
#endif

/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
}

/* CallUnboundCMethod2 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            return __Pyx_CallCFunctionFast(cfunc, self, args, 2);
        }
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL);
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2);
    }
#endif
    PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        PyObject *result = NULL;
        PyObject *args = PyTuple_New(2);
        if (unlikely(!args)) return NULL;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
        else
            result = __Pyx_CallCFunction(cfunc, self, args);
        Py_DECREF(args);
        return result;
    }
#endif
    {
        PyObject *args[4] = {NULL, self, arg1, arg2};
        return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
    }
}

/* ParseKeywordsImpl (used by ParseKeywords) */
static int __Pyx_ValidateDuplicatePosArgs(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    const char* function_name)
{
    PyObject ** const *name = argnames;
    while (name != first_kw_arg) {
        PyObject *key = **name;
        int found = PyDict_Contains(kwds, key);
        if (unlikely(found)) {
            if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key);
            goto bad;
        }
        name++;
    }
    return 0;
bad:
    return -1;
}
#if CYTHON_USE_UNICODE_INTERNALS
static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) {
    int kind;
    Py_ssize_t len = PyUnicode_GET_LENGTH(s1);
    if (len != PyUnicode_GET_LENGTH(s2)) return 0;
    kind = PyUnicode_KIND(s1);
    if (kind != PyUnicode_KIND(s2)) return 0;
    const void *data1 = PyUnicode_DATA(s1);
    const void *data2 = PyUnicode_DATA(s2);
    return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0);
}
#endif
static int __Pyx_MatchKeywordArg_str(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    PyObject ** const *name;
    #if CYTHON_USE_UNICODE_INTERNALS
    Py_hash_t key_hash = ((PyASCIIObject*)key)->hash;
    if (unlikely(key_hash == -1)) {
        key_hash = PyObject_Hash(key);
        if (unlikely(key_hash == -1))
            goto bad;
    }
    #endif
    name = first_kw_arg;
    while (*name) {
        PyObject *name_str = **name;
        #if CYTHON_USE_UNICODE_INTERNALS
        if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) {
            *index_found = (size_t) (name - argnames);
            return 1;
        }
        #else
        #if CYTHON_ASSUME_SAFE_SIZE
        if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
        #endif
        {
            int cmp = PyUnicode_Compare(name_str, key);
            if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
            if (cmp == 0) {
                *index_found = (size_t) (name - argnames);
                return 1;
            }
        }
        #endif
        name++;
    }
    name = argnames;
    while (name != first_kw_arg) {
        PyObject *name_str = **name;
        #if CYTHON_USE_UNICODE_INTERNALS
        if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) {
            if (__Pyx_UnicodeKeywordsEqual(name_str, key))
                goto arg_passed_twice;
        }
        #else
        #if CYTHON_ASSUME_SAFE_SIZE
        if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
        #endif
        {
            if (unlikely(name_str == key)) goto arg_passed_twice;
            int cmp = PyUnicode_Compare(name_str, key);
            if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
            if (cmp == 0) goto arg_passed_twice;
        }
        #endif
        name++;
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
bad:
    return -1;
}
static int __Pyx_MatchKeywordArg_nostr(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    PyObject ** const *name;
    if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type;
    name = first_kw_arg;
    while (*name) {
        int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
        if (cmp == 1) {
            *index_found = (size_t) (name - argnames);
            return 1;
        }
        if (unlikely(cmp == -1)) goto bad;
        name++;
    }
    name = argnames;
    while (name != first_kw_arg) {
        int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
        if (unlikely(cmp != 0)) {
            if (cmp == 1) goto arg_passed_twice;
            else goto bad;
        }
        name++;
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
bad:
    return -1;
}
static CYTHON_INLINE int __Pyx_MatchKeywordArg(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    return likely(PyUnicode_CheckExact(key)) ?
        __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) :
        __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name);
}
static void __Pyx_RejectUnknownKeyword(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    const char *function_name)
{
    #if CYTHON_AVOID_BORROWED_REFS
    PyObject *pos = NULL;
    #else
    Py_ssize_t pos = 0;
    #endif
    PyObject *key = NULL;
    __Pyx_BEGIN_CRITICAL_SECTION(kwds);
    while (
        #if CYTHON_AVOID_BORROWED_REFS
        __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL)
        #else
        PyDict_Next(kwds, &pos, &key, NULL)
        #endif
    ) {
        PyObject** const *name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (!*name) {
            size_t index_found = 0;
            int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
            if (cmp != 1) {
                if (cmp == 0) {
                    PyErr_Format(PyExc_TypeError,
                        "%s() got an unexpected keyword argument '%U'",
                        function_name, key);
                }
                #if CYTHON_AVOID_BORROWED_REFS
                Py_DECREF(key);
                #endif
                break;
            }
        }
        #if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(key);
        #endif
    }
    __Pyx_END_CRITICAL_SECTION();
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(pos);
    #endif
    assert(PyErr_Occurred());
}
static int __Pyx_ParseKeywordDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    PyObject** const *name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    Py_ssize_t extracted = 0;
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
    if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
#endif
    name = first_kw_arg;
    while (*name && num_kwargs > extracted) {
        PyObject * key = **name;
        PyObject *value;
        int found = 0;
        #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
        found = PyDict_GetItemRef(kwds, key, &value);
        #else
        value = PyDict_GetItemWithError(kwds, key);
        if (value) {
            Py_INCREF(value);
            found = 1;
        } else {
            if (unlikely(PyErr_Occurred())) goto bad;
        }
        #endif
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
            extracted++;
        }
        name++;
    }
    if (num_kwargs > extracted) {
        if (ignore_unknown_kwargs) {
            if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1))
                goto bad;
        } else {
            __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name);
            goto bad;
        }
    }
    return 0;
bad:
    return -1;
}
static int __Pyx_ParseKeywordDictToDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject** const *name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    Py_ssize_t len;
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
    if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
#endif
    if (PyDict_Update(kwds2, kwds) < 0) goto bad;
    name = first_kw_arg;
    while (*name) {
        PyObject *key = **name;
        PyObject *value;
#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop))
        int found = PyDict_Pop(kwds2, key, &value);
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
        }
#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
        int found = PyDict_GetItemRef(kwds2, key, &value);
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
            if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad;
        }
#else
    #if CYTHON_COMPILING_IN_CPYTHON
        value = _PyDict_Pop(kwds2, key, kwds2);
    #else
        value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2);
    #endif
        if (value == kwds2) {
            Py_DECREF(value);
        } else {
            if (unlikely(!value)) goto bad;
            values[name-argnames] = value;
        }
#endif
        name++;
    }
    len = PyDict_Size(kwds2);
    if (len > 0) {
        return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name);
    } else if (unlikely(len == -1)) {
        goto bad;
    }
    return 0;
bad:
    return -1;
}
static int __Pyx_ParseKeywordsTuple(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    PyObject *key = NULL;
    PyObject** const * name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) {
#if CYTHON_AVOID_BORROWED_REFS
        key = __Pyx_PySequence_ITEM(kwds, pos);
#else
        key = __Pyx_PyTuple_GET_ITEM(kwds, pos);
#endif
#if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!key)) goto bad;
#endif
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            PyObject *value = kwvalues[pos];
            values[name-argnames] = __Pyx_NewRef(value);
        } else {
            size_t index_found = 0;
            int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
            if (cmp == 1) {
                PyObject *value = kwvalues[pos];
                values[index_found] = __Pyx_NewRef(value);
            } else {
                if (unlikely(cmp == -1)) goto bad;
                if (kwds2) {
                    PyObject *value = kwvalues[pos];
                    if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
                } else if (!ignore_unknown_kwargs) {
                    goto invalid_keyword;
                }
            }
        }
        #if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(key);
        key = NULL;
        #endif
    }
    return 0;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    goto bad;
bad:
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(key);
    #endif
    return -1;
}

/* ParseKeywords */
static int __Pyx_ParseKeywords(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)))
        return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
    else if (kwds2)
        return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name);
    else
        return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    int result;
    PyObject *exc_type;
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *current_exception = tstate->current_exception;
    if (unlikely(!current_exception)) return 0;
    exc_type = (PyObject*) Py_TYPE(current_exception);
    if (exc_type == err) return 1;
#else
    exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
#endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(exc_type);
    #endif
    if (unlikely(PyTuple_Check(err))) {
        result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    } else {
        result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
    }
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(exc_type);
    #endif
    return result;
}
#endif

/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *tmp_value;
    assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
    if (value) {
        #if CYTHON_COMPILING_IN_CPYTHON
        if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
        #endif
            PyException_SetTraceback(value, tb);
    }
    tmp_value = tstate->current_exception;
    tstate->current_exception = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
#else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject* exc_value;
    exc_value = tstate->current_exception;
    tstate->current_exception = 0;
    *value = exc_value;
    *type = NULL;
    *tb = NULL;
    if (exc_value) {
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        #if CYTHON_COMPILING_IN_CPYTHON
        *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
        Py_XINCREF(*tb);
        #else
        *tb = PyException_GetTraceback(exc_value);
        #endif
    }
#else
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#endif
}
#endif

/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
    return result;
#else
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
#endif
}

/* GetBuiltinName (used by GetModuleGlobalName) */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name);
    if (unlikely(!result) && !PyErr_Occurred()) {
        PyErr_Format(PyExc_NameError,
            "name '%U' is not defined", name);
    }
    return result;
}

/* PyDictVersioning (used by GetModuleGlobalName) */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(!__pyx_m)) {
        if (!PyErr_Occurred())
            PyErr_SetNone(PyExc_NameError);
        return NULL;
    }
    result = PyObject_GetAttr(__pyx_m, name);
    if (likely(result)) {
        return result;
    }
    PyErr_Clear();
#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear();
    __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return result;
    }
#else
    result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* RaiseException */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if PY_VERSION_HEX >= 0x030C00A6
        PyException_SetTraceback(value, tb);
#elif CYTHON_FAST_THREAD_STATE
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#else
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}

/* decode_c_bytes (used by decode_bytes) */
static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
         const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    if (unlikely((start < 0) | (stop < 0))) {
        if (start < 0) {
            start += length;
            if (start < 0)
                start = 0;
        }
        if (stop < 0)
            stop += length;
    }
    if (stop > length)
        stop = length;
    if (unlikely(stop <= start))
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_unicode);
    length = stop - start;
    cstring += start;
    if (decode_func) {
        return decode_func(cstring, length, errors);
    } else {
        return PyUnicode_Decode(cstring, length, encoding, errors);
    }
}

/* PyObjectSetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
    return PyObject_SetAttr(obj, attr_name, value);
}
#endif

/* PyObjectVectorCallKwBuilder (used by PyObjectVectorCallMethodKwBuilder) */
#if CYTHON_VECTORCALL
static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    (void)__Pyx_PyObject_FastCallDict;
    Py_INCREF(key);
    if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1;
    args[n] = value;
    return 0;
}
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    (void)__Pyx_VectorcallBuilder_AddArgStr;
    if (unlikely(!PyUnicode_Check(key))) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        return -1;
    }
    return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n);
}
static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    PyObject *pyKey = PyUnicode_FromString(key);
    if (!pyKey) return -1;
    return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n);
}
#else // CYTHON_VECTORCALL
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) {
    if (unlikely(!PyUnicode_Check(key))) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        return -1;
    }
    return PyDict_SetItem(builder, key, value);
}
#endif

/* PyObjectVectorCallMethodKwBuilder */
#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames) {
    PyObject *result;
    PyObject *obj = PyObject_GetAttr(args[0], name);
    if (unlikely(!obj))
        return NULL;
    result = __Pyx_Object_Vectorcall_CallFromBuilder(obj, args+1, nargsf-1, kwnames);
    Py_DECREF(obj);
    return result;
}
#endif

/* PyObjectFormatAndDecref */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
    if (unlikely(!s)) return NULL;
    if (likely(PyUnicode_CheckExact(s))) return s;
    return __Pyx_PyObject_FormatAndDecref(s, f);
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
    PyObject *result;
    if (unlikely(!s)) return NULL;
    result = PyObject_Format(s, f);
    Py_DECREF(s);
    return result;
}

/* JoinPyUnicode */
static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char) {
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyObject *result_uval;
    int result_ukind, kind_shift;
    Py_ssize_t i, char_pos;
    void *result_udata;
    if (max_char > 1114111) max_char = 1114111;
    result_uval = PyUnicode_New(result_ulength, max_char);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
    kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1;
    result_udata = PyUnicode_DATA(result_uval);
    assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
    if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0))
        goto overflow;
    char_pos = 0;
    for (i=0; i < value_count; i++) {
        int ukind;
        Py_ssize_t ulength;
        void *udata;
        PyObject *uval = values[i];
        #if !CYTHON_COMPILING_IN_LIMITED_API
        if (__Pyx_PyUnicode_READY(uval) == (-1))
            goto bad;
        #endif
        ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(ulength < 0)) goto bad;
        #endif
        if (unlikely(!ulength))
            continue;
        if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
            goto overflow;
        ukind = __Pyx_PyUnicode_KIND(uval);
        udata = __Pyx_PyUnicode_DATA(uval);
        if (ukind == result_ukind) {
            memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
        } else {
            #if PY_VERSION_HEX >= 0x030d0000
            if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad;
            #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters)
            _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
            #else
            Py_ssize_t j;
            for (j=0; j < ulength; j++) {
                Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
                __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
            }
            #endif
        }
        char_pos += ulength;
    }
    return result_uval;
overflow:
    PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
bad:
    Py_DECREF(result_uval);
    return NULL;
#else
    Py_ssize_t i;
    PyObject *result = NULL;
    PyObject *value_tuple = PyTuple_New(value_count);
    if (unlikely(!value_tuple)) return NULL;
    CYTHON_UNUSED_VAR(max_char);
    CYTHON_UNUSED_VAR(result_ulength);
    for (i=0; i<value_count; i++) {
        Py_INCREF(values[i]);
        if (__Pyx_PyTuple_SET_ITEM(value_tuple, i, values[i]) != (0)) goto bad;
    }
    result = PyUnicode_Join(__pyx_mstate_global->__pyx_empty_unicode, value_tuple);
bad:
    Py_DECREF(value_tuple);
    return result;
#endif
}

/* RejectKeywords */
static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) {
    PyObject *key = NULL;
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) {
        key = __Pyx_PySequence_ITEM(kwds, 0);
    } else {
#if CYTHON_AVOID_BORROWED_REFS
        PyObject *pos = NULL;
#else
        Py_ssize_t pos = 0;
#endif
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
        if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return;
#endif
        __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL);
#if CYTHON_AVOID_BORROWED_REFS
        Py_XDECREF(pos);
#endif
    }
    if (likely(key)) {
        PyErr_Format(PyExc_TypeError,
            "%s() got an unexpected keyword argument '%U'",
            function_name, key);
        Py_DECREF(key);
    }
}

/* PyObjectFastCallMethod */
#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) {
    PyObject *result;
    PyObject *attr = PyObject_GetAttr(args[0], name);
    if (unlikely(!attr))
        return NULL;
    result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1);
    Py_DECREF(attr);
    return result;
}
#endif

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (unlikely(!j)) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_SIZE
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) {
        return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared);
    } else
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i));
    }
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
#else
    (void)wraparound;
    (void)boundscheck;
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i));
    }
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
#else
    (void)wraparound;
    (void)boundscheck;
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) {
            return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared);
        } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            return __Pyx_NewRef(PyList_GET_ITEM(o, n));
        }
    } else
    #if !CYTHON_AVOID_BORROWED_REFS
    if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            return __Pyx_NewRef(PyTuple_GET_ITEM(o, n));
        }
    } else
    #endif
#endif
#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
    {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (!is_list && mm && mm->mp_subscript) {
            PyObject *r, *key = PyLong_FromSsize_t(i);
            if (unlikely(!key)) return NULL;
            r = mm->mp_subscript(o, key);
            Py_DECREF(key);
            return r;
        }
        if (is_list || likely(sm && sm->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
                Py_ssize_t l = sm->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return sm->sq_item(o, i);
        }
    }
#else
    if (is_list || !PyMapping_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    (void)wraparound;
    (void)boundscheck;
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
}

/* ArgTypeTestFunc (used by ArgTypeTest) */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    __Pyx_TypeName type_name;
    __Pyx_TypeName obj_type_name;
    PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode;
    int from_annotation_subclass = 0;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (!exact) {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    } else if (exact == 2) {
        if (__Pyx_TypeCheck(obj, type)) {
            from_annotation_subclass = 1;
            extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately;
        }
    }
    type_name = __Pyx_PyType_GetFullyQualifiedName(type);
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
        ", got " __Pyx_FMT_TYPENAME ")"
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
        "%s%U"
#endif
        , name, type_name, obj_type_name
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
        , (from_annotation_subclass ? ". " : ""), extra_info
#endif
        );
#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    if (exact == 2 && from_annotation_subclass) {
        PyObject *res;
        PyObject *vargs[2];
        vargs[0] = PyErr_GetRaisedException();
        vargs[1] = extra_info;
        res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL);
        Py_XDECREF(res);
        PyErr_SetRaisedException(vargs[0]);
    }
#endif
    __Pyx_DECREF_TypeName(type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
    PyObject* exc_type;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    exc_type = __Pyx_PyErr_CurrentExceptionType();
    if (unlikely(exc_type)) {
        if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
            return -1;
        __Pyx_PyErr_Clear();
        return 0;
    }
    return 0;
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    }
    return __Pyx_IterFinish();
}

/* SliceObject */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
        Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
    __Pyx_TypeName obj_type_name;
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyLong_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyLong_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_USE_TYPE_SLOTS
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
bad:
    return NULL;
}

/* GetTopmostException (used by SaveResetException) */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    PyObject *exc_value = exc_info->exc_value;
    if (exc_value == NULL || exc_value == Py_None) {
        *value = NULL;
        *type = NULL;
        *tb = NULL;
    } else {
        *value = exc_value;
        Py_INCREF(*value);
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        *tb = PyException_GetTraceback(exc_value);
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #endif
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    PyObject *tmp_value = exc_info->exc_value;
    exc_info->exc_value = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
  #else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
  #endif
}
#endif

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type = NULL, *local_value, *local_tb = NULL;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if PY_VERSION_HEX >= 0x030C0000
    local_value = tstate->current_exception;
    tstate->current_exception = 0;
  #else
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
  #endif
#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000
    local_value = PyErr_GetRaisedException();
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
#if __PYX_LIMITED_VERSION_HEX > 0x030C0000
    if (likely(local_value)) {
        local_type = (PyObject*) Py_TYPE(local_value);
        Py_INCREF(local_type);
        local_tb = PyException_GetTraceback(local_value);
    }
#else
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
      #if PY_VERSION_HEX >= 0x030B00a4
        tmp_value = exc_info->exc_value;
        exc_info->exc_value = local_value;
        tmp_type = NULL;
        tmp_tb = NULL;
        Py_XDECREF(local_type);
        Py_XDECREF(local_tb);
      #else
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
      #endif
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000
    PyErr_SetHandledException(local_value);
    Py_XDECREF(local_value);
    Py_XDECREF(local_type);
    Py_XDECREF(local_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
#endif
}

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_value = exc_info->exc_value;
    exc_info->exc_value = *value;
    if (tmp_value == NULL || tmp_value == Py_None) {
        Py_XDECREF(tmp_value);
        tmp_value = NULL;
        tmp_type = NULL;
        tmp_tb = NULL;
    } else {
        tmp_type = (PyObject*) Py_TYPE(tmp_value);
        Py_INCREF(tmp_type);
        #if CYTHON_COMPILING_IN_CPYTHON
        tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
        Py_XINCREF(tmp_tb);
        #else
        tmp_tb = PyException_GetTraceback(tmp_value);
        #endif
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
  #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
  #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
    PyObject *runerr = NULL;
    Py_ssize_t key_value;
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        __Pyx_TypeName index_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(index));
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError,
            "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name);
        __Pyx_DECREF_TypeName(index_type_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
    __Pyx_TypeName obj_type_name;
    if (likely(PyType_Check(obj))) {
        PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_mstate_global->__pyx_n_u_class_getitem);
        if (!meth) {
            PyErr_Clear();
        } else {
            PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
            Py_DECREF(meth);
            return result;
        }
    }
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
    PyTypeObject *tp = Py_TYPE(obj);
    PyMappingMethods *mm = tp->tp_as_mapping;
    PySequenceMethods *sm = tp->tp_as_sequence;
    if (likely(mm && mm->mp_subscript)) {
        return mm->mp_subscript(obj, key);
    }
    if (likely(sm && sm->sq_item)) {
        return __Pyx_PyObject_GetIndex(obj, key);
    }
    return __Pyx_PyObject_GetItem_Slow(obj, key);
}
#endif

/* RaiseClosureNameError */
static void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* dict_setdefault (used by FetchCommonType) */
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) {
    PyObject* value;
#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4)
    PyDict_SetDefaultRef(d, key, default_value, &value);
#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    PyObject *args[] = {d, key, default_value};
    value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#elif CYTHON_COMPILING_IN_LIMITED_API
    value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL);
#else
    value = PyDict_SetDefault(d, key, default_value);
    if (unlikely(!value)) return NULL;
    Py_INCREF(value);
#endif
    return value;
}

/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */
#if CYTHON_COMPILING_IN_LIMITED_API
static Py_ssize_t __Pyx_GetTypeDictOffset(void) {
    PyObject *tp_dictoffset_o;
    Py_ssize_t tp_dictoffset;
    tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__");
    if (unlikely(!tp_dictoffset_o)) return -1;
    tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o);
    Py_DECREF(tp_dictoffset_o);
    if (unlikely(tp_dictoffset == 0)) {
        PyErr_SetString(
            PyExc_TypeError,
            "'type' doesn't have a dictoffset");
        return -1;
    } else if (unlikely(tp_dictoffset < 0)) {
        PyErr_SetString(
            PyExc_TypeError,
            "'type' has an unexpected negative dictoffset. "
            "Please report this as Cython bug");
        return -1;
    }
    return tp_dictoffset;
}
static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) {
    static Py_ssize_t tp_dictoffset = 0;
    if (unlikely(tp_dictoffset == 0)) {
        tp_dictoffset = __Pyx_GetTypeDictOffset();
        if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) {
            tp_dictoffset = 0; // try again next time?
            return NULL;
        }
    }
    return *(PyObject**)((char*)tp + tp_dictoffset);
}
#endif

/* SetItemOnTypeDict (used by FixUpExtensionType) */
static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) {
    int result;
    PyObject *tp_dict;
#if CYTHON_COMPILING_IN_LIMITED_API
    tp_dict = __Pyx_GetTypeDict(tp);
    if (unlikely(!tp_dict)) return -1;
#else
    tp_dict = tp->tp_dict;
#endif
    result = PyDict_SetItem(tp_dict, k, v);
    if (likely(!result)) {
        PyType_Modified(tp);
        if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) {
            PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name,  (PyObject *) tp, k, NULL);
            if (!setNameResult) return -1;
            Py_DECREF(setNameResult);
        }
    }
    return result;
}

/* FixUpExtensionType (used by FetchCommonType) */
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
#if __PYX_LIMITED_VERSION_HEX > 0x030900B1
    CYTHON_UNUSED_VAR(spec);
    CYTHON_UNUSED_VAR(type);
    CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
#else
    const PyType_Slot *slot = spec->slots;
    int changed = 0;
#if !CYTHON_COMPILING_IN_LIMITED_API
    while (slot && slot->slot && slot->slot != Py_tp_members)
        slot++;
    if (slot && slot->slot == Py_tp_members) {
#if !CYTHON_COMPILING_IN_CPYTHON
        const
#endif  // !CYTHON_COMPILING_IN_CPYTHON)
            PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
        while (memb && memb->name) {
            if (memb->name[0] == '_' && memb->name[1] == '_') {
                if (strcmp(memb->name, "__weaklistoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_weaklistoffset = memb->offset;
                    changed = 1;
                }
                else if (strcmp(memb->name, "__dictoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_dictoffset = memb->offset;
                    changed = 1;
                }
#if CYTHON_METH_FASTCALL
                else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_vectorcall_offset = memb->offset;
                    changed = 1;
                }
#endif  // CYTHON_METH_FASTCALL
#if !CYTHON_COMPILING_IN_PYPY
                else if (strcmp(memb->name, "__module__") == 0) {
                    PyObject *descr;
                    assert(memb->type == T_OBJECT);
                    assert(memb->flags == 0 || memb->flags == READONLY);
                    descr = PyDescr_NewMember(type, memb);
                    if (unlikely(!descr))
                        return -1;
                    int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
                    Py_DECREF(descr);
                    if (unlikely(set_item_result < 0)) {
                        return -1;
                    }
                    changed = 1;
                }
#endif  // !CYTHON_COMPILING_IN_PYPY
            }
            memb++;
        }
    }
#endif  // !CYTHON_COMPILING_IN_LIMITED_API
#if !CYTHON_COMPILING_IN_PYPY
    slot = spec->slots;
    while (slot && slot->slot && slot->slot != Py_tp_getset)
        slot++;
    if (slot && slot->slot == Py_tp_getset) {
        PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc;
        while (getset && getset->name) {
            if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) {
                PyObject *descr = PyDescr_NewGetSet(type, getset);
                if (unlikely(!descr))
                    return -1;
                #if CYTHON_COMPILING_IN_LIMITED_API
                PyObject *pyname = PyUnicode_FromString(getset->name);
                if (unlikely(!pyname)) {
                    Py_DECREF(descr);
                    return -1;
                }
                int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr);
                Py_DECREF(pyname);
                #else
                CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
                int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
                #endif
                Py_DECREF(descr);
                if (unlikely(set_item_result < 0)) {
                    return -1;
                }
                changed = 1;
            }
            ++getset;
        }
    }
#else
    CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
#endif  // !CYTHON_COMPILING_IN_PYPY
    if (changed)
        PyType_Modified(type);
#endif  // PY_VERSION_HEX > 0x030900B1
    return 0;
}

/* AddModuleRef (used by FetchSharedCythonModule) */
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) {
      PyObject *module_dict = PyImport_GetModuleDict();
      PyObject *m;
      if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) {
          return NULL;
      }
      if (m != NULL && PyModule_Check(m)) {
          return m;
      }
      Py_XDECREF(m);
      m = PyModule_NewObject(name);
      if (m == NULL)
          return NULL;
      if (PyDict_CheckExact(module_dict)) {
          PyObject *new_m;
          (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m);
          Py_DECREF(m);
          return new_m;
      } else {
           if (PyObject_SetItem(module_dict, name, m) != 0) {
                Py_DECREF(m);
                return NULL;
            }
            return m;
      }
  }
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *py_name = PyUnicode_FromString(name);
      if (!py_name) return NULL;
      PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name);
      Py_DECREF(py_name);
      return module;
  }
#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#else
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *module = PyImport_AddModule(name);
      Py_XINCREF(module);
      return module;
  }
#endif

/* FetchSharedCythonModule (used by FetchCommonType) */
static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
    return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME);
}

/* FetchCommonType (used by CommonTypesMetaclass) */
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases);
    if (result && metaclass) {
        PyObject *old_tp = (PyObject*)Py_TYPE(result);
    Py_INCREF((PyObject*)metaclass);
#if __PYX_LIMITED_VERSION_HEX >= 0x03090000
        Py_SET_TYPE(result, metaclass);
#else
        result->ob_type = metaclass;
#endif
        Py_DECREF(old_tp);
    }
    return result;
}
#else
#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b)
#endif
static int __Pyx_VerifyCachedType(PyObject *cached_type,
                               const char *name,
                               Py_ssize_t expected_basicsize) {
    Py_ssize_t basicsize;
    if (!PyType_Check(cached_type)) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s is not a type object", name);
        return -1;
    }
    if (expected_basicsize == 0) {
        return 0; // size is inherited, nothing useful to check
    }
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_basicsize;
    py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
    if (unlikely(!py_basicsize)) return -1;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = NULL;
    if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1;
#else
    basicsize = ((PyTypeObject*) cached_type)->tp_basicsize;
#endif
    if (basicsize != expected_basicsize) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s has the wrong size, try recompiling",
            name);
        return -1;
    }
    return 0;
}
static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name;
    int get_item_ref_result;
    const char* object_name = strrchr(spec->name, '.');
    object_name = object_name ? object_name+1 : spec->name;
    py_object_name = PyUnicode_FromString(object_name);
    if (!py_object_name) return NULL;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) goto done;
    abi_module_dict = PyModule_GetDict(abi_module);
    if (!abi_module_dict) goto done;
    get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type);
    if (get_item_ref_result == 1) {
        if (__Pyx_VerifyCachedType(
              cached_type,
              object_name,
              spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    } else if (unlikely(get_item_ref_result == -1)) {
        goto bad;
    }
    cached_type = __Pyx_PyType_FromMetaclass(
        metaclass,
        CYTHON_USE_MODULE_STATE ? module : abi_module,
        spec, bases);
    if (unlikely(!cached_type)) goto bad;
    if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
    new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type);
    if (unlikely(new_cached_type != cached_type)) {
        if (unlikely(!new_cached_type)) goto bad;
        Py_DECREF(cached_type);
        cached_type = new_cached_type;
        if (__Pyx_VerifyCachedType(
                cached_type,
                object_name,
                spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    } else {
        Py_DECREF(new_cached_type);
    }
done:
    Py_XDECREF(abi_module);
    Py_DECREF(py_object_name);
    assert(cached_type == NULL || PyType_Check(cached_type));
    return (PyTypeObject *) cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CommonTypesMetaclass (used by CythonFunctionShared) */
static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) {
    return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
}
#if __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) {
    PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types");
    return NULL;
}
static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) {
    PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable");
    return -1;
}
#endif
static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
    {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL},
    {0, 0, 0, 0, 0}
};
static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = {
    {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset},
    #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
    {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call},
    {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call},
    {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr},
    #endif
    {0, 0}
};
static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
    __PYX_TYPE_MODULE_PREFIX "_common_types_metatype",
    0,
    0,
    Py_TPFLAGS_IMMUTABLETYPE |
    Py_TPFLAGS_DISALLOW_INSTANTIATION |
    Py_TPFLAGS_DEFAULT,
    __pyx_CommonTypesMetaclass_slots
};
static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
    __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
    PyObject *bases = PyTuple_Pack(1, &PyType_Type);
    if (unlikely(!bases)) {
        return -1;
    }
    mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
    Py_DECREF(bases);
    if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
        return -1;
    }
    return 0;
}

/* CallTypeTraverse (used by CythonFunctionShared) */
#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
#else
static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) {
    #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000
    if (__Pyx_get_runtime_version() < 0x03090000) return 0;
    #endif
    if (!always_call) {
        PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*);
        unsigned long flags = PyType_GetFlags(base);
        if (flags & Py_TPFLAGS_HEAPTYPE) {
            return 0;
        }
    }
    Py_VISIT((PyObject*)Py_TYPE(o));
    return 0;
}
#endif

/* PyMethodNew (used by CythonFunctionShared) */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    PyObject *result;
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    {
        PyObject *args[] = {func, self};
        result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL);
    }
    #else
    result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL);
    #endif
    return result;
}
#else
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    return PyMethod_New(func, self);
}
#endif

/* PyVectorcallFastCallDict (used by CythonFunctionShared) */
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    PyObject *res = NULL;
    PyObject *kwnames;
    PyObject **newargs;
    PyObject **kwvalues;
    Py_ssize_t i;
    #if CYTHON_AVOID_BORROWED_REFS
    PyObject *pos;
    #else
    Py_ssize_t pos;
    #endif
    size_t j;
    PyObject *key, *value;
    unsigned long keys_are_strings;
    #if !CYTHON_ASSUME_SAFE_SIZE
    Py_ssize_t nkw = PyDict_Size(kw);
    if (unlikely(nkw == -1)) return NULL;
    #else
    Py_ssize_t nkw = PyDict_GET_SIZE(kw);
    #endif
    newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
    if (unlikely(newargs == NULL)) {
        PyErr_NoMemory();
        return NULL;
    }
    for (j = 0; j < nargs; j++) newargs[j] = args[j];
    kwnames = PyTuple_New(nkw);
    if (unlikely(kwnames == NULL)) {
        PyMem_Free(newargs);
        return NULL;
    }
    kwvalues = newargs + nargs;
    pos = 0;
    i = 0;
    keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
    while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) {
        keys_are_strings &=
        #if CYTHON_COMPILING_IN_LIMITED_API
            PyType_GetFlags(Py_TYPE(key));
        #else
            Py_TYPE(key)->tp_flags;
        #endif
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup;
        #else
        PyTuple_SET_ITEM(kwnames, i, key);
        #endif
        kwvalues[i] = value;
        i++;
    }
    if (unlikely(!keys_are_strings)) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        goto cleanup;
    }
    res = vc(func, newargs, nargs, kwnames);
cleanup:
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(pos);
    #endif
    Py_DECREF(kwnames);
    for (i = 0; i < nkw; i++)
        Py_DECREF(kwvalues[i]);
    PyMem_Free(newargs);
    return res;
}
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    Py_ssize_t kw_size =
        likely(kw == NULL) ?
        0 :
#if !CYTHON_ASSUME_SAFE_SIZE
        PyDict_Size(kw);
#else
        PyDict_GET_SIZE(kw);
#endif
    if (kw_size == 0) {
        return vc(func, args, nargs, NULL);
    }
#if !CYTHON_ASSUME_SAFE_SIZE
    else if (unlikely(kw_size == -1)) {
        return NULL;
    }
#endif
    return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
}
#endif

/* CythonFunctionShared (used by CythonFunction) */
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) {
    if (__Pyx_CyFunction_Check(func)) {
        return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
    } else if (PyCFunction_Check(func)) {
        return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
    if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) {
        int result;
        PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func_2);
        if (unlikely(!newFunc)) {
            PyErr_Clear(); // It's only an optimization, so don't throw an error
            return 0;
        }
        result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc);
        Py_DECREF(newFunc);
        return result;
    }
    return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc);
}
#else
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
    if (PyMethod_Check(func)) {
        func = PyMethod_GET_FUNCTION(func);
    }
    return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
}
#endif
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    __Pyx_Py_XDECREF_SET(
        __Pyx_CyFunction_GetClassObj(f),
            ((classobj) ? __Pyx_NewRef(classobj) : NULL));
#else
    __Pyx_Py_XDECREF_SET(
        ((PyCMethodObject *) (f))->mm_class,
        (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
#endif
}
static PyObject *
__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_doc == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
        if (unlikely(!op->func_doc)) return NULL;
#else
        if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
            op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
#endif
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) {
    PyObject *result;
    CYTHON_UNUSED_VAR(closure);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_doc_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_doc, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_name == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_name = PyObject_GetAttrString(op->func, "__name__");
#else
        op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
{
    PyObject *result = NULL;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_name_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_name, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    PyObject *result;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    Py_INCREF(op->func_qualname);
    result = op->func_qualname;
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_qualname, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
#endif
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(op);
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = NULL;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_defaults_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_kwdefaults_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value || value == Py_None) {
        value = NULL;
    } else if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_annotations, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
    PyObject *result;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_annotations_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) {
    int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
    if (is_coroutine) {
        PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine;
        fromlist = PyList_New(1);
        if (unlikely(!fromlist)) return NULL;
        Py_INCREF(marker);
#if CYTHON_ASSUME_SAFE_MACROS
        PyList_SET_ITEM(fromlist, 0, marker);
#else
        if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
            Py_DECREF(fromlist);
            return NULL;
        }
#endif
        module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
        if (unlikely(!module)) goto ignore;
        is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker);
        Py_DECREF(module);
        if (likely(is_coroutine_value)) {
            return is_coroutine_value;
        }
ignore:
        PyErr_Clear();
    }
    return __Pyx_PyBool_FromLong(is_coroutine);
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
    PyObject *result;
    CYTHON_UNUSED_VAR(context);
    if (op->func_is_coroutine) {
        return __Pyx_NewRef(op->func_is_coroutine);
    }
    result = __Pyx_CyFunction_get_is_coroutine_value(op);
    if (unlikely(!result))
        return NULL;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    if (op->func_is_coroutine) {
        Py_DECREF(result);
        result = __Pyx_NewRef(op->func_is_coroutine);
    } else {
        op->func_is_coroutine = __Pyx_NewRef(result);
    }
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
    if (!py_name) return;
    PyErr_Format(PyExc_TypeError,
        "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
        py_name, message, size);
    Py_DECREF(py_name);
#else
    const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
    PyErr_Format(PyExc_TypeError,
        "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
        name, message, size);
#endif
}
static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
    if (!py_name) return;
    PyErr_Format(PyExc_TypeError,
        "%.200S() %s",
        py_name, message);
    Py_DECREF(py_name);
#else
    const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
    PyErr_Format(PyExc_TypeError,
        "%.200s() %s",
        name, message);
#endif
}
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *
__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_GetAttrString(op->func, "__module__");
}
static int
__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_SetAttrString(op->func, "__module__", value);
}
#endif
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {"__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
    {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
    {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
#else
    {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
    {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
#endif
    {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
#endif
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
#if !CYTHON_COMPILING_IN_LIMITED_API
    {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
#endif
#if CYTHON_METH_FASTCALL
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
#else
    {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
#else
    {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
#endif
#endif
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
{
    PyObject *result = NULL;
    CYTHON_UNUSED_VAR(args);
    __Pyx_BEGIN_CRITICAL_SECTION(m);
    Py_INCREF(m->func_qualname);
    result = m->func_qualname;
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
#if !CYTHON_COMPILING_IN_LIMITED_API
    PyCFunctionObject *cf = (PyCFunctionObject*) op;
#endif
    if (unlikely(op == NULL))
        return NULL;
#if CYTHON_COMPILING_IN_LIMITED_API
    op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
    if (unlikely(!op->func)) return NULL;
#endif
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
#if !CYTHON_COMPILING_IN_LIMITED_API
    cf->m_ml = ml;
    cf->m_self = (PyObject *) op;
#endif
    Py_XINCREF(closure);
    op->func_closure = closure;
#if !CYTHON_COMPILING_IN_LIMITED_API
    Py_XINCREF(module);
    cf->m_module = module;
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    op->func_dict = NULL;
#endif
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    op->func_classobj = NULL;
#else
    ((PyCMethodObject*)op)->mm_class = NULL;
#endif
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    op->func_is_coroutine = NULL;
#if CYTHON_METH_FASTCALL
    switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
    case METH_NOARGS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
        break;
    case METH_O:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
        break;
    case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
        break;
    case METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
        break;
    case METH_VARARGS | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = NULL;
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        Py_DECREF(op);
        return NULL;
    }
#endif
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(m->func);
#else
    Py_CLEAR(((PyCFunctionObject*)m)->m_module);
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(m->func_dict);
#elif PY_VERSION_HEX < 0x030d0000
    _PyObject_ClearManagedDict((PyObject*)m);
#else
    PyObject_ClearManagedDict((PyObject*)m);
#endif
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
#else
    {
        PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
        ((PyCMethodObject *) (m))->mm_class = NULL;
        Py_XDECREF(cls);
    }
#endif
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    Py_CLEAR(m->func_is_coroutine);
    Py_CLEAR(m->defaults);
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    __Pyx_PyHeapTypeObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    {
        int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg);
        if (e) return e;
    }
    Py_VISIT(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(m->func);
#else
    Py_VISIT(((PyCFunctionObject*)m)->m_module);
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(m->func_dict);
#else
    {
        int e =
#if PY_VERSION_HEX < 0x030d0000
            _PyObject_VisitManagedDict
#else
            PyObject_VisitManagedDict
#endif
                ((PyObject*)m, visit, arg);
        if (e != 0) return e;
    }
#endif
    __Pyx_VISIT_CONST(m->func_name);
    __Pyx_VISIT_CONST(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    __Pyx_VISIT_CONST(m->func_code);
    Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    Py_VISIT(m->func_annotations);
    Py_VISIT(m->func_is_coroutine);
    Py_VISIT(m->defaults);
    return 0;
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
    PyObject *repr;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    repr = PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
    __Pyx_END_CRITICAL_SECTION();
    return repr;
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
    PyCFunction meth;
    int flags;
    meth = PyCFunction_GetFunction(f);
    if (unlikely(!meth)) return NULL;
    flags = PyCFunction_GetFlags(f);
    if (unlikely(flags < 0)) return NULL;
#else
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    int flags = f->m_ml->ml_flags;
#endif
    Py_ssize_t size;
    switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_SIZE
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 0))
                return (*meth)(self, NULL);
            __Pyx_CyFunction_raise_argument_count_error(
                (__pyx_CyFunctionObject*)func,
                "takes no arguments", size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_SIZE
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            __Pyx_CyFunction_raise_argument_count_error(
                (__pyx_CyFunctionObject*)func,
                "takes exactly one argument", size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        return NULL;
    }
    __Pyx_CyFunction_raise_type_error(
        (__pyx_CyFunctionObject*)func, "takes no keyword arguments");
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *self, *result;
#if CYTHON_COMPILING_IN_LIMITED_API
    self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
    if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
    self = ((PyCFunctionObject*)func)->m_self;
#endif
    result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
    return result;
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
     __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
    if (vc) {
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
        return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
#else
        (void) &__Pyx_PyVectorcall_FastCallDict;
        return PyVectorcall_Call(func, args, kw);
#endif
    }
#endif
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
#if CYTHON_ASSUME_SAFE_SIZE
        argc = PyTuple_GET_SIZE(args);
#else
        argc = PyTuple_Size(args);
        if (unlikely(argc < 0)) return NULL;
#endif
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            PyErr_Format(PyExc_TypeError,
                         "unbound method %.200S() needs an argument",
                         cyfunc->func_qualname);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
{
    int ret = 0;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        if (unlikely(nargs < 1)) {
            __Pyx_CyFunction_raise_type_error(
                cyfunc, "needs an argument");
            return -1;
        }
        ret = 1;
    }
    if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) {
        __Pyx_CyFunction_raise_type_error(
            cyfunc, "takes no keyword arguments");
        return -1;
    }
    return ret;
}
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 0)) {
        __Pyx_CyFunction_raise_argument_count_error(
            cyfunc, "takes no arguments", nargs);
        return NULL;
    }
    return meth(self, NULL);
}
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 1)) {
        __Pyx_CyFunction_raise_argument_count_error(
            cyfunc, "takes exactly one argument", nargs);
        return NULL;
    }
    return meth(self, args[0]);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    #if PY_VERSION_HEX < 0x030e00A6
    size_t nargs_value = (size_t) nargs;
    #else
    Py_ssize_t nargs_value = nargs;
    #endif
    return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames);
}
#endif
static PyType_Slot __pyx_CyFunctionType_slots[] = {
    {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
    {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
    {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
    {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
    {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
    {Py_tp_methods, (void *)__pyx_CyFunction_methods},
    {Py_tp_members, (void *)__pyx_CyFunction_members},
    {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
    {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
    {0, 0},
};
static PyType_Spec __pyx_CyFunctionType_spec = {
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#if CYTHON_METH_FASTCALL
#if defined(Py_TPFLAGS_HAVE_VECTORCALL)
    Py_TPFLAGS_HAVE_VECTORCALL |
#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL)
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
#endif // CYTHON_METH_FASTCALL
#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API
    Py_TPFLAGS_MANAGED_DICT |
#endif
    Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION |
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    __pyx_CyFunctionType_slots
};
static int __pyx_CyFunction_init(PyObject *module) {
    __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
    mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(
        mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL);
    if (unlikely(mstate->__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type);
    if (unlikely(!m->defaults))
        return NULL;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* AllocateExtensionType */
static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) {
    if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
        allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc);
        return alloc_func(t, 0);
    } else {
        newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc);
    #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
        if (!tp_new) {
            PyObject *new_str = PyUnicode_FromString("__new__");
            if (likely(new_str)) {
                PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL);
                Py_DECREF(new_str);
                return o;
            } else
                return NULL;
        } else
    #endif
        return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0);
    }
}

/* PyObjectCallNoArg (used by PyObjectCallMethod0) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
    PyObject *arg[2] = {NULL, NULL};
    return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectGetMethod (used by PyObjectCallMethod0) */
#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    __Pyx_TypeName type_name;
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
        if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (likely(descr != NULL)) {
        *method = descr;
        return 0;
    }
    type_name = __Pyx_PyType_GetFullyQualifiedName(tp);
    PyErr_Format(PyExc_AttributeError,
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, name);
    __Pyx_DECREF_TypeName(type_name);
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}
#endif

/* PyObjectCallMethod0 (used by PyType_Ready) */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
    PyObject *args[1] = {obj};
    (void) __Pyx_PyObject_CallOneArg;
    (void) __Pyx_PyObject_CallNoArg;
    return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#else
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
#endif
}

/* ValidateBasesTuple (used by PyType_Ready) */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
    Py_ssize_t i, n;
#if CYTHON_ASSUME_SAFE_SIZE
    n = PyTuple_GET_SIZE(bases);
#else
    n = PyTuple_Size(bases);
    if (unlikely(n < 0)) return -1;
#endif
    for (i = 1; i < n; i++)
    {
        PyTypeObject *b;
#if CYTHON_AVOID_BORROWED_REFS
        PyObject *b0 = PySequence_GetItem(bases, i);
        if (!b0) return -1;
#elif CYTHON_ASSUME_SAFE_MACROS
        PyObject *b0 = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *b0 = PyTuple_GetItem(bases, i);
        if (!b0) return -1;
#endif
        b = (PyTypeObject*) b0;
        if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
        {
            __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b);
            PyErr_Format(PyExc_TypeError,
                "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
            __Pyx_DECREF_TypeName(b_name);
#if CYTHON_AVOID_BORROWED_REFS
            Py_DECREF(b0);
#endif
            return -1;
        }
        if (dictoffset == 0)
        {
            Py_ssize_t b_dictoffset = 0;
#if CYTHON_USE_TYPE_SLOTS
            b_dictoffset = b->tp_dictoffset;
#else
            PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
            if (!py_b_dictoffset) goto dictoffset_return;
            b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
            Py_DECREF(py_b_dictoffset);
            if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
#endif
            if (b_dictoffset) {
                {
                    __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b);
                    PyErr_Format(PyExc_TypeError,
                        "extension type '%.200s' has no __dict__ slot, "
                        "but base type '" __Pyx_FMT_TYPENAME "' has: "
                        "either add 'cdef dict __dict__' to the extension type "
                        "or add '__slots__ = [...]' to the base type",
                        type_name, b_name);
                    __Pyx_DECREF_TypeName(b_name);
                }
#if !CYTHON_USE_TYPE_SLOTS
              dictoffset_return:
#endif
#if CYTHON_AVOID_BORROWED_REFS
                Py_DECREF(b0);
#endif
                return -1;
            }
        }
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(b0);
#endif
    }
    return 0;
}
#endif

/* PyType_Ready */
CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) {
    while (t) {
        PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
        if (bases) {
            return 1;
        }
        t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*);
    }
    return 0;
}
static int __Pyx_PyType_Ready(PyTypeObject *t) {
#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION)
    (void)__Pyx_PyObject_CallMethod0;
#if CYTHON_USE_TYPE_SPECS
    (void)__Pyx_validate_bases_tuple;
#endif
    return PyType_Ready(t);
#else
    int r;
    if (!__Pyx_PyType_HasMultipleInheritance(t)) {
        return PyType_Ready(t);
    }
    PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
    if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
        return -1;
#if !defined(PYSTON_MAJOR_VERSION)
    {
        int gc_was_enabled;
    #if PY_VERSION_HEX >= 0x030A00b1
        gc_was_enabled = PyGC_Disable();
        (void)__Pyx_PyObject_CallMethod0;
    #else
        PyObject *ret, *py_status;
        PyObject *gc = NULL;
        #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\
                !CYTHON_COMPILING_IN_GRAAL
        gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc);
        #endif
        if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc);
        if (unlikely(!gc)) return -1;
        py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled);
        if (unlikely(!py_status)) {
            Py_DECREF(gc);
            return -1;
        }
        gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
        Py_DECREF(py_status);
        if (gc_was_enabled > 0) {
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable);
            if (unlikely(!ret)) {
                Py_DECREF(gc);
                return -1;
            }
            Py_DECREF(ret);
        } else if (unlikely(gc_was_enabled == -1)) {
            Py_DECREF(gc);
            return -1;
        }
    #endif
        t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
#if PY_VERSION_HEX >= 0x030A0000
        t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
#endif
#else
        (void)__Pyx_PyObject_CallMethod0;
#endif
    r = PyType_Ready(t);
#if !defined(PYSTON_MAJOR_VERSION)
        t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
    #if PY_VERSION_HEX >= 0x030A00b1
        if (gc_was_enabled)
            PyGC_Enable();
    #else
        if (gc_was_enabled) {
            PyObject *tp, *v, *tb;
            PyErr_Fetch(&tp, &v, &tb);
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable);
            if (likely(ret || r == -1)) {
                Py_XDECREF(ret);
                PyErr_Restore(tp, v, tb);
            } else {
                Py_XDECREF(tp);
                Py_XDECREF(v);
                Py_XDECREF(tb);
                r = -1;
            }
        }
        Py_DECREF(gc);
    #endif
    }
#endif
    return r;
#endif
}

/* DelItemOnTypeDict (used by SetupReduce) */
static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) {
    int result;
    PyObject *tp_dict;
#if CYTHON_COMPILING_IN_LIMITED_API
    tp_dict = __Pyx_GetTypeDict(tp);
    if (unlikely(!tp_dict)) return -1;
#else
    tp_dict = tp->tp_dict;
#endif
    result = PyDict_DelItem(tp_dict, k);
    if (likely(!result)) PyType_Modified(tp);
    return result;
}

/* SetupReduce */
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_getstate = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
    PyObject *getstate = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_getstate);
#else
    getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate);
    if (!getstate && PyErr_Occurred()) {
        goto __PYX_BAD;
    }
#endif
    if (getstate) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate);
#else
        object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate);
        if (!object_getstate && PyErr_Occurred()) {
            goto __PYX_BAD;
        }
#endif
        if (object_getstate != getstate) {
            goto __PYX_GOOD;
        }
    }
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython);
            if (likely(reduce_cython)) {
                ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred()) {
        __Pyx_TypeName type_obj_name =
            __Pyx_PyType_GetFullyQualifiedName((PyTypeObject*)type_obj);
        PyErr_Format(PyExc_RuntimeError,
            "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name);
        __Pyx_DECREF_TypeName(type_obj_name);
    }
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
    Py_XDECREF(object_getstate);
    Py_XDECREF(getstate);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType_3_2_5
#define __PYX_HAVE_RT_ImportType_3_2_5
static PyTypeObject *__Pyx_ImportType_3_2_5(PyObject *module, const char *module_name, const char *class_name,
    size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_5 check_size)
{
    PyObject *result = 0;
    Py_ssize_t basicsize;
    Py_ssize_t itemsize;
#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API)
    PyObject *py_basicsize;
    PyObject *py_itemsize;
#endif
    result = PyObject_GetAttrString(module, class_name);
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) )
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
    itemsize = ((PyTypeObject *)result)->tp_itemsize;
#else
    if (size == 0) {
        return (PyTypeObject *)result;
    }
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
    py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
    if (!py_itemsize)
        goto bad;
    itemsize = PyLong_AsSsize_t(py_itemsize);
    Py_DECREF(py_itemsize);
    py_itemsize = 0;
    if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if (itemsize) {
        if (size % alignment) {
            alignment = size % alignment;
        }
        if (itemsize < (Py_ssize_t)alignment)
            itemsize = (Py_ssize_t)alignment;
    }
    if ((size_t)(basicsize + itemsize) < size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize+itemsize);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error_3_2_5 &&
            ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd-%zd from PyObject",
            module_name, class_name, size, basicsize, basicsize+itemsize);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_2_5 && (size_t)basicsize > size) {
        if (PyErr_WarnFormat(NULL, 0,
                "%.200s.%.200s size changed, may indicate binary incompatibility. "
                "Expected %zd from C header, got %zd from PyObject",
                module_name, class_name, size, basicsize) < 0) {
            goto bad;
        }
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* HasAttr (used by ImportImpl) */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!PyUnicode_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_PyObject_GetAttrStrNoError(o, n);
    if (!r) {
        return (unlikely(PyErr_Occurred())) ? -1 : 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}
#endif

/* ImportImpl (used by Import) */
static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) {
    PyObject *imported_module = PyImport_GetModule(qualname);
    if (unlikely(!imported_module)) {
        *module = NULL;
        if (PyErr_Occurred()) {
            return -1;
        }
        return 0;
    }
    *module = imported_module;
    return 1;
}
static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) {
    PyObject *imported_module;
    PyObject *top_level_package_name;
    Py_ssize_t i;
    int status, module_found;
    Py_ssize_t dot_index;
    module_found = __Pyx__Import_GetModule(qualname, &imported_module);
    if (unlikely(!module_found || module_found == -1)) {
        *module = NULL;
        return module_found;
    }
    if (imported_names) {
        for (i = 0; i < len_imported_names; i++) {
            PyObject *imported_name = imported_names[i];
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
            int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name);
#else
            int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name);
            if (unlikely(has_imported_attribute == -1)) goto error;
#endif
            if (!has_imported_attribute) {
                goto not_found;
            }
        }
        *module = imported_module;
        return 1;
    }
    dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1);
    if (dot_index == -1) {
        *module = imported_module;
        return 1;
    }
    if (unlikely(dot_index == -2)) goto error;
    top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index);
    if (unlikely(!top_level_package_name)) goto error;
    Py_DECREF(imported_module);
    status = __Pyx__Import_GetModule(top_level_package_name, module);
    Py_DECREF(top_level_package_name);
    return status;
error:
    Py_DECREF(imported_module);
    *module = NULL;
    return -1;
not_found:
    Py_DECREF(imported_module);
    *module = NULL;
    return 0;
}
static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) {
    PyObject *module = 0;
    PyObject *empty_dict = 0;
    PyObject *from_list = 0;
    int module_found;
    if (!qualname) {
        qualname = name;
    }
    module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module);
    if (likely(module_found == 1)) {
        return module;
    } else if (unlikely(module_found == -1)) {
        return NULL;
    }
    empty_dict = PyDict_New();
    if (unlikely(!empty_dict))
        goto bad;
    if (imported_names) {
#if CYTHON_COMPILING_IN_CPYTHON
        from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names);
        if (unlikely(!from_list))
            goto bad;
#else
        from_list = PyList_New(len_imported_names);
        if (unlikely(!from_list)) goto bad;
        for (Py_ssize_t i=0; i<len_imported_names; ++i) {
            if (PyList_SetItem(from_list, i, __Pyx_NewRef(imported_names[i])) < 0) goto bad;
        }
#endif
    }
    if (level == -1) {
        const char* package_sep = strchr(__Pyx_MODULE_NAME, '.');
        if (package_sep != (0)) {
            module = PyImport_ImportModuleLevelObject(
                name, moddict, empty_dict, from_list, 1);
            if (unlikely(!module)) {
                if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
                    goto bad;
                PyErr_Clear();
            }
        }
        level = 0;
    }
    if (!module) {
        module = PyImport_ImportModuleLevelObject(
            name, moddict, empty_dict, from_list, level);
    }
bad:
    Py_XDECREF(from_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level) {
    return __Pyx__Import(name, imported_names, len_imported_names, qualname, __pyx_mstate_global->__pyx_d, level);
}

/* Py3UpdateBases */
static PyObject*
__Pyx_PEP560_update_bases(PyObject *bases)
{
    Py_ssize_t i, j, size_bases;
    PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL;
#if CYTHON_ASSUME_SAFE_SIZE
    size_bases = PyTuple_GET_SIZE(bases);
#else
    size_bases = PyTuple_Size(bases);
    if (size_bases < 0) return NULL;
#endif
    for (i = 0; i < size_bases; i++) {
#if CYTHON_AVOID_BORROWED_REFS
        Py_CLEAR(base);
#endif
#if CYTHON_ASSUME_SAFE_MACROS
        base = PyTuple_GET_ITEM(bases, i);
#else
        base = PyTuple_GetItem(bases, i);
        if (!base) goto error;
#endif
#if CYTHON_AVOID_BORROWED_REFS
        Py_INCREF(base);
#endif
        if (PyType_Check(base)) {
            if (new_bases) {
                if (PyList_Append(new_bases, base) < 0) {
                    goto error;
                }
            }
            continue;
        }
        meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries);
        if (!meth && PyErr_Occurred()) {
            goto error;
        }
        if (!meth) {
            if (new_bases) {
                if (PyList_Append(new_bases, base) < 0) {
                    goto error;
                }
            }
            continue;
        }
        new_base = __Pyx_PyObject_CallOneArg(meth, bases);
        Py_DECREF(meth);
        if (!new_base) {
            goto error;
        }
        if (!PyTuple_Check(new_base)) {
            PyErr_SetString(PyExc_TypeError,
                            "__mro_entries__ must return a tuple");
            Py_DECREF(new_base);
            goto error;
        }
        if (!new_bases) {
            if (!(new_bases = PyList_New(i))) {
                goto error;
            }
            for (j = 0; j < i; j++) {
                PyObject *base_from_list;
#if CYTHON_ASSUME_SAFE_MACROS
                base_from_list = PyTuple_GET_ITEM(bases, j);
                PyList_SET_ITEM(new_bases, j, base_from_list);
                Py_INCREF(base_from_list);
#else
                base_from_list = PyTuple_GetItem(bases, j);
                if (!base_from_list) goto error;
                Py_INCREF(base_from_list);
                if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error;
#endif
            }
        }
#if CYTHON_ASSUME_SAFE_SIZE
        j = PyList_GET_SIZE(new_bases);
#else
        j = PyList_Size(new_bases);
        if (j < 0) goto error;
#endif
        if (PyList_SetSlice(new_bases, j, j, new_base) < 0) {
            goto error;
        }
        Py_DECREF(new_base);
    }
    if (!new_bases) {
        Py_INCREF(bases);
        return bases;
    }
    result = PyList_AsTuple(new_bases);
    Py_DECREF(new_bases);
#if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(base);
#endif
    return result;
error:
    Py_XDECREF(new_bases);
#if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(base);
#endif
    return NULL;
}

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases;
#if CYTHON_ASSUME_SAFE_SIZE
    nbases = PyTuple_GET_SIZE(bases);
#else
    nbases = PyTuple_Size(bases);
    if (nbases < 0) return NULL;
#endif
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
#if CYTHON_ASSUME_SAFE_MACROS
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *tmp = PyTuple_GetItem(bases, i);
        if (!tmp) return NULL;
#endif
        tmptype = Py_TYPE(tmp);
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
        metaclass = &PyType_Type;
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* PyObjectCall2Args (used by Py3ClassCreate) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args[3] = {NULL, arg1, arg2};
    return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectLookupSpecial (used by Py3ClassCreate) */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) {
    PyObject *res;
    PyTypeObject *tp = Py_TYPE(obj);
    res = _PyType_Lookup(tp, attr_name);
    if (likely(res)) {
        descrgetfunc f = Py_TYPE(res)->tp_descr_get;
        if (!f) {
            Py_INCREF(res);
        } else {
            res = f(res, obj, (PyObject *)tp);
        }
    } else if (with_error) {
        PyErr_SetObject(PyExc_AttributeError, attr_name);
    }
    return res;
}
#endif

/* Py3ClassCreate */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare);
        if (prep) {
            PyObject *pargs[3] = {NULL, name, bases};
            ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
            Py_DECREF(prep);
        } else {
            if (unlikely(PyErr_Occurred()))
                return NULL;
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result;
    PyObject *owned_metaclass = NULL;
    PyObject *margs[4] = {NULL, name, bases, dict};
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
    Py_XDECREF(owned_metaclass);
    return result;
}

/* CLineInTraceback (used by AddTraceback) */
#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o))
#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL);
#else
PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) {
    PyObject **dict_ptr = _PyObject_GetDictPtr(o);
    return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL;
}
#endif
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
    PyObject *use_cline = NULL;
    PyObject *ptype, *pvalue, *ptraceback;
    PyObject *cython_runtime_dict;
    CYTHON_MAYBE_UNUSED_VAR(tstate);
    if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
    cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, cython_runtime_dict,
            __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False))
    }
    if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    Py_XDECREF(use_cline);
    Py_XDECREF(cython_runtime_dict);
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache (used by AddTraceback) */
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) {
    __Pyx_CachedCodeObjectType* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!code_cache->entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
    if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = code_cache->entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) {
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
    (void)__pyx__find_code_object;
    return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss.
#else
    struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count);
    if (old_count < 0) {
        __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
        return NULL;
    }
#endif
    __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line);
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
#endif
    return result;
#endif
}
static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object)
{
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = code_cache->entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            code_cache->entries = entries;
            code_cache->max_count = 64;
            code_cache->count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
    if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) {
        __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_INCREF(code_object);
        Py_DECREF(tmp);
        return;
    }
    if (code_cache->count == code_cache->max_count) {
        int new_max = code_cache->max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        code_cache->entries = entries;
        code_cache->max_count = new_max;
    }
    for (i=code_cache->count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    code_cache->count++;
    Py_INCREF(code_object);
}
static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) {
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
    (void)__pyx__insert_code_object;
    return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail.
#else
    struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_nonatomic_int_type expected = 0;
    if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) {
        return;
    }
#endif
    __pyx__insert_code_object(code_cache, code_line, code_object);
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN);
#endif
#endif
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION)
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
                                                       PyObject *firstlineno, PyObject *name) {
    PyObject *replace = NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
    replace = PyObject_GetAttrString(code, "replace");
    if (likely(replace)) {
        PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict);
        Py_DECREF(replace);
        return result;
    }
    PyErr_Clear();
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
    PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
    PyObject *exc_type, *exc_value, *exc_traceback;
    int success = 0;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
    }
    PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
    code_object = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!code_object) {
        code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
        if (unlikely(!code_object)) goto bad;
        py_py_line = PyLong_FromLong(py_line);
        if (unlikely(!py_py_line)) goto bad;
        if (c_line) {
            py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        } else {
            py_funcname = PyUnicode_FromString(funcname);
        }
        if (unlikely(!py_funcname)) goto bad;
        dict = PyDict_New();
        if (unlikely(!dict)) goto bad;
        {
            PyObject *old_code_object = code_object;
            code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
            Py_DECREF(old_code_object);
        }
        if (unlikely(!code_object)) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, code_object);
    } else {
        dict = PyDict_New();
    }
    getframe = PySys_GetObject("_getframe");
    if (unlikely(!getframe)) goto bad;
    if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
    frame = PyEval_EvalCode(code_object, dict, dict);
    if (unlikely(!frame) || frame == Py_None) goto bad;
    success = 1;
  bad:
    PyErr_Restore(exc_type, exc_value, exc_traceback);
    Py_XDECREF(code_object);
    Py_XDECREF(py_py_line);
    Py_XDECREF(py_funcname);
    Py_XDECREF(dict);
    Py_XDECREF(replace);
    if (success) {
        PyTraceBack_Here(
            (struct _frame*)frame);
    }
    Py_XDECREF(frame);
}
#else
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    if (c_line) {
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
    }
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    Py_XDECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject *ptype, *pvalue, *ptraceback;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) {
            /* If the code object creation fails, then we should clear the
               fetched exception references and propagate the new exception */
            Py_XDECREF(ptype);
            Py_XDECREF(pvalue);
            Py_XDECREF(ptraceback);
            goto bad;
        }
        __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_mstate_global->__pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}
#endif

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_brlapi_keyCode_t(brlapi_keyCode_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const brlapi_keyCode_t neg_one = (brlapi_keyCode_t) -1, const_zero = (brlapi_keyCode_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(brlapi_keyCode_t) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(brlapi_keyCode_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(brlapi_keyCode_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(brlapi_keyCode_t) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(brlapi_keyCode_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(brlapi_keyCode_t),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(brlapi_keyCode_t));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE brlapi_keyCode_t __Pyx_PyLong_As_brlapi_keyCode_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const brlapi_keyCode_t neg_one = (brlapi_keyCode_t) -1, const_zero = (brlapi_keyCode_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        brlapi_keyCode_t val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (brlapi_keyCode_t) -1;
        val = __Pyx_PyLong_As_brlapi_keyCode_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(brlapi_keyCode_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(brlapi_keyCode_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_keyCode_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_keyCode_t) >= 2 * PyLong_SHIFT)) {
                            return (brlapi_keyCode_t) (((((brlapi_keyCode_t)digits[1]) << PyLong_SHIFT) | (brlapi_keyCode_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(brlapi_keyCode_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_keyCode_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_keyCode_t) >= 3 * PyLong_SHIFT)) {
                            return (brlapi_keyCode_t) (((((((brlapi_keyCode_t)digits[2]) << PyLong_SHIFT) | (brlapi_keyCode_t)digits[1]) << PyLong_SHIFT) | (brlapi_keyCode_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(brlapi_keyCode_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_keyCode_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_keyCode_t) >= 4 * PyLong_SHIFT)) {
                            return (brlapi_keyCode_t) (((((((((brlapi_keyCode_t)digits[3]) << PyLong_SHIFT) | (brlapi_keyCode_t)digits[2]) << PyLong_SHIFT) | (brlapi_keyCode_t)digits[1]) << PyLong_SHIFT) | (brlapi_keyCode_t)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (brlapi_keyCode_t) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(brlapi_keyCode_t) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(brlapi_keyCode_t, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(brlapi_keyCode_t) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(brlapi_keyCode_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(brlapi_keyCode_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(brlapi_keyCode_t) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_keyCode_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_keyCode_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (brlapi_keyCode_t) (((brlapi_keyCode_t)-1)*(((((brlapi_keyCode_t)digits[1]) << PyLong_SHIFT) | (brlapi_keyCode_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(brlapi_keyCode_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_keyCode_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_keyCode_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (brlapi_keyCode_t) ((((((brlapi_keyCode_t)digits[1]) << PyLong_SHIFT) | (brlapi_keyCode_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(brlapi_keyCode_t) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_keyCode_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_keyCode_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (brlapi_keyCode_t) (((brlapi_keyCode_t)-1)*(((((((brlapi_keyCode_t)digits[2]) << PyLong_SHIFT) | (brlapi_keyCode_t)digits[1]) << PyLong_SHIFT) | (brlapi_keyCode_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(brlapi_keyCode_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_keyCode_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_keyCode_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (brlapi_keyCode_t) ((((((((brlapi_keyCode_t)digits[2]) << PyLong_SHIFT) | (brlapi_keyCode_t)digits[1]) << PyLong_SHIFT) | (brlapi_keyCode_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(brlapi_keyCode_t) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_keyCode_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_keyCode_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (brlapi_keyCode_t) (((brlapi_keyCode_t)-1)*(((((((((brlapi_keyCode_t)digits[3]) << PyLong_SHIFT) | (brlapi_keyCode_t)digits[2]) << PyLong_SHIFT) | (brlapi_keyCode_t)digits[1]) << PyLong_SHIFT) | (brlapi_keyCode_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(brlapi_keyCode_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_keyCode_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_keyCode_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (brlapi_keyCode_t) ((((((((((brlapi_keyCode_t)digits[3]) << PyLong_SHIFT) | (brlapi_keyCode_t)digits[2]) << PyLong_SHIFT) | (brlapi_keyCode_t)digits[1]) << PyLong_SHIFT) | (brlapi_keyCode_t)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(brlapi_keyCode_t) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(brlapi_keyCode_t, long, PyLong_AsLong(x))
        } else if ((sizeof(brlapi_keyCode_t) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(brlapi_keyCode_t, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        brlapi_keyCode_t val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (brlapi_keyCode_t) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (brlapi_keyCode_t) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (brlapi_keyCode_t) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (brlapi_keyCode_t) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(brlapi_keyCode_t) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((brlapi_keyCode_t) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(brlapi_keyCode_t) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((brlapi_keyCode_t) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((brlapi_keyCode_t) 1) << (sizeof(brlapi_keyCode_t) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (brlapi_keyCode_t) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to brlapi_keyCode_t");
    return (brlapi_keyCode_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to brlapi_keyCode_t");
    return (brlapi_keyCode_t) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_int(unsigned int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(unsigned int) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(unsigned int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(unsigned int) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(unsigned int),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(unsigned int));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE unsigned int __Pyx_PyLong_As_unsigned_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        unsigned int val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (unsigned int) -1;
        val = __Pyx_PyLong_As_unsigned_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(unsigned int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(unsigned int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned int) >= 2 * PyLong_SHIFT)) {
                            return (unsigned int) (((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(unsigned int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned int) >= 3 * PyLong_SHIFT)) {
                            return (unsigned int) (((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(unsigned int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned int) >= 4 * PyLong_SHIFT)) {
                            return (unsigned int) (((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (unsigned int) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(unsigned int) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(unsigned int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(unsigned int) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) {
                            return (unsigned int) (((unsigned int)-1)*(((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(unsigned int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) {
                            return (unsigned int) ((((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) {
                            return (unsigned int) (((unsigned int)-1)*(((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(unsigned int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) {
                            return (unsigned int) ((((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT)) {
                            return (unsigned int) (((unsigned int)-1)*(((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(unsigned int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT)) {
                            return (unsigned int) ((((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(unsigned int) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(unsigned int, long, PyLong_AsLong(x))
        } else if ((sizeof(unsigned int) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(unsigned int, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        unsigned int val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (unsigned int) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (unsigned int) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (unsigned int) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (unsigned int) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(unsigned int) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((unsigned int) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(unsigned int) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((unsigned int) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((unsigned int) 1) << (sizeof(unsigned int) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (unsigned int) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to unsigned int");
    return (unsigned int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to unsigned int");
    return (unsigned int) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_brlapi_param_type_t(brlapi_param_type_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const brlapi_param_type_t neg_one = (brlapi_param_type_t) -1, const_zero = (brlapi_param_type_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(brlapi_param_type_t) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(brlapi_param_type_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(brlapi_param_type_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(brlapi_param_type_t) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(brlapi_param_type_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(brlapi_param_type_t),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(brlapi_param_type_t));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint8_t(uint8_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint8_t neg_one = (uint8_t) -1, const_zero = (uint8_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint8_t) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(uint8_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(uint8_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint8_t) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(uint8_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(uint8_t),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(uint8_t));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint16_t(uint16_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint16_t neg_one = (uint16_t) -1, const_zero = (uint16_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint16_t) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(uint16_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(uint16_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint16_t) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(uint16_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(uint16_t),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(uint16_t));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint32_t(uint32_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint32_t) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(uint32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint32_t) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(uint32_t),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(uint32_t));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint64_t(uint64_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint64_t) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint64_t) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(uint64_t));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        size_t val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (size_t) -1;
        val = __Pyx_PyLong_As_size_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) >= 2 * PyLong_SHIFT)) {
                            return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) >= 3 * PyLong_SHIFT)) {
                            return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) >= 4 * PyLong_SHIFT)) {
                            return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (size_t) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(size_t) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(size_t) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
        } else if ((sizeof(size_t) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        size_t val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (size_t) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (size_t) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (size_t) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (size_t) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(size_t) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((size_t) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(size_t) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((size_t) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((size_t) 1) << (sizeof(size_t) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (size_t) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to size_t");
    return (size_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to size_t");
    return (size_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        int val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyLong_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (int) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(int) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(int) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
        } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        int val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (int) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (int) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (int) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (int) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((int) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((int) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (int) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE brlapi_rangeType_t __Pyx_PyLong_As_brlapi_rangeType_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const brlapi_rangeType_t neg_one = (brlapi_rangeType_t) -1, const_zero = (brlapi_rangeType_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        brlapi_rangeType_t val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (brlapi_rangeType_t) -1;
        val = __Pyx_PyLong_As_brlapi_rangeType_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(brlapi_rangeType_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(brlapi_rangeType_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_rangeType_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_rangeType_t) >= 2 * PyLong_SHIFT)) {
                            return (brlapi_rangeType_t) (((((brlapi_rangeType_t)digits[1]) << PyLong_SHIFT) | (brlapi_rangeType_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(brlapi_rangeType_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_rangeType_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_rangeType_t) >= 3 * PyLong_SHIFT)) {
                            return (brlapi_rangeType_t) (((((((brlapi_rangeType_t)digits[2]) << PyLong_SHIFT) | (brlapi_rangeType_t)digits[1]) << PyLong_SHIFT) | (brlapi_rangeType_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(brlapi_rangeType_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_rangeType_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_rangeType_t) >= 4 * PyLong_SHIFT)) {
                            return (brlapi_rangeType_t) (((((((((brlapi_rangeType_t)digits[3]) << PyLong_SHIFT) | (brlapi_rangeType_t)digits[2]) << PyLong_SHIFT) | (brlapi_rangeType_t)digits[1]) << PyLong_SHIFT) | (brlapi_rangeType_t)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (brlapi_rangeType_t) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(brlapi_rangeType_t) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(brlapi_rangeType_t, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(brlapi_rangeType_t) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(brlapi_rangeType_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(brlapi_rangeType_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(brlapi_rangeType_t) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_rangeType_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_rangeType_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (brlapi_rangeType_t) (((brlapi_rangeType_t)-1)*(((((brlapi_rangeType_t)digits[1]) << PyLong_SHIFT) | (brlapi_rangeType_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(brlapi_rangeType_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_rangeType_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_rangeType_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (brlapi_rangeType_t) ((((((brlapi_rangeType_t)digits[1]) << PyLong_SHIFT) | (brlapi_rangeType_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(brlapi_rangeType_t) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_rangeType_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_rangeType_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (brlapi_rangeType_t) (((brlapi_rangeType_t)-1)*(((((((brlapi_rangeType_t)digits[2]) << PyLong_SHIFT) | (brlapi_rangeType_t)digits[1]) << PyLong_SHIFT) | (brlapi_rangeType_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(brlapi_rangeType_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_rangeType_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_rangeType_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (brlapi_rangeType_t) ((((((((brlapi_rangeType_t)digits[2]) << PyLong_SHIFT) | (brlapi_rangeType_t)digits[1]) << PyLong_SHIFT) | (brlapi_rangeType_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(brlapi_rangeType_t) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_rangeType_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_rangeType_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (brlapi_rangeType_t) (((brlapi_rangeType_t)-1)*(((((((((brlapi_rangeType_t)digits[3]) << PyLong_SHIFT) | (brlapi_rangeType_t)digits[2]) << PyLong_SHIFT) | (brlapi_rangeType_t)digits[1]) << PyLong_SHIFT) | (brlapi_rangeType_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(brlapi_rangeType_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_rangeType_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_rangeType_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (brlapi_rangeType_t) ((((((((((brlapi_rangeType_t)digits[3]) << PyLong_SHIFT) | (brlapi_rangeType_t)digits[2]) << PyLong_SHIFT) | (brlapi_rangeType_t)digits[1]) << PyLong_SHIFT) | (brlapi_rangeType_t)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(brlapi_rangeType_t) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(brlapi_rangeType_t, long, PyLong_AsLong(x))
        } else if ((sizeof(brlapi_rangeType_t) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(brlapi_rangeType_t, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        brlapi_rangeType_t val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums");
        val = (brlapi_rangeType_t) -1;
#endif
        if (unlikely(ret))
            return (brlapi_rangeType_t) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to brlapi_rangeType_t");
    return (brlapi_rangeType_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to brlapi_rangeType_t");
    return (brlapi_rangeType_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE brlapi_param_t __Pyx_PyLong_As_brlapi_param_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const brlapi_param_t neg_one = (brlapi_param_t) -1, const_zero = (brlapi_param_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        brlapi_param_t val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (brlapi_param_t) -1;
        val = __Pyx_PyLong_As_brlapi_param_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(brlapi_param_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(brlapi_param_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_param_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_param_t) >= 2 * PyLong_SHIFT)) {
                            return (brlapi_param_t) (((((brlapi_param_t)digits[1]) << PyLong_SHIFT) | (brlapi_param_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(brlapi_param_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_param_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_param_t) >= 3 * PyLong_SHIFT)) {
                            return (brlapi_param_t) (((((((brlapi_param_t)digits[2]) << PyLong_SHIFT) | (brlapi_param_t)digits[1]) << PyLong_SHIFT) | (brlapi_param_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(brlapi_param_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_param_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_param_t) >= 4 * PyLong_SHIFT)) {
                            return (brlapi_param_t) (((((((((brlapi_param_t)digits[3]) << PyLong_SHIFT) | (brlapi_param_t)digits[2]) << PyLong_SHIFT) | (brlapi_param_t)digits[1]) << PyLong_SHIFT) | (brlapi_param_t)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (brlapi_param_t) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(brlapi_param_t) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(brlapi_param_t, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(brlapi_param_t) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(brlapi_param_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(brlapi_param_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(brlapi_param_t) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_param_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_param_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (brlapi_param_t) (((brlapi_param_t)-1)*(((((brlapi_param_t)digits[1]) << PyLong_SHIFT) | (brlapi_param_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(brlapi_param_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_param_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_param_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (brlapi_param_t) ((((((brlapi_param_t)digits[1]) << PyLong_SHIFT) | (brlapi_param_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(brlapi_param_t) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_param_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_param_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (brlapi_param_t) (((brlapi_param_t)-1)*(((((((brlapi_param_t)digits[2]) << PyLong_SHIFT) | (brlapi_param_t)digits[1]) << PyLong_SHIFT) | (brlapi_param_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(brlapi_param_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_param_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_param_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (brlapi_param_t) ((((((((brlapi_param_t)digits[2]) << PyLong_SHIFT) | (brlapi_param_t)digits[1]) << PyLong_SHIFT) | (brlapi_param_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(brlapi_param_t) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_param_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_param_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (brlapi_param_t) (((brlapi_param_t)-1)*(((((((((brlapi_param_t)digits[3]) << PyLong_SHIFT) | (brlapi_param_t)digits[2]) << PyLong_SHIFT) | (brlapi_param_t)digits[1]) << PyLong_SHIFT) | (brlapi_param_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(brlapi_param_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(brlapi_param_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(brlapi_param_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (brlapi_param_t) ((((((((((brlapi_param_t)digits[3]) << PyLong_SHIFT) | (brlapi_param_t)digits[2]) << PyLong_SHIFT) | (brlapi_param_t)digits[1]) << PyLong_SHIFT) | (brlapi_param_t)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(brlapi_param_t) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(brlapi_param_t, long, PyLong_AsLong(x))
        } else if ((sizeof(brlapi_param_t) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(brlapi_param_t, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        brlapi_param_t val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (brlapi_param_t) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (brlapi_param_t) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (brlapi_param_t) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (brlapi_param_t) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(brlapi_param_t) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((brlapi_param_t) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(brlapi_param_t) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((brlapi_param_t) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((brlapi_param_t) 1) << (sizeof(brlapi_param_t) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (brlapi_param_t) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to brlapi_param_t");
    return (brlapi_param_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to brlapi_param_t");
    return (brlapi_param_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE uint64_t __Pyx_PyLong_As_uint64_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        uint64_t val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (uint64_t) -1;
        val = __Pyx_PyLong_As_uint64_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(uint64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(uint64_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) >= 2 * PyLong_SHIFT)) {
                            return (uint64_t) (((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(uint64_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) >= 3 * PyLong_SHIFT)) {
                            return (uint64_t) (((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(uint64_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) >= 4 * PyLong_SHIFT)) {
                            return (uint64_t) (((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (uint64_t) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(uint64_t) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(uint64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(uint64_t) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (uint64_t) (((uint64_t)-1)*(((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(uint64_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (uint64_t) ((((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (uint64_t) (((uint64_t)-1)*(((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(uint64_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (uint64_t) ((((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (uint64_t) (((uint64_t)-1)*(((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(uint64_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (uint64_t) ((((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(uint64_t) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint64_t, long, PyLong_AsLong(x))
        } else if ((sizeof(uint64_t) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        uint64_t val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (uint64_t) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (uint64_t) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (uint64_t) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (uint64_t) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(uint64_t) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((uint64_t) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(uint64_t) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((uint64_t) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((uint64_t) 1) << (sizeof(uint64_t) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (uint64_t) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint64_t");
    return (uint64_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint64_t");
    return (uint64_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE uint32_t __Pyx_PyLong_As_uint32_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        uint32_t val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (uint32_t) -1;
        val = __Pyx_PyLong_As_uint32_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(uint32_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(uint32_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint32_t) >= 2 * PyLong_SHIFT)) {
                            return (uint32_t) (((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(uint32_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint32_t) >= 3 * PyLong_SHIFT)) {
                            return (uint32_t) (((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(uint32_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint32_t) >= 4 * PyLong_SHIFT)) {
                            return (uint32_t) (((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (uint32_t) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(uint32_t) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(uint32_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(uint32_t) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (uint32_t) (((uint32_t)-1)*(((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(uint32_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (uint32_t) ((((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (uint32_t) (((uint32_t)-1)*(((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(uint32_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (uint32_t) ((((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (uint32_t) (((uint32_t)-1)*(((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(uint32_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (uint32_t) ((((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(uint32_t) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint32_t, long, PyLong_AsLong(x))
        } else if ((sizeof(uint32_t) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint32_t, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        uint32_t val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (uint32_t) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (uint32_t) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (uint32_t) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (uint32_t) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(uint32_t) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((uint32_t) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(uint32_t) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((uint32_t) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((uint32_t) 1) << (sizeof(uint32_t) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (uint32_t) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint32_t");
    return (uint32_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint32_t");
    return (uint32_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE uint8_t __Pyx_PyLong_As_uint8_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint8_t neg_one = (uint8_t) -1, const_zero = (uint8_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        uint8_t val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (uint8_t) -1;
        val = __Pyx_PyLong_As_uint8_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(uint8_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(uint8_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint8_t) >= 2 * PyLong_SHIFT)) {
                            return (uint8_t) (((((uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(uint8_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint8_t) >= 3 * PyLong_SHIFT)) {
                            return (uint8_t) (((((((uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(uint8_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint8_t) >= 4 * PyLong_SHIFT)) {
                            return (uint8_t) (((((((((uint8_t)digits[3]) << PyLong_SHIFT) | (uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (uint8_t) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(uint8_t) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint8_t, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(uint8_t) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint8_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(uint8_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(uint8_t) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint8_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (uint8_t) (((uint8_t)-1)*(((((uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(uint8_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint8_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (uint8_t) ((((((uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(uint8_t) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint8_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (uint8_t) (((uint8_t)-1)*(((((((uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(uint8_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint8_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (uint8_t) ((((((((uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(uint8_t) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint8_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (uint8_t) (((uint8_t)-1)*(((((((((uint8_t)digits[3]) << PyLong_SHIFT) | (uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(uint8_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint8_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (uint8_t) ((((((((((uint8_t)digits[3]) << PyLong_SHIFT) | (uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(uint8_t) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint8_t, long, PyLong_AsLong(x))
        } else if ((sizeof(uint8_t) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint8_t, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        uint8_t val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (uint8_t) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (uint8_t) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (uint8_t) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (uint8_t) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(uint8_t) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((uint8_t) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(uint8_t) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((uint8_t) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((uint8_t) 1) << (sizeof(uint8_t) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (uint8_t) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint8_t");
    return (uint8_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint8_t");
    return (uint8_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE uint16_t __Pyx_PyLong_As_uint16_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint16_t neg_one = (uint16_t) -1, const_zero = (uint16_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        uint16_t val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (uint16_t) -1;
        val = __Pyx_PyLong_As_uint16_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(uint16_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(uint16_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint16_t) >= 2 * PyLong_SHIFT)) {
                            return (uint16_t) (((((uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(uint16_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint16_t) >= 3 * PyLong_SHIFT)) {
                            return (uint16_t) (((((((uint16_t)digits[2]) << PyLong_SHIFT) | (uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(uint16_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint16_t) >= 4 * PyLong_SHIFT)) {
                            return (uint16_t) (((((((((uint16_t)digits[3]) << PyLong_SHIFT) | (uint16_t)digits[2]) << PyLong_SHIFT) | (uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (uint16_t) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(uint16_t) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint16_t, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(uint16_t) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint16_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(uint16_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(uint16_t) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint16_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (uint16_t) (((uint16_t)-1)*(((((uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(uint16_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint16_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (uint16_t) ((((((uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(uint16_t) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint16_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (uint16_t) (((uint16_t)-1)*(((((((uint16_t)digits[2]) << PyLong_SHIFT) | (uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(uint16_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint16_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (uint16_t) ((((((((uint16_t)digits[2]) << PyLong_SHIFT) | (uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(uint16_t) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint16_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (uint16_t) (((uint16_t)-1)*(((((((((uint16_t)digits[3]) << PyLong_SHIFT) | (uint16_t)digits[2]) << PyLong_SHIFT) | (uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(uint16_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint16_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (uint16_t) ((((((((((uint16_t)digits[3]) << PyLong_SHIFT) | (uint16_t)digits[2]) << PyLong_SHIFT) | (uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(uint16_t) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint16_t, long, PyLong_AsLong(x))
        } else if ((sizeof(uint16_t) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint16_t, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        uint16_t val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (uint16_t) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (uint16_t) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (uint16_t) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (uint16_t) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(uint16_t) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((uint16_t) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(uint16_t) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((uint16_t) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((uint16_t) 1) << (sizeof(uint16_t) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (uint16_t) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint16_t");
    return (uint16_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint16_t");
    return (uint16_t) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_brlapi_param_t(brlapi_param_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const brlapi_param_t neg_one = (brlapi_param_t) -1, const_zero = (brlapi_param_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(brlapi_param_t) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(brlapi_param_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(brlapi_param_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(brlapi_param_t) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(brlapi_param_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(brlapi_param_t),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(brlapi_param_t));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* FormatTypeName */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
static __Pyx_TypeName
__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp)
{
    PyObject *module = NULL, *name = NULL, *result = NULL;
    #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
    name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_mstate_global->__pyx_n_u_qualname);
    #else
    name = PyType_GetQualName(tp);
    #endif
    if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad;
    module = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_mstate_global->__pyx_n_u_module);
    if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad;
    if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) {
        result = name;
        name = NULL;
        goto done;
    }
    result = PyUnicode_FromFormat("%U.%U", module, name);
    if (unlikely(result == NULL)) goto bad;
  done:
    Py_XDECREF(name);
    Py_XDECREF(module);
    return result;
  bad:
    PyErr_Clear();
    if (name) {
        result = name;
        name = NULL;
    } else {
        result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__8);
    }
    goto done;
}
#endif

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyLong_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (long) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(long) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(long) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
        } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        long val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (long) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (long) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (long) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (long) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((long) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((long) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (long) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (cls == a || cls == b) return 1;
    mro = cls->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            PyObject *base = PyTuple_GET_ITEM(mro, i);
            if (base == (PyObject *)a || base == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
}
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    if (exc_type1) {
        return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
    } else {
        return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
}
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* GetRuntimeVersion */
#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
void __Pyx_init_runtime_version(void) {
    if (__Pyx_cached_runtime_version == 0) {
        const char* rt_version = Py_GetVersion();
        unsigned long version = 0;
        unsigned long factor = 0x01000000UL;
        unsigned int digit = 0;
        int i = 0;
        while (factor) {
            while ('0' <= rt_version[i] && rt_version[i] <= '9') {
                digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
                ++i;
            }
            version += factor * digit;
            if (rt_version[i] != '.')
                break;
            digit = 0;
            factor >>= 8;
            ++i;
        }
        __Pyx_cached_runtime_version = version;
    }
}
#endif
static unsigned long __Pyx_get_runtime_version(void) {
#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
    return Py_Version & ~0xFFUL;
#else
    return __Pyx_cached_runtime_version;
#endif
}

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
    const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
    if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
        return 0;
    if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
        return 1;
    {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compile time Python version %d.%d "
                      "of module '%.100s' "
                      "%s "
                      "runtime version %d.%d",
                       (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
                       __Pyx_MODULE_NAME,
                       (allow_newer) ? "was newer than" : "does not match",
                       (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
       );
        return PyErr_WarnEx(NULL, message, 1);
    }
}

/* NewCodeObj */
#if CYTHON_COMPILING_IN_LIMITED_API
    static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
                                       PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                       PyObject *fv, PyObject *cell, PyObject* fn,
                                       PyObject *name, int fline, PyObject *lnos) {
        PyObject *exception_table = NULL;
        PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
        #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
        PyObject *version_info;
        PyObject *py_minor_version = NULL;
        #endif
        long minor_version = 0;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
        minor_version = 11;
        #else
        if (!(version_info = PySys_GetObject("version_info"))) goto end;
        if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
        minor_version = PyLong_AsLong(py_minor_version);
        Py_DECREF(py_minor_version);
        if (minor_version == -1 && PyErr_Occurred()) goto end;
        #endif
        if (!(types_module = PyImport_ImportModule("types"))) goto end;
        if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
        if (minor_version <= 7) {
            (void)p;
            result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else if (minor_version <= 10) {
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else {
            if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
        }
    end:
        Py_XDECREF(code_type);
        Py_XDECREF(exception_table);
        Py_XDECREF(types_module);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return result;
    }
#elif PY_VERSION_HEX >= 0x030B0000
  static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
                                         PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                         PyObject *fv, PyObject *cell, PyObject* fn,
                                         PyObject *name, int fline, PyObject *lnos) {
    PyCodeObject *result;
    result =
      #if PY_VERSION_HEX >= 0x030C0000
        PyUnstable_Code_NewWithPosOnlyArgs
      #else
        PyCode_NewWithPosOnlyArgs
      #endif
        (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
    if (likely(result))
        result->_co_firsttraceable = 0;
    #endif
    return result;
  }
#elif !CYTHON_COMPILING_IN_PYPY
  #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
static PyObject* __Pyx_PyCode_New(
        const __Pyx_PyCode_New_function_description descr,
        PyObject * const *varnames,
        PyObject *filename,
        PyObject *funcname,
        PyObject *line_table,
        PyObject *tuple_dedup_map
) {
    PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL;
    Py_ssize_t var_count = (Py_ssize_t) descr.nlocals;
    PyObject *varnames_tuple = PyTuple_New(var_count);
    if (unlikely(!varnames_tuple)) return NULL;
    for (Py_ssize_t i=0; i < var_count; i++) {
        Py_INCREF(varnames[i]);
        if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done;
    }
    #if CYTHON_COMPILING_IN_LIMITED_API
    varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple);
    if (!varnames_tuple_dedup) {
        if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done;
        varnames_tuple_dedup = varnames_tuple;
    }
    #else
    varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple);
    if (unlikely(!varnames_tuple_dedup)) goto done;
    #endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(varnames_tuple_dedup);
    #endif
    if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) {
        Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(line_table_length == -1)) goto done;
        #endif
        Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL;
        code_bytes = PyBytes_FromStringAndSize(NULL, code_len);
        if (unlikely(!code_bytes)) goto done;
        char* c_code_bytes = PyBytes_AsString(code_bytes);
        if (unlikely(!c_code_bytes)) goto done;
        memset(c_code_bytes, 0, (size_t) code_len);
    }
    code_obj = (PyObject*) __Pyx__PyCode_New(
        (int) descr.argcount,
        (int) descr.num_posonly_args,
        (int) descr.num_kwonly_args,
        (int) descr.nlocals,
        0,
        (int) descr.flags,
        code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes,
        __pyx_mstate_global->__pyx_empty_tuple,
        __pyx_mstate_global->__pyx_empty_tuple,
        varnames_tuple_dedup,
        __pyx_mstate_global->__pyx_empty_tuple,
        __pyx_mstate_global->__pyx_empty_tuple,
        filename,
        funcname,
        (int) descr.first_line,
        (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes
    );
done:
    Py_XDECREF(code_bytes);
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(varnames_tuple_dedup);
    #endif
    Py_DECREF(varnames_tuple);
    return code_obj;
}

/* DecompressString */
static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) {
    PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed;
    const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib";
    PyObject *methodname = PyUnicode_FromString("decompress");
    if (unlikely(!methodname)) return NULL;
    #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
    if (algo == 3) {
        PyObject *fromlist = Py_BuildValue("[O]", methodname);
        if (unlikely(!fromlist)) goto bad;
        module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
    } else
    #endif
        module = PyImport_ImportModule(module_name);
    if (unlikely(!module)) goto import_failed;
    decompress = PyObject_GetAttr(module, methodname);
    if (unlikely(!decompress)) goto import_failed;
    {
        #ifdef __cplusplus
            char *memview_bytes = const_cast<char*>(s);
        #else
            #if defined(__clang__)
              #pragma clang diagnostic push
              #pragma clang diagnostic ignored "-Wcast-qual"
            #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
              #pragma GCC diagnostic push
              #pragma GCC diagnostic ignored "-Wcast-qual"
            #endif
            char *memview_bytes = (char*) s;
            #if defined(__clang__)
              #pragma clang diagnostic pop
            #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
              #pragma GCC diagnostic pop
            #endif
        #endif
        #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ)
        int memview_flags = 0x100;
        #else
        int memview_flags = PyBUF_READ;
        #endif
        compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags);
    }
    if (unlikely(!compressed_bytes)) {
        Py_DECREF(decompress);
        goto bad;
    }
    decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL);
    Py_DECREF(compressed_bytes);
    Py_DECREF(decompress);
    Py_DECREF(module);
    Py_DECREF(methodname);
    return decompressed;
import_failed:
    PyErr_Format(PyExc_ImportError,
        "Failed to import '%.20s.decompress' - cannot initialise module strings. "
        "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.",
        module_name, algo);
bad:
    Py_XDECREF(module);
    Py_DECREF(methodname);
    return NULL;
}

#include <string.h>
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
    size_t len = strlen(s);
    if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
        PyErr_SetString(PyExc_OverflowError, "byte string is too long");
        return -1;
    }
    return (Py_ssize_t) len;
}
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return PyByteArray_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if CYTHON_COMPILING_IN_LIMITED_API
    {
        const char* result;
        Py_ssize_t unicode_length;
        CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
        if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL;
        #else
        result = PyUnicode_AsUTF8AndSize(o, length);
        #endif
        #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        unicode_length = PyUnicode_GetLength(o);
        if (unlikely(unicode_length < 0)) return NULL;
        if (unlikely(unicode_length != *length)) {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
        #endif
        return result;
    }
#else
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
#endif
}
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
    if (PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
    if (PyByteArray_Check(o)) {
#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)))
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
#else
        *length = PyByteArray_Size(o);
        if (*length == -1) return NULL;
        return PyByteArray_AsString(o);
#endif
    } else
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) {
    __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result));
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ").  "
                "The ability to return an instance of a strict subclass of int is deprecated, "
                "and may be removed in a future version of Python.",
                result_type_name)) {
            __Pyx_DECREF_TypeName(result_type_name);
            Py_DECREF(result);
            return NULL;
        }
        __Pyx_DECREF_TypeName(result_type_name);
        return result;
    }
    PyErr_Format(PyExc_TypeError,
                 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")",
                 result_type_name);
    __Pyx_DECREF_TypeName(result_type_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  PyObject *res = NULL;
  if (likely(PyLong_Check(x)))
      return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  if (likely(m && m->nb_int)) {
      res = m->nb_int(x);
  }
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
      res = PyNumber_Long(x);
  }
#endif
  if (likely(res)) {
      if (unlikely(!PyLong_CheckExact(res))) {
          return __Pyx_PyNumber_LongWrongResultType(res);
      }
  }
  else if (!PyErr_Occurred()) {
      PyErr_SetString(PyExc_TypeError,
                      "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(__Pyx_PyLong_IsCompact(b))) {
        return __Pyx_PyLong_CompactValue(b);
    } else {
      const digit* digits = __Pyx_PyLong_Digits(b);
      const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyLong_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyLong_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) {
    CYTHON_UNUSED_VAR(b);
    return __Pyx_NewRef(Py_None);
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return __Pyx_NewRef(b ? Py_True: Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) {
    return PyLong_FromSize_t(ival);
}


/* MultiPhaseInitModuleState */
#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000)
  #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1
#else
  #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0
#endif
#endif
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS
#error "Module state with PEP489 requires atomics. Currently that's one of\
 C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics"
#endif
#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
#define __Pyx_ModuleStateLookup_Lock()
#define __Pyx_ModuleStateLookup_Unlock()
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
static PyMutex __Pyx_ModuleStateLookup_mutex = {0};
#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(__cplusplus) && __cplusplus >= 201103L
#include <mutex>
static std::mutex __Pyx_ModuleStateLookup_mutex;
#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock()
#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock()
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__)
#include <threads.h>
static mtx_t __Pyx_ModuleStateLookup_mutex;
static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT;
static void __Pyx_ModuleStateLookup_initialize_mutex(void) {
    mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain);
}
#define __Pyx_ModuleStateLookup_Lock()\
  call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\
  mtx_lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(HAVE_PTHREAD_H)
#include <pthread.h>
static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER;
#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(_WIN32)
#include <Windows.h>  // synchapi.h on its own doesn't work
static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT;
#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
#else
#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\
 Requires C standard >= C11, or C++ standard >= C++11,\
 or pthreads, or the Windows 32 API, or Python >= 3.13."
#endif
typedef struct {
    int64_t id;
    PyObject *module;
} __Pyx_InterpreterIdAndModule;
typedef struct {
    char interpreter_id_as_index;
    Py_ssize_t count;
    Py_ssize_t allocated;
    __Pyx_InterpreterIdAndModule table[1];
} __Pyx_ModuleStateLookupData;
#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0;
#endif
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0;
#else
static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL;
#endif
static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound(
        __Pyx_InterpreterIdAndModule* table,
        Py_ssize_t count,
        int64_t interpreterId) {
    __Pyx_InterpreterIdAndModule* begin = table;
    __Pyx_InterpreterIdAndModule* end = begin + count;
    if (begin->id == interpreterId) {
        return begin;
    }
    while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
        __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2;
        if (halfway->id == interpreterId) {
            return halfway;
        }
        if (halfway->id < interpreterId) {
            begin = halfway;
        } else {
            end = halfway;
        }
    }
    for (; begin < end; ++begin) {
        if (begin->id >= interpreterId) return begin;
    }
    return begin;
}
static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return NULL;
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
    {
        __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
        if (likely(data)) {
            __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data);
            if (likely(data == new_data)) {
                goto read_finished;
            }
        }
        __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
        __Pyx_ModuleStateLookup_Lock();
        __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter);
        data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
        __Pyx_ModuleStateLookup_Unlock();
    }
  read_finished:;
#else
    __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data;
#endif
    __Pyx_InterpreterIdAndModule* found = NULL;
    if (unlikely(!data)) goto end;
    if (data->interpreter_id_as_index) {
        if (interpreter_id < data->count) {
            found = data->table+interpreter_id;
        }
    } else {
        found = __Pyx_State_FindModuleStateLookupTableLowerBound(
            data->table, data->count, interpreter_id);
    }
  end:
    {
        PyObject *result=NULL;
        if (found && found->id == interpreter_id) {
            result = found->module;
        }
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
        __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
#endif
        return result;
    }
}
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) {
    while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0);
}
#else
#define __Pyx_ModuleStateLookup_wait_until_no_readers()
#endif
static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) {
    Py_ssize_t to_allocate = (*old_data)->allocated;
    while (to_allocate <= interpreter_id) {
        if (to_allocate == 0) to_allocate = 1;
        else to_allocate *= 2;
    }
    __Pyx_ModuleStateLookupData *new_data = *old_data;
    if (to_allocate != (*old_data)->allocated) {
         new_data = (__Pyx_ModuleStateLookupData *)realloc(
            *old_data,
            sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
        if (!new_data) {
            PyErr_NoMemory();
            return -1;
        }
        for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) {
            new_data->table[i].id = i;
            new_data->table[i].module = NULL;
        }
        new_data->allocated = to_allocate;
    }
    new_data->table[interpreter_id].module = module;
    if (new_data->count < interpreter_id+1) {
        new_data->count = interpreter_id+1;
    }
    *old_data = new_data;
    return 0;
}
static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) {
    __Pyx_InterpreterIdAndModule *read = data->table;
    __Pyx_InterpreterIdAndModule *write = data->table;
    __Pyx_InterpreterIdAndModule *end = read + data->count;
    for (; read<end; ++read) {
        if (read->module) {
            write->id = read->id;
            write->module = read->module;
            ++write;
        }
    }
    data->count = write - data->table;
    for (; write<end; ++write) {
        write->id = 0;
        write->module = NULL;
    }
    data->interpreter_id_as_index = 0;
}
static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return -1;
    int result = 0;
    __Pyx_ModuleStateLookup_Lock();
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *)
            __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
#else
    __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data;
#endif
    __Pyx_ModuleStateLookupData *new_data = old_data;
    if (!new_data) {
        new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData));
        if (!new_data) {
            result = -1;
            PyErr_NoMemory();
            goto end;
        }
        new_data->allocated = 1;
        new_data->interpreter_id_as_index = 1;
    }
    __Pyx_ModuleStateLookup_wait_until_no_readers();
    if (new_data->interpreter_id_as_index) {
        if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
            result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id);
            goto end;
        }
        __Pyx_State_ConvertFromInterpIdAsIndex(new_data);
    }
    {
        Py_ssize_t insert_at = 0;
        {
            __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
                new_data->table, new_data->count, interpreter_id);
            assert(lower_bound);
            insert_at = lower_bound - new_data->table;
            if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) {
                lower_bound->module = module;
                goto end;  // already in table, nothing more to do
            }
        }
        if (new_data->count+1 >= new_data->allocated) {
            Py_ssize_t to_allocate = (new_data->count+1)*2;
            new_data =
                (__Pyx_ModuleStateLookupData*)realloc(
                    new_data,
                    sizeof(__Pyx_ModuleStateLookupData) +
                    (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
            if (!new_data) {
                result = -1;
                new_data = old_data;
                PyErr_NoMemory();
                goto end;
            }
            new_data->allocated = to_allocate;
        }
        ++new_data->count;
        int64_t last_id = interpreter_id;
        PyObject *last_module = module;
        for (Py_ssize_t i=insert_at; i<new_data->count; ++i) {
            int64_t current_id = new_data->table[i].id;
            new_data->table[i].id = last_id;
            last_id = current_id;
            PyObject *current_module = new_data->table[i].module;
            new_data->table[i].module = last_module;
            last_module = current_module;
        }
    }
  end:
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data);
#else
    __Pyx_ModuleStateLookup_data = new_data;
#endif
    __Pyx_ModuleStateLookup_Unlock();
    return result;
}
static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return -1;
    __Pyx_ModuleStateLookup_Lock();
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *)
            __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
#else
    __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data;
#endif
    if (data->interpreter_id_as_index) {
        if (interpreter_id < data->count) {
            data->table[interpreter_id].module = NULL;
        }
        goto done;
    }
    {
        __Pyx_ModuleStateLookup_wait_until_no_readers();
        __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
            data->table, data->count, interpreter_id);
        if (!lower_bound) goto done;
        if (lower_bound->id != interpreter_id) goto done;
        __Pyx_InterpreterIdAndModule *end = data->table+data->count;
        for (;lower_bound<end-1; ++lower_bound) {
            lower_bound->id = (lower_bound+1)->id;
            lower_bound->module = (lower_bound+1)->module;
        }
    }
    --data->count;
    if (data->count == 0) {
        free(data);
        data = NULL;
    }
  done:
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data);
#else
    __Pyx_ModuleStateLookup_data = data;
#endif
    __Pyx_ModuleStateLookup_Unlock();
    return 0;
}
#endif

/* #### Code section: utility_code_pragmas_end ### */
#ifdef _MSC_VER
#pragma warning( pop )
#endif



/* #### Code section: end ### */
#endif /* Py_PYTHON_H */
