/* Generated by Cython 0.29.37 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "define_macros": [
            [
                "NDEBUG",
                null
            ],
            [
                "_LARGEFILE_SOURCE",
                null
            ],
            [
                "_CONSOLE",
                null
            ],
            [
                "_FILE_OFFSET_BITS",
                64
            ],
            [
                "SAPonUNIX",
                null
            ],
            [
                "SAPwithUNICODE",
                null
            ],
            [
                "SAPwithTHREADS",
                null
            ],
            [
                "SAPonLIN",
                null
            ]
        ],
        "depends": [],
        "extra_compile_args": [
            "-Wall",
            "-O2",
            "-fexceptions",
            "-funsigned-char",
            "-fno-strict-aliasing",
            "-Wall",
            "-Wno-uninitialized",
            "-Wno-deprecated-declarations",
            "-Wno-unused-function",
            "-Wcast-align",
            "-fPIC",
            "-pthread",
            "-minline-all-stringops",
            "-I/usr/local/sap/nwrfcsdk/include"
        ],
        "extra_link_args": [
            "-L/usr/local/sap/nwrfcsdk/lib"
        ],
        "language": "c++",
        "libraries": [
            "sapnwrfc",
            "sapucum"
        ],
        "name": "pyrfc._cyrfc",
        "sources": [
            "src/pyrfc/_cyrfc.pyx"
        ]
    },
    "module_name": "pyrfc._cyrfc"
}
END: Cython Metadata */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_29_37"
#define CYTHON_HEX_VERSION 0x001D25F0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x02070000
    #define HAVE_LONG_LONG
  #endif
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #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_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00)
  #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
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
#elif defined(PY_NOGIL)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #ifndef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #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
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 0
  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
    #define CYTHON_USE_PYLONG_INTERNALS (PY_VERSION_HEX < 0x030C00A5)
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0 || 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
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #if PY_VERSION_HEX >= 0x030B00A4
    #undef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 0
  #elif !defined(CYTHON_FAST_THREAD_STATE)
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
  #ifndef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS ((PY_VERSION_HEX >= 0x030600B1) && (PY_VERSION_HEX < 0x030C00A5))
  #endif
  #if PY_VERSION_HEX >= 0x030B00A4
    #undef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 0
  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
    #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  #endif
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_MAJOR_VERSION < 3
    #include "longintrepr.h"
  #endif
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
           typedef unsigned char     uint8_t;
           typedef unsigned int      uint32_t;
        #else
           typedef unsigned __int8   uint8_t;
           typedef unsigned __int32  uint32_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

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

#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_DefaultClassType PyType_Type
#if PY_VERSION_HEX >= 0x030B00A1
    static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, 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 *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
        PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
        const char *fn_cstr=NULL;
        const char *name_cstr=NULL;
        PyCodeObject* co=NULL;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        if (!(kwds=PyDict_New())) goto end;
        if (!(argcount=PyLong_FromLong(a))) goto end;
        if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end;
        if (!(posonlyargcount=PyLong_FromLong(0))) goto end;
        if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end;
        if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;
        if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end;
        if (!(nlocals=PyLong_FromLong(l))) goto end;
        if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end;
        if (!(stacksize=PyLong_FromLong(s))) goto end;
        if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end;
        if (!(flags=PyLong_FromLong(f))) goto end;
        if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end;
        if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;
        if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;
        if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;
        if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too;
        if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here
        if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
        Py_XDECREF((PyObject*)co);
        co = (PyCodeObject*)call_result;
        call_result = NULL;
        if (0) {
            cleanup_code_too:
            Py_XDECREF((PyObject*)co);
            co = NULL;
        }
        end:
        Py_XDECREF(kwds);
        Py_XDECREF(argcount);
        Py_XDECREF(posonlyargcount);
        Py_XDECREF(kwonlyargcount);
        Py_XDECREF(nlocals);
        Py_XDECREF(stacksize);
        Py_XDECREF(replace);
        Py_XDECREF(call_result);
        Py_XDECREF(empty);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return co;
    }
#else
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
  #define __Pyx_DefaultClassType PyType_Type
#endif
#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 METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
  #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
  #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
  #define PyMem_RawFree(p)             PyMem_Free(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
#else
#define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #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_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #if 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
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

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

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

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

#define __PYX_HAVE__pyrfc___cyrfc
#define __PYX_HAVE_API__pyrfc___cyrfc
/* Early includes */
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include "sapnwrfc.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

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

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#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 const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
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))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


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

static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime = NULL;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;


static const char *__pyx_f[] = {
  "src/pyrfc/_cyrfc.pyx",
  "stringsource",
};
/* 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()

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


/*--- Type declarations ---*/
struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters;
struct __pyx_obj_5pyrfc_6_cyrfc_Connection;
struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection;
struct __pyx_obj_5pyrfc_6_cyrfc_Server;
struct __pyx_obj_5pyrfc_6_cyrfc_Throughput;
struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py;
struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString;

/* "pyrfc/_cyrfc.pyx":3073
 *         )
 * 
 * cdef wrapString(const SAP_UC* uc, uclen=-1, rstrip=False):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */
struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString {
  int __pyx_n;
  PyObject *uclen;
  PyObject *rstrip;
};

/* "pyrfc/_cyrfc.pyx":274
 * 
 * 
 * cdef class ConnectionParameters:             # <<<<<<<<<<<<<<
 *     """Connection parameters instance in SAP unicode format
 * 
 */
struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters {
  PyObject_HEAD
  unsigned int _params_count;
  RFC_CONNECTION_PARAMETER *_params;
};


/* "pyrfc/_cyrfc.pyx":498
 * 
 * 
 * cdef class Connection:             # <<<<<<<<<<<<<<
 *     """ A connection to an SAP backend system
 * 
 */
struct __pyx_obj_5pyrfc_6_cyrfc_Connection {
  PyObject_HEAD
  struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *__pyx_vtab;
  unsigned int __pyx___bconfig;
  PyObject *__config;
  int active_transaction;
  int active_unit;
  RFC_CONNECTION_HANDLE _handle;
  RFC_TRANSACTION_HANDLE _tHandle;
  RFC_UNIT_HANDLE _uHandle;
  struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *_connection;
};


/* "pyrfc/_cyrfc.pyx":1512
 * 
 * 
 * cdef class ServerConnection:             # <<<<<<<<<<<<<<
 *     cdef ConnectionParameters _connection
 *     cdef RFC_SERVER_HANDLE _handle
 */
struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection {
  PyObject_HEAD
  struct __pyx_vtabstruct_5pyrfc_6_cyrfc_ServerConnection *__pyx_vtab;
  struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *_connection;
  RFC_SERVER_HANDLE _handle;
  int debug;
  int rstrip;
};


/* "pyrfc/_cyrfc.pyx":1723
 * 
 * 
 * cdef class Server:             # <<<<<<<<<<<<<<
 *     """ An ABAP server
 * 
 */
struct __pyx_obj_5pyrfc_6_cyrfc_Server {
  PyObject_HEAD
  struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Server *__pyx_vtab;
  int debug;
  int rstrip;
  struct __pyx_obj_5pyrfc_6_cyrfc_Connection *_client_connection;
  struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *_server_connection;
  PyObject *_server_thread;
};


/* "pyrfc/_cyrfc.pyx":2172
 * ################################################################################
 * 
 * cdef class Throughput:             # <<<<<<<<<<<<<<
 *     _registry = []
 * 
 */
struct __pyx_obj_5pyrfc_6_cyrfc_Throughput {
  PyObject_HEAD
  struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Throughput *__pyx_vtab;
  RFC_THROUGHPUT_HANDLE _throughput_handle;
  PyObject *_connections;
};


/* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_object____object___to_py")
 * cdef object __Pyx_CFunc_object____object___to_py(object (*f)(object) ):             # <<<<<<<<<<<<<<
 *     def wrap(object client_connection):
 *         """wrap(client_connection)"""
 */
struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py {
  PyObject_HEAD
  PyObject *(*__pyx_v_f)(PyObject *);
};



/* "pyrfc/_cyrfc.pyx":498
 * 
 * 
 * cdef class Connection:             # <<<<<<<<<<<<<<
 *     """ A connection to an SAP backend system
 * 
 */

struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection {
  PyObject *(*_reopen)(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *);
  PyObject *(*_open)(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *);
  PyObject *(*_error)(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *, RFC_ERROR_INFO *);
};
static struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *__pyx_vtabptr_5pyrfc_6_cyrfc_Connection;


/* "pyrfc/_cyrfc.pyx":1512
 * 
 * 
 * cdef class ServerConnection:             # <<<<<<<<<<<<<<
 *     cdef ConnectionParameters _connection
 *     cdef RFC_SERVER_HANDLE _handle
 */

struct __pyx_vtabstruct_5pyrfc_6_cyrfc_ServerConnection {
  PyObject *(*_open)(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *);
  PyObject *(*_close)(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *);
};
static struct __pyx_vtabstruct_5pyrfc_6_cyrfc_ServerConnection *__pyx_vtabptr_5pyrfc_6_cyrfc_ServerConnection;


/* "pyrfc/_cyrfc.pyx":1723
 * 
 * 
 * cdef class Server:             # <<<<<<<<<<<<<<
 *     """ An ABAP server
 * 
 */

struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Server {
  RFC_RC (*__pyx___onCheckFunction)(RFC_CONNECTION_HANDLE, RFC_UNIT_IDENTIFIER const *);
  RFC_RC (*__pyx___onCommitFunction)(RFC_CONNECTION_HANDLE, RFC_UNIT_IDENTIFIER const *);
  RFC_RC (*__pyx___onRollbackFunction)(RFC_CONNECTION_HANDLE, RFC_UNIT_IDENTIFIER const *);
  RFC_RC (*__pyx___onConfirmFunction)(RFC_CONNECTION_HANDLE, RFC_UNIT_IDENTIFIER const *);
  RFC_RC (*__pyx___onGetStateFunction)(RFC_CONNECTION_HANDLE, RFC_UNIT_IDENTIFIER const *, RFC_UNIT_STATE *);
  PyObject *(*_error)(struct __pyx_obj_5pyrfc_6_cyrfc_Server *, RFC_ERROR_INFO *);
};
static struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Server *__pyx_vtabptr_5pyrfc_6_cyrfc_Server;


/* "pyrfc/_cyrfc.pyx":2172
 * ################################################################################
 * 
 * cdef class Throughput:             # <<<<<<<<<<<<<<
 *     _registry = []
 * 
 */

struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Throughput {
  PyObject *(*_destroy)(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *);
};
static struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Throughput *__pyx_vtabptr_5pyrfc_6_cyrfc_Throughput;

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

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

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

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

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  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_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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* DictGetItem.proto */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
#define __Pyx_PyObject_Dict_GetItem(obj, name)\
    (likely(PyDict_CheckExact(obj)) ?\
     __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
#else
#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
#endif

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

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

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

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

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

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

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

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

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

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

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

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

/* PyObjectFormatSimple.proto */
#if CYTHON_COMPILING_IN_PYPY
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#elif PY_MAJOR_VERSION < 3
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\
        PyObject_Format(s, f))
#elif CYTHON_USE_TYPE_SLOTS
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_str(s) :\
        likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_str(s) :\
        PyObject_Format(s, f))
#else
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#endif

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

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

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

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

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

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

/* BuildPyUnicode.proto */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
                                                int prepend_sign, char padding_char);

/* CIntToPyUnicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char);

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

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

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

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

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

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

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

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

/* CIntToPyUnicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_RFC_UNIT_STATE(RFC_UNIT_STATE value, Py_ssize_t width, char padding_char, char format_char);

/* CIntToPyUnicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char);

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

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

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

/* CIntToPyUnicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_RFC_RC(RFC_RC value, Py_ssize_t width, char padding_char, char format_char);

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

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

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

/* SetItemInt.proto */
#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
               __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
                                               int is_list, int wraparound, int boundscheck);

/* CallableCheck.proto */
#if CYTHON_USE_TYPE_SLOTS && PY_MAJOR_VERSION >= 3
#define __Pyx_PyCallable_Check(obj)   (Py_TYPE(obj)->tp_call != NULL)
#else
#define __Pyx_PyCallable_Check(obj)   PyCallable_Check(obj)
#endif

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

/* ReRaiseException.proto */
static CYTHON_INLINE void __Pyx_ReraiseException(void);

/* PyObjectFormat.proto */
#if CYTHON_USE_UNICODE_WRITER
static PyObject* __Pyx_PyObject_Format(PyObject* s, PyObject* f);
#else
#define __Pyx_PyObject_Format(s, f) PyObject_Format(s, f)
#endif

/* CIntToPyUnicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_RFCTYPE(RFCTYPE value, Py_ssize_t width, char padding_char, char format_char);

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

/* PyDictContains.proto */
static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) {
    int result = PyDict_Contains(dict, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

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

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

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

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

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

/* decode_c_string_utf16.proto */
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_string.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, 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));

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

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

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

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

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

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

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

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

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

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

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

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

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

/* GetNameInClass.proto */
#define __Pyx_GetNameInClass(var, nmspace, name)  (var) = __Pyx__GetNameInClass(nmspace, name)
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name);

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

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

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_DIRECTION(RFC_DIRECTION value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFCTYPE(RFCTYPE value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_UNIT_STATE(RFC_UNIT_STATE value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_RC(RFC_RC value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_CALL_TYPE(RFC_CALL_TYPE value);

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

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

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

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

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

/* CIntFromPy.proto */
static CYTHON_INLINE short __Pyx_PyInt_As_short(PyObject *);

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

/* CIntFromPy.proto */
static CYTHON_INLINE RFC_RC __Pyx_PyInt_As_RFC_RC(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE RFCTYPE __Pyx_PyInt_As_RFCTYPE(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE RFC_DIRECTION __Pyx_PyInt_As_RFC_DIRECTION(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SAP_ULLONG(SAP_ULLONG value);

/* CIntFromPy.proto */
static CYTHON_INLINE RFC_INT __Pyx_PyInt_As_RFC_INT(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE RFC_INT8 __Pyx_PyInt_As_RFC_INT8(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_ERROR_GROUP(RFC_ERROR_GROUP value);

/* CIntFromPy.proto */
static CYTHON_INLINE RFC_ERROR_GROUP __Pyx_PyInt_As_RFC_ERROR_GROUP(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SAP_RAW(SAP_RAW value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_INT(RFC_INT value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_INT2(RFC_INT2 value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_INT8(RFC_INT8 value);

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

/* CStringEquals.proto */
static CYTHON_INLINE int __Pyx_StrEq(const char *, const char *);

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

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

static PyObject *__pyx_f_5pyrfc_6_cyrfc_10Connection__reopen(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_5pyrfc_6_cyrfc_10Connection__open(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_5pyrfc_6_cyrfc_10Connection__error(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, RFC_ERROR_INFO *__pyx_v_errorInfo); /* proto*/
static PyObject *__pyx_f_5pyrfc_6_cyrfc_16ServerConnection__open(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_5pyrfc_6_cyrfc_16ServerConnection__close(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__pyx_v_self); /* proto*/
static RFC_RC __pyx_f_5pyrfc_6_cyrfc_6Server___onCheckFunction(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_UNIT_IDENTIFIER const *__pyx_v_identifier); /* proto*/
static RFC_RC __pyx_f_5pyrfc_6_cyrfc_6Server___onCommitFunction(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_UNIT_IDENTIFIER const *__pyx_v_identifier); /* proto*/
static RFC_RC __pyx_f_5pyrfc_6_cyrfc_6Server___onRollbackFunction(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_UNIT_IDENTIFIER const *__pyx_v_identifier); /* proto*/
static RFC_RC __pyx_f_5pyrfc_6_cyrfc_6Server___onConfirmFunction(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_UNIT_IDENTIFIER const *__pyx_v_identifier); /* proto*/
static RFC_RC __pyx_f_5pyrfc_6_cyrfc_6Server___onGetStateFunction(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_UNIT_IDENTIFIER const *__pyx_v_identifier, RFC_UNIT_STATE *__pyx_v_unitState); /* proto*/
static PyObject *__pyx_f_5pyrfc_6_cyrfc_6Server__error(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, RFC_ERROR_INFO *__pyx_v_errorInfo); /* proto*/
static PyObject *__pyx_f_5pyrfc_6_cyrfc_10Throughput__destroy(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self); /* proto*/

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

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

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

/* Module declarations from 'pyrfc.csapnwrfc' */

/* Module declarations from 'pyrfc._cyrfc' */
static PyTypeObject *__pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters = 0;
static PyTypeObject *__pyx_ptype_5pyrfc_6_cyrfc_Connection = 0;
static PyTypeObject *__pyx_ptype_5pyrfc_6_cyrfc_ServerConnection = 0;
static PyTypeObject *__pyx_ptype_5pyrfc_6_cyrfc_Server = 0;
static PyTypeObject *__pyx_ptype_5pyrfc_6_cyrfc_Throughput = 0;
static PyTypeObject *__pyx_ptype___pyx_scope_struct____Pyx_CFunc_object____object___to_py = 0;
static PyObject *__pyx_f_5pyrfc_6_cyrfc__cancel_connection(PyObject *); /*proto*/
static RFC_RC __pyx_f_5pyrfc_6_cyrfc_metadataLookup(SAP_UC const *, RFC_ATTRIBUTES, RFC_FUNCTION_DESC_HANDLE *); /*proto*/
static PyObject *__pyx_f_5pyrfc_6_cyrfc_get_server_context(RFC_CONNECTION_HANDLE, RFC_ERROR_INFO *); /*proto*/
static RFC_RC __pyx_f_5pyrfc_6_cyrfc_genericHandler(RFC_CONNECTION_HANDLE, RFC_FUNCTION_HANDLE, RFC_ERROR_INFO *); /*proto*/
static RFC_TYPE_DESC_HANDLE __pyx_f_5pyrfc_6_cyrfc_fillTypeDescription(PyObject *); /*proto*/
static RFC_UNIT_IDENTIFIER __pyx_f_5pyrfc_6_cyrfc_fillUnitIdentifier(PyObject *); /*proto*/
static PyObject *__pyx_f_5pyrfc_6_cyrfc_fillFunctionParameter(RFC_FUNCTION_DESC_HANDLE, RFC_FUNCTION_HANDLE, PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_f_5pyrfc_6_cyrfc_fillStructureField(RFC_TYPE_DESC_HANDLE, RFC_STRUCTURE_HANDLE, PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_f_5pyrfc_6_cyrfc_fillTable(RFC_TYPE_DESC_HANDLE, RFC_TABLE_HANDLE, PyObject *); /*proto*/
static PyObject *__pyx_f_5pyrfc_6_cyrfc_fillVariable(RFCTYPE, RFC_FUNCTION_HANDLE, SAP_UC *, PyObject *, RFC_TYPE_DESC_HANDLE); /*proto*/
static SAP_RAW *__pyx_f_5pyrfc_6_cyrfc_fillBytes(PyObject *); /*proto*/
static PyObject *__pyx_f_5pyrfc_6_cyrfc_fillError(PyObject *, RFC_ERROR_INFO *); /*proto*/
static SAP_UC *__pyx_f_5pyrfc_6_cyrfc_fillString(PyObject *); /*proto*/
static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapConnectionAttributes(RFC_ATTRIBUTES); /*proto*/
static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapTypeDescription(RFC_TYPE_DESC_HANDLE); /*proto*/
static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapFunctionDescription(RFC_FUNCTION_DESC_HANDLE); /*proto*/
static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapResult(RFC_FUNCTION_DESC_HANDLE, RFC_FUNCTION_HANDLE, RFC_DIRECTION, PyObject *); /*proto*/
static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapUnitIdentifier(RFC_UNIT_IDENTIFIER); /*proto*/
static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapUnitAttributes(RFC_UNIT_ATTRIBUTES *); /*proto*/
static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapStructure(RFC_TYPE_DESC_HANDLE, RFC_STRUCTURE_HANDLE, PyObject *); /*proto*/
static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapTable(RFC_TYPE_DESC_HANDLE, RFC_TABLE_HANDLE, PyObject *); /*proto*/
static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapVariable(RFCTYPE, RFC_FUNCTION_HANDLE, SAP_UC *, unsigned int, RFC_TYPE_DESC_HANDLE, PyObject *); /*proto*/
static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapError(RFC_ERROR_INFO *); /*proto*/
static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapString(SAP_UC const *, struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString *__pyx_optional_args); /*proto*/
static PyObject *__Pyx_CFunc_object____object___to_py(PyObject *(*)(PyObject *)); /*proto*/
#define __Pyx_MODULE_NAME "pyrfc._cyrfc"
extern int __pyx_module_is_main_pyrfc___cyrfc;
int __pyx_module_is_main_pyrfc___cyrfc = 0;

/* Implementation of 'pyrfc._cyrfc' */
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_staticmethod;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_print;
static const char __pyx_k_Q[] = "Q";
static const char __pyx_k_T[] = "T";
static const char __pyx_k_d[] = "d";
static const char __pyx_k_t[] = "t";
static const char __pyx_k_02[] = "02";
static const char __pyx_k_04[] = "04";
static const char __pyx_k_OK[] = "OK";
static const char __pyx_k__3[] = "/";
static const char __pyx_k__4[] = ")>";
static const char __pyx_k__5[] = "";
static const char __pyx_k__6[] = "'";
static const char __pyx_k_id[] = "id";
static const char __pyx_k_rc[] = "rc";
static const char __pyx_k_TID[] = "TID ";
static const char __pyx_k_UTC[] = " UTC] ";
static const char __pyx_k__21[] = ".";
static const char __pyx_k__24[] = "[";
static const char __pyx_k__25[] = " '";
static const char __pyx_k__28[] = "'.";
static const char __pyx_k__29[] = ").";
static const char __pyx_k__46[] = "\000";
static const char __pyx_k__51[] = "*";
static const char __pyx_k_add[] = "add";
static const char __pyx_k_day[] = "day";
static const char __pyx_k_del[] = "__del__";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_get[] = "get";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_rel[] = "rel";
static const char __pyx_k_sys[] = "sys";
static const char __pyx_k_Enum[] = "Enum";
static const char __pyx_k_Unit[] = "Unit ";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_auto[] = "auto";
static const char __pyx_k_code[] = "code";
static const char __pyx_k_date[] = "date";
static const char __pyx_k_dest[] = "dest";
static const char __pyx_k_enum[] = "enum";
static const char __pyx_k_free[] = "_free";
static const char __pyx_k_host[] = "host";
static const char __pyx_k_hour[] = "hour";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_join[] = "join";
static const char __pyx_k_lock[] = "lock";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_open[] = "open";
static const char __pyx_k_port[] = "port";
static const char __pyx_k_repr[] = "__repr__";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_stop[] = "stop";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_time[] = "time";
static const char __pyx_k_type[] = "type";
static const char __pyx_k_unit[] = "unit";
static const char __pyx_k_user[] = "user";
static const char __pyx_k_with[] = "' with ";
static const char __pyx_k_wrap[] = "wrap";
static const char __pyx_k_year[] = "year";
static const char __pyx_k_H_M_S[] = "%H%M%S";
static const char __pyx_k_Timer[] = "Timer";
static const char __pyx_k_Y_m_d[] = "%Y%m%d";
static const char __pyx_k_alive[] = "alive";
static const char __pyx_k_calls[] = "calls";
static const char __pyx_k_check[] = "check";
static const char __pyx_k_clear[] = "clear";
static const char __pyx_k_close[] = "_close";
static const char __pyx_k_debug[] = "debug";
static const char __pyx_k_dtime[] = "dtime";
static const char __pyx_k_field[] = "field '";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_major[] = "major";
static const char __pyx_k_minor[] = "minor";
static const char __pyx_k_month[] = "month";
static const char __pyx_k_print[] = "print";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_serve[] = "serve";
static const char __pyx_k_start[] = "start";
static const char __pyx_k_state[] = "state";
static const char __pyx_k_sysId[] = "sysId";
static const char __pyx_k_sysid[] = "sysid";
static const char __pyx_k_trace[] = "trace";
static const char __pyx_k_upper[] = "upper";
static const char __pyx_k_utils[] = "_utils";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_Server[] = "Server";
static const char __pyx_k_Thread[] = "Thread";
static const char __pyx_k_Values[] = "\n Values: ";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_cancel[] = "cancel";
static const char __pyx_k_client[] = "client";
static const char __pyx_k_commit[] = "commit";
static const char __pyx_k_config[] = "config";
static const char __pyx_k_decode[] = "decode";
static const char __pyx_k_encode[] = "encode";
static const char __pyx_k_fields[] = "fields";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_handle[] = "handle";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_isfile[] = "isfile";
static const char __pyx_k_length[] = "' length '";
static const char __pyx_k_locale[] = "locale";
static const char __pyx_k_minute[] = "minute";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_msg_v1[] = "msg_v1";
static const char __pyx_k_msg_v2[] = "msg_v2";
static const char __pyx_k_msg_v3[] = "msg_v3";
static const char __pyx_k_msg_v4[] = "msg_v4";
static const char __pyx_k_name_2[] = "__name__";
static const char __pyx_k_object[] = "object";
static const char __pyx_k_origin[] = "origin";
static const char __pyx_k_params[] = " params>";
static const char __pyx_k_queued[] = "queued";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_remove[] = "remove";
static const char __pyx_k_rsplit[] = "rsplit";
static const char __pyx_k_rstrip[] = "rstrip";
static const char __pyx_k_second[] = "second";
static const char __pyx_k_server[] = "server";
static const char __pyx_k_socket[] = "socket";
static const char __pyx_k_t_code[] = "t_code";
static const char __pyx_k_target[] = "target";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_utcnow[] = "utcnow";
static const char __pyx_k_Decimal[] = "Decimal";
static const char __pyx_k_close_2[] = "close";
static const char __pyx_k_confirm[] = "confirm";
static const char __pyx_k_created[] = "created";
static const char __pyx_k_decimal[] = "decimal";
static const char __pyx_k_destroy[] = "destroy";
static const char __pyx_k_isdigit[] = "isdigit";
static const char __pyx_k_message[] = "message";
static const char __pyx_k_of_type[] = "of type";
static const char __pyx_k_options[] = "options";
static const char __pyx_k_os_path[] = "os.path";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_program[] = "program";
static const char __pyx_k_rfcRole[] = "rfcRole";
static const char __pyx_k_timeout[] = "timeout";
static const char __pyx_k_unit_id[] = "unit_id";
static const char __pyx_k_00000000[] = "00000000";
static const char __pyx_k_Function[] = "Function '";
static const char __pyx_k_Iterable[] = "Iterable";
static const char __pyx_k_RCStatus[] = "RCStatus";
static const char __pyx_k_RFCError[] = "RFCError";
static const char __pyx_k_callback[] = "callback";
static const char __pyx_k_codepage[] = "codepage";
static const char __pyx_k_datetime[] = "datetime";
static const char __pyx_k_decimals[] = "decimals";
static const char __pyx_k_exc_info[] = "exc_info";
static const char __pyx_k_executed[] = "executed";
static const char __pyx_k_getState[] = "getState";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_handle_2[] = "' handle ";
static const char __pyx_k_handle_3[] = "_handle";
static const char __pyx_k_hostname[] = "hostname";
static const char __pyx_k_is_alive[] = "is_alive";
static const char __pyx_k_is_valid[] = "is_valid";
static const char __pyx_k_lang_iso[] = "lang_iso";
static const char __pyx_k_lang_sap[] = "lang_sap";
static const char __pyx_k_language[] = "language";
static const char __pyx_k_launched[] = "launched ";
static const char __pyx_k_msg_type[] = "msg_type";
static const char __pyx_k_optional[] = "optional";
static const char __pyx_k_pathName[] = "pathName";
static const char __pyx_k_platform[] = "platform";
static const char __pyx_k_progName[] = "progName";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_registry[] = "_registry";
static const char __pyx_k_reserved[] = "reserved";
static const char __pyx_k_rollback[] = "rollback";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_strptime[] = "strptime";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_UnitState[] = "UnitState";
static const char __pyx_k_add_field[] = "add_field";
static const char __pyx_k_but_found[] = ", but found ";
static const char __pyx_k_call_type[] = "call_type";
static const char __pyx_k_committed[] = "committed";
static const char __pyx_k_confirmed[] = "confirmed";
static const char __pyx_k_direction[] = "direction";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_errorInfo[] = "errorInfo";
static const char __pyx_k_exception[] = "_exception";
static const char __pyx_k_func_name[] = "func_name";
static const char __pyx_k_int_field[] = "int_field";
static const char __pyx_k_iteritems[] = "iteritems";
static const char __pyx_k_kernelRel[] = "kernelRel";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_msg_class[] = "msg_class";
static const char __pyx_k_not_found[] = "not_found";
static const char __pyx_k_partnerIP[] = "partnerIP";
static const char __pyx_k_path_name[] = "path_name";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_sat_trace[] = "sat_trace";
static const char __pyx_k_sentBytes[] = "sentBytes";
static const char __pyx_k_sysNumber[] = "sysNumber";
static const char __pyx_k_threading[] = "threading";
static const char __pyx_k_totalTime[] = "totalTime";
static const char __pyx_k_traceback[] = "traceback";
static const char __pyx_k_type_name[] = "type_name";
static const char __pyx_k_uc_length[] = "uc_length";
static const char __pyx_k_uc_offset[] = "uc_offset";
static const char __pyx_k_Connection[] = "Connection";
static const char __pyx_k_Error_code[] = "Error code ";
static const char __pyx_k_LogonError[] = "LogonError";
static const char __pyx_k_MASK_DTIME[] = "_MASK_DTIME";
static const char __pyx_k_New_handle[] = ". New handle: ";
static const char __pyx_k_RFC_EXPORT[] = "RFC_EXPORT";
static const char __pyx_k_RFC_IMPORT[] = "RFC_IMPORT";
static const char __pyx_k_RFC_TABLES[] = "RFC_TABLES";
static const char __pyx_k_Throughput[] = "Throughput";
static const char __pyx_k_attributes[] = "attributes";
static const char __pyx_k_auth_check[] = "auth_check";
static const char __pyx_k_background[] = "background";
static const char __pyx_k_connection[] = "connection";
static const char __pyx_k_cpicConvId[] = "cpicConvId";
static const char __pyx_k_enum_names[] = "enum_names";
static const char __pyx_k_field_type[] = "field_type";
static const char __pyx_k_in_process[] = "in_process";
static const char __pyx_k_localeconv[] = "localeconv";
static const char __pyx_k_msg_number[] = "msg_number";
static const char __pyx_k_must_be_in[] = "' must be in ";
static const char __pyx_k_nuc_length[] = "nuc_length";
static const char __pyx_k_nuc_offset[] = "nuc_offset";
static const char __pyx_k_parameters[] = "parameters";
static const char __pyx_k_partnerRel[] = "partnerRel";
static const char __pyx_k_patchLevel[] = "patchLevel";
static const char __pyx_k_patchlevel[] = "patchlevel";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_queue_name[] = "queue_name";
static const char __pyx_k_serverName[] = "serverName";
static const char __pyx_k_server_log[] = "_server_log";
static const char __pyx_k_throughput[] = "throughput";
static const char __pyx_k_uclang_iso[] = "uclang_iso";
static const char __pyx_k_uclang_sap[] = "uclang_sap";
static const char __pyx_k_MASK_RSTRIP[] = "_MASK_RSTRIP";
static const char __pyx_k_RFCTYPE_BCD[] = "RFCTYPE_BCD";
static const char __pyx_k_RFCTYPE_INT[] = "RFCTYPE_INT";
static const char __pyx_k_RFCTYPE_NUM[] = "RFCTYPE_NUM";
static const char __pyx_k_Request_for[] = "Request for '";
static const char __pyx_k_active_unit[] = "active_unit";
static const char __pyx_k_cfunc_to_py[] = "cfunc.to_py";
static const char __pyx_k_chars_found[] = " chars, found ";
static const char __pyx_k_connections[] = "connections";
static const char __pyx_k_enum_values[] = "enum_values";
static const char __pyx_k_get_unit_id[] = "_get_unit_id";
static const char __pyx_k_gethostname[] = "gethostname";
static const char __pyx_k_is_stateful[] = "is_stateful";
static const char __pyx_k_isoLanguage[] = "isoLanguage";
static const char __pyx_k_log_message[] = "log_message";
static const char __pyx_k_multi_count[] = "multi count";
static const char __pyx_k_partnerHost[] = "partnerHost";
static const char __pyx_k_partnerIPv6[] = "partnerIPv6";
static const char __pyx_k_partnerType[] = "partnerType";
static const char __pyx_k_queue_names[] = "queue_names";
static const char __pyx_k_rolled_back[] = "rolled_back";
static const char __pyx_k_synchronous[] = "synchronous";
static const char __pyx_k_LOCALE_RADIX[] = "_LOCALE_RADIX";
static const char __pyx_k_RFCTYPE_BYTE[] = "RFCTYPE_BYTE";
static const char __pyx_k_RFCTYPE_CDAY[] = "RFCTYPE_CDAY";
static const char __pyx_k_RFCTYPE_CHAR[] = "RFCTYPE_CHAR";
static const char __pyx_k_RFCTYPE_DATE[] = "RFCTYPE_DATE";
static const char __pyx_k_RFCTYPE_INT1[] = "RFCTYPE_INT1";
static const char __pyx_k_RFCTYPE_INT2[] = "RFCTYPE_INT2";
static const char __pyx_k_RFCTYPE_INT8[] = "RFCTYPE_INT8";
static const char __pyx_k_RFCTYPE_NULL[] = "RFCTYPE_NULL";
static const char __pyx_k_RFCTYPE_TIME[] = "RFCTYPE_TIME";
static const char __pyx_k_RFC_CHANGING[] = "RFC_CHANGING";
static const char __pyx_k_RFC_EXECUTED[] = "RFC_EXECUTED";
static const char __pyx_k_RfcFieldType[] = "RfcFieldType";
static const char __pyx_k_Server_close[] = "Server close";
static const char __pyx_k_UnitCallType[] = "UnitCallType";
static const char __pyx_k_confirm_unit[] = "_confirm_unit";
static const char __pyx_k_destroy_unit[] = "_destroy_unit";
static const char __pyx_k_kernel_trace[] = "kernel_trace";
static const char __pyx_k_must_be_in_2[] = "' must be in '";
static const char __pyx_k_protocolType[] = "protocolType";
static const char __pyx_k_pyrfc__cyrfc[] = "pyrfc._cyrfc";
static const char __pyx_k_sapnwrfc_ini[] = "sapnwrfc.ini";
static const char __pyx_k_sending_date[] = "sending_date";
static const char __pyx_k_sending_time[] = "sending_time";
static const char __pyx_k_server_log_2[] = "server_log";
static const char __pyx_k_staticmethod[] = "staticmethod";
static const char __pyx_k_stringsource[] = "stringsource";
static const char __pyx_k_unit_history[] = "unit_history";
static const char __pyx_k_when_filling[] = " when filling ";
static const char __pyx_k_RFCTYPE_DTDAY[] = "RFCTYPE_DTDAY";
static const char __pyx_k_RFCTYPE_FLOAT[] = "RFCTYPE_FLOAT";
static const char __pyx_k_RFCTYPE_TABLE[] = "RFCTYPE_TABLE";
static const char __pyx_k_RFC_NOT_FOUND[] = "RFC_NOT_FOUND";
static const char __pyx_k_add_parameter[] = "add_parameter";
static const char __pyx_k_bgRfcFunction[] = "__bgRfcFunction";
static const char __pyx_k_client_params[] = "client_params";
static const char __pyx_k_decimal_point[] = "decimal_point";
static const char __pyx_k_default_value[] = "default_value";
static const char __pyx_k_function_name[] = "function_name";
static const char __pyx_k_invalid_state[] = " invalid state '";
static const char __pyx_k_not_requested[] = "not_requested";
static const char __pyx_k_numberOfCalls[] = "numberOfCalls";
static const char __pyx_k_peakBusyCount[] = "peakBusyCount";
static const char __pyx_k_receivedBytes[] = "receivedBytes";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_server_params[] = "server_params";
static const char __pyx_k_transactional[] = "transactional";
static const char __pyx_k_when_wrapping[] = " when wrapping ";
static const char __pyx_k_RFCTYPE_DECF16[] = "RFCTYPE_DECF16";
static const char __pyx_k_RFCTYPE_DECF34[] = "RFCTYPE_DECF34";
static const char __pyx_k_RFCTYPE_DTWEEK[] = "RFCTYPE_DTWEEK";
static const char __pyx_k_RFCTYPE_STRING[] = "RFCTYPE_STRING";
static const char __pyx_k_genericHandler[] = "genericHandler";
static const char __pyx_k_get_unit_state[] = "_get_unit_state";
static const char __pyx_k_metadataLookup[] = "metadataLookup";
static const char __pyx_k_parameter_text[] = "parameter_text";
static const char __pyx_k_parameter_type[] = "parameter_type";
static const char __pyx_k_server_context[] = "server_context";
static const char __pyx_k_transaction_id[] = "transaction_id";
static const char __pyx_k_RFCTYPE_DTMONTH[] = "RFCTYPE_DTMONTH";
static const char __pyx_k_RFCTYPE_TMINUTE[] = "RFCTYPE_TMINUTE";
static const char __pyx_k_RFCTYPE_TSECOND[] = "RFCTYPE_TSECOND";
static const char __pyx_k_RFCTYPE_UTCLONG[] = "RFCTYPE_UTCLONG";
static const char __pyx_k_RFCTYPE_XMLDATA[] = "RFCTYPE_XMLDATA";
static const char __pyx_k_RFCTYPE_XSTRING[] = "RFCTYPE_XSTRING";
static const char __pyx_k_Server_function[] = "Server function '";
static const char __pyx_k_TypeDescription[] = "<TypeDescription '";
static const char __pyx_k_applicationTime[] = "applicationTime";
static const char __pyx_k_background_unit[] = "background_unit";
static const char __pyx_k_bgRfcFunction_2[] = "bgRfcFunction";
static const char __pyx_k_collections_abc[] = "collections.abc";
static const char __pyx_k_is_not_callable[] = "' is not callable: '";
static const char __pyx_k_no_commit_check[] = "no_commit_check";
static const char __pyx_k_partnerCodepage[] = "partnerCodepage";
static const char __pyx_k_reload_ini_file[] = "reload_ini_file";
static const char __pyx_k_request_context[] = "request_context";
static const char __pyx_k_setOnConnection[] = "setOnConnection";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_unit_attributes[] = "unit_attributes";
static const char __pyx_k_unit_identifier[] = "unit_identifier";
static const char __pyx_k_ABAPRuntimeError[] = "ABAPRuntimeError";
static const char __pyx_k_ServerConnection[] = "ServerConnection";
static const char __pyx_k_Unknown_RFC_type[] = "Unknown RFC type ";
static const char __pyx_k_currentBusyCount[] = "currentBusyCount";
static const char __pyx_k_direction_string[] = "'direction' (string) '";
static const char __pyx_k_func_desc_handle[] = "func_desc_handle";
static const char __pyx_k_is_not_supported[] = "' is not supported";
static const char __pyx_k_server_functions[] = "server_functions";
static const char __pyx_k_set_locale_radix[] = "set_locale_radix";
static const char __pyx_k_type_description[] = "type_description";
static const char __pyx_k_RFCTYPE_STRUCTURE[] = "RFCTYPE_STRUCTURE";
static const char __pyx_k_RFCTYPE_UTCMINUTE[] = "RFCTYPE_UTCMINUTE";
static const char __pyx_k_RFCTYPE_UTCSECOND[] = "RFCTYPE_UTCSECOND";
static const char __pyx_k_Server_connection[] = "Server connection";
static const char __pyx_k_TypeDescription_2[] = "TypeDescription";
static const char __pyx_k_already_installed[] = "' already installed.";
static const char __pyx_k_cancel_connection[] = "cancel_connection";
static const char __pyx_k_client_connection[] = "client_connection";
static const char __pyx_k_field_name_string[] = "field 'name' (string) '";
static const char __pyx_k_field_type_string[] = "'field_type' (string) '";
static const char __pyx_k_fields_n_uclength[] = " fields (n/uclength=";
static const char __pyx_k_getFromConnection[] = "getFromConnection";
static const char __pyx_k_has_invalid_state[] = " has invalid state '";
static const char __pyx_k_registrationCount[] = "registrationCount";
static const char __pyx_k_request_context_2[] = "\nrequest_context: ";
static const char __pyx_k_serializationTime[] = "serializationTime";
static const char __pyx_k_CommunicationError[] = "CommunicationError";
static const char __pyx_k_RFCTYPE_ABAPOBJECT[] = "RFCTYPE_ABAPOBJECT";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_default_auth_check[] = "default_auth_check";
static const char __pyx_k_get_transaction_id[] = "_get_transaction_id";
static const char __pyx_k_set_cryptolib_path[] = "set_cryptolib_path";
static const char __pyx_k_FunctionDescription[] = "<FunctionDescription '";
static const char __pyx_k_confirm_transaction[] = "_confirm_transaction";
static const char __pyx_k_deserializationTime[] = "deserializationTime";
static const char __pyx_k_destroy_transaction[] = "_destroy_transaction";
static const char __pyx_k_field_name_string_2[] = "field 'name' (string) ";
static const char __pyx_k_idunitStateentifier[] = "idunitStateentifier";
static const char __pyx_k_language_iso_to_sap[] = "language_iso_to_sap";
static const char __pyx_k_language_sap_to_iso[] = "language_sap_to_iso";
static const char __pyx_k_partnerBytesPerChar[] = "partnerBytesPerChar";
static const char __pyx_k_ABAPApplicationError[] = "ABAPApplicationError";
static const char __pyx_k_ConnectionParameters[] = "ConnectionParameters";
static const char __pyx_k_ExternalRuntimeError[] = "ExternalRuntimeError";
static const char __pyx_k_RFC_EXTERNAL_FAILURE[] = "RFC_EXTERNAL_FAILURE";
static const char __pyx_k_default_value_string[] = "'default_value' (string) '";
static const char __pyx_k_get_nwrfclib_version[] = "get_nwrfclib_version";
static const char __pyx_k_return_import_params[] = "return_import_params";
static const char __pyx_k_src_pyrfc__cyrfc_pyx[] = "src/pyrfc/_cyrfc.pyx";
static const char __pyx_k_FunctionDescription_2[] = "FunctionDescription";
static const char __pyx_k_RfcParameterDirection[] = "RfcParameterDirection";
static const char __pyx_k_connection_attributes[] = "connection_attributes";
static const char __pyx_k_parameter_type_string[] = "'parameter_type' (string) '";
static const char __pyx_k_partnerSystemCodepage[] = "partnerSystemCodepage";
static const char __pyx_k_Remote_function_module[] = "Remote function module '";
static const char __pyx_k_TypeDescription___init[] = "TypeDescription.__init__";
static const char __pyx_k_TypeDescription___repr[] = "TypeDescription.__repr__";
static const char __pyx_k_create_and_submit_unit[] = "_create_and_submit_unit";
static const char __pyx_k_install_bgrfc_handlers[] = "install_bgrfc_handlers";
static const char __pyx_k_set_ini_file_directory[] = "set_ini_file_directory";
static const char __pyx_k_Connection_was_canceled[] = "Connection was canceled: ";
static const char __pyx_k_No_connections_assigned[] = "No connections assigned";
static const char __pyx_k_Not_a_valid_error_group[] = "Not a valid error group.";
static const char __pyx_k_authorization_check_for[] = "authorization check for '";
static const char __pyx_k_must_be_of_type_integer[] = "' must be of type integer";
static const char __pyx_k_raises_ABAPRuntimeError[] = "' raises ABAPRuntimeError ";
static const char __pyx_k_Crypto_library_not_found[] = "Crypto library not found:";
static const char __pyx_k_ExternalApplicationError[] = "ExternalApplicationError";
static const char __pyx_k_must_not_exceed_30_chars[] = "' must not exceed 30 chars.";
static const char __pyx_k_Invalid_connection_handle[] = "Invalid connection handle.";
static const char __pyx_k_MASK_RETURN_IMPORT_PARAMS[] = "_MASK_RETURN_IMPORT_PARAMS";
static const char __pyx_k_Server_function_installed[] = "Server function installed";
static const char __pyx_k_TypeDescription_add_field[] = "TypeDescription.add_field";
static const char __pyx_k_sapnwrfc_ini_not_found_in[] = "sapnwrfc.ini not found in:";
static const char __pyx_k_should_be_from_1_30_chars[] = "' should be from 1-30 chars.";
static const char __pyx_k_ExternalAuthorizationError[] = "ExternalAuthorizationError";
static const char __pyx_k_FunctionDescription___init[] = "FunctionDescription.__init__";
static const char __pyx_k_FunctionDescription___repr[] = "FunctionDescription.__repr__";
static const char __pyx_k_raises_ABAPApplicationError[] = "' raises ABAPApplicationError ";
static const char __pyx_k_raises_ExternalRuntimeError[] = "' raises ExternalRuntimeError ";
static const char __pyx_k_should_be_from_1_30_chars_2[] = " should be from 1-30 chars.";
static const char __pyx_k_an_integer_required_received[] = "an integer required, received";
static const char __pyx_k_code_set_to_RFC_ABAP_MESSAGE[] = " - code set to RFC_ABAP_MESSAGE.";
static const char __pyx_k_date_value_required_received[] = "date value required, received";
static const char __pyx_k_time_value_required_received[] = "time value required, received";
static const char __pyx_k_Connection_parameters_missing[] = "Connection parameters missing";
static const char __pyx_k_The__pyrfc_C_extension_module[] = " The _pyrfc C-extension module ";
static const char __pyx_k_create_and_submit_transaction[] = "_create_and_submit_transaction";
static const char __pyx_k_Error_in_bgRFC_handler_onCheck[] = "Error in bgRFC handler onCheck:";
static const char __pyx_k_Invocation_finished_submitting[] = " Invocation finished. submitting unit.";
static const char __pyx_k_No_metadata_found_for_function[] = "No metadata found for function '";
static const char __pyx_k_Pyx_CFunc_object____object___t[] = "__Pyx_CFunc_object____object___to_py.<locals>.wrap";
static const char __pyx_k_an_string_is_required_received[] = "an string is required, received";
static const char __pyx_k_code_set_to_RFC_ABAP_EXCEPTION[] = " - code set to RFC_ABAP_EXCEPTION.";
static const char __pyx_k_wrapString_uclen_u_utf8_size_u[] = "wrapString uclen: %u utf8_size: %u";
static const char __pyx_k_A_function_description_This_cla[] = " A function description\n\n    This class wraps the RFC_FUNCTION_DESC_HANDLE as e.g. returned by\n    RfcGetFunctionDesc() and used for server functionality.\n\n    .. WARNING::\n\n        Actually, the function description does not support exceptions\n        (cf. RfcAddException() etc.)\n\n    :param name: Name of the function.\n\n\n    *Attributes and methods*\n\n    **name**\n        The name of the function.\n\n    **parameters**\n        The parameters as a list of dicts.\n\n    ";
static const char __pyx_k_A_type_description_This_class_w[] = " A type description\n\n    This class wraps the RFC_TYPE_DESC_HANDLE as e.g. contained in\n    a parameter description of a function description.\n\n    :param name: Name of the type.\n    :param nuc_length: Length of the type in non unicode systems.\n    :param uc_length: Length of the type in unicode systems.\n\n    *Attributes and methods*\n\n    **name**\n        The name of the function.\n\n    **nuc_length**\n        The length in bytes if chars are non unicode.\n\n    **uc_length**\n        The length in bytes if chars are unicode.\n\n    **fields**\n        The fields as a list of dicts.\n\n    ";
static const char __pyx_k_Argument_attributes_not_valid_t[] = "Argument 'attributes' not valid. (t/qRFC does not support attributes.)";
static const char __pyx_k_Argument_unit_not_valid_Is_unit[] = "Argument 'unit' not valid. (Is unit['background'] boolean?)";
static const char __pyx_k_Authentication_exception_raised[] = "Authentication exception raised by callback function: '";
static const char __pyx_k_BgRfc_callback_function_key_not[] = "BgRfc callback function key not supported: '";
static const char __pyx_k_Callback_functions_may_only_rai[] = "\nCallback functions may only raise ABAPApplicationError, ABAPRuntimeError, or ExternalRuntimeError.\nThe values of the request were:\nparams: ";
static const char __pyx_k_Connection_configuration_option[] = "Connection configuration option '";
static const char __pyx_k_Error_in_bgRFC_handler_onCommit[] = "Error in bgRFC handler onCommit:";
static const char __pyx_k_Error_while_retrieving_connecti[] = "': Error while retrieving connection attributes (rc=";
static const char __pyx_k_Parameter_calls_must_contain_at[] = "Parameter 'calls' must contain at least on call description (func_name, params).";
static const char __pyx_k_Parameter_unit_not_valid_Please[] = "Parameter 'unit' not valid. Please use initialize_unit() to retrieve a valid unit.";
static const char __pyx_k_bgRFC_handler_onGetState_is_not[] = "bgRFC handler onGetState is not registered for server connection handle '{<uintptr_t>rfcHandle}'";
static const char __pyx_k_code_set_to_RFC_EXTERNAL_FAILUR[] = " - code set to RFC_EXTERNAL_FAILURE.";
static const char __pyx_k_invocation_rejected_because_the[] = "' invocation rejected because the connection is closed";
static const char __pyx_k_parameter_text_string_parameter[] = "'parameter_text' (string) '{parameter_text}' must not exceed 79 chars.";
static const char __pyx_k_raises_an_invalid_exception_Exc[] = "' raises an invalid exception:\n Exception: ";
static const char __pyx_k_self__handle_self__tHandle_self[] = "self._handle,self._tHandle,self._uHandle cannot be converted to a Python object for pickling";
static const char __pyx_k_when_getting_server_context_for[] = " when getting server context for connection '";
static const char __pyx_k_Argument_background_must_be_a_bo[] = "Argument 'background' must be a boolean value.";
static const char __pyx_k_Argument_queue_names_not_valid_t[] = "Argument 'queue_names' not valid. (t/qRFC only support one queue name.)";
static const char __pyx_k_BgRfc_callback_function_referenc[] = "BgRfc callback function referenced by '";
static const char __pyx_k_Connection_object_required_recei[] = "Connection object required, received";
static const char __pyx_k_Error_in_bgRFC_handler_onConfirm[] = "Error in bgRFC handler onConfirm:";
static const char __pyx_k_Error_in_bgRFC_handler_onGetStat[] = "Error in bgRFC handler onGetState:\n";
static const char __pyx_k_Error_in_bgRFC_handler_onRollbac[] = "Error in bgRFC handler onRollback:";
static const char __pyx_k_FunctionDescription_add_paramete[] = "FunctionDescription.add_parameter";
static const char __pyx_k_Invalid_exception_raised_by_call[] = "Invalid exception raised by callback function.";
static const char __pyx_k_Invalid_length_of_unit_id_should[] = "Invalid length of unit['id'] (should be ";
static const char __pyx_k_Length_of_parameter_unit_id_must[] = "Length of parameter 'unit['id']' must be ";
static const char __pyx_k_No_state_check_possible_of_non_b[] = "No state check possible of non-bgRFC units.";
static const char __pyx_k_No_transaction_handle_for_this_c[] = "No transaction handle for this connection available.";
static const char __pyx_k_No_unit_handle_for_this_connecti[] = "No unit handle for this connection available.";
static const char __pyx_k_Parameter_calls_must_be_iterable[] = "Parameter 'calls' must be iterable.";
static const char __pyx_k_Parameter_calls_must_contain_val[] = "Parameter 'calls' must contain valid call descriptions (func_name, params dict).";
static const char __pyx_k_Remote_function_module_name_must[] = "Remote function module name must be unicode string, received:";
static const char __pyx_k_There_is_an_active_unit_for_this[] = "There is an active unit for this connection. Use destroy_unit() or confirm_unit().";
static const char __pyx_k_User_user_from_system_sysId_clie[] = "User '{user}' from system '{sysId}' client '{client}' host '{partnerHost}' invokes '{func_name}'";
static const char __pyx_k_a_decimal_value_required_receive[] = "a decimal value required, received";
static const char __pyx_k_a_numeric_string_is_required_rec[] = "a numeric string is required, received";
static const char __pyx_k_dictionary_required_for_structur[] = "dictionary required for structure parameter, received";
static const char __pyx_k_list_required_for_table_paramete[] = "list required for table parameter, received";
static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
static const char __pyx_k_sapnwrfc_ini_path_is_not_a_strin[] = "sapnwrfc.ini path is not a string:";
static const char __pyx_k_self__handle_cannot_be_converted[] = "self._handle cannot be converted to a Python object for pickling";
static const char __pyx_k_self__throughput_handle_cannot_b[] = "self._throughput_handle cannot be converted to a Python object for pickling";
static PyObject *__pyx_kp_u_00000000;
static PyObject *__pyx_kp_u_02;
static PyObject *__pyx_kp_u_04;
static PyObject *__pyx_n_s_ABAPApplicationError;
static PyObject *__pyx_n_s_ABAPRuntimeError;
static PyObject *__pyx_kp_s_A_function_description_This_cla;
static PyObject *__pyx_kp_s_A_type_description_This_class_w;
static PyObject *__pyx_kp_u_Argument_attributes_not_valid_t;
static PyObject *__pyx_kp_u_Argument_background_must_be_a_bo;
static PyObject *__pyx_kp_u_Argument_queue_names_not_valid_t;
static PyObject *__pyx_kp_u_Argument_unit_not_valid_Is_unit;
static PyObject *__pyx_kp_u_Authentication_exception_raised;
static PyObject *__pyx_kp_u_BgRfc_callback_function_key_not;
static PyObject *__pyx_kp_u_BgRfc_callback_function_referenc;
static PyObject *__pyx_kp_u_Callback_functions_may_only_rai;
static PyObject *__pyx_n_s_CommunicationError;
static PyObject *__pyx_n_s_Connection;
static PyObject *__pyx_n_s_ConnectionParameters;
static PyObject *__pyx_kp_u_Connection_configuration_option;
static PyObject *__pyx_kp_u_Connection_object_required_recei;
static PyObject *__pyx_kp_u_Connection_parameters_missing;
static PyObject *__pyx_kp_u_Connection_was_canceled;
static PyObject *__pyx_kp_u_Crypto_library_not_found;
static PyObject *__pyx_n_s_Decimal;
static PyObject *__pyx_n_s_Enum;
static PyObject *__pyx_kp_u_Error_code;
static PyObject *__pyx_kp_u_Error_in_bgRFC_handler_onCheck;
static PyObject *__pyx_kp_u_Error_in_bgRFC_handler_onCommit;
static PyObject *__pyx_kp_u_Error_in_bgRFC_handler_onConfirm;
static PyObject *__pyx_kp_u_Error_in_bgRFC_handler_onGetStat;
static PyObject *__pyx_kp_u_Error_in_bgRFC_handler_onRollbac;
static PyObject *__pyx_kp_u_Error_while_retrieving_connecti;
static PyObject *__pyx_n_s_ExternalApplicationError;
static PyObject *__pyx_n_s_ExternalAuthorizationError;
static PyObject *__pyx_n_s_ExternalRuntimeError;
static PyObject *__pyx_kp_u_Function;
static PyObject *__pyx_kp_u_FunctionDescription;
static PyObject *__pyx_n_s_FunctionDescription_2;
static PyObject *__pyx_n_s_FunctionDescription___init;
static PyObject *__pyx_n_s_FunctionDescription___repr;
static PyObject *__pyx_n_s_FunctionDescription_add_paramete;
static PyObject *__pyx_kp_u_H_M_S;
static PyObject *__pyx_kp_u_Invalid_connection_handle;
static PyObject *__pyx_kp_u_Invalid_exception_raised_by_call;
static PyObject *__pyx_kp_u_Invalid_length_of_unit_id_should;
static PyObject *__pyx_kp_u_Invocation_finished_submitting;
static PyObject *__pyx_n_s_Iterable;
static PyObject *__pyx_n_s_LOCALE_RADIX;
static PyObject *__pyx_kp_u_Length_of_parameter_unit_id_must;
static PyObject *__pyx_n_s_LogonError;
static PyObject *__pyx_n_s_MASK_DTIME;
static PyObject *__pyx_n_s_MASK_RETURN_IMPORT_PARAMS;
static PyObject *__pyx_n_s_MASK_RSTRIP;
static PyObject *__pyx_kp_u_New_handle;
static PyObject *__pyx_kp_u_No_connections_assigned;
static PyObject *__pyx_kp_u_No_metadata_found_for_function;
static PyObject *__pyx_kp_u_No_state_check_possible_of_non_b;
static PyObject *__pyx_kp_u_No_transaction_handle_for_this_c;
static PyObject *__pyx_kp_u_No_unit_handle_for_this_connecti;
static PyObject *__pyx_kp_u_Not_a_valid_error_group;
static PyObject *__pyx_n_s_OK;
static PyObject *__pyx_kp_u_Parameter_calls_must_be_iterable;
static PyObject *__pyx_kp_u_Parameter_calls_must_contain_at;
static PyObject *__pyx_kp_u_Parameter_calls_must_contain_val;
static PyObject *__pyx_kp_u_Parameter_unit_not_valid_Please;
static PyObject *__pyx_n_s_Pyx_CFunc_object____object___t;
static PyObject *__pyx_n_u_Q;
static PyObject *__pyx_n_s_RCStatus;
static PyObject *__pyx_n_s_RFCError;
static PyObject *__pyx_n_s_RFCTYPE_ABAPOBJECT;
static PyObject *__pyx_n_s_RFCTYPE_BCD;
static PyObject *__pyx_n_s_RFCTYPE_BYTE;
static PyObject *__pyx_n_s_RFCTYPE_CDAY;
static PyObject *__pyx_n_s_RFCTYPE_CHAR;
static PyObject *__pyx_n_s_RFCTYPE_DATE;
static PyObject *__pyx_n_s_RFCTYPE_DECF16;
static PyObject *__pyx_n_s_RFCTYPE_DECF34;
static PyObject *__pyx_n_s_RFCTYPE_DTDAY;
static PyObject *__pyx_n_s_RFCTYPE_DTMONTH;
static PyObject *__pyx_n_s_RFCTYPE_DTWEEK;
static PyObject *__pyx_n_s_RFCTYPE_FLOAT;
static PyObject *__pyx_n_s_RFCTYPE_INT;
static PyObject *__pyx_n_s_RFCTYPE_INT1;
static PyObject *__pyx_n_s_RFCTYPE_INT2;
static PyObject *__pyx_n_s_RFCTYPE_INT8;
static PyObject *__pyx_n_s_RFCTYPE_NULL;
static PyObject *__pyx_n_s_RFCTYPE_NUM;
static PyObject *__pyx_n_s_RFCTYPE_STRING;
static PyObject *__pyx_n_s_RFCTYPE_STRUCTURE;
static PyObject *__pyx_n_s_RFCTYPE_TABLE;
static PyObject *__pyx_n_s_RFCTYPE_TIME;
static PyObject *__pyx_n_s_RFCTYPE_TMINUTE;
static PyObject *__pyx_n_s_RFCTYPE_TSECOND;
static PyObject *__pyx_n_s_RFCTYPE_UTCLONG;
static PyObject *__pyx_n_s_RFCTYPE_UTCMINUTE;
static PyObject *__pyx_n_s_RFCTYPE_UTCSECOND;
static PyObject *__pyx_n_s_RFCTYPE_XMLDATA;
static PyObject *__pyx_n_s_RFCTYPE_XSTRING;
static PyObject *__pyx_n_s_RFC_CHANGING;
static PyObject *__pyx_n_s_RFC_EXECUTED;
static PyObject *__pyx_n_s_RFC_EXPORT;
static PyObject *__pyx_n_s_RFC_EXTERNAL_FAILURE;
static PyObject *__pyx_n_s_RFC_IMPORT;
static PyObject *__pyx_n_s_RFC_NOT_FOUND;
static PyObject *__pyx_n_s_RFC_TABLES;
static PyObject *__pyx_kp_u_Remote_function_module;
static PyObject *__pyx_kp_u_Remote_function_module_name_must;
static PyObject *__pyx_kp_u_Request_for;
static PyObject *__pyx_n_s_RfcFieldType;
static PyObject *__pyx_n_s_RfcParameterDirection;
static PyObject *__pyx_n_s_Server;
static PyObject *__pyx_n_u_Server;
static PyObject *__pyx_n_s_ServerConnection;
static PyObject *__pyx_kp_u_Server_close;
static PyObject *__pyx_kp_u_Server_connection;
static PyObject *__pyx_kp_u_Server_function;
static PyObject *__pyx_kp_u_Server_function_installed;
static PyObject *__pyx_n_u_T;
static PyObject *__pyx_kp_u_TID;
static PyObject *__pyx_kp_u_There_is_an_active_unit_for_this;
static PyObject *__pyx_n_s_Thread;
static PyObject *__pyx_n_s_Throughput;
static PyObject *__pyx_n_s_Timer;
static PyObject *__pyx_kp_u_TypeDescription;
static PyObject *__pyx_n_s_TypeDescription_2;
static PyObject *__pyx_n_s_TypeDescription___init;
static PyObject *__pyx_n_s_TypeDescription___repr;
static PyObject *__pyx_n_s_TypeDescription_add_field;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_kp_u_UTC;
static PyObject *__pyx_kp_u_Unit;
static PyObject *__pyx_n_s_UnitCallType;
static PyObject *__pyx_n_s_UnitState;
static PyObject *__pyx_kp_u_Unknown_RFC_type;
static PyObject *__pyx_kp_u_User_user_from_system_sysId_clie;
static PyObject *__pyx_kp_u_Values;
static PyObject *__pyx_kp_u_Y_m_d;
static PyObject *__pyx_kp_u__21;
static PyObject *__pyx_kp_u__24;
static PyObject *__pyx_kp_u__25;
static PyObject *__pyx_kp_u__28;
static PyObject *__pyx_kp_u__29;
static PyObject *__pyx_kp_u__3;
static PyObject *__pyx_kp_u__4;
static PyObject *__pyx_kp_u__46;
static PyObject *__pyx_kp_u__5;
static PyObject *__pyx_n_s__51;
static PyObject *__pyx_kp_u__6;
static PyObject *__pyx_kp_u_a_decimal_value_required_receive;
static PyObject *__pyx_kp_u_a_numeric_string_is_required_rec;
static PyObject *__pyx_n_u_active_unit;
static PyObject *__pyx_n_s_add;
static PyObject *__pyx_n_s_add_field;
static PyObject *__pyx_n_s_add_parameter;
static PyObject *__pyx_n_s_alive;
static PyObject *__pyx_kp_u_already_installed;
static PyObject *__pyx_kp_u_an_integer_required_received;
static PyObject *__pyx_kp_u_an_string_is_required_received;
static PyObject *__pyx_n_s_append;
static PyObject *__pyx_n_u_applicationTime;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_attributes;
static PyObject *__pyx_n_u_auth_check;
static PyObject *__pyx_kp_u_authorization_check_for;
static PyObject *__pyx_n_s_auto;
static PyObject *__pyx_n_s_background;
static PyObject *__pyx_n_u_background;
static PyObject *__pyx_n_s_background_unit;
static PyObject *__pyx_kp_u_bgRFC_handler_onGetState_is_not;
static PyObject *__pyx_n_s_bgRfcFunction;
static PyObject *__pyx_n_s_bgRfcFunction_2;
static PyObject *__pyx_kp_u_but_found;
static PyObject *__pyx_n_u_call_type;
static PyObject *__pyx_n_s_callback;
static PyObject *__pyx_n_u_callback;
static PyObject *__pyx_n_s_calls;
static PyObject *__pyx_n_s_cancel;
static PyObject *__pyx_n_s_cancel_connection;
static PyObject *__pyx_n_s_cfunc_to_py;
static PyObject *__pyx_kp_u_chars_found;
static PyObject *__pyx_n_u_check;
static PyObject *__pyx_n_s_clear;
static PyObject *__pyx_n_u_client;
static PyObject *__pyx_n_s_client_connection;
static PyObject *__pyx_n_s_client_params;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_close_2;
static PyObject *__pyx_n_s_code;
static PyObject *__pyx_kp_u_code_set_to_RFC_ABAP_EXCEPTION;
static PyObject *__pyx_kp_u_code_set_to_RFC_ABAP_MESSAGE;
static PyObject *__pyx_kp_u_code_set_to_RFC_EXTERNAL_FAILUR;
static PyObject *__pyx_n_u_codepage;
static PyObject *__pyx_n_s_collections_abc;
static PyObject *__pyx_n_u_commit;
static PyObject *__pyx_n_s_committed;
static PyObject *__pyx_n_s_config;
static PyObject *__pyx_n_u_confirm;
static PyObject *__pyx_n_s_confirm_transaction;
static PyObject *__pyx_n_s_confirm_unit;
static PyObject *__pyx_n_s_confirmed;
static PyObject *__pyx_n_s_connection;
static PyObject *__pyx_n_u_connection_attributes;
static PyObject *__pyx_n_s_connections;
static PyObject *__pyx_n_u_cpicConvId;
static PyObject *__pyx_n_s_create_and_submit_transaction;
static PyObject *__pyx_n_s_create_and_submit_unit;
static PyObject *__pyx_n_s_created;
static PyObject *__pyx_n_u_currentBusyCount;
static PyObject *__pyx_n_u_d;
static PyObject *__pyx_n_s_date;
static PyObject *__pyx_kp_u_date_value_required_received;
static PyObject *__pyx_n_s_datetime;
static PyObject *__pyx_n_s_day;
static PyObject *__pyx_n_s_debug;
static PyObject *__pyx_n_u_debug;
static PyObject *__pyx_n_s_decimal;
static PyObject *__pyx_n_u_decimal_point;
static PyObject *__pyx_n_s_decimals;
static PyObject *__pyx_n_u_decimals;
static PyObject *__pyx_n_s_decode;
static PyObject *__pyx_n_s_default_auth_check;
static PyObject *__pyx_n_s_default_value;
static PyObject *__pyx_n_u_default_value;
static PyObject *__pyx_kp_u_default_value_string;
static PyObject *__pyx_n_s_del;
static PyObject *__pyx_n_u_deserializationTime;
static PyObject *__pyx_n_u_dest;
static PyObject *__pyx_n_s_destroy;
static PyObject *__pyx_n_s_destroy_transaction;
static PyObject *__pyx_n_s_destroy_unit;
static PyObject *__pyx_kp_u_dictionary_required_for_structur;
static PyObject *__pyx_n_s_direction;
static PyObject *__pyx_n_u_direction;
static PyObject *__pyx_kp_u_direction_string;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_u_dtime;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_enum;
static PyObject *__pyx_n_s_enum_names;
static PyObject *__pyx_n_s_enum_values;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_errorInfo;
static PyObject *__pyx_n_s_exc_info;
static PyObject *__pyx_n_s_exception;
static PyObject *__pyx_n_s_executed;
static PyObject *__pyx_kp_u_field;
static PyObject *__pyx_kp_u_field_name_string;
static PyObject *__pyx_kp_u_field_name_string_2;
static PyObject *__pyx_n_s_field_type;
static PyObject *__pyx_n_u_field_type;
static PyObject *__pyx_kp_u_field_type_string;
static PyObject *__pyx_n_s_fields;
static PyObject *__pyx_kp_u_fields_n_uclength;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_s_free;
static PyObject *__pyx_n_u_func_desc_handle;
static PyObject *__pyx_n_s_func_name;
static PyObject *__pyx_n_s_function_name;
static PyObject *__pyx_n_u_genericHandler;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_getFromConnection;
static PyObject *__pyx_n_u_getState;
static PyObject *__pyx_n_s_get_nwrfclib_version;
static PyObject *__pyx_n_s_get_transaction_id;
static PyObject *__pyx_n_s_get_unit_id;
static PyObject *__pyx_n_s_get_unit_state;
static PyObject *__pyx_n_s_gethostname;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_handle;
static PyObject *__pyx_kp_u_handle_2;
static PyObject *__pyx_n_s_handle_3;
static PyObject *__pyx_kp_u_has_invalid_state;
static PyObject *__pyx_n_u_host;
static PyObject *__pyx_n_u_hostname;
static PyObject *__pyx_n_s_hour;
static PyObject *__pyx_n_u_id;
static PyObject *__pyx_n_s_idunitStateentifier;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_in_process;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_install_bgrfc_handlers;
static PyObject *__pyx_n_s_int_field;
static PyObject *__pyx_kp_u_invalid_state;
static PyObject *__pyx_kp_u_invocation_rejected_because_the;
static PyObject *__pyx_n_s_is_alive;
static PyObject *__pyx_kp_u_is_not_callable;
static PyObject *__pyx_kp_u_is_not_supported;
static PyObject *__pyx_n_u_is_stateful;
static PyObject *__pyx_n_s_is_valid;
static PyObject *__pyx_n_s_isdigit;
static PyObject *__pyx_n_s_isfile;
static PyObject *__pyx_n_u_isoLanguage;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_iteritems;
static PyObject *__pyx_n_s_join;
static PyObject *__pyx_n_u_kernelRel;
static PyObject *__pyx_n_u_kernel_trace;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_s_lang_iso;
static PyObject *__pyx_n_s_lang_sap;
static PyObject *__pyx_n_u_language;
static PyObject *__pyx_n_s_language_iso_to_sap;
static PyObject *__pyx_n_s_language_sap_to_iso;
static PyObject *__pyx_kp_u_launched;
static PyObject *__pyx_kp_u_length;
static PyObject *__pyx_kp_u_list_required_for_table_paramete;
static PyObject *__pyx_n_s_locale;
static PyObject *__pyx_n_s_localeconv;
static PyObject *__pyx_n_u_lock;
static PyObject *__pyx_n_s_log_message;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_major;
static PyObject *__pyx_n_u_major;
static PyObject *__pyx_n_s_message;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_u_metadataLookup;
static PyObject *__pyx_n_s_minor;
static PyObject *__pyx_n_u_minor;
static PyObject *__pyx_n_s_minute;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_month;
static PyObject *__pyx_n_s_msg_class;
static PyObject *__pyx_n_s_msg_number;
static PyObject *__pyx_n_s_msg_type;
static PyObject *__pyx_n_s_msg_v1;
static PyObject *__pyx_n_s_msg_v2;
static PyObject *__pyx_n_s_msg_v3;
static PyObject *__pyx_n_s_msg_v4;
static PyObject *__pyx_kp_u_multi_count;
static PyObject *__pyx_kp_u_must_be_in;
static PyObject *__pyx_kp_u_must_be_in_2;
static PyObject *__pyx_kp_u_must_be_of_type_integer;
static PyObject *__pyx_kp_u_must_not_exceed_30_chars;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_u_name;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_n_u_no_commit_check;
static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
static PyObject *__pyx_n_s_not_found;
static PyObject *__pyx_n_u_not_requested;
static PyObject *__pyx_n_s_nuc_length;
static PyObject *__pyx_n_u_nuc_length;
static PyObject *__pyx_n_s_nuc_offset;
static PyObject *__pyx_n_u_nuc_offset;
static PyObject *__pyx_n_u_numberOfCalls;
static PyObject *__pyx_n_s_object;
static PyObject *__pyx_kp_u_of_type;
static PyObject *__pyx_n_s_open;
static PyObject *__pyx_n_s_optional;
static PyObject *__pyx_n_u_optional;
static PyObject *__pyx_n_s_options;
static PyObject *__pyx_n_s_origin;
static PyObject *__pyx_n_s_os_path;
static PyObject *__pyx_n_s_parameter_text;
static PyObject *__pyx_n_u_parameter_text;
static PyObject *__pyx_kp_u_parameter_text_string_parameter;
static PyObject *__pyx_n_s_parameter_type;
static PyObject *__pyx_n_u_parameter_type;
static PyObject *__pyx_kp_u_parameter_type_string;
static PyObject *__pyx_n_s_parameters;
static PyObject *__pyx_kp_u_params;
static PyObject *__pyx_n_u_partnerBytesPerChar;
static PyObject *__pyx_n_u_partnerCodepage;
static PyObject *__pyx_n_u_partnerHost;
static PyObject *__pyx_n_u_partnerIP;
static PyObject *__pyx_n_u_partnerIPv6;
static PyObject *__pyx_n_u_partnerRel;
static PyObject *__pyx_n_u_partnerSystemCodepage;
static PyObject *__pyx_n_u_partnerType;
static PyObject *__pyx_n_u_patchLevel;
static PyObject *__pyx_n_s_patchlevel;
static PyObject *__pyx_n_s_pathName;
static PyObject *__pyx_n_s_path_name;
static PyObject *__pyx_n_u_peakBusyCount;
static PyObject *__pyx_n_s_platform;
static PyObject *__pyx_n_u_platform;
static PyObject *__pyx_n_u_port;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_print;
static PyObject *__pyx_n_u_progName;
static PyObject *__pyx_n_u_program;
static PyObject *__pyx_n_u_protocolType;
static PyObject *__pyx_n_s_pyrfc__cyrfc;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_queue_name;
static PyObject *__pyx_n_s_queue_names;
static PyObject *__pyx_n_s_queued;
static PyObject *__pyx_n_u_queued;
static PyObject *__pyx_kp_u_raises_ABAPApplicationError;
static PyObject *__pyx_kp_u_raises_ABAPRuntimeError;
static PyObject *__pyx_kp_u_raises_ExternalRuntimeError;
static PyObject *__pyx_kp_u_raises_an_invalid_exception_Exc;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_rc;
static PyObject *__pyx_n_u_receivedBytes;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reduce_cython;
static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_n_u_registrationCount;
static PyObject *__pyx_n_s_registry;
static PyObject *__pyx_n_u_rel;
static PyObject *__pyx_n_s_reload_ini_file;
static PyObject *__pyx_n_s_remove;
static PyObject *__pyx_n_s_repr;
static PyObject *__pyx_n_s_request_context;
static PyObject *__pyx_kp_u_request_context_2;
static PyObject *__pyx_n_u_reserved;
static PyObject *__pyx_n_u_return_import_params;
static PyObject *__pyx_n_u_rfcRole;
static PyObject *__pyx_n_u_rollback;
static PyObject *__pyx_n_s_rolled_back;
static PyObject *__pyx_n_s_rsplit;
static PyObject *__pyx_n_s_rstrip;
static PyObject *__pyx_n_u_rstrip;
static PyObject *__pyx_kp_u_sapnwrfc_ini;
static PyObject *__pyx_kp_u_sapnwrfc_ini_not_found_in;
static PyObject *__pyx_kp_u_sapnwrfc_ini_path_is_not_a_strin;
static PyObject *__pyx_n_u_sat_trace;
static PyObject *__pyx_n_s_second;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_kp_s_self__handle_cannot_be_converted;
static PyObject *__pyx_kp_s_self__handle_self__tHandle_self;
static PyObject *__pyx_kp_s_self__throughput_handle_cannot_b;
static PyObject *__pyx_n_u_sending_date;
static PyObject *__pyx_n_u_sending_time;
static PyObject *__pyx_n_u_sentBytes;
static PyObject *__pyx_n_u_serializationTime;
static PyObject *__pyx_n_s_serve;
static PyObject *__pyx_n_u_server;
static PyObject *__pyx_n_u_serverName;
static PyObject *__pyx_n_s_server_context;
static PyObject *__pyx_n_u_server_context;
static PyObject *__pyx_n_s_server_functions;
static PyObject *__pyx_n_s_server_log;
static PyObject *__pyx_n_u_server_log_2;
static PyObject *__pyx_n_s_server_params;
static PyObject *__pyx_n_s_setOnConnection;
static PyObject *__pyx_n_s_set_cryptolib_path;
static PyObject *__pyx_n_s_set_ini_file_directory;
static PyObject *__pyx_n_s_set_locale_radix;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_kp_u_should_be_from_1_30_chars;
static PyObject *__pyx_kp_u_should_be_from_1_30_chars_2;
static PyObject *__pyx_n_s_socket;
static PyObject *__pyx_kp_s_src_pyrfc__cyrfc_pyx;
static PyObject *__pyx_n_s_start;
static PyObject *__pyx_n_u_state;
static PyObject *__pyx_n_s_staticmethod;
static PyObject *__pyx_n_s_stop;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_s_strptime;
static PyObject *__pyx_n_s_synchronous;
static PyObject *__pyx_n_s_sys;
static PyObject *__pyx_n_s_sysId;
static PyObject *__pyx_n_u_sysId;
static PyObject *__pyx_n_u_sysNumber;
static PyObject *__pyx_n_s_sysid;
static PyObject *__pyx_n_s_t;
static PyObject *__pyx_n_u_t_code;
static PyObject *__pyx_n_s_target;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_threading;
static PyObject *__pyx_n_s_throughput;
static PyObject *__pyx_n_s_time;
static PyObject *__pyx_kp_u_time_value_required_received;
static PyObject *__pyx_n_u_timeout;
static PyObject *__pyx_n_u_totalTime;
static PyObject *__pyx_n_u_trace;
static PyObject *__pyx_n_s_traceback;
static PyObject *__pyx_n_s_transaction_id;
static PyObject *__pyx_n_s_transactional;
static PyObject *__pyx_n_s_type;
static PyObject *__pyx_n_u_type;
static PyObject *__pyx_n_s_type_description;
static PyObject *__pyx_n_u_type_description;
static PyObject *__pyx_n_s_type_name;
static PyObject *__pyx_n_s_uc_length;
static PyObject *__pyx_n_u_uc_length;
static PyObject *__pyx_n_s_uc_offset;
static PyObject *__pyx_n_u_uc_offset;
static PyObject *__pyx_n_s_uclang_iso;
static PyObject *__pyx_n_s_uclang_sap;
static PyObject *__pyx_n_s_unit;
static PyObject *__pyx_n_u_unit_attributes;
static PyObject *__pyx_n_u_unit_history;
static PyObject *__pyx_n_s_unit_id;
static PyObject *__pyx_n_u_unit_identifier;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_upper;
static PyObject *__pyx_n_u_user;
static PyObject *__pyx_n_s_utcnow;
static PyObject *__pyx_n_s_utils;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_kp_u_when_filling;
static PyObject *__pyx_kp_u_when_getting_server_context_for;
static PyObject *__pyx_kp_u_when_wrapping;
static PyObject *__pyx_kp_u_with;
static PyObject *__pyx_n_s_wrap;
static PyObject *__pyx_kp_u_wrapString_uclen_u_utf8_size_u;
static PyObject *__pyx_n_s_year;
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_get_nwrfclib_version(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_2set_ini_file_directory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path_name); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_4reload_ini_file(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6language_iso_to_sap(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lang_iso); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_8language_sap_to_iso(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lang_sap); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10set_cryptolib_path(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path_name); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_12set_locale_radix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_14cancel_connection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_client_connection); /* proto */
static int __pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters___cinit__(struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *__pyx_v_self, PyObject *__pyx_v_params); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters_2__del__(struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters_4_free(struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_15TypeDescription___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_nuc_length, PyObject *__pyx_v_uc_length); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_15TypeDescription_2add_field(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_field_type, PyObject *__pyx_v_nuc_length, PyObject *__pyx_v_uc_length, PyObject *__pyx_v_nuc_offset, PyObject *__pyx_v_uc_offset, PyObject *__pyx_v_decimals, PyObject *__pyx_v_type_description); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_15TypeDescription_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_19FunctionDescription___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_19FunctionDescription_2add_parameter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_parameter_type, PyObject *__pyx_v_direction, PyObject *__pyx_v_nuc_length, PyObject *__pyx_v_uc_length, PyObject *__pyx_v_decimals, PyObject *__pyx_v_default_value, PyObject *__pyx_v_parameter_text, PyObject *__pyx_v_optional, PyObject *__pyx_v_type_description); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_19FunctionDescription_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_7version___get__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_7options___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_6handle___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_5alive___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static int __pyx_pf_5pyrfc_6_cyrfc_10Connection___init__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_config, PyObject *__pyx_v_params); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_2free(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_4__del__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_6__enter__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_8__exit__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_type, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_traceback); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_10open(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_12reopen(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_14close(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_16cancel(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static int __pyx_pf_5pyrfc_6_cyrfc_10Connection_18__bool__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_20_close(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_22ping(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_24reset_server_context(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_26get_connection_attributes(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_28is_valid(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_30get_function_description(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_func_name); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_32call(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_func_name, PyObject *__pyx_v_options, PyObject *__pyx_v_params); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_34type_desc_get(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_type_name); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_36type_desc_remove(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_sysid, PyObject *__pyx_v_type_name); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_38func_desc_remove(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_sysid, PyObject *__pyx_v_func_name); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_40_get_transaction_id(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_42_create_and_submit_transaction(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_transaction_id, PyObject *__pyx_v_calls, PyObject *__pyx_v_queue_name); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_44_destroy_transaction(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_46_confirm_transaction(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_48_get_unit_id(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_50_create_and_submit_unit(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit_id, PyObject *__pyx_v_calls, PyObject *__pyx_v_queue_names, PyObject *__pyx_v_attributes); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_52_get_unit_state(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_54_destroy_unit(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_56_confirm_unit(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_58initialize_unit(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_background); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_60fill_and_submit_unit(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit, PyObject *__pyx_v_calls, PyObject *__pyx_v_queue_names, PyObject *__pyx_v_attributes); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_62get_unit_state(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_64destroy_unit(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_66confirm_unit(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_8__config___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static int __pyx_pf_5pyrfc_6_cyrfc_10Connection_8__config_2__set__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5pyrfc_6_cyrfc_10Connection_8__config_4__del__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_68__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_70__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_16default_auth_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func_name, PyObject *__pyx_v_request_context); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_18_server_log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_origin, PyObject *__pyx_v_log_message); /* proto */
static int __pyx_pf_5pyrfc_6_cyrfc_16ServerConnection___init__(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__pyx_v_self, PyObject *__pyx_v_params); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_2open(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_4close(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__pyx_v_self); /* proto */
static int __pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_6__bool__(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_6handle___get__(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_5alive___get__(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_8__del__(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_5debug___get__(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__pyx_v_self); /* proto */
static int __pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_5debug_2__set__(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_6rstrip___get__(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__pyx_v_self); /* proto */
static int __pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_6rstrip_2__set__(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5pyrfc_6_cyrfc_6Server___cinit__(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, PyObject *__pyx_v_server_params, PyObject *__pyx_v_client_params, PyObject *__pyx_v_config); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_2bgrfc_init(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, PyObject *__pyx_v_sysId, PyObject *__pyx_v_bgRfcFunction); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_4install_bgrfc_handlers(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, PyObject *__pyx_v_sysId); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_6add_function(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, PyObject *__pyx_v_func_name, PyObject *__pyx_v_callback); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_8serve(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_10start(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_12stop(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_14close(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_16get_server_attributes(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_18_close(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_5debug___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self); /* proto */
static int __pyx_pf_5pyrfc_6_cyrfc_6Server_5debug_2__set__(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_6rstrip___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self); /* proto */
static int __pyx_pf_5pyrfc_6_cyrfc_6Server_6rstrip_2__set__(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_20__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_22__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5pyrfc_6_cyrfc_10Throughput___init__(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self, PyObject *__pyx_v_connections); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_11connections___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_7_handle___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_2setOnConnection(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self, struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_connection); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_4getFromConnection(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_connection); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_6removeFromConnection(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self, struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_connection); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_8reset(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_10__del__(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_12__exit__(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_type, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_traceback); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_14__enter__(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_5stats___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11cfunc_dot_to_py_36__Pyx_CFunc_object____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_client_connection); /* proto */
static PyObject *__pyx_tp_new_5pyrfc_6_cyrfc_ConnectionParameters(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5pyrfc_6_cyrfc_Connection(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5pyrfc_6_cyrfc_ServerConnection(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5pyrfc_6_cyrfc_Server(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5pyrfc_6_cyrfc_Throughput(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object____object___to_py(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get = {0, &__pyx_n_s_get, 0, 0, 0};
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_4;
static PyObject *__pyx_int_5;
static PyObject *__pyx_int_6;
static PyObject *__pyx_int_8;
static PyObject *__pyx_int_12;
static PyObject *__pyx_int_15;
static PyObject *__pyx_int_17;
static PyObject *__pyx_int_19;
static PyObject *__pyx_int_20;
static PyObject *__pyx_int_40;
static PyObject *__pyx_int_45;
static PyObject *__pyx_int_50;
static PyObject *__pyx_int_64;
static PyObject *__pyx_int_100;
static PyObject *__pyx_int_128;
static PyObject *__pyx_int_512;
static PyObject *__pyx_int_8080;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_slice__12;
static PyObject *__pyx_slice__13;
static PyObject *__pyx_slice__14;
static PyObject *__pyx_slice__15;
static PyObject *__pyx_slice__30;
static PyObject *__pyx_slice__38;
static PyObject *__pyx_slice__39;
static PyObject *__pyx_slice__40;
static PyObject *__pyx_slice__41;
static PyObject *__pyx_slice__42;
static PyObject *__pyx_slice__43;
static PyObject *__pyx_slice__44;
static PyObject *__pyx_slice__45;
static PyObject *__pyx_slice__47;
static PyObject *__pyx_slice__48;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__23;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__31;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__56;
static PyObject *__pyx_tuple__58;
static PyObject *__pyx_tuple__60;
static PyObject *__pyx_tuple__62;
static PyObject *__pyx_tuple__64;
static PyObject *__pyx_tuple__66;
static PyObject *__pyx_tuple__68;
static PyObject *__pyx_tuple__69;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__73;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_tuple__77;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__82;
static PyObject *__pyx_tuple__84;
static PyObject *__pyx_tuple__86;
static PyObject *__pyx_tuple__88;
static PyObject *__pyx_codeobj__50;
static PyObject *__pyx_codeobj__53;
static PyObject *__pyx_codeobj__55;
static PyObject *__pyx_codeobj__57;
static PyObject *__pyx_codeobj__59;
static PyObject *__pyx_codeobj__61;
static PyObject *__pyx_codeobj__63;
static PyObject *__pyx_codeobj__65;
static PyObject *__pyx_codeobj__67;
static PyObject *__pyx_codeobj__70;
static PyObject *__pyx_codeobj__72;
static PyObject *__pyx_codeobj__75;
static PyObject *__pyx_codeobj__78;
static PyObject *__pyx_codeobj__80;
static PyObject *__pyx_codeobj__83;
static PyObject *__pyx_codeobj__85;
static PyObject *__pyx_codeobj__87;
static PyObject *__pyx_codeobj__89;
/* Late includes */

/* "pyrfc/_cyrfc.pyx":112
 * 
 * 
 * def get_nwrfclib_version():             # <<<<<<<<<<<<<<
 *     """Get SAP NW RFC Lib version
 *     :returns: tuple of major, minor and patch level and OS platform
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_1get_nwrfclib_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_get_nwrfclib_version[] = "Get SAP NW RFC Lib version\n    :returns: tuple of major, minor and patch level and OS platform\n    ";
static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_1get_nwrfclib_version = {"get_nwrfclib_version", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_1get_nwrfclib_version, METH_NOARGS, __pyx_doc_5pyrfc_6_cyrfc_get_nwrfclib_version};
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_1get_nwrfclib_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_nwrfclib_version (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_get_nwrfclib_version(__pyx_self);

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_get_nwrfclib_version(CYTHON_UNUSED PyObject *__pyx_self) {
  unsigned int __pyx_v_major;
  unsigned int __pyx_v_minor;
  unsigned int __pyx_v_patchlevel;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_nwrfclib_version", 0);

  /* "pyrfc/_cyrfc.pyx":116
 *     :returns: tuple of major, minor and patch level and OS platform
 *     """
 *     cdef unsigned major = 0             # <<<<<<<<<<<<<<
 *     cdef unsigned minor = 0
 *     cdef unsigned patchlevel = 0
 */
  __pyx_v_major = 0;

  /* "pyrfc/_cyrfc.pyx":117
 *     """
 *     cdef unsigned major = 0
 *     cdef unsigned minor = 0             # <<<<<<<<<<<<<<
 *     cdef unsigned patchlevel = 0
 *     RfcGetVersion(&major, &minor, &patchlevel)
 */
  __pyx_v_minor = 0;

  /* "pyrfc/_cyrfc.pyx":118
 *     cdef unsigned major = 0
 *     cdef unsigned minor = 0
 *     cdef unsigned patchlevel = 0             # <<<<<<<<<<<<<<
 *     RfcGetVersion(&major, &minor, &patchlevel)
 *     return {'major': major, 'minor': minor, 'patchLevel': patchlevel, 'platform': platform}
 */
  __pyx_v_patchlevel = 0;

  /* "pyrfc/_cyrfc.pyx":119
 *     cdef unsigned minor = 0
 *     cdef unsigned patchlevel = 0
 *     RfcGetVersion(&major, &minor, &patchlevel)             # <<<<<<<<<<<<<<
 *     return {'major': major, 'minor': minor, 'patchLevel': patchlevel, 'platform': platform}
 * 
 */
  (void)(RfcGetVersion((&__pyx_v_major), (&__pyx_v_minor), (&__pyx_v_patchlevel)));

  /* "pyrfc/_cyrfc.pyx":120
 *     cdef unsigned patchlevel = 0
 *     RfcGetVersion(&major, &minor, &patchlevel)
 *     return {'major': major, 'minor': minor, 'patchLevel': patchlevel, 'platform': platform}             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_major); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_major, __pyx_t_2) < 0) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_minor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_minor, __pyx_t_2) < 0) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_patchlevel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_patchLevel, __pyx_t_2) < 0) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_platform); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_platform, __pyx_t_2) < 0) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":112
 * 
 * 
 * def get_nwrfclib_version():             # <<<<<<<<<<<<<<
 *     """Get SAP NW RFC Lib version
 *     :returns: tuple of major, minor and patch level and OS platform
 */

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

/* "pyrfc/_cyrfc.pyx":123
 * 
 * 
 * def set_ini_file_directory(path_name):             # <<<<<<<<<<<<<<
 *     """Sets the directory in which to search for the sapnwrfc.ini file
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_3set_ini_file_directory(PyObject *__pyx_self, PyObject *__pyx_v_path_name); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_2set_ini_file_directory[] = "Sets the directory in which to search for the sapnwrfc.ini file\n\n    :param path_name: Directory in which to search for the sapnwrfc.ini file.\n    :type path_name: string\n\n    :return: nothing, raises an error\n    ";
static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_3set_ini_file_directory = {"set_ini_file_directory", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_3set_ini_file_directory, METH_O, __pyx_doc_5pyrfc_6_cyrfc_2set_ini_file_directory};
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_3set_ini_file_directory(PyObject *__pyx_self, PyObject *__pyx_v_path_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_ini_file_directory (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_2set_ini_file_directory(__pyx_self, ((PyObject *)__pyx_v_path_name));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_2set_ini_file_directory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path_name) {
  RFC_ERROR_INFO __pyx_v_errorInfo;
  SAP_UC __pyx_v_pathName[0x200];
  RFC_RC __pyx_v_rc;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  SAP_UC *__pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_ini_file_directory", 0);

  /* "pyrfc/_cyrfc.pyx":131
 *     :return: nothing, raises an error
 *     """
 *     if type(path_name) is not str:             # <<<<<<<<<<<<<<
 *         raise TypeError('sapnwrfc.ini path is not a string:', path_name)
 *     cdef RFC_ERROR_INFO errorInfo
 */
  __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_path_name)) != ((PyObject *)(&PyUnicode_Type)));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":132
 *     """
 *     if type(path_name) is not str:
 *         raise TypeError('sapnwrfc.ini path is not a string:', path_name)             # <<<<<<<<<<<<<<
 *     cdef RFC_ERROR_INFO errorInfo
 *     cdef SAP_UC pathName [512]
 */
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_kp_u_sapnwrfc_ini_path_is_not_a_strin);
    __Pyx_GIVEREF(__pyx_kp_u_sapnwrfc_ini_path_is_not_a_strin);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_sapnwrfc_ini_path_is_not_a_strin);
    __Pyx_INCREF(__pyx_v_path_name);
    __Pyx_GIVEREF(__pyx_v_path_name);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_path_name);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 132, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":131
 *     :return: nothing, raises an error
 *     """
 *     if type(path_name) is not str:             # <<<<<<<<<<<<<<
 *         raise TypeError('sapnwrfc.ini path is not a string:', path_name)
 *     cdef RFC_ERROR_INFO errorInfo
 */
  }

  /* "pyrfc/_cyrfc.pyx":135
 *     cdef RFC_ERROR_INFO errorInfo
 *     cdef SAP_UC pathName [512]
 *     if not isfile(join(path_name, "sapnwrfc.ini")):             # <<<<<<<<<<<<<<
 *         raise TypeError('sapnwrfc.ini not found in:', path_name)
 *     pathName = fillString(path_name)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_isfile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_join); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_path_name, __pyx_kp_u_sapnwrfc_ini};
    __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 135, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_5);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_path_name, __pyx_kp_u_sapnwrfc_ini};
    __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 135, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_5);
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(__pyx_v_path_name);
    __Pyx_GIVEREF(__pyx_v_path_name);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_path_name);
    __Pyx_INCREF(__pyx_kp_u_sapnwrfc_ini);
    __Pyx_GIVEREF(__pyx_kp_u_sapnwrfc_ini);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_kp_u_sapnwrfc_ini);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":136
 *     cdef SAP_UC pathName [512]
 *     if not isfile(join(path_name, "sapnwrfc.ini")):
 *         raise TypeError('sapnwrfc.ini not found in:', path_name)             # <<<<<<<<<<<<<<
 *     pathName = fillString(path_name)
 *     cdef RFC_RC rc = RfcSetIniPath(pathName, &errorInfo)
 */
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_kp_u_sapnwrfc_ini_not_found_in);
    __Pyx_GIVEREF(__pyx_kp_u_sapnwrfc_ini_not_found_in);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_sapnwrfc_ini_not_found_in);
    __Pyx_INCREF(__pyx_v_path_name);
    __Pyx_GIVEREF(__pyx_v_path_name);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_path_name);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 136, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":135
 *     cdef RFC_ERROR_INFO errorInfo
 *     cdef SAP_UC pathName [512]
 *     if not isfile(join(path_name, "sapnwrfc.ini")):             # <<<<<<<<<<<<<<
 *         raise TypeError('sapnwrfc.ini not found in:', path_name)
 *     pathName = fillString(path_name)
 */
  }

  /* "pyrfc/_cyrfc.pyx":137
 *     if not isfile(join(path_name, "sapnwrfc.ini")):
 *         raise TypeError('sapnwrfc.ini not found in:', path_name)
 *     pathName = fillString(path_name)             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc = RfcSetIniPath(pathName, &errorInfo)
 *     if rc != RFC_OK:
 */
  __pyx_t_10 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_path_name); if (unlikely(__pyx_t_10 == ((SAP_UC *)NULL))) __PYX_ERR(0, 137, __pyx_L1_error)
  memcpy(&(__pyx_v_pathName[0]), __pyx_t_10, sizeof(__pyx_v_pathName[0]) * (0x200 - 0));

  /* "pyrfc/_cyrfc.pyx":138
 *         raise TypeError('sapnwrfc.ini not found in:', path_name)
 *     pathName = fillString(path_name)
 *     cdef RFC_RC rc = RfcSetIniPath(pathName, &errorInfo)             # <<<<<<<<<<<<<<
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 */
  __pyx_v_rc = RfcSetIniPath(__pyx_v_pathName, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":139
 *     pathName = fillString(path_name)
 *     cdef RFC_RC rc = RfcSetIniPath(pathName, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 * 
 */
  __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":140
 *     cdef RFC_RC rc = RfcSetIniPath(pathName, &errorInfo)
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __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, 140, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":139
 *     pathName = fillString(path_name)
 *     cdef RFC_RC rc = RfcSetIniPath(pathName, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":123
 * 
 * 
 * def set_ini_file_directory(path_name):             # <<<<<<<<<<<<<<
 *     """Sets the directory in which to search for the sapnwrfc.ini file
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrfc._cyrfc.set_ini_file_directory", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":143
 * 
 * 
 * def reload_ini_file():             # <<<<<<<<<<<<<<
 *     """Reloads the contents of the sapnwrfc.ini file into memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_5reload_ini_file(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_4reload_ini_file[] = "Reloads the contents of the sapnwrfc.ini file into memory.\n\n    Searches the directory given by ``RfcSetIniPath()`` (or the current working directory)\n    for the file sapnwrfc.ini and loads its contents into memory. Reloading the sapnwrfc.ini\n    file is only necessary after the file has been manually edited.\n    If you want to use a sapnwrfc.ini file in a different location, consider using ``RfcSetIniPath()``.\n\n    Note: If a file with the name ``sapnwrfc.ini`` does not exist in the given directory,\n    this is not considered an error! Default settings are used in this case.\n\n    :return: nothing, raises an error\n    ";
static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_5reload_ini_file = {"reload_ini_file", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_5reload_ini_file, METH_NOARGS, __pyx_doc_5pyrfc_6_cyrfc_4reload_ini_file};
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_5reload_ini_file(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reload_ini_file (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_4reload_ini_file(__pyx_self);

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_4reload_ini_file(CYTHON_UNUSED PyObject *__pyx_self) {
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_RC __pyx_v_rc;
  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("reload_ini_file", 0);

  /* "pyrfc/_cyrfc.pyx":157
 *     """
 *     cdef RFC_ERROR_INFO errorInfo
 *     cdef RFC_RC rc = RfcReloadIniFile (&errorInfo)             # <<<<<<<<<<<<<<
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 */
  __pyx_v_rc = RfcReloadIniFile((&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":158
 *     cdef RFC_ERROR_INFO errorInfo
 *     cdef RFC_RC rc = RfcReloadIniFile (&errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 * 
 */
  __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":159
 *     cdef RFC_RC rc = RfcReloadIniFile (&errorInfo)
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __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, 159, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":158
 *     cdef RFC_ERROR_INFO errorInfo
 *     cdef RFC_RC rc = RfcReloadIniFile (&errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":143
 * 
 * 
 * def reload_ini_file():             # <<<<<<<<<<<<<<
 *     """Reloads the contents of the sapnwrfc.ini file into memory.
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":162
 * 
 * 
 * def language_iso_to_sap(lang_iso):             # <<<<<<<<<<<<<<
 *     """Language code conversion of ISO code to SAP code.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_7language_iso_to_sap(PyObject *__pyx_self, PyObject *__pyx_v_lang_iso); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_6language_iso_to_sap[] = "Language code conversion of ISO code to SAP code.\n\n    :param lang_iso: Language ISO code\n    :type lang_iso: string\n\n    :return: SAP language code of char 1 type\n\n    :raises: :exc:`~pyrfc.RFCError` or a subclass\n                if ISO to SAP code conversion fails.\n    ";
static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_7language_iso_to_sap = {"language_iso_to_sap", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_7language_iso_to_sap, METH_O, __pyx_doc_5pyrfc_6_cyrfc_6language_iso_to_sap};
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_7language_iso_to_sap(PyObject *__pyx_self, PyObject *__pyx_v_lang_iso) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("language_iso_to_sap (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6language_iso_to_sap(__pyx_self, ((PyObject *)__pyx_v_lang_iso));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6language_iso_to_sap(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lang_iso) {
  SAP_UC *__pyx_v_uclang_iso;
  SAP_UC __pyx_v_uclang_sap[8];
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_RC __pyx_v_rc;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SAP_UC *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("language_iso_to_sap", 0);

  /* "pyrfc/_cyrfc.pyx":173
 *                 if ISO to SAP code conversion fails.
 *     """
 *     cdef SAP_UC *uclang_iso = fillString(lang_iso)             # <<<<<<<<<<<<<<
 *     cdef SAP_UC uclang_sap[8]
 *     cdef RFC_ERROR_INFO errorInfo
 */
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_lang_iso); if (unlikely(__pyx_t_1 == ((SAP_UC *)NULL))) __PYX_ERR(0, 173, __pyx_L1_error)
  __pyx_v_uclang_iso = __pyx_t_1;

  /* "pyrfc/_cyrfc.pyx":176
 *     cdef SAP_UC uclang_sap[8]
 *     cdef RFC_ERROR_INFO errorInfo
 *     cdef RFC_RC rc = RfcLanguageIsoToSap(uclang_iso, uclang_sap, &errorInfo)             # <<<<<<<<<<<<<<
 *     free(uclang_iso)
 *     if rc != RFC_OK:
 */
  __pyx_v_rc = RfcLanguageIsoToSap(__pyx_v_uclang_iso, __pyx_v_uclang_sap, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":177
 *     cdef RFC_ERROR_INFO errorInfo
 *     cdef RFC_RC rc = RfcLanguageIsoToSap(uclang_iso, uclang_sap, &errorInfo)
 *     free(uclang_iso)             # <<<<<<<<<<<<<<
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 */
  free(__pyx_v_uclang_iso);

  /* "pyrfc/_cyrfc.pyx":178
 *     cdef RFC_RC rc = RfcLanguageIsoToSap(uclang_iso, uclang_sap, &errorInfo)
 *     free(uclang_iso)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     return wrapString(uclang_sap, 1)
 */
  __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":179
 *     free(uclang_iso)
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *     return wrapString(uclang_sap, 1)
 * 
 */
    __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __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, 179, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":178
 *     cdef RFC_RC rc = RfcLanguageIsoToSap(uclang_iso, uclang_sap, &errorInfo)
 *     free(uclang_iso)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     return wrapString(uclang_sap, 1)
 */
  }

  /* "pyrfc/_cyrfc.pyx":180
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 *     return wrapString(uclang_sap, 1)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.uclen = __pyx_int_1;
  __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_uclang_sap, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":162
 * 
 * 
 * def language_iso_to_sap(lang_iso):             # <<<<<<<<<<<<<<
 *     """Language code conversion of ISO code to SAP code.
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":183
 * 
 * 
 * def language_sap_to_iso(lang_sap):             # <<<<<<<<<<<<<<
 *     """Language code conversion of SAP code to ISO code.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_9language_sap_to_iso(PyObject *__pyx_self, PyObject *__pyx_v_lang_sap); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_8language_sap_to_iso[] = "Language code conversion of SAP code to ISO code.\n\n    :param lang_sap: Language SAP code\n    :type lang_sap: string\n\n    :return: ISO language code\n\n    :raises: :exc:`~pyrfc.RFCError` or a subclass\n                if SAP to ISO code conversion fails.\n    ";
static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_9language_sap_to_iso = {"language_sap_to_iso", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_9language_sap_to_iso, METH_O, __pyx_doc_5pyrfc_6_cyrfc_8language_sap_to_iso};
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_9language_sap_to_iso(PyObject *__pyx_self, PyObject *__pyx_v_lang_sap) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("language_sap_to_iso (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_8language_sap_to_iso(__pyx_self, ((PyObject *)__pyx_v_lang_sap));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_8language_sap_to_iso(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lang_sap) {
  SAP_UC *__pyx_v_uclang_sap;
  SAP_UC __pyx_v_uclang_iso[16];
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_RC __pyx_v_rc;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SAP_UC *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("language_sap_to_iso", 0);

  /* "pyrfc/_cyrfc.pyx":194
 *                 if SAP to ISO code conversion fails.
 *     """
 *     cdef SAP_UC *uclang_sap = fillString(lang_sap)             # <<<<<<<<<<<<<<
 *     cdef SAP_UC uclang_iso[16]
 *     cdef RFC_ERROR_INFO errorInfo
 */
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_lang_sap); if (unlikely(__pyx_t_1 == ((SAP_UC *)NULL))) __PYX_ERR(0, 194, __pyx_L1_error)
  __pyx_v_uclang_sap = __pyx_t_1;

  /* "pyrfc/_cyrfc.pyx":197
 *     cdef SAP_UC uclang_iso[16]
 *     cdef RFC_ERROR_INFO errorInfo
 *     cdef RFC_RC rc = RfcLanguageSapToIso(uclang_sap, uclang_iso, &errorInfo)             # <<<<<<<<<<<<<<
 *     free(uclang_sap)
 *     if rc != RFC_OK:
 */
  __pyx_v_rc = RfcLanguageSapToIso(__pyx_v_uclang_sap, __pyx_v_uclang_iso, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":198
 *     cdef RFC_ERROR_INFO errorInfo
 *     cdef RFC_RC rc = RfcLanguageSapToIso(uclang_sap, uclang_iso, &errorInfo)
 *     free(uclang_sap)             # <<<<<<<<<<<<<<
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 */
  free(__pyx_v_uclang_sap);

  /* "pyrfc/_cyrfc.pyx":199
 *     cdef RFC_RC rc = RfcLanguageSapToIso(uclang_sap, uclang_iso, &errorInfo)
 *     free(uclang_sap)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     return wrapString(uclang_iso, 2)
 */
  __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":200
 *     free(uclang_sap)
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *     return wrapString(uclang_iso, 2)
 * 
 */
    __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 200, __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, 200, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":199
 *     cdef RFC_RC rc = RfcLanguageSapToIso(uclang_sap, uclang_iso, &errorInfo)
 *     free(uclang_sap)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     return wrapString(uclang_iso, 2)
 */
  }

  /* "pyrfc/_cyrfc.pyx":201
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 *     return wrapString(uclang_iso, 2)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.uclen = __pyx_int_2;
  __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_uclang_iso, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":183
 * 
 * 
 * def language_sap_to_iso(lang_sap):             # <<<<<<<<<<<<<<
 *     """Language code conversion of SAP code to ISO code.
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":204
 * 
 * 
 * def set_cryptolib_path(path_name):             # <<<<<<<<<<<<<<
 *     """Sets the absolute path to the sapcrypto library to enable TLS encryption via Websocket Rfc.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_11set_cryptolib_path(PyObject *__pyx_self, PyObject *__pyx_v_path_name); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10set_cryptolib_path[] = "Sets the absolute path to the sapcrypto library to enable TLS encryption via Websocket Rfc.\n\n    The parameter path_name needs also to contain the name of the library.\n    This function has the same effect as the sapnwrfc.ini parameter TLS_SAPCRYPTOLIB.\n    This API cannot reset a new path to the library during runtime. Once set, the path is definitive.\n\n    :param path_name: Absolute path to crypto library\n    :type path_name: string\n\n    :return: nothing, raises an error\n    ";
static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_11set_cryptolib_path = {"set_cryptolib_path", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_11set_cryptolib_path, METH_O, __pyx_doc_5pyrfc_6_cyrfc_10set_cryptolib_path};
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_11set_cryptolib_path(PyObject *__pyx_self, PyObject *__pyx_v_path_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_cryptolib_path (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10set_cryptolib_path(__pyx_self, ((PyObject *)__pyx_v_path_name));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10set_cryptolib_path(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path_name) {
  RFC_ERROR_INFO __pyx_v_errorInfo;
  SAP_UC __pyx_v_pathName[0x200];
  RFC_RC __pyx_v_rc;
  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;
  SAP_UC *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_cryptolib_path", 0);

  /* "pyrfc/_cyrfc.pyx":216
 *     :return: nothing, raises an error
 *     """
 *     if type(path_name) is not str:             # <<<<<<<<<<<<<<
 *         raise TypeError('sapnwrfc.ini path is not a string:', path_name)
 *     cdef RFC_ERROR_INFO errorInfo
 */
  __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_path_name)) != ((PyObject *)(&PyUnicode_Type)));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":217
 *     """
 *     if type(path_name) is not str:
 *         raise TypeError('sapnwrfc.ini path is not a string:', path_name)             # <<<<<<<<<<<<<<
 *     cdef RFC_ERROR_INFO errorInfo
 *     cdef SAP_UC pathName [512]
 */
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_kp_u_sapnwrfc_ini_path_is_not_a_strin);
    __Pyx_GIVEREF(__pyx_kp_u_sapnwrfc_ini_path_is_not_a_strin);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_sapnwrfc_ini_path_is_not_a_strin);
    __Pyx_INCREF(__pyx_v_path_name);
    __Pyx_GIVEREF(__pyx_v_path_name);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_path_name);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 217, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":216
 *     :return: nothing, raises an error
 *     """
 *     if type(path_name) is not str:             # <<<<<<<<<<<<<<
 *         raise TypeError('sapnwrfc.ini path is not a string:', path_name)
 *     cdef RFC_ERROR_INFO errorInfo
 */
  }

  /* "pyrfc/_cyrfc.pyx":220
 *     cdef RFC_ERROR_INFO errorInfo
 *     cdef SAP_UC pathName [512]
 *     if not isfile(path_name):             # <<<<<<<<<<<<<<
 *         raise TypeError('Crypto library not found:', path_name)
 *     pathName = fillString(path_name)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_isfile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_v_path_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_path_name);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":221
 *     cdef SAP_UC pathName [512]
 *     if not isfile(path_name):
 *         raise TypeError('Crypto library not found:', path_name)             # <<<<<<<<<<<<<<
 *     pathName = fillString(path_name)
 *     cdef RFC_RC rc = RfcLoadCryptoLibrary(pathName, &errorInfo)
 */
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_kp_u_Crypto_library_not_found);
    __Pyx_GIVEREF(__pyx_kp_u_Crypto_library_not_found);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Crypto_library_not_found);
    __Pyx_INCREF(__pyx_v_path_name);
    __Pyx_GIVEREF(__pyx_v_path_name);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_path_name);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 221, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":220
 *     cdef RFC_ERROR_INFO errorInfo
 *     cdef SAP_UC pathName [512]
 *     if not isfile(path_name):             # <<<<<<<<<<<<<<
 *         raise TypeError('Crypto library not found:', path_name)
 *     pathName = fillString(path_name)
 */
  }

  /* "pyrfc/_cyrfc.pyx":222
 *     if not isfile(path_name):
 *         raise TypeError('Crypto library not found:', path_name)
 *     pathName = fillString(path_name)             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc = RfcLoadCryptoLibrary(pathName, &errorInfo)
 *     if rc != RFC_OK:
 */
  __pyx_t_6 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_path_name); if (unlikely(__pyx_t_6 == ((SAP_UC *)NULL))) __PYX_ERR(0, 222, __pyx_L1_error)
  memcpy(&(__pyx_v_pathName[0]), __pyx_t_6, sizeof(__pyx_v_pathName[0]) * (0x200 - 0));

  /* "pyrfc/_cyrfc.pyx":223
 *         raise TypeError('Crypto library not found:', path_name)
 *     pathName = fillString(path_name)
 *     cdef RFC_RC rc = RfcLoadCryptoLibrary(pathName, &errorInfo)             # <<<<<<<<<<<<<<
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 */
  __pyx_v_rc = RfcLoadCryptoLibrary(__pyx_v_pathName, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":224
 *     pathName = fillString(path_name)
 *     cdef RFC_RC rc = RfcLoadCryptoLibrary(pathName, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 * 
 */
  __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":225
 *     cdef RFC_RC rc = RfcLoadCryptoLibrary(pathName, &errorInfo)
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 225, __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, 225, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":224
 *     pathName = fillString(path_name)
 *     cdef RFC_RC rc = RfcLoadCryptoLibrary(pathName, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":204
 * 
 * 
 * def set_cryptolib_path(path_name):             # <<<<<<<<<<<<<<
 *     """Sets the absolute path to the sapcrypto library to enable TLS encryption via Websocket Rfc.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrfc._cyrfc.set_cryptolib_path", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":228
 * 
 * 
 * def set_locale_radix(value=None):             # <<<<<<<<<<<<<<
 *     """Sets the locale radix for decimal conversions.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_13set_locale_radix(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_12set_locale_radix[] = "Sets the locale radix for decimal conversions.\n\n    :param value: Locale radix like ``.`` or ``,``\n    :type path_name: string\n\n    :return: New radix set\n    ";
static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_13set_locale_radix = {"set_locale_radix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_13set_locale_radix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_12set_locale_radix};
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_13set_locale_radix(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_locale_radix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_locale_radix") < 0)) __PYX_ERR(0, 228, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_value = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_locale_radix", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 228, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.set_locale_radix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_12set_locale_radix(__pyx_self, __pyx_v_value);

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_12set_locale_radix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_locale_radix", 0);
  __Pyx_INCREF(__pyx_v_value);

  /* "pyrfc/_cyrfc.pyx":237
 *     """
 *     global _LOCALE_RADIX
 *     if value is None:             # <<<<<<<<<<<<<<
 *         value = localeconv()['decimal_point']
 *     _LOCALE_RADIX = value
 */
  __pyx_t_1 = (__pyx_v_value == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrfc/_cyrfc.pyx":238
 *     global _LOCALE_RADIX
 *     if value is None:
 *         value = localeconv()['decimal_point']             # <<<<<<<<<<<<<<
 *     _LOCALE_RADIX = value
 *     return _LOCALE_RADIX
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_localeconv); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_decimal_point); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrfc/_cyrfc.pyx":237
 *     """
 *     global _LOCALE_RADIX
 *     if value is None:             # <<<<<<<<<<<<<<
 *         value = localeconv()['decimal_point']
 *     _LOCALE_RADIX = value
 */
  }

  /* "pyrfc/_cyrfc.pyx":239
 *     if value is None:
 *         value = localeconv()['decimal_point']
 *     _LOCALE_RADIX = value             # <<<<<<<<<<<<<<
 *     return _LOCALE_RADIX
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOCALE_RADIX, __pyx_v_value) < 0) __PYX_ERR(0, 239, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":240
 *         value = localeconv()['decimal_point']
 *     _LOCALE_RADIX = value
 *     return _LOCALE_RADIX             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_LOCALE_RADIX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":228
 * 
 * 
 * def set_locale_radix(value=None):             # <<<<<<<<<<<<<<
 *     """Sets the locale radix for decimal conversions.
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":243
 * 
 * 
 * cdef _cancel_connection(client_connection):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc__cancel_connection(PyObject *__pyx_v_client_connection) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  uintptr_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_cancel_connection", 0);

  /* "pyrfc/_cyrfc.pyx":246
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 *     if client_connection.handle is not None:             # <<<<<<<<<<<<<<
 *         rc = RfcCancel(<RFC_CONNECTION_HANDLE><uintptr_t>client_connection.handle, &errorInfo)
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_client_connection, __pyx_n_s_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 != Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "pyrfc/_cyrfc.pyx":247
 *     cdef RFC_ERROR_INFO errorInfo
 *     if client_connection.handle is not None:
 *         rc = RfcCancel(<RFC_CONNECTION_HANDLE><uintptr_t>client_connection.handle, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_client_connection, __pyx_n_s_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_4 == ((uintptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 247, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_rc = RfcCancel(((RFC_CONNECTION_HANDLE)((uintptr_t)__pyx_t_4)), (&__pyx_v_errorInfo));

    /* "pyrfc/_cyrfc.pyx":248
 *     if client_connection.handle is not None:
 *         rc = RfcCancel(<RFC_CONNECTION_HANDLE><uintptr_t>client_connection.handle, &errorInfo)
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 * 
 */
    __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_2 = ((__pyx_v_errorInfo.code != RFC_OK) != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L5_bool_binop_done:;
    if (unlikely(__pyx_t_3)) {

      /* "pyrfc/_cyrfc.pyx":249
 *         rc = RfcCancel(<RFC_CONNECTION_HANDLE><uintptr_t>client_connection.handle, &errorInfo)
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __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, 249, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":248
 *     if client_connection.handle is not None:
 *         rc = RfcCancel(<RFC_CONNECTION_HANDLE><uintptr_t>client_connection.handle, &errorInfo)
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 * 
 */
    }

    /* "pyrfc/_cyrfc.pyx":246
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 *     if client_connection.handle is not None:             # <<<<<<<<<<<<<<
 *         rc = RfcCancel(<RFC_CONNECTION_HANDLE><uintptr_t>client_connection.handle, &errorInfo)
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:
 */
  }

  /* "pyrfc/_cyrfc.pyx":243
 * 
 * 
 * cdef _cancel_connection(client_connection):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrfc._cyrfc._cancel_connection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":252
 * 
 * 
 * def cancel_connection(client_connection):             # <<<<<<<<<<<<<<
 *     """Immediately cancels the RFC call which is currently being called over the given RFC connection
 *     and closes the connection. Can be used only on an RFC client connection.
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_15cancel_connection(PyObject *__pyx_self, PyObject *__pyx_v_client_connection); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_14cancel_connection[] = "Immediately cancels the RFC call which is currently being called over the given RFC connection\n    and closes the connection. Can be used only on an RFC client connection.\n\n    RFC call cancellation with timeout can be done automatically, without using this method explicitely.\n    The ``timeout`` option can be at connection level, when creating connection instance, or at RFC call level, as\n    RFC ``Connection.call()`` option. Either way, the connection will be cancelled if RFC call takes longer than ``timeout`` seconds.\n\n    :param client_connection: RFC client connection instance to be cancelled\n    :type client_connection: Connection\n\n    :raises: :exc:`~pyrfc.RFCError` or a subclass\n                thereof if the connection cannot be cancelled cleanly.\n    ";
static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_15cancel_connection = {"cancel_connection", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_15cancel_connection, METH_O, __pyx_doc_5pyrfc_6_cyrfc_14cancel_connection};
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_15cancel_connection(PyObject *__pyx_self, PyObject *__pyx_v_client_connection) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cancel_connection (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_14cancel_connection(__pyx_self, ((PyObject *)__pyx_v_client_connection));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_14cancel_connection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_client_connection) {
  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("cancel_connection", 0);

  /* "pyrfc/_cyrfc.pyx":266
 *                 thereof if the connection cannot be cancelled cleanly.
 *     """
 *     Thread(target=_cancel_connection, args=(client_connection,)).start()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Thread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_CFunc_object____object___to_py(__pyx_f_5pyrfc_6_cyrfc__cancel_connection); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_target, __pyx_t_4) < 0) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_client_connection);
  __Pyx_GIVEREF(__pyx_v_client_connection);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_client_connection);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_args, __pyx_t_4) < 0) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 266, __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;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_start); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":252
 * 
 * 
 * def cancel_connection(client_connection):             # <<<<<<<<<<<<<<
 *     """Immediately cancels the RFC call which is currently being called over the given RFC connection
 *     and closes the connection. Can be used only on an RFC client connection.
 */

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

/* "pyrfc/_cyrfc.pyx":285
 *     cdef RFC_CONNECTION_PARAMETER *_params
 * 
 *     def __cinit__(self, **params):             # <<<<<<<<<<<<<<
 *         self._params_count = <unsigned> len(params)
 *         if self._params_count < 1:
 */

/* Python wrapper */
static int __pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_params = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1;
  __pyx_v_params = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_params)) return -1;
  __Pyx_GOTREF(__pyx_v_params);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters___cinit__(((struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *)__pyx_v_self), __pyx_v_params);

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

static int __pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters___cinit__(struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *__pyx_v_self, PyObject *__pyx_v_params) {
  int __pyx_v_i;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_value = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  SAP_UC *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyrfc/_cyrfc.pyx":286
 * 
 *     def __cinit__(self, **params):
 *         self._params_count = <unsigned> len(params)             # <<<<<<<<<<<<<<
 *         if self._params_count < 1:
 *             raise RFCError("Connection parameters missing")
 */
  __pyx_t_1 = PyDict_Size(__pyx_v_params); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 286, __pyx_L1_error)
  __pyx_v_self->_params_count = ((unsigned int)__pyx_t_1);

  /* "pyrfc/_cyrfc.pyx":287
 *     def __cinit__(self, **params):
 *         self._params_count = <unsigned> len(params)
 *         if self._params_count < 1:             # <<<<<<<<<<<<<<
 *             raise RFCError("Connection parameters missing")
 *         self._params = <RFC_CONNECTION_PARAMETER*> malloc(self._params_count * sizeof(RFC_CONNECTION_PARAMETER))
 */
  __pyx_t_2 = ((__pyx_v_self->_params_count < 1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":288
 *         self._params_count = <unsigned> len(params)
 *         if self._params_count < 1:
 *             raise RFCError("Connection parameters missing")             # <<<<<<<<<<<<<<
 *         self._params = <RFC_CONNECTION_PARAMETER*> malloc(self._params_count * sizeof(RFC_CONNECTION_PARAMETER))
 *         cdef int i = 0
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_Connection_parameters_missing) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_Connection_parameters_missing);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 288, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":287
 *     def __cinit__(self, **params):
 *         self._params_count = <unsigned> len(params)
 *         if self._params_count < 1:             # <<<<<<<<<<<<<<
 *             raise RFCError("Connection parameters missing")
 *         self._params = <RFC_CONNECTION_PARAMETER*> malloc(self._params_count * sizeof(RFC_CONNECTION_PARAMETER))
 */
  }

  /* "pyrfc/_cyrfc.pyx":289
 *         if self._params_count < 1:
 *             raise RFCError("Connection parameters missing")
 *         self._params = <RFC_CONNECTION_PARAMETER*> malloc(self._params_count * sizeof(RFC_CONNECTION_PARAMETER))             # <<<<<<<<<<<<<<
 *         cdef int i = 0
 *         for name, value in params.iteritems():
 */
  __pyx_v_self->_params = ((RFC_CONNECTION_PARAMETER *)malloc((__pyx_v_self->_params_count * (sizeof(RFC_CONNECTION_PARAMETER)))));

  /* "pyrfc/_cyrfc.pyx":290
 *             raise RFCError("Connection parameters missing")
 *         self._params = <RFC_CONNECTION_PARAMETER*> malloc(self._params_count * sizeof(RFC_CONNECTION_PARAMETER))
 *         cdef int i = 0             # <<<<<<<<<<<<<<
 *         for name, value in params.iteritems():
 *             self._params[i].name = fillString(name)
 */
  __pyx_v_i = 0;

  /* "pyrfc/_cyrfc.pyx":291
 *         self._params = <RFC_CONNECTION_PARAMETER*> malloc(self._params_count * sizeof(RFC_CONNECTION_PARAMETER))
 *         cdef int i = 0
 *         for name, value in params.iteritems():             # <<<<<<<<<<<<<<
 *             self._params[i].name = fillString(name)
 *             self._params[i].value = fillString(value)
 */
  __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_params, 1, __pyx_n_s_iteritems, (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_3);
  __pyx_t_3 = __pyx_t_4;
  __pyx_t_4 = 0;
  while (1) {
    __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_6, &__pyx_t_1, &__pyx_t_4, &__pyx_t_5, NULL, __pyx_t_7);
    if (unlikely(__pyx_t_8 == 0)) break;
    if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "pyrfc/_cyrfc.pyx":292
 *         cdef int i = 0
 *         for name, value in params.iteritems():
 *             self._params[i].name = fillString(name)             # <<<<<<<<<<<<<<
 *             self._params[i].value = fillString(value)
 *             i += 1
 */
    __pyx_t_9 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_name); if (unlikely(__pyx_t_9 == ((SAP_UC *)NULL))) __PYX_ERR(0, 292, __pyx_L1_error)
    (__pyx_v_self->_params[__pyx_v_i]).name = __pyx_t_9;

    /* "pyrfc/_cyrfc.pyx":293
 *         for name, value in params.iteritems():
 *             self._params[i].name = fillString(name)
 *             self._params[i].value = fillString(value)             # <<<<<<<<<<<<<<
 *             i += 1
 * 
 */
    __pyx_t_9 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_value); if (unlikely(__pyx_t_9 == ((SAP_UC *)NULL))) __PYX_ERR(0, 293, __pyx_L1_error)
    (__pyx_v_self->_params[__pyx_v_i]).value = __pyx_t_9;

    /* "pyrfc/_cyrfc.pyx":294
 *             self._params[i].name = fillString(name)
 *             self._params[i].value = fillString(value)
 *             i += 1             # <<<<<<<<<<<<<<
 * 
 *     def __del__(self):
 */
    __pyx_v_i = (__pyx_v_i + 1);
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":285
 *     cdef RFC_CONNECTION_PARAMETER *_params
 * 
 *     def __cinit__(self, **params):             # <<<<<<<<<<<<<<
 *         self._params_count = <unsigned> len(params)
 *         if self._params_count < 1:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrfc._cyrfc.ConnectionParameters.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":296
 *             i += 1
 * 
 *     def __del__(self):             # <<<<<<<<<<<<<<
 *         self._free()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_3__del__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_3__del__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters_2__del__(((struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters_2__del__(struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);

  /* "pyrfc/_cyrfc.pyx":297
 * 
 *     def __del__(self):
 *         self._free()             # <<<<<<<<<<<<<<
 * 
 *     def _free(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_free); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":296
 *             i += 1
 * 
 *     def __del__(self):             # <<<<<<<<<<<<<<
 *         self._free()
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":299
 *         self._free()
 * 
 *     def _free(self):             # <<<<<<<<<<<<<<
 *         if self._params_count > 0:
 *             for i in range(self._params_count):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_5_free(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_5_free(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_free (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters_4_free(((struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters_4_free(struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *__pyx_v_self) {
  unsigned int __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  unsigned int __pyx_t_2;
  unsigned int __pyx_t_3;
  unsigned int __pyx_t_4;
  __Pyx_RefNannySetupContext("_free", 0);

  /* "pyrfc/_cyrfc.pyx":300
 * 
 *     def _free(self):
 *         if self._params_count > 0:             # <<<<<<<<<<<<<<
 *             for i in range(self._params_count):
 *                 free(<SAP_UC*>self._params[i].name)
 */
  __pyx_t_1 = ((__pyx_v_self->_params_count > 0) != 0);
  if (__pyx_t_1) {

    /* "pyrfc/_cyrfc.pyx":301
 *     def _free(self):
 *         if self._params_count > 0:
 *             for i in range(self._params_count):             # <<<<<<<<<<<<<<
 *                 free(<SAP_UC*>self._params[i].name)
 *                 free(<SAP_UC*> self._params[i].value)
 */
    __pyx_t_2 = __pyx_v_self->_params_count;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_i = __pyx_t_4;

      /* "pyrfc/_cyrfc.pyx":302
 *         if self._params_count > 0:
 *             for i in range(self._params_count):
 *                 free(<SAP_UC*>self._params[i].name)             # <<<<<<<<<<<<<<
 *                 free(<SAP_UC*> self._params[i].value)
 *             free(self._params)
 */
      free(((SAP_UC *)(__pyx_v_self->_params[__pyx_v_i]).name));

      /* "pyrfc/_cyrfc.pyx":303
 *             for i in range(self._params_count):
 *                 free(<SAP_UC*>self._params[i].name)
 *                 free(<SAP_UC*> self._params[i].value)             # <<<<<<<<<<<<<<
 *             free(self._params)
 *             self._params_count = 0
 */
      free(((SAP_UC *)(__pyx_v_self->_params[__pyx_v_i]).value));
    }

    /* "pyrfc/_cyrfc.pyx":304
 *                 free(<SAP_UC*>self._params[i].name)
 *                 free(<SAP_UC*> self._params[i].value)
 *             free(self._params)             # <<<<<<<<<<<<<<
 *             self._params_count = 0
 * 
 */
    free(__pyx_v_self->_params);

    /* "pyrfc/_cyrfc.pyx":305
 *                 free(<SAP_UC*> self._params[i].value)
 *             free(self._params)
 *             self._params_count = 0             # <<<<<<<<<<<<<<
 * 
 * ################################################################################
 */
    __pyx_v_self->_params_count = 0;

    /* "pyrfc/_cyrfc.pyx":300
 * 
 *     def _free(self):
 *         if self._params_count > 0:             # <<<<<<<<<<<<<<
 *             for i in range(self._params_count):
 *                 free(<SAP_UC*>self._params[i].name)
 */
  }

  /* "pyrfc/_cyrfc.pyx":299
 *         self._free()
 * 
 *     def _free(self):             # <<<<<<<<<<<<<<
 *         if self._params_count > 0:
 *             for i in range(self._params_count):
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters_6__reduce_cython__(((struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *)__pyx_v_self));

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

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

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

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

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters_8__setstate_cython__(((struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

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

/* "pyrfc/_cyrfc.pyx":337
 * 
 *     """
 *     def __init__(self, name, nuc_length, uc_length):             # <<<<<<<<<<<<<<
 *         self.fields = []
 *         if len(name)<1 or len(name)>30:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_15TypeDescription_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_15TypeDescription_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_15TypeDescription_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_15TypeDescription_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_nuc_length = 0;
  PyObject *__pyx_v_uc_length = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name,&__pyx_n_s_nuc_length,&__pyx_n_s_uc_length,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 337, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nuc_length)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 337, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_uc_length)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 337, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 337, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_name = values[1];
    __pyx_v_nuc_length = values[2];
    __pyx_v_uc_length = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 337, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.TypeDescription.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_15TypeDescription___init__(__pyx_self, __pyx_v_self, __pyx_v_name, __pyx_v_nuc_length, __pyx_v_uc_length);

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_15TypeDescription___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_nuc_length, PyObject *__pyx_v_uc_length) {
  PyObject *__pyx_v_int_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyrfc/_cyrfc.pyx":338
 *     """
 *     def __init__(self, name, nuc_length, uc_length):
 *         self.fields = []             # <<<<<<<<<<<<<<
 *         if len(name)<1 or len(name)>30:
 *             raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.")
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fields, __pyx_t_1) < 0) __PYX_ERR(0, 338, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":339
 *     def __init__(self, name, nuc_length, uc_length):
 *         self.fields = []
 *         if len(name)<1 or len(name)>30:             # <<<<<<<<<<<<<<
 *             raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.")
 *         for int_field in [nuc_length, uc_length]:
 */
  __pyx_t_3 = PyObject_Length(__pyx_v_name); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 339, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 < 1) != 0);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = PyObject_Length(__pyx_v_name); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 339, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 30) != 0);
  __pyx_t_2 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":340
 *         self.fields = []
 *         if len(name)<1 or len(name)>30:
 *             raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.")             # <<<<<<<<<<<<<<
 *         for int_field in [nuc_length, uc_length]:
 *             if type(int_field) not in [int, long]:
 */
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = 0;
    __pyx_t_5 = 127;
    __Pyx_INCREF(__pyx_kp_u_field_name_string);
    __pyx_t_3 += 23;
    __Pyx_GIVEREF(__pyx_kp_u_field_name_string);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_field_name_string);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
    __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u_should_be_from_1_30_chars);
    __pyx_t_3 += 28;
    __Pyx_GIVEREF(__pyx_kp_u_should_be_from_1_30_chars);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_should_be_from_1_30_chars);
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 340, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":339
 *     def __init__(self, name, nuc_length, uc_length):
 *         self.fields = []
 *         if len(name)<1 or len(name)>30:             # <<<<<<<<<<<<<<
 *             raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.")
 *         for int_field in [nuc_length, uc_length]:
 */
  }

  /* "pyrfc/_cyrfc.pyx":341
 *         if len(name)<1 or len(name)>30:
 *             raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.")
 *         for int_field in [nuc_length, uc_length]:             # <<<<<<<<<<<<<<
 *             if type(int_field) not in [int, long]:
 *                 raise TypeError(f"field '{name}' length '{int_field}' must be of type integer")
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_nuc_length);
  __Pyx_GIVEREF(__pyx_v_nuc_length);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_nuc_length);
  __Pyx_INCREF(__pyx_v_uc_length);
  __Pyx_GIVEREF(__pyx_v_uc_length);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_uc_length);
  __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (__pyx_t_3 >= 2) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 341, __pyx_L1_error)
    #else
    __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_int_field, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":342
 *             raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.")
 *         for int_field in [nuc_length, uc_length]:
 *             if type(int_field) not in [int, long]:             # <<<<<<<<<<<<<<
 *                 raise TypeError(f"field '{name}' length '{int_field}' must be of type integer")
 *         self.name = name
 */
    __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_int_field)));
    __pyx_t_1 = ((PyObject *)Py_TYPE(__pyx_v_int_field));
    __pyx_t_7 = PyObject_RichCompare(((PyObject *)__pyx_t_1), ((PyObject *)(&PyInt_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 342, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 342, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_4) {
    } else {
      __pyx_t_2 = __pyx_t_4;
      goto __pyx_L9_bool_binop_done;
    }
    __pyx_t_7 = PyObject_RichCompare(((PyObject *)__pyx_t_1), ((PyObject *)(&PyLong_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 342, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 342, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_2 = __pyx_t_4;
    __pyx_L9_bool_binop_done:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = (__pyx_t_2 != 0);
    if (unlikely(__pyx_t_4)) {

      /* "pyrfc/_cyrfc.pyx":343
 *         for int_field in [nuc_length, uc_length]:
 *             if type(int_field) not in [int, long]:
 *                 raise TypeError(f"field '{name}' length '{int_field}' must be of type integer")             # <<<<<<<<<<<<<<
 *         self.name = name
 *         self.nuc_length = nuc_length
 */
      __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = 0;
      __pyx_t_5 = 127;
      __Pyx_INCREF(__pyx_kp_u_field);
      __pyx_t_8 += 7;
      __Pyx_GIVEREF(__pyx_kp_u_field);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_field);
      __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 343, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_5;
      __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);
      __pyx_t_7 = 0;
      __Pyx_INCREF(__pyx_kp_u_length);
      __pyx_t_8 += 10;
      __Pyx_GIVEREF(__pyx_kp_u_length);
      PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_length);
      __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_int_field, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 343, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_5;
      __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_7);
      __pyx_t_7 = 0;
      __Pyx_INCREF(__pyx_kp_u_must_be_of_type_integer);
      __pyx_t_8 += 25;
      __Pyx_GIVEREF(__pyx_kp_u_must_be_of_type_integer);
      PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_must_be_of_type_integer);
      __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 343, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 343, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":342
 *             raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.")
 *         for int_field in [nuc_length, uc_length]:
 *             if type(int_field) not in [int, long]:             # <<<<<<<<<<<<<<
 *                 raise TypeError(f"field '{name}' length '{int_field}' must be of type integer")
 *         self.name = name
 */
    }

    /* "pyrfc/_cyrfc.pyx":341
 *         if len(name)<1 or len(name)>30:
 *             raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.")
 *         for int_field in [nuc_length, uc_length]:             # <<<<<<<<<<<<<<
 *             if type(int_field) not in [int, long]:
 *                 raise TypeError(f"field '{name}' length '{int_field}' must be of type integer")
 */
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyrfc/_cyrfc.pyx":344
 *             if type(int_field) not in [int, long]:
 *                 raise TypeError(f"field '{name}' length '{int_field}' must be of type integer")
 *         self.name = name             # <<<<<<<<<<<<<<
 *         self.nuc_length = nuc_length
 *         self.uc_length = uc_length
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 344, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":345
 *                 raise TypeError(f"field '{name}' length '{int_field}' must be of type integer")
 *         self.name = name
 *         self.nuc_length = nuc_length             # <<<<<<<<<<<<<<
 *         self.uc_length = uc_length
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nuc_length, __pyx_v_nuc_length) < 0) __PYX_ERR(0, 345, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":346
 *         self.name = name
 *         self.nuc_length = nuc_length
 *         self.uc_length = uc_length             # <<<<<<<<<<<<<<
 * 
 *     def add_field(self, name, field_type, nuc_length, uc_length, nuc_offset,
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_uc_length, __pyx_v_uc_length) < 0) __PYX_ERR(0, 346, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":337
 * 
 *     """
 *     def __init__(self, name, nuc_length, uc_length):             # <<<<<<<<<<<<<<
 *         self.fields = []
 *         if len(name)<1 or len(name)>30:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrfc._cyrfc.TypeDescription.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_int_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":348
 *         self.uc_length = uc_length
 * 
 *     def add_field(self, name, field_type, nuc_length, uc_length, nuc_offset,             # <<<<<<<<<<<<<<
 *                   uc_offset, decimals=0, type_description=None):
 *         """ Adds a field to the type description.
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_15TypeDescription_3add_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_15TypeDescription_2add_field[] = " Adds a field to the type description.\n\n        :param name: Field name\n        :type name: string (30)\n        :param field_type: RfcFieldType enum name\n        :type field_type: string\n        :param nuc_length: NUC length\n        :type nuc_length: int\n        :param uc_length: UC length\n        :type uc_length: int\n        :param nuc_offset: NUC offset.\n        :type nuc_offset: int\n        :param uc_offset: UC offset.\n        :type uc_offset: int\n        :param decimals: Decimals (default=0)\n        :type decimals: int\n        :param type_description: An object of class TypeDescription or None (default=None)\n        :type type_description: object of class TypeDescription\n        ";
static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_15TypeDescription_3add_field = {"add_field", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_15TypeDescription_3add_field, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_15TypeDescription_2add_field};
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_15TypeDescription_3add_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_field_type = 0;
  PyObject *__pyx_v_nuc_length = 0;
  PyObject *__pyx_v_uc_length = 0;
  PyObject *__pyx_v_nuc_offset = 0;
  PyObject *__pyx_v_uc_offset = 0;
  PyObject *__pyx_v_decimals = 0;
  PyObject *__pyx_v_type_description = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_field (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name,&__pyx_n_s_field_type,&__pyx_n_s_nuc_length,&__pyx_n_s_uc_length,&__pyx_n_s_nuc_offset,&__pyx_n_s_uc_offset,&__pyx_n_s_decimals,&__pyx_n_s_type_description,0};
    PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
    values[7] = ((PyObject *)((PyObject *)__pyx_int_0));

    /* "pyrfc/_cyrfc.pyx":349
 * 
 *     def add_field(self, name, field_type, nuc_length, uc_length, nuc_offset,
 *                   uc_offset, decimals=0, type_description=None):             # <<<<<<<<<<<<<<
 *         """ Adds a field to the type description.
 * 
 */
    values[8] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_field", 0, 7, 9, 1); __PYX_ERR(0, 348, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_field_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_field", 0, 7, 9, 2); __PYX_ERR(0, 348, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nuc_length)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_field", 0, 7, 9, 3); __PYX_ERR(0, 348, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_uc_length)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_field", 0, 7, 9, 4); __PYX_ERR(0, 348, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nuc_offset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_field", 0, 7, 9, 5); __PYX_ERR(0, 348, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_uc_offset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_field", 0, 7, 9, 6); __PYX_ERR(0, 348, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_decimals);
          if (value) { values[7] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_type_description);
          if (value) { values[8] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_field") < 0)) __PYX_ERR(0, 348, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_name = values[1];
    __pyx_v_field_type = values[2];
    __pyx_v_nuc_length = values[3];
    __pyx_v_uc_length = values[4];
    __pyx_v_nuc_offset = values[5];
    __pyx_v_uc_offset = values[6];
    __pyx_v_decimals = values[7];
    __pyx_v_type_description = values[8];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_field", 0, 7, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 348, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.TypeDescription.add_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_15TypeDescription_2add_field(__pyx_self, __pyx_v_self, __pyx_v_name, __pyx_v_field_type, __pyx_v_nuc_length, __pyx_v_uc_length, __pyx_v_nuc_offset, __pyx_v_uc_offset, __pyx_v_decimals, __pyx_v_type_description);

  /* "pyrfc/_cyrfc.pyx":348
 *         self.uc_length = uc_length
 * 
 *     def add_field(self, name, field_type, nuc_length, uc_length, nuc_offset,             # <<<<<<<<<<<<<<
 *                   uc_offset, decimals=0, type_description=None):
 *         """ Adds a field to the type description.
 */

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_15TypeDescription_2add_field(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_field_type, PyObject *__pyx_v_nuc_length, PyObject *__pyx_v_uc_length, PyObject *__pyx_v_nuc_offset, PyObject *__pyx_v_uc_offset, PyObject *__pyx_v_decimals, PyObject *__pyx_v_type_description) {
  PyObject *__pyx_v_int_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_UCS4 __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_field", 0);

  /* "pyrfc/_cyrfc.pyx":369
 *         :type type_description: object of class TypeDescription
 *         """
 *         if len(name)<1:             # <<<<<<<<<<<<<<
 *             return None
 *         if len(name)>30:
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_name); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 369, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 < 1) != 0);
  if (__pyx_t_2) {

    /* "pyrfc/_cyrfc.pyx":370
 *         """
 *         if len(name)<1:
 *             return None             # <<<<<<<<<<<<<<
 *         if len(name)>30:
 *             raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.")
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "pyrfc/_cyrfc.pyx":369
 *         :type type_description: object of class TypeDescription
 *         """
 *         if len(name)<1:             # <<<<<<<<<<<<<<
 *             return None
 *         if len(name)>30:
 */
  }

  /* "pyrfc/_cyrfc.pyx":371
 *         if len(name)<1:
 *             return None
 *         if len(name)>30:             # <<<<<<<<<<<<<<
 *             raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.")
 *         if field_type not in enum_names(RfcFieldType):
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_name); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 371, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 > 30) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":372
 *             return None
 *         if len(name)>30:
 *             raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.")             # <<<<<<<<<<<<<<
 *         if field_type not in enum_names(RfcFieldType):
 *             raise TypeError(f"'field_type' (string) '{field_type}' must be in {enum_names(RfcFieldType)}")
 */
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_4 = 127;
    __Pyx_INCREF(__pyx_kp_u_field_name_string);
    __pyx_t_1 += 23;
    __Pyx_GIVEREF(__pyx_kp_u_field_name_string);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_field_name_string);
    __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4;
    __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u_should_be_from_1_30_chars);
    __pyx_t_1 += 28;
    __Pyx_GIVEREF(__pyx_kp_u_should_be_from_1_30_chars);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_should_be_from_1_30_chars);
    __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 372, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":371
 *         if len(name)<1:
 *             return None
 *         if len(name)>30:             # <<<<<<<<<<<<<<
 *             raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.")
 *         if field_type not in enum_names(RfcFieldType):
 */
  }

  /* "pyrfc/_cyrfc.pyx":373
 *         if len(name)>30:
 *             raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.")
 *         if field_type not in enum_names(RfcFieldType):             # <<<<<<<<<<<<<<
 *             raise TypeError(f"'field_type' (string) '{field_type}' must be in {enum_names(RfcFieldType)}")
 *         for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_enum_names); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_RfcFieldType); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_field_type, __pyx_t_3, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = (__pyx_t_2 != 0);
  if (unlikely(__pyx_t_8)) {

    /* "pyrfc/_cyrfc.pyx":374
 *             raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.")
 *         if field_type not in enum_names(RfcFieldType):
 *             raise TypeError(f"'field_type' (string) '{field_type}' must be in {enum_names(RfcFieldType)}")             # <<<<<<<<<<<<<<
 *         for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]:
 *             if not isinstance(int_field, (int, long)):
 */
    __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_4 = 127;
    __Pyx_INCREF(__pyx_kp_u_field_type_string);
    __pyx_t_1 += 23;
    __Pyx_GIVEREF(__pyx_kp_u_field_type_string);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_field_type_string);
    __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_field_type, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4;
    __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u_must_be_in);
    __pyx_t_1 += 13;
    __Pyx_GIVEREF(__pyx_kp_u_must_be_in);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_must_be_in);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_enum_names); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_RfcFieldType); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_4;
    __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 4, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 374, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":373
 *         if len(name)>30:
 *             raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.")
 *         if field_type not in enum_names(RfcFieldType):             # <<<<<<<<<<<<<<
 *             raise TypeError(f"'field_type' (string) '{field_type}' must be in {enum_names(RfcFieldType)}")
 *         for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]:
 */
  }

  /* "pyrfc/_cyrfc.pyx":375
 *         if field_type not in enum_names(RfcFieldType):
 *             raise TypeError(f"'field_type' (string) '{field_type}' must be in {enum_names(RfcFieldType)}")
 *         for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]:             # <<<<<<<<<<<<<<
 *             if not isinstance(int_field, (int, long)):
 *                 raise TypeError(f"field '{name}' length '{int_field}' must be of type integer")
 */
  __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_nuc_length);
  __Pyx_GIVEREF(__pyx_v_nuc_length);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_nuc_length);
  __Pyx_INCREF(__pyx_v_nuc_offset);
  __Pyx_GIVEREF(__pyx_v_nuc_offset);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_nuc_offset);
  __Pyx_INCREF(__pyx_v_uc_length);
  __Pyx_GIVEREF(__pyx_v_uc_length);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_uc_length);
  __Pyx_INCREF(__pyx_v_uc_offset);
  __Pyx_GIVEREF(__pyx_v_uc_offset);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_uc_offset);
  __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_1 >= 4) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 375, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 375, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_int_field, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":376
 *             raise TypeError(f"'field_type' (string) '{field_type}' must be in {enum_names(RfcFieldType)}")
 *         for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]:
 *             if not isinstance(int_field, (int, long)):             # <<<<<<<<<<<<<<
 *                 raise TypeError(f"field '{name}' length '{int_field}' must be of type integer")
 *         self.fields.append({
 */
    __pyx_t_2 = PyInt_Check(__pyx_v_int_field); 
    __pyx_t_10 = (__pyx_t_2 != 0);
    if (!__pyx_t_10) {
    } else {
      __pyx_t_8 = __pyx_t_10;
      goto __pyx_L9_bool_binop_done;
    }
    __pyx_t_10 = PyLong_Check(__pyx_v_int_field); 
    __pyx_t_2 = (__pyx_t_10 != 0);
    __pyx_t_8 = __pyx_t_2;
    __pyx_L9_bool_binop_done:;
    __pyx_t_2 = ((!(__pyx_t_8 != 0)) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "pyrfc/_cyrfc.pyx":377
 *         for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]:
 *             if not isinstance(int_field, (int, long)):
 *                 raise TypeError(f"field '{name}' length '{int_field}' must be of type integer")             # <<<<<<<<<<<<<<
 *         self.fields.append({
 *             'name': name,
 */
      __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = 0;
      __pyx_t_4 = 127;
      __Pyx_INCREF(__pyx_kp_u_field);
      __pyx_t_11 += 7;
      __Pyx_GIVEREF(__pyx_kp_u_field);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_field);
      __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4;
      __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
      __pyx_t_5 = 0;
      __Pyx_INCREF(__pyx_kp_u_length);
      __pyx_t_11 += 10;
      __Pyx_GIVEREF(__pyx_kp_u_length);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_length);
      __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_int_field, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4;
      __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_5);
      __pyx_t_5 = 0;
      __Pyx_INCREF(__pyx_kp_u_must_be_of_type_integer);
      __pyx_t_11 += 25;
      __Pyx_GIVEREF(__pyx_kp_u_must_be_of_type_integer);
      PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u_must_be_of_type_integer);
      __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 5, __pyx_t_11, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 377, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":376
 *             raise TypeError(f"'field_type' (string) '{field_type}' must be in {enum_names(RfcFieldType)}")
 *         for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]:
 *             if not isinstance(int_field, (int, long)):             # <<<<<<<<<<<<<<
 *                 raise TypeError(f"field '{name}' length '{int_field}' must be of type integer")
 *         self.fields.append({
 */
    }

    /* "pyrfc/_cyrfc.pyx":375
 *         if field_type not in enum_names(RfcFieldType):
 *             raise TypeError(f"'field_type' (string) '{field_type}' must be in {enum_names(RfcFieldType)}")
 *         for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]:             # <<<<<<<<<<<<<<
 *             if not isinstance(int_field, (int, long)):
 *                 raise TypeError(f"field '{name}' length '{int_field}' must be of type integer")
 */
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyrfc/_cyrfc.pyx":378
 *             if not isinstance(int_field, (int, long)):
 *                 raise TypeError(f"field '{name}' length '{int_field}' must be of type integer")
 *         self.fields.append({             # <<<<<<<<<<<<<<
 *             'name': name,
 *             'field_type': field_type,
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fields); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "pyrfc/_cyrfc.pyx":379
 *                 raise TypeError(f"field '{name}' length '{int_field}' must be of type integer")
 *         self.fields.append({
 *             'name': name,             # <<<<<<<<<<<<<<
 *             'field_type': field_type,
 *             'nuc_length': nuc_length,
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_name, __pyx_v_name) < 0) __PYX_ERR(0, 379, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":380
 *         self.fields.append({
 *             'name': name,
 *             'field_type': field_type,             # <<<<<<<<<<<<<<
 *             'nuc_length': nuc_length,
 *             'nuc_offset': nuc_offset,
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_field_type, __pyx_v_field_type) < 0) __PYX_ERR(0, 379, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":381
 *             'name': name,
 *             'field_type': field_type,
 *             'nuc_length': nuc_length,             # <<<<<<<<<<<<<<
 *             'nuc_offset': nuc_offset,
 *             'uc_length': uc_length,
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nuc_length, __pyx_v_nuc_length) < 0) __PYX_ERR(0, 379, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":382
 *             'field_type': field_type,
 *             'nuc_length': nuc_length,
 *             'nuc_offset': nuc_offset,             # <<<<<<<<<<<<<<
 *             'uc_length': uc_length,
 *             'uc_offset': uc_offset,
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nuc_offset, __pyx_v_nuc_offset) < 0) __PYX_ERR(0, 379, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":383
 *             'nuc_length': nuc_length,
 *             'nuc_offset': nuc_offset,
 *             'uc_length': uc_length,             # <<<<<<<<<<<<<<
 *             'uc_offset': uc_offset,
 *             'decimals': decimals,
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_uc_length, __pyx_v_uc_length) < 0) __PYX_ERR(0, 379, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":384
 *             'nuc_offset': nuc_offset,
 *             'uc_length': uc_length,
 *             'uc_offset': uc_offset,             # <<<<<<<<<<<<<<
 *             'decimals': decimals,
 *             'type_description': type_description
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_uc_offset, __pyx_v_uc_offset) < 0) __PYX_ERR(0, 379, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":385
 *             'uc_length': uc_length,
 *             'uc_offset': uc_offset,
 *             'decimals': decimals,             # <<<<<<<<<<<<<<
 *             'type_description': type_description
 *         })
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_decimals, __pyx_v_decimals) < 0) __PYX_ERR(0, 379, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":386
 *             'uc_offset': uc_offset,
 *             'decimals': decimals,
 *             'type_description': type_description             # <<<<<<<<<<<<<<
 *         })
 * 
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_type_description, __pyx_v_type_description) < 0) __PYX_ERR(0, 379, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":378
 *             if not isinstance(int_field, (int, long)):
 *                 raise TypeError(f"field '{name}' length '{int_field}' must be of type integer")
 *         self.fields.append({             # <<<<<<<<<<<<<<
 *             'name': name,
 *             'field_type': field_type,
 */
  __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_t_3); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":348
 *         self.uc_length = uc_length
 * 
 *     def add_field(self, name, field_type, nuc_length, uc_length, nuc_offset,             # <<<<<<<<<<<<<<
 *                   uc_offset, decimals=0, type_description=None):
 *         """ Adds a field to the type description.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrfc._cyrfc.TypeDescription.add_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_int_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":389
 *         })
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"<TypeDescription '{self.name}' with {len(self.fields)} " \
 *             f"fields (n/uclength={self.nuc_length}/{self.uc_length})>"
 */

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

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_15TypeDescription_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "pyrfc/_cyrfc.pyx":390
 * 
 *     def __repr__(self):
 *         return f"<TypeDescription '{self.name}' with {len(self.fields)} " \             # <<<<<<<<<<<<<<
 *             f"fields (n/uclength={self.nuc_length}/{self.uc_length})>"
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_TypeDescription);
  __pyx_t_2 += 18;
  __Pyx_GIVEREF(__pyx_kp_u_TypeDescription);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_TypeDescription);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u_with);
  __pyx_t_2 += 7;
  __Pyx_GIVEREF(__pyx_kp_u_with);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_with);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fields); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_6, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u_fields_n_uclength);
  __pyx_t_2 += 20;
  __Pyx_GIVEREF(__pyx_kp_u_fields_n_uclength);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_fields_n_uclength);

  /* "pyrfc/_cyrfc.pyx":391
 *     def __repr__(self):
 *         return f"<TypeDescription '{self.name}' with {len(self.fields)} " \
 *             f"fields (n/uclength={self.nuc_length}/{self.uc_length})>"             # <<<<<<<<<<<<<<
 * 
 * ################################################################################
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nuc_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_uc_length); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_kp_u__4);

  /* "pyrfc/_cyrfc.pyx":390
 * 
 *     def __repr__(self):
 *         return f"<TypeDescription '{self.name}' with {len(self.fields)} " \             # <<<<<<<<<<<<<<
 *             f"fields (n/uclength={self.nuc_length}/{self.uc_length})>"
 * 
 */
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 9, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":389
 *         })
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"<TypeDescription '{self.name}' with {len(self.fields)} " \
 *             f"fields (n/uclength={self.nuc_length}/{self.uc_length})>"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrfc._cyrfc.TypeDescription.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":421
 * 
 *     """
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.name = name
 *         self.parameters = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_19FunctionDescription_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_19FunctionDescription_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_19FunctionDescription_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_19FunctionDescription_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_name = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 421, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 421, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_name = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 421, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.FunctionDescription.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_19FunctionDescription___init__(__pyx_self, __pyx_v_self, __pyx_v_name);

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

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

  /* "pyrfc/_cyrfc.pyx":422
 *     """
 *     def __init__(self, name):
 *         self.name = name             # <<<<<<<<<<<<<<
 *         self.parameters = []
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 422, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":423
 *     def __init__(self, name):
 *         self.name = name
 *         self.parameters = []             # <<<<<<<<<<<<<<
 * 
 *     def add_parameter(self, name, parameter_type, direction, nuc_length,
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_parameters, __pyx_t_1) < 0) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":421
 * 
 *     """
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.name = name
 *         self.parameters = []
 */

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

/* "pyrfc/_cyrfc.pyx":425
 *         self.parameters = []
 * 
 *     def add_parameter(self, name, parameter_type, direction, nuc_length,             # <<<<<<<<<<<<<<
 *                       uc_length, decimals=0, default_value="", parameter_text="",
 *                       optional=False, type_description=None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_19FunctionDescription_3add_parameter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_19FunctionDescription_2add_parameter[] = " Adds a parameter to the function description.\n\n        :param name: Parameter name\n        :type name: string (30)\n        :param parameter_type: RfcFieldType enum name\n        :type parameter_type: string\n        :param direction: RfcParameterDirection enum name\n        :type direction: string\n        :param nuc_length: NUC length\n        :type nuc_length: int\n        :param uc_length: UC length\n        :type uc_length: int\n        :param decimals: Decimals (default=0)\n        :type decimals: int\n        :param default_value: Default value (default=\"\")\n        :type default_value: string (30)\n        :param parameter_text: Parameter text (default=\"\")\n        :type parameter_text: string (79)\n        :param optional: Is the parameter optional (default=False)\n        :type optional: bool\n        :param type_description: An object of class TypeDescription or None (default=None)\n        :type type_description: object of class TypeDescription\n        ";
static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_19FunctionDescription_3add_parameter = {"add_parameter", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_19FunctionDescription_3add_parameter, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_19FunctionDescription_2add_parameter};
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_19FunctionDescription_3add_parameter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_parameter_type = 0;
  PyObject *__pyx_v_direction = 0;
  PyObject *__pyx_v_nuc_length = 0;
  PyObject *__pyx_v_uc_length = 0;
  PyObject *__pyx_v_decimals = 0;
  PyObject *__pyx_v_default_value = 0;
  PyObject *__pyx_v_parameter_text = 0;
  PyObject *__pyx_v_optional = 0;
  PyObject *__pyx_v_type_description = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_parameter (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name,&__pyx_n_s_parameter_type,&__pyx_n_s_direction,&__pyx_n_s_nuc_length,&__pyx_n_s_uc_length,&__pyx_n_s_decimals,&__pyx_n_s_default_value,&__pyx_n_s_parameter_text,&__pyx_n_s_optional,&__pyx_n_s_type_description,0};
    PyObject* values[11] = {0,0,0,0,0,0,0,0,0,0,0};
    values[6] = ((PyObject *)((PyObject *)__pyx_int_0));
    values[7] = ((PyObject *)((PyObject*)__pyx_kp_u__5));
    values[8] = ((PyObject *)((PyObject*)__pyx_kp_u__5));

    /* "pyrfc/_cyrfc.pyx":427
 *     def add_parameter(self, name, parameter_type, direction, nuc_length,
 *                       uc_length, decimals=0, default_value="", parameter_text="",
 *                       optional=False, type_description=None):             # <<<<<<<<<<<<<<
 *         """ Adds a parameter to the function description.
 * 
 */
    values[9] = ((PyObject *)((PyObject *)Py_False));
    values[10] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_parameter", 0, 6, 11, 1); __PYX_ERR(0, 425, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_parameter_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_parameter", 0, 6, 11, 2); __PYX_ERR(0, 425, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_direction)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_parameter", 0, 6, 11, 3); __PYX_ERR(0, 425, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nuc_length)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_parameter", 0, 6, 11, 4); __PYX_ERR(0, 425, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_uc_length)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_parameter", 0, 6, 11, 5); __PYX_ERR(0, 425, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_decimals);
          if (value) { values[6] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default_value);
          if (value) { values[7] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_parameter_text);
          if (value) { values[8] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_optional);
          if (value) { values[9] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 10:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_type_description);
          if (value) { values[10] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_parameter") < 0)) __PYX_ERR(0, 425, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_name = values[1];
    __pyx_v_parameter_type = values[2];
    __pyx_v_direction = values[3];
    __pyx_v_nuc_length = values[4];
    __pyx_v_uc_length = values[5];
    __pyx_v_decimals = values[6];
    __pyx_v_default_value = values[7];
    __pyx_v_parameter_text = values[8];
    __pyx_v_optional = values[9];
    __pyx_v_type_description = values[10];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_parameter", 0, 6, 11, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 425, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.FunctionDescription.add_parameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_19FunctionDescription_2add_parameter(__pyx_self, __pyx_v_self, __pyx_v_name, __pyx_v_parameter_type, __pyx_v_direction, __pyx_v_nuc_length, __pyx_v_uc_length, __pyx_v_decimals, __pyx_v_default_value, __pyx_v_parameter_text, __pyx_v_optional, __pyx_v_type_description);

  /* "pyrfc/_cyrfc.pyx":425
 *         self.parameters = []
 * 
 *     def add_parameter(self, name, parameter_type, direction, nuc_length,             # <<<<<<<<<<<<<<
 *                       uc_length, decimals=0, default_value="", parameter_text="",
 *                       optional=False, type_description=None):
 */

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_19FunctionDescription_2add_parameter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_parameter_type, PyObject *__pyx_v_direction, PyObject *__pyx_v_nuc_length, PyObject *__pyx_v_uc_length, PyObject *__pyx_v_decimals, PyObject *__pyx_v_default_value, PyObject *__pyx_v_parameter_text, PyObject *__pyx_v_optional, PyObject *__pyx_v_type_description) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_UCS4 __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_parameter", 0);

  /* "pyrfc/_cyrfc.pyx":451
 *         :type type_description: object of class TypeDescription
 *         """
 *         if len(name)<1 or len(name)>30:             # <<<<<<<<<<<<<<
 *             raise TypeError(f"field 'name' (string) {name} should be from 1-30 chars.")
 *         if parameter_type not in enum_names(RfcFieldType):
 */
  __pyx_t_2 = PyObject_Length(__pyx_v_name); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 451, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_2 < 1) != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = PyObject_Length(__pyx_v_name); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 451, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_2 > 30) != 0);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":452
 *         """
 *         if len(name)<1 or len(name)>30:
 *             raise TypeError(f"field 'name' (string) {name} should be from 1-30 chars.")             # <<<<<<<<<<<<<<
 *         if parameter_type not in enum_names(RfcFieldType):
 *             raise TypeError(f"'parameter_type' (string) '{parameter_type}' must be in {enum_names(RfcFieldType)}")
 */
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = 0;
    __pyx_t_5 = 127;
    __Pyx_INCREF(__pyx_kp_u_field_name_string_2);
    __pyx_t_2 += 22;
    __Pyx_GIVEREF(__pyx_kp_u_field_name_string_2);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_field_name_string_2);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
    __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u_should_be_from_1_30_chars_2);
    __pyx_t_2 += 27;
    __Pyx_GIVEREF(__pyx_kp_u_should_be_from_1_30_chars_2);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_should_be_from_1_30_chars_2);
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 452, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":451
 *         :type type_description: object of class TypeDescription
 *         """
 *         if len(name)<1 or len(name)>30:             # <<<<<<<<<<<<<<
 *             raise TypeError(f"field 'name' (string) {name} should be from 1-30 chars.")
 *         if parameter_type not in enum_names(RfcFieldType):
 */
  }

  /* "pyrfc/_cyrfc.pyx":453
 *         if len(name)<1 or len(name)>30:
 *             raise TypeError(f"field 'name' (string) {name} should be from 1-30 chars.")
 *         if parameter_type not in enum_names(RfcFieldType):             # <<<<<<<<<<<<<<
 *             raise TypeError(f"'parameter_type' (string) '{parameter_type}' must be in {enum_names(RfcFieldType)}")
 *         if direction not in enum_names(RfcParameterDirection):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_enum_names); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_RfcFieldType); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_parameter_type, __pyx_t_4, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__pyx_t_1 != 0);
  if (unlikely(__pyx_t_3)) {

    /* "pyrfc/_cyrfc.pyx":454
 *             raise TypeError(f"field 'name' (string) {name} should be from 1-30 chars.")
 *         if parameter_type not in enum_names(RfcFieldType):
 *             raise TypeError(f"'parameter_type' (string) '{parameter_type}' must be in {enum_names(RfcFieldType)}")             # <<<<<<<<<<<<<<
 *         if direction not in enum_names(RfcParameterDirection):
 *             raise TypeError(f"'direction' (string) '{direction}' must be in '{enum_names(RfcParameterDirection)}'")
 */
    __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = 0;
    __pyx_t_5 = 127;
    __Pyx_INCREF(__pyx_kp_u_parameter_type_string);
    __pyx_t_2 += 27;
    __Pyx_GIVEREF(__pyx_kp_u_parameter_type_string);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_parameter_type_string);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_parameter_type, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
    __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u_must_be_in);
    __pyx_t_2 += 13;
    __Pyx_GIVEREF(__pyx_kp_u_must_be_in);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_must_be_in);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_enum_names); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_RfcFieldType); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_5;
    __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 454, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":453
 *         if len(name)<1 or len(name)>30:
 *             raise TypeError(f"field 'name' (string) {name} should be from 1-30 chars.")
 *         if parameter_type not in enum_names(RfcFieldType):             # <<<<<<<<<<<<<<
 *             raise TypeError(f"'parameter_type' (string) '{parameter_type}' must be in {enum_names(RfcFieldType)}")
 *         if direction not in enum_names(RfcParameterDirection):
 */
  }

  /* "pyrfc/_cyrfc.pyx":455
 *         if parameter_type not in enum_names(RfcFieldType):
 *             raise TypeError(f"'parameter_type' (string) '{parameter_type}' must be in {enum_names(RfcFieldType)}")
 *         if direction not in enum_names(RfcParameterDirection):             # <<<<<<<<<<<<<<
 *             raise TypeError(f"'direction' (string) '{direction}' must be in '{enum_names(RfcParameterDirection)}'")
 *         if len(default_value)>30:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_enum_names); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_RfcParameterDirection); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_direction, __pyx_t_4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 455, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (__pyx_t_3 != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":456
 *             raise TypeError(f"'parameter_type' (string) '{parameter_type}' must be in {enum_names(RfcFieldType)}")
 *         if direction not in enum_names(RfcParameterDirection):
 *             raise TypeError(f"'direction' (string) '{direction}' must be in '{enum_names(RfcParameterDirection)}'")             # <<<<<<<<<<<<<<
 *         if len(default_value)>30:
 *             raise TypeError(f"'default_value' (string) '{default_value}' must not exceed 30 chars.")
 */
    __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = 0;
    __pyx_t_5 = 127;
    __Pyx_INCREF(__pyx_kp_u_direction_string);
    __pyx_t_2 += 22;
    __Pyx_GIVEREF(__pyx_kp_u_direction_string);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_direction_string);
    __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_direction, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_5;
    __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_kp_u_must_be_in_2);
    __pyx_t_2 += 14;
    __Pyx_GIVEREF(__pyx_kp_u_must_be_in_2);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_must_be_in_2);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_enum_names); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_RfcParameterDirection); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
    __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u__6);
    __pyx_t_2 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__6);
    PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_u__6);
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 456, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":455
 *         if parameter_type not in enum_names(RfcFieldType):
 *             raise TypeError(f"'parameter_type' (string) '{parameter_type}' must be in {enum_names(RfcFieldType)}")
 *         if direction not in enum_names(RfcParameterDirection):             # <<<<<<<<<<<<<<
 *             raise TypeError(f"'direction' (string) '{direction}' must be in '{enum_names(RfcParameterDirection)}'")
 *         if len(default_value)>30:
 */
  }

  /* "pyrfc/_cyrfc.pyx":457
 *         if direction not in enum_names(RfcParameterDirection):
 *             raise TypeError(f"'direction' (string) '{direction}' must be in '{enum_names(RfcParameterDirection)}'")
 *         if len(default_value)>30:             # <<<<<<<<<<<<<<
 *             raise TypeError(f"'default_value' (string) '{default_value}' must not exceed 30 chars.")
 *         if len(parameter_text)>79:
 */
  __pyx_t_2 = PyObject_Length(__pyx_v_default_value); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 457, __pyx_L1_error)
  __pyx_t_1 = ((__pyx_t_2 > 30) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":458
 *             raise TypeError(f"'direction' (string) '{direction}' must be in '{enum_names(RfcParameterDirection)}'")
 *         if len(default_value)>30:
 *             raise TypeError(f"'default_value' (string) '{default_value}' must not exceed 30 chars.")             # <<<<<<<<<<<<<<
 *         if len(parameter_text)>79:
 *             raise TypeError("'parameter_text' (string) '{parameter_text}' must not exceed 79 chars.")
 */
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = 0;
    __pyx_t_5 = 127;
    __Pyx_INCREF(__pyx_kp_u_default_value_string);
    __pyx_t_2 += 26;
    __Pyx_GIVEREF(__pyx_kp_u_default_value_string);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_default_value_string);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_default_value, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
    __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u_must_not_exceed_30_chars);
    __pyx_t_2 += 27;
    __Pyx_GIVEREF(__pyx_kp_u_must_not_exceed_30_chars);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_must_not_exceed_30_chars);
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 458, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":457
 *         if direction not in enum_names(RfcParameterDirection):
 *             raise TypeError(f"'direction' (string) '{direction}' must be in '{enum_names(RfcParameterDirection)}'")
 *         if len(default_value)>30:             # <<<<<<<<<<<<<<
 *             raise TypeError(f"'default_value' (string) '{default_value}' must not exceed 30 chars.")
 *         if len(parameter_text)>79:
 */
  }

  /* "pyrfc/_cyrfc.pyx":459
 *         if len(default_value)>30:
 *             raise TypeError(f"'default_value' (string) '{default_value}' must not exceed 30 chars.")
 *         if len(parameter_text)>79:             # <<<<<<<<<<<<<<
 *             raise TypeError("'parameter_text' (string) '{parameter_text}' must not exceed 79 chars.")
 *         self.parameters.append({
 */
  __pyx_t_2 = PyObject_Length(__pyx_v_parameter_text); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 459, __pyx_L1_error)
  __pyx_t_1 = ((__pyx_t_2 > 79) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":460
 *             raise TypeError(f"'default_value' (string) '{default_value}' must not exceed 30 chars.")
 *         if len(parameter_text)>79:
 *             raise TypeError("'parameter_text' (string) '{parameter_text}' must not exceed 79 chars.")             # <<<<<<<<<<<<<<
 *         self.parameters.append({
 *             'name': name,
 */
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 460, __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, 460, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":459
 *         if len(default_value)>30:
 *             raise TypeError(f"'default_value' (string) '{default_value}' must not exceed 30 chars.")
 *         if len(parameter_text)>79:             # <<<<<<<<<<<<<<
 *             raise TypeError("'parameter_text' (string) '{parameter_text}' must not exceed 79 chars.")
 *         self.parameters.append({
 */
  }

  /* "pyrfc/_cyrfc.pyx":461
 *         if len(parameter_text)>79:
 *             raise TypeError("'parameter_text' (string) '{parameter_text}' must not exceed 79 chars.")
 *         self.parameters.append({             # <<<<<<<<<<<<<<
 *             'name': name,
 *             'parameter_type': parameter_type,
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parameters); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "pyrfc/_cyrfc.pyx":462
 *             raise TypeError("'parameter_text' (string) '{parameter_text}' must not exceed 79 chars.")
 *         self.parameters.append({
 *             'name': name,             # <<<<<<<<<<<<<<
 *             'parameter_type': parameter_type,
 *             'direction': direction,
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_name, __pyx_v_name) < 0) __PYX_ERR(0, 462, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":463
 *         self.parameters.append({
 *             'name': name,
 *             'parameter_type': parameter_type,             # <<<<<<<<<<<<<<
 *             'direction': direction,
 *             'nuc_length': nuc_length,
 */
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_parameter_type, __pyx_v_parameter_type) < 0) __PYX_ERR(0, 462, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":464
 *             'name': name,
 *             'parameter_type': parameter_type,
 *             'direction': direction,             # <<<<<<<<<<<<<<
 *             'nuc_length': nuc_length,
 *             'uc_length': uc_length,
 */
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_direction, __pyx_v_direction) < 0) __PYX_ERR(0, 462, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":465
 *             'parameter_type': parameter_type,
 *             'direction': direction,
 *             'nuc_length': nuc_length,             # <<<<<<<<<<<<<<
 *             'uc_length': uc_length,
 *             'decimals': decimals,
 */
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_nuc_length, __pyx_v_nuc_length) < 0) __PYX_ERR(0, 462, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":466
 *             'direction': direction,
 *             'nuc_length': nuc_length,
 *             'uc_length': uc_length,             # <<<<<<<<<<<<<<
 *             'decimals': decimals,
 *             'default_value': default_value,
 */
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_uc_length, __pyx_v_uc_length) < 0) __PYX_ERR(0, 462, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":467
 *             'nuc_length': nuc_length,
 *             'uc_length': uc_length,
 *             'decimals': decimals,             # <<<<<<<<<<<<<<
 *             'default_value': default_value,
 *             'parameter_text': parameter_text,
 */
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_decimals, __pyx_v_decimals) < 0) __PYX_ERR(0, 462, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":468
 *             'uc_length': uc_length,
 *             'decimals': decimals,
 *             'default_value': default_value,             # <<<<<<<<<<<<<<
 *             'parameter_text': parameter_text,
 *             'optional': optional,
 */
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_default_value, __pyx_v_default_value) < 0) __PYX_ERR(0, 462, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":469
 *             'decimals': decimals,
 *             'default_value': default_value,
 *             'parameter_text': parameter_text,             # <<<<<<<<<<<<<<
 *             'optional': optional,
 *             'type_description': type_description
 */
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_parameter_text, __pyx_v_parameter_text) < 0) __PYX_ERR(0, 462, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":470
 *             'default_value': default_value,
 *             'parameter_text': parameter_text,
 *             'optional': optional,             # <<<<<<<<<<<<<<
 *             'type_description': type_description
 *         })
 */
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_optional, __pyx_v_optional) < 0) __PYX_ERR(0, 462, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":471
 *             'parameter_text': parameter_text,
 *             'optional': optional,
 *             'type_description': type_description             # <<<<<<<<<<<<<<
 *         })
 * 
 */
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_type_description, __pyx_v_type_description) < 0) __PYX_ERR(0, 462, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":461
 *         if len(parameter_text)>79:
 *             raise TypeError("'parameter_text' (string) '{parameter_text}' must not exceed 79 chars.")
 *         self.parameters.append({             # <<<<<<<<<<<<<<
 *             'name': name,
 *             'parameter_type': parameter_type,
 */
  __pyx_t_10 = __Pyx_PyObject_Append(__pyx_t_4, __pyx_t_6); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 461, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyrfc/_cyrfc.pyx":425
 *         self.parameters = []
 * 
 *     def add_parameter(self, name, parameter_type, direction, nuc_length,             # <<<<<<<<<<<<<<
 *                       uc_length, decimals=0, default_value="", parameter_text="",
 *                       optional=False, type_description=None):
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrfc._cyrfc.FunctionDescription.add_parameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":474
 *         })
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"<FunctionDescription '{self.name}' with {len(self.parameters)} params>"
 * 
 */

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

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_19FunctionDescription_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "pyrfc/_cyrfc.pyx":475
 * 
 *     def __repr__(self):
 *         return f"<FunctionDescription '{self.name}' with {len(self.parameters)} params>"             # <<<<<<<<<<<<<<
 * 
 * # NOTES ON ERROR HANDLING
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_FunctionDescription);
  __pyx_t_2 += 22;
  __Pyx_GIVEREF(__pyx_kp_u_FunctionDescription);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_FunctionDescription);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u_with);
  __pyx_t_2 += 7;
  __Pyx_GIVEREF(__pyx_kp_u_with);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_with);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parameters); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_6, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u_params);
  __pyx_t_2 += 8;
  __Pyx_GIVEREF(__pyx_kp_u_params);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_params);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":474
 *         })
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"<FunctionDescription '{self.name}' with {len(self.parameters)} params>"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrfc._cyrfc.FunctionDescription.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":554
 * 
 *     @property
 *     def version(self):             # <<<<<<<<<<<<<<
 *         """Get SAP NW RFC SDK and PyRFC binding versions
 *         :returns: SAP NW RFC SDK major, minor, patch level and PyRFC binding version
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_7version_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_7version_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_7version___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_7version___get__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) {
  unsigned int __pyx_v_major;
  unsigned int __pyx_v_minor;
  unsigned int __pyx_v_patchlevel;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrfc/_cyrfc.pyx":558
 *         :returns: SAP NW RFC SDK major, minor, patch level and PyRFC binding version
 *         """
 *         cdef unsigned major = 0             # <<<<<<<<<<<<<<
 *         cdef unsigned minor = 0
 *         cdef unsigned patchlevel = 0
 */
  __pyx_v_major = 0;

  /* "pyrfc/_cyrfc.pyx":559
 *         """
 *         cdef unsigned major = 0
 *         cdef unsigned minor = 0             # <<<<<<<<<<<<<<
 *         cdef unsigned patchlevel = 0
 *         RfcGetVersion(&major, &minor, &patchlevel)
 */
  __pyx_v_minor = 0;

  /* "pyrfc/_cyrfc.pyx":560
 *         cdef unsigned major = 0
 *         cdef unsigned minor = 0
 *         cdef unsigned patchlevel = 0             # <<<<<<<<<<<<<<
 *         RfcGetVersion(&major, &minor, &patchlevel)
 *         return {'major': major, 'minor': minor, 'patchLevel': patchlevel, 'platform': platform}
 */
  __pyx_v_patchlevel = 0;

  /* "pyrfc/_cyrfc.pyx":561
 *         cdef unsigned minor = 0
 *         cdef unsigned patchlevel = 0
 *         RfcGetVersion(&major, &minor, &patchlevel)             # <<<<<<<<<<<<<<
 *         return {'major': major, 'minor': minor, 'patchLevel': patchlevel, 'platform': platform}
 * 
 */
  (void)(RfcGetVersion((&__pyx_v_major), (&__pyx_v_minor), (&__pyx_v_patchlevel)));

  /* "pyrfc/_cyrfc.pyx":562
 *         cdef unsigned patchlevel = 0
 *         RfcGetVersion(&major, &minor, &patchlevel)
 *         return {'major': major, 'minor': minor, 'patchLevel': patchlevel, 'platform': platform}             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_major); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_major, __pyx_t_2) < 0) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_minor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_minor, __pyx_t_2) < 0) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_patchlevel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_patchLevel, __pyx_t_2) < 0) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_platform); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_platform, __pyx_t_2) < 0) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":554
 * 
 *     @property
 *     def version(self):             # <<<<<<<<<<<<<<
 *         """Get SAP NW RFC SDK and PyRFC binding versions
 *         :returns: SAP NW RFC SDK major, minor, patch level and PyRFC binding version
 */

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

/* "pyrfc/_cyrfc.pyx":565
 * 
 *     @property
 *     def options(self):             # <<<<<<<<<<<<<<
 *         """Client connection configuration
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_7options_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_7options_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_7options___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

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

  /* "pyrfc/_cyrfc.pyx":572
 *         :type: dict
 *         """
 *         return self.__config             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->__config);
  __pyx_r = __pyx_v_self->__config;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":565
 * 
 *     @property
 *     def options(self):             # <<<<<<<<<<<<<<
 *         """Client connection configuration
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":575
 * 
 *     @property
 *     def handle(self):             # <<<<<<<<<<<<<<
 *         """Get client connection handle
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_6handle_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_6handle_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_6handle___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

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

  /* "pyrfc/_cyrfc.pyx":581
 *         :type: uintptr_t
 *         """
 *         return <uintptr_t>self._handle if self._handle is not NULL else None             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  if (((__pyx_v_self->_handle != NULL) != 0)) {
    __pyx_t_2 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_self->_handle)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":575
 * 
 *     @property
 *     def handle(self):             # <<<<<<<<<<<<<<
 *         """Get client connection handle
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":584
 * 
 *     @property
 *     def alive(self):             # <<<<<<<<<<<<<<
 *         """Conection alive property
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_5alive_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_5alive_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_5alive___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_5alive___get__(struct __pyx_obj_5pyrfc_6_cyrfc_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);

  /* "pyrfc/_cyrfc.pyx":590
 *         :type: boolean
 *         """
 *         return self._handle != NULL             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, config=None, **params):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->_handle != NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":584
 * 
 *     @property
 *     def alive(self):             # <<<<<<<<<<<<<<
 *         """Conection alive property
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":592
 *         return self._handle != NULL
 * 
 *     def __init__(self, config=None, **params):             # <<<<<<<<<<<<<<
 *         # check and set connection configuration
 *         config = config or {}
 */

/* Python wrapper */
static int __pyx_pw_5pyrfc_6_cyrfc_10Connection_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5pyrfc_6_cyrfc_10Connection_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_config = 0;
  PyObject *__pyx_v_params = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_params = PyDict_New(); if (unlikely(!__pyx_v_params)) return -1;
  __Pyx_GOTREF(__pyx_v_params);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_config,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_config);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_params, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 592, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_config = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 592, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_params); __pyx_v_params = 0;
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection___init__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_config, __pyx_v_params);

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

static int __pyx_pf_5pyrfc_6_cyrfc_10Connection___init__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_config, PyObject *__pyx_v_params) {
  PyObject *__pyx_v_k = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  unsigned int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_config);

  /* "pyrfc/_cyrfc.pyx":594
 *     def __init__(self, config=None, **params):
 *         # check and set connection configuration
 *         config = config or {}             # <<<<<<<<<<<<<<
 *         for k in config:
 *             if k not in['dtime', 'return_import_params', 'rstrip', 'timeout']:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_config); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 594, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __Pyx_INCREF(__pyx_v_config);
    __pyx_t_1 = __pyx_v_config;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_config, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":595
 *         # check and set connection configuration
 *         config = config or {}
 *         for k in config:             # <<<<<<<<<<<<<<
 *             if k not in['dtime', 'return_import_params', 'rstrip', 'timeout']:
 *                 raise RFCError(f"Connection configuration option '{k}' is not supported")
 */
  if (likely(PyList_CheckExact(__pyx_v_config)) || PyTuple_CheckExact(__pyx_v_config)) {
    __pyx_t_1 = __pyx_v_config; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_config); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 595, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 595, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 595, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 595, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 595, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_5(__pyx_t_1);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 595, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":596
 *         config = config or {}
 *         for k in config:
 *             if k not in['dtime', 'return_import_params', 'rstrip', 'timeout']:             # <<<<<<<<<<<<<<
 *                 raise RFCError(f"Connection configuration option '{k}' is not supported")
 *         self.__config = {}
 */
    __Pyx_INCREF(__pyx_v_k);
    __pyx_t_3 = __pyx_v_k;
    __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_dtime, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 596, __pyx_L1_error)
    if (__pyx_t_6) {
    } else {
      __pyx_t_2 = __pyx_t_6;
      goto __pyx_L8_bool_binop_done;
    }
    __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_return_import_params, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 596, __pyx_L1_error)
    if (__pyx_t_6) {
    } else {
      __pyx_t_2 = __pyx_t_6;
      goto __pyx_L8_bool_binop_done;
    }
    __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_rstrip, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 596, __pyx_L1_error)
    if (__pyx_t_6) {
    } else {
      __pyx_t_2 = __pyx_t_6;
      goto __pyx_L8_bool_binop_done;
    }
    __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_timeout, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 596, __pyx_L1_error)
    __pyx_t_2 = __pyx_t_6;
    __pyx_L8_bool_binop_done:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = (__pyx_t_2 != 0);
    if (unlikely(__pyx_t_6)) {

      /* "pyrfc/_cyrfc.pyx":597
 *         for k in config:
 *             if k not in['dtime', 'return_import_params', 'rstrip', 'timeout']:
 *                 raise RFCError(f"Connection configuration option '{k}' is not supported")             # <<<<<<<<<<<<<<
 *         self.__config = {}
 *         self.__config['dtime'] = config.get('dtime', False)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_Connection_configuration_option);
      __pyx_t_9 += 33;
      __Pyx_GIVEREF(__pyx_kp_u_Connection_configuration_option);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_Connection_configuration_option);
      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_k, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_INCREF(__pyx_kp_u_is_not_supported);
      __pyx_t_9 += 18;
      __Pyx_GIVEREF(__pyx_kp_u_is_not_supported);
      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u_is_not_supported);
      __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_11);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 597, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":596
 *         config = config or {}
 *         for k in config:
 *             if k not in['dtime', 'return_import_params', 'rstrip', 'timeout']:             # <<<<<<<<<<<<<<
 *                 raise RFCError(f"Connection configuration option '{k}' is not supported")
 *         self.__config = {}
 */
    }

    /* "pyrfc/_cyrfc.pyx":595
 *         # check and set connection configuration
 *         config = config or {}
 *         for k in config:             # <<<<<<<<<<<<<<
 *             if k not in['dtime', 'return_import_params', 'rstrip', 'timeout']:
 *                 raise RFCError(f"Connection configuration option '{k}' is not supported")
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":598
 *             if k not in['dtime', 'return_import_params', 'rstrip', 'timeout']:
 *                 raise RFCError(f"Connection configuration option '{k}' is not supported")
 *         self.__config = {}             # <<<<<<<<<<<<<<
 *         self.__config['dtime'] = config.get('dtime', False)
 *         self.__config['return_import_params'] = config.get('return_import_params', False)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__config);
  __Pyx_DECREF(__pyx_v_self->__config);
  __pyx_v_self->__config = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":599
 *                 raise RFCError(f"Connection configuration option '{k}' is not supported")
 *         self.__config = {}
 *         self.__config['dtime'] = config.get('dtime', False)             # <<<<<<<<<<<<<<
 *         self.__config['return_import_params'] = config.get('return_import_params', False)
 *         self.__config['rstrip'] = config.get('rstrip', True)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_v_self->__config == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 599, __pyx_L1_error)
  }
  if (unlikely(PyDict_SetItem(__pyx_v_self->__config, __pyx_n_u_dtime, __pyx_t_3) < 0)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":600
 *         self.__config = {}
 *         self.__config['dtime'] = config.get('dtime', False)
 *         self.__config['return_import_params'] = config.get('return_import_params', False)             # <<<<<<<<<<<<<<
 *         self.__config['rstrip'] = config.get('rstrip', True)
 *         self.__config['timeout'] = config.get('timeout', None)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_v_self->__config == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 600, __pyx_L1_error)
  }
  if (unlikely(PyDict_SetItem(__pyx_v_self->__config, __pyx_n_u_return_import_params, __pyx_t_1) < 0)) __PYX_ERR(0, 600, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":601
 *         self.__config['dtime'] = config.get('dtime', False)
 *         self.__config['return_import_params'] = config.get('return_import_params', False)
 *         self.__config['rstrip'] = config.get('rstrip', True)             # <<<<<<<<<<<<<<
 *         self.__config['timeout'] = config.get('timeout', None)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_v_self->__config == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 601, __pyx_L1_error)
  }
  if (unlikely(PyDict_SetItem(__pyx_v_self->__config, __pyx_n_u_rstrip, __pyx_t_3) < 0)) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":602
 *         self.__config['return_import_params'] = config.get('return_import_params', False)
 *         self.__config['rstrip'] = config.get('rstrip', True)
 *         self.__config['timeout'] = config.get('timeout', None)             # <<<<<<<<<<<<<<
 * 
 *         # set internal configuration
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_v_self->__config == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 602, __pyx_L1_error)
  }
  if (unlikely(PyDict_SetItem(__pyx_v_self->__config, __pyx_n_u_timeout, __pyx_t_1) < 0)) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":605
 * 
 *         # set internal configuration
 *         self.__bconfig = 0             # <<<<<<<<<<<<<<
 *         if self.__config['dtime']:
 *             self.__bconfig |= _MASK_DTIME
 */
  __pyx_v_self->__pyx___bconfig = 0;

  /* "pyrfc/_cyrfc.pyx":606
 *         # set internal configuration
 *         self.__bconfig = 0
 *         if self.__config['dtime']:             # <<<<<<<<<<<<<<
 *             self.__bconfig |= _MASK_DTIME
 *         if self.__config['return_import_params']:
 */
  if (unlikely(__pyx_v_self->__config == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 606, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->__config, __pyx_n_u_dtime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {

    /* "pyrfc/_cyrfc.pyx":607
 *         self.__bconfig = 0
 *         if self.__config['dtime']:
 *             self.__bconfig |= _MASK_DTIME             # <<<<<<<<<<<<<<
 *         if self.__config['return_import_params']:
 *             self.__bconfig |= _MASK_RETURN_IMPORT_PARAMS
 */
    __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->__pyx___bconfig); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MASK_DTIME); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = PyNumber_InPlaceOr(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_t_7); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 607, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_self->__pyx___bconfig = __pyx_t_12;

    /* "pyrfc/_cyrfc.pyx":606
 *         # set internal configuration
 *         self.__bconfig = 0
 *         if self.__config['dtime']:             # <<<<<<<<<<<<<<
 *             self.__bconfig |= _MASK_DTIME
 *         if self.__config['return_import_params']:
 */
  }

  /* "pyrfc/_cyrfc.pyx":608
 *         if self.__config['dtime']:
 *             self.__bconfig |= _MASK_DTIME
 *         if self.__config['return_import_params']:             # <<<<<<<<<<<<<<
 *             self.__bconfig |= _MASK_RETURN_IMPORT_PARAMS
 *         if self.__config['rstrip']:
 */
  if (unlikely(__pyx_v_self->__config == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 608, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_self->__config, __pyx_n_u_return_import_params); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 608, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_6) {

    /* "pyrfc/_cyrfc.pyx":609
 *             self.__bconfig |= _MASK_DTIME
 *         if self.__config['return_import_params']:
 *             self.__bconfig |= _MASK_RETURN_IMPORT_PARAMS             # <<<<<<<<<<<<<<
 *         if self.__config['rstrip']:
 *             self.__bconfig |= _MASK_RSTRIP
 */
    __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->__pyx___bconfig); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MASK_RETURN_IMPORT_PARAMS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyNumber_InPlaceOr(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_t_1); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 609, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_self->__pyx___bconfig = __pyx_t_12;

    /* "pyrfc/_cyrfc.pyx":608
 *         if self.__config['dtime']:
 *             self.__bconfig |= _MASK_DTIME
 *         if self.__config['return_import_params']:             # <<<<<<<<<<<<<<
 *             self.__bconfig |= _MASK_RETURN_IMPORT_PARAMS
 *         if self.__config['rstrip']:
 */
  }

  /* "pyrfc/_cyrfc.pyx":610
 *         if self.__config['return_import_params']:
 *             self.__bconfig |= _MASK_RETURN_IMPORT_PARAMS
 *         if self.__config['rstrip']:             # <<<<<<<<<<<<<<
 *             self.__bconfig |= _MASK_RSTRIP
 * 
 */
  if (unlikely(__pyx_v_self->__config == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 610, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->__config, __pyx_n_u_rstrip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 610, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {

    /* "pyrfc/_cyrfc.pyx":611
 *             self.__bconfig |= _MASK_RETURN_IMPORT_PARAMS
 *         if self.__config['rstrip']:
 *             self.__bconfig |= _MASK_RSTRIP             # <<<<<<<<<<<<<<
 * 
 *         self._connection = ConnectionParameters(**params)
 */
    __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->__pyx___bconfig); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MASK_RSTRIP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = PyNumber_InPlaceOr(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_t_7); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 611, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_self->__pyx___bconfig = __pyx_t_12;

    /* "pyrfc/_cyrfc.pyx":610
 *         if self.__config['return_import_params']:
 *             self.__bconfig |= _MASK_RETURN_IMPORT_PARAMS
 *         if self.__config['rstrip']:             # <<<<<<<<<<<<<<
 *             self.__bconfig |= _MASK_RSTRIP
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":613
 *             self.__bconfig |= _MASK_RSTRIP
 * 
 *         self._connection = ConnectionParameters(**params)             # <<<<<<<<<<<<<<
 *         self._handle = NULL
 *         self.active_transaction = False
 */
  __pyx_t_7 = PyDict_Copy(__pyx_v_params); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters), __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_connection);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_connection));
  __pyx_v_self->_connection = ((struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":614
 * 
 *         self._connection = ConnectionParameters(**params)
 *         self._handle = NULL             # <<<<<<<<<<<<<<
 *         self.active_transaction = False
 *         self.active_unit = False
 */
  __pyx_v_self->_handle = NULL;

  /* "pyrfc/_cyrfc.pyx":615
 *         self._connection = ConnectionParameters(**params)
 *         self._handle = NULL
 *         self.active_transaction = False             # <<<<<<<<<<<<<<
 *         self.active_unit = False
 *         self._open()
 */
  __pyx_v_self->active_transaction = 0;

  /* "pyrfc/_cyrfc.pyx":616
 *         self._handle = NULL
 *         self.active_transaction = False
 *         self.active_unit = False             # <<<<<<<<<<<<<<
 *         self._open()
 * 
 */
  __pyx_v_self->active_unit = 0;

  /* "pyrfc/_cyrfc.pyx":617
 *         self.active_transaction = False
 *         self.active_unit = False
 *         self._open()             # <<<<<<<<<<<<<<
 * 
 *     def free(self):
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":592
 *         return self._handle != NULL
 * 
 *     def __init__(self, config=None, **params):             # <<<<<<<<<<<<<<
 *         # check and set connection configuration
 *         config = config or {}
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_config);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":619
 *         self._open()
 * 
 *     def free(self):             # <<<<<<<<<<<<<<
 *         """ Explicitly free connection parameters and close the connection.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_3free(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Connection_2free[] = " Explicitly free connection parameters and close the connection.\n\n        Note that this is usually required because the object destruction\n        can be delayed by the garbage collection and problems may occur\n        when too many connections are opened.\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_3free(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("free (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_2free(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_2free(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("free", 0);

  /* "pyrfc/_cyrfc.pyx":626
 *         when too many connections are opened.
 *         """
 *         self.__del__()             # <<<<<<<<<<<<<<
 * 
 *     def __del__(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_del); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":619
 *         self._open()
 * 
 *     def free(self):             # <<<<<<<<<<<<<<
 *         """ Explicitly free connection parameters and close the connection.
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":628
 *         self.__del__()
 * 
 *     def __del__(self):             # <<<<<<<<<<<<<<
 *         self._close()
 *         self._connection._free()
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_5__del__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_5__del__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_4__del__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_4__del__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);

  /* "pyrfc/_cyrfc.pyx":629
 * 
 *     def __del__(self):
 *         self._close()             # <<<<<<<<<<<<<<
 *         self._connection._free()
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":630
 *     def __del__(self):
 *         self._close()
 *         self._connection._free()             # <<<<<<<<<<<<<<
 * 
 *     def __enter__(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_connection), __pyx_n_s_free); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":628
 *         self.__del__()
 * 
 *     def __del__(self):             # <<<<<<<<<<<<<<
 *         self._close()
 *         self._connection._free()
 */

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

/* "pyrfc/_cyrfc.pyx":632
 *         self._connection._free()
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_7__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_7__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_6__enter__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_6__enter__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__enter__", 0);

  /* "pyrfc/_cyrfc.pyx":633
 * 
 *     def __enter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __exit__(self, type, value, traceback):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":632
 *         self._connection._free()
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":635
 *         return self
 * 
 *     def __exit__(self, type, value, traceback):             # <<<<<<<<<<<<<<
 *         # Although the _close() method is also called in the destructor, the
 *         # explicit call assures the immediate closing to the connection.
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_9__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_9__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_type = 0;
  CYTHON_UNUSED PyObject *__pyx_v_value = 0;
  CYTHON_UNUSED PyObject *__pyx_v_traceback = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_type,&__pyx_n_s_value,&__pyx_n_s_traceback,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); __PYX_ERR(0, 635, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traceback)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); __PYX_ERR(0, 635, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) __PYX_ERR(0, 635, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_type = values[0];
    __pyx_v_value = values[1];
    __pyx_v_traceback = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 635, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_8__exit__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_type, __pyx_v_value, __pyx_v_traceback);

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_8__exit__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_type, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_traceback) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__exit__", 0);

  /* "pyrfc/_cyrfc.pyx":638
 *         # Although the _close() method is also called in the destructor, the
 *         # explicit call assures the immediate closing to the connection.
 *         self._close()             # <<<<<<<<<<<<<<
 * 
 *     def open(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":635
 *         return self
 * 
 *     def __exit__(self, type, value, traceback):             # <<<<<<<<<<<<<<
 *         # Although the _close() method is also called in the destructor, the
 *         # explicit call assures the immediate closing to the connection.
 */

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

/* "pyrfc/_cyrfc.pyx":640
 *         self._close()
 * 
 *     def open(self):             # <<<<<<<<<<<<<<
 *         """ Open client the connection
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_11open(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Connection_10open[] = " Open client the connection\n\n        :raises: :exc:`~pyrfc.RFCError` or a subclass\n                 thereof if the connection cannot be opened.\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_11open(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("open (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_10open(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_10open(struct __pyx_obj_5pyrfc_6_cyrfc_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("open", 0);

  /* "pyrfc/_cyrfc.pyx":646
 *                  thereof if the connection cannot be opened.
 *         """
 *         self._open()             # <<<<<<<<<<<<<<
 * 
 *     def reopen(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":640
 *         self._close()
 * 
 *     def open(self):             # <<<<<<<<<<<<<<
 *         """ Open client the connection
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection.open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":648
 *         self._open()
 * 
 *     def reopen(self):             # <<<<<<<<<<<<<<
 *         """ Re-open client the connection
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_13reopen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Connection_12reopen[] = " Re-open client the connection\n\n        :raises: :exc:`~pyrfc.RFCError` or a subclass\n                 thereof if the connection cannot be re-opened.\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_13reopen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reopen (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_12reopen(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_12reopen(struct __pyx_obj_5pyrfc_6_cyrfc_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("reopen", 0);

  /* "pyrfc/_cyrfc.pyx":654
 *                  thereof if the connection cannot be re-opened.
 *         """
 *         self._reopen()             # <<<<<<<<<<<<<<
 * 
 *     def close(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_reopen(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":648
 *         self._open()
 * 
 *     def reopen(self):             # <<<<<<<<<<<<<<
 *         """ Re-open client the connection
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection.reopen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":656
 *         self._reopen()
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         """ Close the connection
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_15close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Connection_14close[] = " Close the connection\n\n        :raises: :exc:`~pyrfc.RFCError` or a subclass\n                 thereof if the connection cannot be closed cleanly.\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_15close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("close (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_14close(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_14close(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("close", 0);

  /* "pyrfc/_cyrfc.pyx":662
 *                  thereof if the connection cannot be closed cleanly.
 *         """
 *         self._close()             # <<<<<<<<<<<<<<
 * 
 *     def cancel(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":656
 *         self._reopen()
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         """ Close the connection
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":664
 *         self._close()
 * 
 *     def cancel(self):             # <<<<<<<<<<<<<<
 *         """ Cancels the ongoing RFC call using `~pyrfc.cancel_connection()` function
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_17cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Connection_16cancel[] = " Cancels the ongoing RFC call using `~pyrfc.cancel_connection()` function\n\n        :raises: :exc:`~pyrfc.RFCError` or a subclass\n                 thereof if the connection cannot be cancelled cleanly.\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_17cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cancel (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_16cancel(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_16cancel(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cancel", 0);

  /* "pyrfc/_cyrfc.pyx":670
 *                  thereof if the connection cannot be cancelled cleanly.
 *         """
 *         cancel_connection(self)             # <<<<<<<<<<<<<<
 * 
 *     def __bool__(self):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_cancel_connection); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self));
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":664
 *         self._close()
 * 
 *     def cancel(self):             # <<<<<<<<<<<<<<
 *         """ Cancels the ongoing RFC call using `~pyrfc.cancel_connection()` function
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":672
 *         cancel_connection(self)
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         return self.alive
 * 
 */

/* Python wrapper */
static int __pyx_pw_5pyrfc_6_cyrfc_10Connection_19__bool__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5pyrfc_6_cyrfc_10Connection_19__bool__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_18__bool__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

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

  /* "pyrfc/_cyrfc.pyx":673
 * 
 *     def __bool__(self):
 *         return self.alive             # <<<<<<<<<<<<<<
 * 
 *     cdef _reopen(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 673, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":672
 *         cancel_connection(self)
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         return self.alive
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":675
 *         return self.alive
 * 
 *     cdef _reopen(self):             # <<<<<<<<<<<<<<
 *         self._close()
 *         self._open()
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_10Connection__reopen(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_reopen", 0);

  /* "pyrfc/_cyrfc.pyx":676
 * 
 *     cdef _reopen(self):
 *         self._close()             # <<<<<<<<<<<<<<
 *         self._open()
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":677
 *     cdef _reopen(self):
 *         self._close()
 *         self._open()             # <<<<<<<<<<<<<<
 * 
 *     cdef _open(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":675
 *         return self.alive
 * 
 *     cdef _reopen(self):             # <<<<<<<<<<<<<<
 *         self._close()
 *         self._open()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection._reopen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":679
 *         self._open()
 * 
 *     cdef _open(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         with nogil:
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_10Connection__open(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) {
  RFC_ERROR_INFO __pyx_v_errorInfo;
  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("_open", 0);

  /* "pyrfc/_cyrfc.pyx":681
 *     cdef _open(self):
 *         cdef RFC_ERROR_INFO errorInfo
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self._handle = RfcOpenConnection(self._connection._params, self._connection._params_count, &errorInfo)
 *         if not self._handle:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "pyrfc/_cyrfc.pyx":682
 *         cdef RFC_ERROR_INFO errorInfo
 *         with nogil:
 *             self._handle = RfcOpenConnection(self._connection._params, self._connection._params_count, &errorInfo)             # <<<<<<<<<<<<<<
 *         if not self._handle:
 *             self._error(&errorInfo)
 */
        __pyx_v_self->_handle = RfcOpenConnection(__pyx_v_self->_connection->_params, __pyx_v_self->_connection->_params_count, (&__pyx_v_errorInfo));
      }

      /* "pyrfc/_cyrfc.pyx":681
 *     cdef _open(self):
 *         cdef RFC_ERROR_INFO errorInfo
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self._handle = RfcOpenConnection(self._connection._params, self._connection._params_count, &errorInfo)
 *         if not self._handle:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "pyrfc/_cyrfc.pyx":683
 *         with nogil:
 *             self._handle = RfcOpenConnection(self._connection._params, self._connection._params_count, &errorInfo)
 *         if not self._handle:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 * 
 */
  __pyx_t_1 = ((!(__pyx_v_self->_handle != 0)) != 0);
  if (__pyx_t_1) {

    /* "pyrfc/_cyrfc.pyx":684
 *             self._handle = RfcOpenConnection(self._connection._params, self._connection._params_count, &errorInfo)
 *         if not self._handle:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *     def _close(self):
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrfc/_cyrfc.pyx":683
 *         with nogil:
 *             self._handle = RfcOpenConnection(self._connection._params, self._connection._params_count, &errorInfo)
 *         if not self._handle:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":679
 *         self._open()
 * 
 *     cdef _open(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         with nogil:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":686
 *             self._error(&errorInfo)
 * 
 *     def _close(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_21_close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_21_close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_close (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_20_close(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_20_close(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  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("_close", 0);

  /* "pyrfc/_cyrfc.pyx":689
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 *         if self._handle != NULL:             # <<<<<<<<<<<<<<
 *             rc = RfcCloseConnection(self._handle, &errorInfo)
 *             self._handle = NULL
 */
  __pyx_t_1 = ((__pyx_v_self->_handle != NULL) != 0);
  if (__pyx_t_1) {

    /* "pyrfc/_cyrfc.pyx":690
 *         cdef RFC_ERROR_INFO errorInfo
 *         if self._handle != NULL:
 *             rc = RfcCloseConnection(self._handle, &errorInfo)             # <<<<<<<<<<<<<<
 *             self._handle = NULL
 *             if rc != RFC_OK:
 */
    __pyx_v_rc = RfcCloseConnection(__pyx_v_self->_handle, (&__pyx_v_errorInfo));

    /* "pyrfc/_cyrfc.pyx":691
 *         if self._handle != NULL:
 *             rc = RfcCloseConnection(self._handle, &errorInfo)
 *             self._handle = NULL             # <<<<<<<<<<<<<<
 *             if rc != RFC_OK:
 *                 self._error(&errorInfo)
 */
    __pyx_v_self->_handle = NULL;

    /* "pyrfc/_cyrfc.pyx":692
 *             rc = RfcCloseConnection(self._handle, &errorInfo)
 *             self._handle = NULL
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 self._error(&errorInfo)
 * 
 */
    __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
    if (__pyx_t_1) {

      /* "pyrfc/_cyrfc.pyx":693
 *             self._handle = NULL
 *             if rc != RFC_OK:
 *                 self._error(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *     cdef _error(self, RFC_ERROR_INFO* errorInfo):
 */
      __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 693, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrfc/_cyrfc.pyx":692
 *             rc = RfcCloseConnection(self._handle, &errorInfo)
 *             self._handle = NULL
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 self._error(&errorInfo)
 * 
 */
    }

    /* "pyrfc/_cyrfc.pyx":689
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 *         if self._handle != NULL:             # <<<<<<<<<<<<<<
 *             rc = RfcCloseConnection(self._handle, &errorInfo)
 *             self._handle = NULL
 */
  }

  /* "pyrfc/_cyrfc.pyx":686
 *             self._error(&errorInfo)
 * 
 *     def _close(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 */

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

/* "pyrfc/_cyrfc.pyx":695
 *                 self._error(&errorInfo)
 * 
 *     cdef _error(self, RFC_ERROR_INFO* errorInfo):             # <<<<<<<<<<<<<<
 *         """
 *         Error treatment of a connection.
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_10Connection__error(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, RFC_ERROR_INFO *__pyx_v_errorInfo) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_error", 0);

  /* "pyrfc/_cyrfc.pyx":710
 *         #    self.alive = False
 * 
 *         raise wrapError(errorInfo)             # <<<<<<<<<<<<<<
 * 
 *     def ping(self):
 */
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError(__pyx_v_errorInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 710, __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, 710, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":695
 *                 self._error(&errorInfo)
 * 
 *     cdef _error(self, RFC_ERROR_INFO* errorInfo):             # <<<<<<<<<<<<<<
 *         """
 *         Error treatment of a connection.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection._error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":712
 *         raise wrapError(errorInfo)
 * 
 *     def ping(self):             # <<<<<<<<<<<<<<
 *         """ Send a RFC Ping through the current connection
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_23ping(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Connection_22ping[] = " Send a RFC Ping through the current connection\n\n        Returns nothing.\n\n        :raises: :exc:`~pyrfc.RFCError` or a subclass\n                 thereof if the RFC Ping fails.\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_23ping(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ping (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_22ping(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_22ping(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  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("ping", 0);

  /* "pyrfc/_cyrfc.pyx":722
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 *         rc = RfcPing(self._handle, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 */
  __pyx_v_rc = RfcPing(__pyx_v_self->_handle, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":723
 *         cdef RFC_ERROR_INFO errorInfo
 *         rc = RfcPing(self._handle, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 * 
 */
  __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
  if (__pyx_t_1) {

    /* "pyrfc/_cyrfc.pyx":724
 *         rc = RfcPing(self._handle, &errorInfo)
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *     def reset_server_context(self):
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 724, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrfc/_cyrfc.pyx":723
 *         cdef RFC_ERROR_INFO errorInfo
 *         rc = RfcPing(self._handle, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":712
 *         raise wrapError(errorInfo)
 * 
 *     def ping(self):             # <<<<<<<<<<<<<<
 *         """ Send a RFC Ping through the current connection
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":726
 *             self._error(&errorInfo)
 * 
 *     def reset_server_context(self):             # <<<<<<<<<<<<<<
 *         """ Resets the SAP server context ("user context / ABAP session context")
 *         associated with the given client connection, but does not close the connection
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_25reset_server_context(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Connection_24reset_server_context[] = " Resets the SAP server context (\"user context / ABAP session context\")\n        associated with the given client connection, but does not close the connection\n\n        :raises: :exc:`~pyrfc.RFCError` or a subclass\n                 thereof in case resetting the server context fails.\n                 (Better close the connection in that case.).\n                 :exc:`sapnwrf2.CommunicationError` if no conversion\n                 was found for the\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_25reset_server_context(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset_server_context (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_24reset_server_context(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_24reset_server_context(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  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("reset_server_context", 0);

  /* "pyrfc/_cyrfc.pyx":739
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 *         rc = RfcResetServerContext(self._handle, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 */
  __pyx_v_rc = RfcResetServerContext(__pyx_v_self->_handle, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":740
 *         cdef RFC_ERROR_INFO errorInfo
 *         rc = RfcResetServerContext(self._handle, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 * 
 */
  __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
  if (__pyx_t_1) {

    /* "pyrfc/_cyrfc.pyx":741
 *         rc = RfcResetServerContext(self._handle, &errorInfo)
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *     def get_connection_attributes(self):
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrfc/_cyrfc.pyx":740
 *         cdef RFC_ERROR_INFO errorInfo
 *         rc = RfcResetServerContext(self._handle, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":726
 *             self._error(&errorInfo)
 * 
 *     def reset_server_context(self):             # <<<<<<<<<<<<<<
 *         """ Resets the SAP server context ("user context / ABAP session context")
 *         associated with the given client connection, but does not close the connection
 */

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

/* "pyrfc/_cyrfc.pyx":743
 *             self._error(&errorInfo)
 * 
 *     def get_connection_attributes(self):             # <<<<<<<<<<<<<<
 *         """ Get connection details
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_27get_connection_attributes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Connection_26get_connection_attributes[] = " Get connection details\n\n        :returns: Mapping of connection information keys:\n\n            * active_unit: True if there is a filled and submitted unit w/o being confirmed or destroyed.\n            * dest: RFC destination\n            * host: Own host name\n            * partnerHost: Partner host name\n            * sysNumber: R/3 system number\n            * sysId: R/3 system ID\n            * client: Client (\"Mandant\")\n            * user: User\n            * language: Language\n            * trace: Trace level (0-3)\n            * isoLanguage: 2-byte ISO-Language\n            * codepage: Own code page\n            * partnerCodepage: Partner code page\n            * rfcRole: C/S: RFC Client / RFC Server\n            * type: 2/3/E/R: R/2,R/3,Ext,Reg.Ext\n            * partnerType: 2/3/E/R: R/2,R/3,Ext,Reg.Ext\n            * rel: My system release\n            * partnerRe: Partner system release\n            * kernelRel: Partner kernel release\n            * cpicConvId: CPI-C Conversation ID\n            * progName: Name calling APAB program (report, module pool)\n            * partnerBytesPerChar: Bytes per char in backend codepage.\n            * partnerSystemCodepage: Partner system code page\n            * reserved: Reserved for later use\n\n            Note: all values, except ``active_unit`` are right stripped string values.\n\n        :raises: :exc:`~pyrfc.RFCError` or a subclass thereof if the RFC call fails.\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_27get_connection_attributes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_connection_attributes (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_26get_connection_attributes(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_26get_connection_attributes(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_ATTRIBUTES __pyx_v_attributes;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_connection_attributes", 0);

  /* "pyrfc/_cyrfc.pyx":781
 *         cdef RFC_ATTRIBUTES attributes
 * 
 *         result = {}             # <<<<<<<<<<<<<<
 * 
 *         if self.is_valid():
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":783
 *         result = {}
 * 
 *         if self.is_valid():             # <<<<<<<<<<<<<<
 *             rc = RfcGetConnectionAttributes(self._handle, &attributes, &errorInfo)
 *             if rc != RFC_OK:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_valid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 783, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "pyrfc/_cyrfc.pyx":784
 * 
 *         if self.is_valid():
 *             rc = RfcGetConnectionAttributes(self._handle, &attributes, &errorInfo)             # <<<<<<<<<<<<<<
 *             if rc != RFC_OK:
 *                 self._error(&errorInfo)
 */
    __pyx_v_rc = RfcGetConnectionAttributes(__pyx_v_self->_handle, (&__pyx_v_attributes), (&__pyx_v_errorInfo));

    /* "pyrfc/_cyrfc.pyx":785
 *         if self.is_valid():
 *             rc = RfcGetConnectionAttributes(self._handle, &attributes, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 self._error(&errorInfo)
 * 
 */
    __pyx_t_4 = ((__pyx_v_rc != RFC_OK) != 0);
    if (__pyx_t_4) {

      /* "pyrfc/_cyrfc.pyx":786
 *             rc = RfcGetConnectionAttributes(self._handle, &attributes, &errorInfo)
 *             if rc != RFC_OK:
 *                 self._error(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *             result = wrapConnectionAttributes(attributes)
 */
      __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 786, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyrfc/_cyrfc.pyx":785
 *         if self.is_valid():
 *             rc = RfcGetConnectionAttributes(self._handle, &attributes, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 self._error(&errorInfo)
 * 
 */
    }

    /* "pyrfc/_cyrfc.pyx":788
 *                 self._error(&errorInfo)
 * 
 *             result = wrapConnectionAttributes(attributes)             # <<<<<<<<<<<<<<
 *             result.update({
 *                 'active_unit': self.active_unit or self.active_transaction
 */
    __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapConnectionAttributes(__pyx_v_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":789
 * 
 *             result = wrapConnectionAttributes(attributes)
 *             result.update({             # <<<<<<<<<<<<<<
 *                 'active_unit': self.active_unit or self.active_transaction
 *             })
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_update); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "pyrfc/_cyrfc.pyx":790
 *             result = wrapConnectionAttributes(attributes)
 *             result.update({
 *                 'active_unit': self.active_unit or self.active_transaction             # <<<<<<<<<<<<<<
 *             })
 *         return result
 */
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!__pyx_v_self->active_unit) {
    } else {
      __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->active_unit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 790, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->active_transaction); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __pyx_t_6;
    __pyx_t_6 = 0;
    __pyx_L5_bool_binop_done:;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_active_unit, __pyx_t_5) < 0) __PYX_ERR(0, 790, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":783
 *         result = {}
 * 
 *         if self.is_valid():             # <<<<<<<<<<<<<<
 *             rc = RfcGetConnectionAttributes(self._handle, &attributes, &errorInfo)
 *             if rc != RFC_OK:
 */
  }

  /* "pyrfc/_cyrfc.pyx":792
 *                 'active_unit': self.active_unit or self.active_transaction
 *             })
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def is_valid(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":743
 *             self._error(&errorInfo)
 * 
 *     def get_connection_attributes(self):             # <<<<<<<<<<<<<<
 *         """ Get connection details
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection.get_connection_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":794
 *         return result
 * 
 *     def is_valid(self):             # <<<<<<<<<<<<<<
 *         """Checks an RFC connection. Can be used to check whether a client/server connection
 *         has already been closed, or whether the NW RFC library still "considers" the connection
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_29is_valid(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Connection_28is_valid[] = "Checks an RFC connection. Can be used to check whether a client/server connection\n        has already been closed, or whether the NW RFC library still \"considers\" the connection\n        to be open.\n\n        .. note::\n           This does not guarantee that the connection is indeed still alive:\n           A firewall may silently have closed the connection without notifying\n           the endpoints. If you want to find out, whether the connection is still alive,\n           you'll have to use the more expensive RfcPing().\n\n        :returns: boolean\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_29is_valid(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_valid (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_28is_valid(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_28is_valid(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) {
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_INT __pyx_v_isValid;
  RFC_RC __pyx_v_rc;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("is_valid", 0);

  /* "pyrfc/_cyrfc.pyx":810
 *         cdef RFC_INT isValid
 * 
 *         rc = RfcIsConnectionHandleValid(self._handle, &isValid, &errorInfo)             # <<<<<<<<<<<<<<
 * 
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:
 */
  __pyx_v_rc = RfcIsConnectionHandleValid(__pyx_v_self->_handle, (&__pyx_v_isValid), (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":812
 *         rc = RfcIsConnectionHandleValid(self._handle, &isValid, &errorInfo)
 * 
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             return False
 *         return True
 */
  __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_errorInfo.code != RFC_OK) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrfc/_cyrfc.pyx":813
 * 
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:
 *             return False             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "pyrfc/_cyrfc.pyx":812
 *         rc = RfcIsConnectionHandleValid(self._handle, &isValid, &errorInfo)
 * 
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             return False
 *         return True
 */
  }

  /* "pyrfc/_cyrfc.pyx":814
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:
 *             return False
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     # def c_handle_test(self, p_handle):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":794
 *         return result
 * 
 *     def is_valid(self):             # <<<<<<<<<<<<<<
 *         """Checks an RFC connection. Can be used to check whether a client/server connection
 *         has already been closed, or whether the NW RFC library still "considers" the connection
 */

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

/* "pyrfc/_cyrfc.pyx":823
 *     #     print("c:handle", "ok" if c_handle - self._handle == 0 else "error")
 * 
 *     def get_function_description(self, func_name):             # <<<<<<<<<<<<<<
 *         """ Returns a function description of a function module.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_31get_function_description(PyObject *__pyx_v_self, PyObject *__pyx_v_func_name); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Connection_30get_function_description[] = " Returns a function description of a function module.\n\n        :param func_name: Name of the function module whose description\n              will be returned.\n        :type func_name: string\n\n        :return: A :class:`FunctionDescription` object.\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_31get_function_description(PyObject *__pyx_v_self, PyObject *__pyx_v_func_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_function_description (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_30get_function_description(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_func_name));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_30get_function_description(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_func_name) {
  RFC_ERROR_INFO __pyx_v_errorInfo;
  SAP_UC *__pyx_v_funcName;
  RFC_FUNCTION_DESC_HANDLE __pyx_v_funcDesc;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  SAP_UC *__pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_function_description", 0);

  /* "pyrfc/_cyrfc.pyx":833
 *         """
 *         cdef RFC_ERROR_INFO errorInfo
 *         funcName = fillString(func_name.upper())             # <<<<<<<<<<<<<<
 *         cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 *         free(funcName)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_func_name, __pyx_n_s_upper); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_funcName = __pyx_t_4;

  /* "pyrfc/_cyrfc.pyx":834
 *         cdef RFC_ERROR_INFO errorInfo
 *         funcName = fillString(func_name.upper())
 *         cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)             # <<<<<<<<<<<<<<
 *         free(funcName)
 *         if not funcDesc:
 */
  __pyx_v_funcDesc = RfcGetFunctionDesc(__pyx_v_self->_handle, __pyx_v_funcName, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":835
 *         funcName = fillString(func_name.upper())
 *         cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 *         free(funcName)             # <<<<<<<<<<<<<<
 *         if not funcDesc:
 *             self._error(&errorInfo)
 */
  free(__pyx_v_funcName);

  /* "pyrfc/_cyrfc.pyx":836
 *         cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 *         free(funcName)
 *         if not funcDesc:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         return wrapFunctionDescription(funcDesc)
 */
  __pyx_t_5 = ((!(__pyx_v_funcDesc != 0)) != 0);
  if (__pyx_t_5) {

    /* "pyrfc/_cyrfc.pyx":837
 *         free(funcName)
 *         if not funcDesc:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *         return wrapFunctionDescription(funcDesc)
 * 
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 837, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":836
 *         cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 *         free(funcName)
 *         if not funcDesc:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         return wrapFunctionDescription(funcDesc)
 */
  }

  /* "pyrfc/_cyrfc.pyx":838
 *         if not funcDesc:
 *             self._error(&errorInfo)
 *         return wrapFunctionDescription(funcDesc)             # <<<<<<<<<<<<<<
 * 
 *     def call(self, func_name, options=None, **params):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapFunctionDescription(__pyx_v_funcDesc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":823
 *     #     print("c:handle", "ok" if c_handle - self._handle == 0 else "error")
 * 
 *     def get_function_description(self, func_name):             # <<<<<<<<<<<<<<
 *         """ Returns a function description of a function module.
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":840
 *         return wrapFunctionDescription(funcDesc)
 * 
 *     def call(self, func_name, options=None, **params):             # <<<<<<<<<<<<<<
 *         """ Invokes a remote-enabled function module via RFC.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_33call(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Connection_32call[] = " Invokes a remote-enabled function module via RFC.\n\n        :param func_name: Name of the function module that will be invoked.\n        :type func_name: string\n\n        :param options: Call options for single remote ABAP function call. Allowed keys:\n\n            - ``not_requested`` Allows to deactivate certain parameters in the function module interface.\n              This is particularly useful for BAPIs which have many large tables, the Python client is not interested in.\n              Deactivate those, to reduce network traffic and memory consumption in your application considerably.\n\n              This functionality can be used for input and output parameters. If the parameter is an input, no data for\n              that parameter will be sent to the backend. If it's an output, the backend will be informed not to return\n              data for that parameter.\n\n            - ``timeout`` Cancel RFC connection if ongoing RFC call not completed within ``timeout`` seconds.\n              Timeout can be also set as client connection configuration option, in which case is valid for all RFC calls.\n\n              Examples: https://github.com/SAP/PyRFC/tree/main/examples/timeout\n\n        :type options: dictionary\n\n        :param params: Parameter of the function module. All non optional\n                IMPORT, CHANGING, and TABLE parameters must be provided.\n        :type params: keyword arguments\n\n        :return: Dictionary with all EXPORT, CHANGING, and TABLE parameters.\n                 The IMPORT parameters are also given, if :attr:`Connection.config.return_import_params`\n                 is set to ``True``.\n\n        :raises: :exc:`~pyrfc.RFCError` or a subclass\n                 thereof if the RFC call fails.\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_33call(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_func_name = 0;
  PyObject *__pyx_v_options = 0;
  PyObject *__pyx_v_params = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("call (wrapper)", 0);
  __pyx_v_params = PyDict_New(); if (unlikely(!__pyx_v_params)) return NULL;
  __Pyx_GOTREF(__pyx_v_params);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func_name,&__pyx_n_s_options,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_func_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_options);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_params, values, pos_args, "call") < 0)) __PYX_ERR(0, 840, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_func_name = values[0];
    __pyx_v_options = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("call", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 840, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_params); __pyx_v_params = 0;
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection.call", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_32call(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_func_name, __pyx_v_options, __pyx_v_params);

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_32call(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_func_name, PyObject *__pyx_v_options, PyObject *__pyx_v_params) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_ERROR_INFO __pyx_v_openErrorInfo;
  SAP_UC *__pyx_v_cName;
  SAP_UC *__pyx_v_funcName;
  RFC_FUNCTION_DESC_HANDLE __pyx_v_funcDesc;
  RFC_FUNCTION_HANDLE __pyx_v_funcCont;
  int __pyx_v_isActive;
  PyObject *__pyx_v_skip_parameters = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_cancel_timer = NULL;
  PyObject *__pyx_v_timeout = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_closed_handle = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  SAP_UC *__pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  char const *__pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("call", 0);
  __Pyx_INCREF(__pyx_v_options);

  /* "pyrfc/_cyrfc.pyx":878
 *         cdef RFC_ERROR_INFO openErrorInfo
 *         cdef SAP_UC *cName
 *         if type(func_name) is not str:             # <<<<<<<<<<<<<<
 *             raise RFCError("Remote function module name must be unicode string, received:", func_name, type(func_name))
 *         cdef SAP_UC *funcName = fillString(func_name)
 */
  __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_func_name)) != ((PyObject *)(&PyUnicode_Type)));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":879
 *         cdef SAP_UC *cName
 *         if type(func_name) is not str:
 *             raise RFCError("Remote function module name must be unicode string, received:", func_name, type(func_name))             # <<<<<<<<<<<<<<
 *         cdef SAP_UC *funcName = fillString(func_name)
 *         if self._handle == NULL:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_kp_u_Remote_function_module_name_must, __pyx_v_func_name, ((PyObject *)Py_TYPE(__pyx_v_func_name))};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 879, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_kp_u_Remote_function_module_name_must, __pyx_v_func_name, ((PyObject *)Py_TYPE(__pyx_v_func_name))};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 879, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_u_Remote_function_module_name_must);
      __Pyx_GIVEREF(__pyx_kp_u_Remote_function_module_name_must);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_u_Remote_function_module_name_must);
      __Pyx_INCREF(__pyx_v_func_name);
      __Pyx_GIVEREF(__pyx_v_func_name);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_func_name);
      __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_func_name)));
      __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_func_name)));
      PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, ((PyObject *)Py_TYPE(__pyx_v_func_name)));
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 879, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":878
 *         cdef RFC_ERROR_INFO openErrorInfo
 *         cdef SAP_UC *cName
 *         if type(func_name) is not str:             # <<<<<<<<<<<<<<
 *             raise RFCError("Remote function module name must be unicode string, received:", func_name, type(func_name))
 *         cdef SAP_UC *funcName = fillString(func_name)
 */
  }

  /* "pyrfc/_cyrfc.pyx":880
 *         if type(func_name) is not str:
 *             raise RFCError("Remote function module name must be unicode string, received:", func_name, type(func_name))
 *         cdef SAP_UC *funcName = fillString(func_name)             # <<<<<<<<<<<<<<
 *         if self._handle == NULL:
 *             raise RFCError(f"Remote function module '{func_name}' invocation rejected because the connection is closed")
 */
  __pyx_t_8 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_func_name); if (unlikely(__pyx_t_8 == ((SAP_UC *)NULL))) __PYX_ERR(0, 880, __pyx_L1_error)
  __pyx_v_funcName = __pyx_t_8;

  /* "pyrfc/_cyrfc.pyx":881
 *             raise RFCError("Remote function module name must be unicode string, received:", func_name, type(func_name))
 *         cdef SAP_UC *funcName = fillString(func_name)
 *         if self._handle == NULL:             # <<<<<<<<<<<<<<
 *             raise RFCError(f"Remote function module '{func_name}' invocation rejected because the connection is closed")
 *         cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 */
  __pyx_t_2 = ((__pyx_v_self->_handle == NULL) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":882
 *         cdef SAP_UC *funcName = fillString(func_name)
 *         if self._handle == NULL:
 *             raise RFCError(f"Remote function module '{func_name}' invocation rejected because the connection is closed")             # <<<<<<<<<<<<<<
 *         cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 *         free(funcName)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = 0;
    __pyx_t_10 = 127;
    __Pyx_INCREF(__pyx_kp_u_Remote_function_module);
    __pyx_t_9 += 24;
    __Pyx_GIVEREF(__pyx_kp_u_Remote_function_module);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_Remote_function_module);
    __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_10;
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u_invocation_rejected_because_the);
    __pyx_t_9 += 54;
    __Pyx_GIVEREF(__pyx_kp_u_invocation_rejected_because_the);
    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_kp_u_invocation_rejected_because_the);
    __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_7, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 882, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":881
 *             raise RFCError("Remote function module name must be unicode string, received:", func_name, type(func_name))
 *         cdef SAP_UC *funcName = fillString(func_name)
 *         if self._handle == NULL:             # <<<<<<<<<<<<<<
 *             raise RFCError(f"Remote function module '{func_name}' invocation rejected because the connection is closed")
 *         cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 */
  }

  /* "pyrfc/_cyrfc.pyx":883
 *         if self._handle == NULL:
 *             raise RFCError(f"Remote function module '{func_name}' invocation rejected because the connection is closed")
 *         cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)             # <<<<<<<<<<<<<<
 *         free(funcName)
 *         if not funcDesc:
 */
  __pyx_v_funcDesc = RfcGetFunctionDesc(__pyx_v_self->_handle, __pyx_v_funcName, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":884
 *             raise RFCError(f"Remote function module '{func_name}' invocation rejected because the connection is closed")
 *         cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 *         free(funcName)             # <<<<<<<<<<<<<<
 *         if not funcDesc:
 *             self._error(&errorInfo)
 */
  free(__pyx_v_funcName);

  /* "pyrfc/_cyrfc.pyx":885
 *         cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 *         free(funcName)
 *         if not funcDesc:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         cdef RFC_FUNCTION_HANDLE funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 */
  __pyx_t_2 = ((!(__pyx_v_funcDesc != 0)) != 0);
  if (__pyx_t_2) {

    /* "pyrfc/_cyrfc.pyx":886
 *         free(funcName)
 *         if not funcDesc:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *         cdef RFC_FUNCTION_HANDLE funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 *         if not funcCont:
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":885
 *         cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 *         free(funcName)
 *         if not funcDesc:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         cdef RFC_FUNCTION_HANDLE funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 */
  }

  /* "pyrfc/_cyrfc.pyx":887
 *         if not funcDesc:
 *             self._error(&errorInfo)
 *         cdef RFC_FUNCTION_HANDLE funcCont = RfcCreateFunction(funcDesc, &errorInfo)             # <<<<<<<<<<<<<<
 *         if not funcCont:
 *             self._error(&errorInfo)
 */
  __pyx_v_funcCont = RfcCreateFunction(__pyx_v_funcDesc, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":888
 *             self._error(&errorInfo)
 *         cdef RFC_FUNCTION_HANDLE funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 *         if not funcCont:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         cdef int isActive = 0
 */
  __pyx_t_2 = ((!(__pyx_v_funcCont != 0)) != 0);
  if (__pyx_t_2) {

    /* "pyrfc/_cyrfc.pyx":889
 *         cdef RFC_FUNCTION_HANDLE funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 *         if not funcCont:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *         cdef int isActive = 0
 *         options = options or {}
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":888
 *             self._error(&errorInfo)
 *         cdef RFC_FUNCTION_HANDLE funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 *         if not funcCont:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         cdef int isActive = 0
 */
  }

  /* "pyrfc/_cyrfc.pyx":890
 *         if not funcCont:
 *             self._error(&errorInfo)
 *         cdef int isActive = 0             # <<<<<<<<<<<<<<
 *         options = options or {}
 *         try:  # now we have a function module
 */
  __pyx_v_isActive = 0;

  /* "pyrfc/_cyrfc.pyx":891
 *             self._error(&errorInfo)
 *         cdef int isActive = 0
 *         options = options or {}             # <<<<<<<<<<<<<<
 *         try:  # now we have a function module
 *             if 'not_requested' in options:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_options); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 891, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __Pyx_INCREF(__pyx_v_options);
    __pyx_t_3 = __pyx_v_options;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_3 = __pyx_t_4;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_L7_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_options, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":892
 *         cdef int isActive = 0
 *         options = options or {}
 *         try:  # now we have a function module             # <<<<<<<<<<<<<<
 *             if 'not_requested' in options:
 *                 skip_parameters = options['not_requested']
 */
  /*try:*/ {

    /* "pyrfc/_cyrfc.pyx":893
 *         options = options or {}
 *         try:  # now we have a function module
 *             if 'not_requested' in options:             # <<<<<<<<<<<<<<
 *                 skip_parameters = options['not_requested']
 *                 if type(skip_parameters) is not list:
 */
    __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_not_requested, __pyx_v_options, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 893, __pyx_L10_error)
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "pyrfc/_cyrfc.pyx":894
 *         try:  # now we have a function module
 *             if 'not_requested' in options:
 *                 skip_parameters = options['not_requested']             # <<<<<<<<<<<<<<
 *                 if type(skip_parameters) is not list:
 *                     skip_parameters = [skip_parameters]
 */
      __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_options, __pyx_n_u_not_requested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 894, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_skip_parameters = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "pyrfc/_cyrfc.pyx":895
 *             if 'not_requested' in options:
 *                 skip_parameters = options['not_requested']
 *                 if type(skip_parameters) is not list:             # <<<<<<<<<<<<<<
 *                     skip_parameters = [skip_parameters]
 *                 for name in skip_parameters:
 */
      __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_skip_parameters)) != ((PyObject *)(&PyList_Type)));
      __pyx_t_2 = (__pyx_t_1 != 0);
      if (__pyx_t_2) {

        /* "pyrfc/_cyrfc.pyx":896
 *                 skip_parameters = options['not_requested']
 *                 if type(skip_parameters) is not list:
 *                     skip_parameters = [skip_parameters]             # <<<<<<<<<<<<<<
 *                 for name in skip_parameters:
 *                     cName = fillString(name)
 */
        __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 896, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_v_skip_parameters);
        __Pyx_GIVEREF(__pyx_v_skip_parameters);
        PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_skip_parameters);
        __Pyx_DECREF_SET(__pyx_v_skip_parameters, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyrfc/_cyrfc.pyx":895
 *             if 'not_requested' in options:
 *                 skip_parameters = options['not_requested']
 *                 if type(skip_parameters) is not list:             # <<<<<<<<<<<<<<
 *                     skip_parameters = [skip_parameters]
 *                 for name in skip_parameters:
 */
      }

      /* "pyrfc/_cyrfc.pyx":897
 *                 if type(skip_parameters) is not list:
 *                     skip_parameters = [skip_parameters]
 *                 for name in skip_parameters:             # <<<<<<<<<<<<<<
 *                     cName = fillString(name)
 *                     rc = RfcSetParameterActive(funcCont, cName, isActive, &errorInfo)
 */
      if (likely(PyList_CheckExact(__pyx_v_skip_parameters)) || PyTuple_CheckExact(__pyx_v_skip_parameters)) {
        __pyx_t_3 = __pyx_v_skip_parameters; __Pyx_INCREF(__pyx_t_3); __pyx_t_9 = 0;
        __pyx_t_11 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_skip_parameters); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 897, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_11 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 897, __pyx_L10_error)
      }
      for (;;) {
        if (likely(!__pyx_t_11)) {
          if (likely(PyList_CheckExact(__pyx_t_3))) {
            if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 897, __pyx_L10_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 897, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          } else {
            if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 897, __pyx_L10_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 897, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          }
        } else {
          __pyx_t_4 = __pyx_t_11(__pyx_t_3);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 897, __pyx_L10_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyrfc/_cyrfc.pyx":898
 *                     skip_parameters = [skip_parameters]
 *                 for name in skip_parameters:
 *                     cName = fillString(name)             # <<<<<<<<<<<<<<
 *                     rc = RfcSetParameterActive(funcCont, cName, isActive, &errorInfo)
 *                     free(cName)
 */
        __pyx_t_8 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_name); if (unlikely(__pyx_t_8 == ((SAP_UC *)NULL))) __PYX_ERR(0, 898, __pyx_L10_error)
        __pyx_v_cName = __pyx_t_8;

        /* "pyrfc/_cyrfc.pyx":899
 *                 for name in skip_parameters:
 *                     cName = fillString(name)
 *                     rc = RfcSetParameterActive(funcCont, cName, isActive, &errorInfo)             # <<<<<<<<<<<<<<
 *                     free(cName)
 *                     if rc != RFC_OK:
 */
        __pyx_v_rc = RfcSetParameterActive(__pyx_v_funcCont, __pyx_v_cName, __pyx_v_isActive, (&__pyx_v_errorInfo));

        /* "pyrfc/_cyrfc.pyx":900
 *                     cName = fillString(name)
 *                     rc = RfcSetParameterActive(funcCont, cName, isActive, &errorInfo)
 *                     free(cName)             # <<<<<<<<<<<<<<
 *                     if rc != RFC_OK:
 *                         self._error(&errorInfo)
 */
        free(__pyx_v_cName);

        /* "pyrfc/_cyrfc.pyx":901
 *                     rc = RfcSetParameterActive(funcCont, cName, isActive, &errorInfo)
 *                     free(cName)
 *                     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                         self._error(&errorInfo)
 *             # set connection timeout, starts before writing input parameters to container
 */
        __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
        if (__pyx_t_2) {

          /* "pyrfc/_cyrfc.pyx":902
 *                     free(cName)
 *                     if rc != RFC_OK:
 *                         self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *             # set connection timeout, starts before writing input parameters to container
 *             cancel_timer = None
 */
          __pyx_t_4 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 902, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "pyrfc/_cyrfc.pyx":901
 *                     rc = RfcSetParameterActive(funcCont, cName, isActive, &errorInfo)
 *                     free(cName)
 *                     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                         self._error(&errorInfo)
 *             # set connection timeout, starts before writing input parameters to container
 */
        }

        /* "pyrfc/_cyrfc.pyx":897
 *                 if type(skip_parameters) is not list:
 *                     skip_parameters = [skip_parameters]
 *                 for name in skip_parameters:             # <<<<<<<<<<<<<<
 *                     cName = fillString(name)
 *                     rc = RfcSetParameterActive(funcCont, cName, isActive, &errorInfo)
 */
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyrfc/_cyrfc.pyx":893
 *         options = options or {}
 *         try:  # now we have a function module
 *             if 'not_requested' in options:             # <<<<<<<<<<<<<<
 *                 skip_parameters = options['not_requested']
 *                 if type(skip_parameters) is not list:
 */
    }

    /* "pyrfc/_cyrfc.pyx":904
 *                         self._error(&errorInfo)
 *             # set connection timeout, starts before writing input parameters to container
 *             cancel_timer = None             # <<<<<<<<<<<<<<
 *             timeout = options.get('timeout', self.__config['timeout'])
 *             if timeout is not None:
 */
    __Pyx_INCREF(Py_None);
    __pyx_v_cancel_timer = Py_None;

    /* "pyrfc/_cyrfc.pyx":905
 *             # set connection timeout, starts before writing input parameters to container
 *             cancel_timer = None
 *             timeout = options.get('timeout', self.__config['timeout'])             # <<<<<<<<<<<<<<
 *             if timeout is not None:
 *                 cancel_timer = Timer(timeout, cancel_connection, (self,))
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 905, __pyx_L10_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(__pyx_v_self->__config == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 905, __pyx_L10_error)
    }
    __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_self->__config, __pyx_n_u_timeout); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 905, __pyx_L10_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_n_u_timeout, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 905, __pyx_L10_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_n_u_timeout, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 905, __pyx_L10_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_12 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 905, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_n_u_timeout);
      __Pyx_GIVEREF(__pyx_n_u_timeout);
      PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_6, __pyx_n_u_timeout);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_6, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 905, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_timeout = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":906
 *             cancel_timer = None
 *             timeout = options.get('timeout', self.__config['timeout'])
 *             if timeout is not None:             # <<<<<<<<<<<<<<
 *                 cancel_timer = Timer(timeout, cancel_connection, (self,))
 *                 cancel_timer.start()
 */
    __pyx_t_2 = (__pyx_v_timeout != Py_None);
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "pyrfc/_cyrfc.pyx":907
 *             timeout = options.get('timeout', self.__config['timeout'])
 *             if timeout is not None:
 *                 cancel_timer = Timer(timeout, cancel_connection, (self,))             # <<<<<<<<<<<<<<
 *                 cancel_timer.start()
 *             for name, value in params.iteritems():
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Timer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 907, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_cancel_connection); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 907, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 907, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(((PyObject *)__pyx_v_self));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
      PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self));
      __pyx_t_7 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_6 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_timeout, __pyx_t_12, __pyx_t_5};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 907, __pyx_L10_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_timeout, __pyx_t_12, __pyx_t_5};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 907, __pyx_L10_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      {
        __pyx_t_13 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 907, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_13);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_INCREF(__pyx_v_timeout);
        __Pyx_GIVEREF(__pyx_v_timeout);
        PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_6, __pyx_v_timeout);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_6, __pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_6, __pyx_t_5);
        __pyx_t_12 = 0;
        __pyx_t_5 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_13, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 907, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_cancel_timer, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "pyrfc/_cyrfc.pyx":908
 *             if timeout is not None:
 *                 cancel_timer = Timer(timeout, cancel_connection, (self,))
 *                 cancel_timer.start()             # <<<<<<<<<<<<<<
 *             for name, value in params.iteritems():
 *                 fillFunctionParameter(funcDesc, funcCont, name, value)
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cancel_timer, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 908, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_13 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      __pyx_t_3 = (__pyx_t_13) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_13) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 908, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyrfc/_cyrfc.pyx":906
 *             cancel_timer = None
 *             timeout = options.get('timeout', self.__config['timeout'])
 *             if timeout is not None:             # <<<<<<<<<<<<<<
 *                 cancel_timer = Timer(timeout, cancel_connection, (self,))
 *                 cancel_timer.start()
 */
    }

    /* "pyrfc/_cyrfc.pyx":909
 *                 cancel_timer = Timer(timeout, cancel_connection, (self,))
 *                 cancel_timer.start()
 *             for name, value in params.iteritems():             # <<<<<<<<<<<<<<
 *                 fillFunctionParameter(funcDesc, funcCont, name, value)
 *             # save old handle for troubleshooting
 */
    __pyx_t_9 = 0;
    __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_params, 1, __pyx_n_s_iteritems, (&__pyx_t_14), (&__pyx_t_6)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 909, __pyx_L10_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3);
    __pyx_t_3 = __pyx_t_4;
    __pyx_t_4 = 0;
    while (1) {
      __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_14, &__pyx_t_9, &__pyx_t_4, &__pyx_t_13, NULL, __pyx_t_6);
      if (unlikely(__pyx_t_15 == 0)) break;
      if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 909, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_13);
      __pyx_t_13 = 0;

      /* "pyrfc/_cyrfc.pyx":910
 *                 cancel_timer.start()
 *             for name, value in params.iteritems():
 *                 fillFunctionParameter(funcDesc, funcCont, name, value)             # <<<<<<<<<<<<<<
 *             # save old handle for troubleshooting
 *             with nogil:
 */
      __pyx_t_13 = __pyx_f_5pyrfc_6_cyrfc_fillFunctionParameter(__pyx_v_funcDesc, __pyx_v_funcCont, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 910, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":912
 *                 fillFunctionParameter(funcDesc, funcCont, name, value)
 *             # save old handle for troubleshooting
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 rc = RfcInvoke(self._handle, funcCont, &errorInfo)
 *             if cancel_timer is not None:
 */
    {
        #ifdef WITH_THREAD
        PyThreadState *_save;
        Py_UNBLOCK_THREADS
        __Pyx_FastGIL_Remember();
        #endif
        /*try:*/ {

          /* "pyrfc/_cyrfc.pyx":913
 *             # save old handle for troubleshooting
 *             with nogil:
 *                 rc = RfcInvoke(self._handle, funcCont, &errorInfo)             # <<<<<<<<<<<<<<
 *             if cancel_timer is not None:
 *                 cancel_timer.cancel()
 */
          __pyx_v_rc = RfcInvoke(__pyx_v_self->_handle, __pyx_v_funcCont, (&__pyx_v_errorInfo));
        }

        /* "pyrfc/_cyrfc.pyx":912
 *                 fillFunctionParameter(funcDesc, funcCont, name, value)
 *             # save old handle for troubleshooting
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 rc = RfcInvoke(self._handle, funcCont, &errorInfo)
 *             if cancel_timer is not None:
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            __Pyx_FastGIL_Forget();
            Py_BLOCK_THREADS
            #endif
            goto __pyx_L22;
          }
          __pyx_L22:;
        }
    }

    /* "pyrfc/_cyrfc.pyx":914
 *             with nogil:
 *                 rc = RfcInvoke(self._handle, funcCont, &errorInfo)
 *             if cancel_timer is not None:             # <<<<<<<<<<<<<<
 *                 cancel_timer.cancel()
 *             # print("invoke:", errorInfo.group, rc, self.handle, self.is_valid())
 */
    __pyx_t_1 = (__pyx_v_cancel_timer != Py_None);
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "pyrfc/_cyrfc.pyx":915
 *                 rc = RfcInvoke(self._handle, funcCont, &errorInfo)
 *             if cancel_timer is not None:
 *                 cancel_timer.cancel()             # <<<<<<<<<<<<<<
 *             # print("invoke:", errorInfo.group, rc, self.handle, self.is_valid())
 *             if rc != RFC_OK:
 */
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_cancel_timer, __pyx_n_s_cancel); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 915, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_13);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_13, function);
        }
      }
      __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_13);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 915, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyrfc/_cyrfc.pyx":914
 *             with nogil:
 *                 rc = RfcInvoke(self._handle, funcCont, &errorInfo)
 *             if cancel_timer is not None:             # <<<<<<<<<<<<<<
 *                 cancel_timer.cancel()
 *             # print("invoke:", errorInfo.group, rc, self.handle, self.is_valid())
 */
    }

    /* "pyrfc/_cyrfc.pyx":917
 *                 cancel_timer.cancel()
 *             # print("invoke:", errorInfo.group, rc, self.handle, self.is_valid())
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 if errorInfo.code in (
 *                         RFC_COMMUNICATION_FAILURE,
 */
    __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
    if (__pyx_t_2) {

      /* "pyrfc/_cyrfc.pyx":918
 *             # print("invoke:", errorInfo.group, rc, self.handle, self.is_valid())
 *             if rc != RFC_OK:
 *                 if errorInfo.code in (             # <<<<<<<<<<<<<<
 *                         RFC_COMMUNICATION_FAILURE,
 *                         RFC_ABAP_RUNTIME_FAILURE,
 */
      switch (__pyx_v_errorInfo.code) {
        case RFC_COMMUNICATION_FAILURE:

        /* "pyrfc/_cyrfc.pyx":919
 *             if rc != RFC_OK:
 *                 if errorInfo.code in (
 *                         RFC_COMMUNICATION_FAILURE,             # <<<<<<<<<<<<<<
 *                         RFC_ABAP_RUNTIME_FAILURE,
 *                         RFC_ABAP_MESSAGE,
 */
        case RFC_ABAP_RUNTIME_FAILURE:

        /* "pyrfc/_cyrfc.pyx":920
 *                 if errorInfo.code in (
 *                         RFC_COMMUNICATION_FAILURE,
 *                         RFC_ABAP_RUNTIME_FAILURE,             # <<<<<<<<<<<<<<
 *                         RFC_ABAP_MESSAGE,
 *                         RFC_EXTERNAL_FAILURE
 */
        case RFC_ABAP_MESSAGE:

        /* "pyrfc/_cyrfc.pyx":921
 *                         RFC_COMMUNICATION_FAILURE,
 *                         RFC_ABAP_RUNTIME_FAILURE,
 *                         RFC_ABAP_MESSAGE,             # <<<<<<<<<<<<<<
 *                         RFC_EXTERNAL_FAILURE
 *                     ) or errorInfo.group in (
 */
        case RFC_EXTERNAL_FAILURE:

        /* "pyrfc/_cyrfc.pyx":918
 *             # print("invoke:", errorInfo.group, rc, self.handle, self.is_valid())
 *             if rc != RFC_OK:
 *                 if errorInfo.code in (             # <<<<<<<<<<<<<<
 *                         RFC_COMMUNICATION_FAILURE,
 *                         RFC_ABAP_RUNTIME_FAILURE,
 */
        __pyx_t_1 = 1;
        break;
        default:
        __pyx_t_1 = 0;
        break;
      }
      __pyx_t_16 = (__pyx_t_1 != 0);
      if (!__pyx_t_16) {
      } else {
        __pyx_t_2 = __pyx_t_16;
        goto __pyx_L26_bool_binop_done;
      }

      /* "pyrfc/_cyrfc.pyx":923
 *                         RFC_ABAP_MESSAGE,
 *                         RFC_EXTERNAL_FAILURE
 *                     ) or errorInfo.group in (             # <<<<<<<<<<<<<<
 *                         ABAP_RUNTIME_FAILURE,
 *                         LOGON_FAILURE,
 */
      switch (__pyx_v_errorInfo.group) {
        case ABAP_RUNTIME_FAILURE:

        /* "pyrfc/_cyrfc.pyx":924
 *                         RFC_EXTERNAL_FAILURE
 *                     ) or errorInfo.group in (
 *                         ABAP_RUNTIME_FAILURE,             # <<<<<<<<<<<<<<
 *                         LOGON_FAILURE,
 *                         COMMUNICATION_FAILURE,
 */
        case LOGON_FAILURE:

        /* "pyrfc/_cyrfc.pyx":925
 *                     ) or errorInfo.group in (
 *                         ABAP_RUNTIME_FAILURE,
 *                         LOGON_FAILURE,             # <<<<<<<<<<<<<<
 *                         COMMUNICATION_FAILURE,
 *                         EXTERNAL_RUNTIME_FAILURE):
 */
        case COMMUNICATION_FAILURE:

        /* "pyrfc/_cyrfc.pyx":926
 *                         ABAP_RUNTIME_FAILURE,
 *                         LOGON_FAILURE,
 *                         COMMUNICATION_FAILURE,             # <<<<<<<<<<<<<<
 *                         EXTERNAL_RUNTIME_FAILURE):
 *                     # Connection closed, re-open
 */
        case EXTERNAL_RUNTIME_FAILURE:

        /* "pyrfc/_cyrfc.pyx":923
 *                         RFC_ABAP_MESSAGE,
 *                         RFC_EXTERNAL_FAILURE
 *                     ) or errorInfo.group in (             # <<<<<<<<<<<<<<
 *                         ABAP_RUNTIME_FAILURE,
 *                         LOGON_FAILURE,
 */
        __pyx_t_16 = 1;
        break;
        default:
        __pyx_t_16 = 0;
        break;
      }
      __pyx_t_1 = (__pyx_t_16 != 0);
      __pyx_t_2 = __pyx_t_1;
      __pyx_L26_bool_binop_done:;

      /* "pyrfc/_cyrfc.pyx":918
 *             # print("invoke:", errorInfo.group, rc, self.handle, self.is_valid())
 *             if rc != RFC_OK:
 *                 if errorInfo.code in (             # <<<<<<<<<<<<<<
 *                         RFC_COMMUNICATION_FAILURE,
 *                         RFC_ABAP_RUNTIME_FAILURE,
 */
      if (__pyx_t_2) {

        /* "pyrfc/_cyrfc.pyx":929
 *                         EXTERNAL_RUNTIME_FAILURE):
 *                     # Connection closed, re-open
 *                     closed_handle = self.handle             # <<<<<<<<<<<<<<
 *                     self._handle = RfcOpenConnection(self._connection._params, self._connection._params_count, &openErrorInfo)
 *                     if openErrorInfo.code != RFC_OK:
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 929, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_v_closed_handle = __pyx_t_3;
        __pyx_t_3 = 0;

        /* "pyrfc/_cyrfc.pyx":930
 *                     # Connection closed, re-open
 *                     closed_handle = self.handle
 *                     self._handle = RfcOpenConnection(self._connection._params, self._connection._params_count, &openErrorInfo)             # <<<<<<<<<<<<<<
 *                     if openErrorInfo.code != RFC_OK:
 *                         self._handle = NULL
 */
        __pyx_v_self->_handle = RfcOpenConnection(__pyx_v_self->_connection->_params, __pyx_v_self->_connection->_params_count, (&__pyx_v_openErrorInfo));

        /* "pyrfc/_cyrfc.pyx":931
 *                     closed_handle = self.handle
 *                     self._handle = RfcOpenConnection(self._connection._params, self._connection._params_count, &openErrorInfo)
 *                     if openErrorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *                         self._handle = NULL
 *                         # Communication error returned as error
 */
        __pyx_t_2 = ((__pyx_v_openErrorInfo.code != RFC_OK) != 0);
        if (__pyx_t_2) {

          /* "pyrfc/_cyrfc.pyx":932
 *                     self._handle = RfcOpenConnection(self._connection._params, self._connection._params_count, &openErrorInfo)
 *                     if openErrorInfo.code != RFC_OK:
 *                         self._handle = NULL             # <<<<<<<<<<<<<<
 *                         # Communication error returned as error
 *                         errorInfo = openErrorInfo
 */
          __pyx_v_self->_handle = NULL;

          /* "pyrfc/_cyrfc.pyx":934
 *                         self._handle = NULL
 *                         # Communication error returned as error
 *                         errorInfo = openErrorInfo             # <<<<<<<<<<<<<<
 *                     elif errorInfo.code == RFC_CANCELED:
 *                         errorInfo.message = fillString(f"Connection was canceled: {closed_handle}. New handle: {self.handle}")
 */
          __pyx_v_errorInfo = __pyx_v_openErrorInfo;

          /* "pyrfc/_cyrfc.pyx":931
 *                     closed_handle = self.handle
 *                     self._handle = RfcOpenConnection(self._connection._params, self._connection._params_count, &openErrorInfo)
 *                     if openErrorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *                         self._handle = NULL
 *                         # Communication error returned as error
 */
          goto __pyx_L28;
        }

        /* "pyrfc/_cyrfc.pyx":935
 *                         # Communication error returned as error
 *                         errorInfo = openErrorInfo
 *                     elif errorInfo.code == RFC_CANCELED:             # <<<<<<<<<<<<<<
 *                         errorInfo.message = fillString(f"Connection was canceled: {closed_handle}. New handle: {self.handle}")
 *                 self._error(&errorInfo)
 */
        __pyx_t_2 = ((__pyx_v_errorInfo.code == RFC_CANCELED) != 0);
        if (__pyx_t_2) {

          /* "pyrfc/_cyrfc.pyx":936
 *                         errorInfo = openErrorInfo
 *                     elif errorInfo.code == RFC_CANCELED:
 *                         errorInfo.message = fillString(f"Connection was canceled: {closed_handle}. New handle: {self.handle}")             # <<<<<<<<<<<<<<
 *                 self._error(&errorInfo)
 *             if self.__bconfig & _MASK_RETURN_IMPORT_PARAMS:
 */
          __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 936, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_14 = 0;
          __pyx_t_10 = 127;
          __Pyx_INCREF(__pyx_kp_u_Connection_was_canceled);
          __pyx_t_14 += 25;
          __Pyx_GIVEREF(__pyx_kp_u_Connection_was_canceled);
          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Connection_was_canceled);
          __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_v_closed_handle, __pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 936, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) : __pyx_t_10;
          __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13);
          __Pyx_GIVEREF(__pyx_t_13);
          PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_13);
          __pyx_t_13 = 0;
          __Pyx_INCREF(__pyx_kp_u_New_handle);
          __pyx_t_14 += 14;
          __Pyx_GIVEREF(__pyx_kp_u_New_handle);
          PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_New_handle);
          __pyx_t_13 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 936, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_13, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 936, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_10;
          __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_4);
          __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_3, 4, __pyx_t_14, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 936, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_8 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_4); if (unlikely(__pyx_t_8 == ((SAP_UC *)NULL))) __PYX_ERR(0, 936, __pyx_L10_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          memcpy(&(__pyx_v_errorInfo.message[0]), __pyx_t_8, sizeof(__pyx_v_errorInfo.message[0]) * (0x200 - 0));

          /* "pyrfc/_cyrfc.pyx":935
 *                         # Communication error returned as error
 *                         errorInfo = openErrorInfo
 *                     elif errorInfo.code == RFC_CANCELED:             # <<<<<<<<<<<<<<
 *                         errorInfo.message = fillString(f"Connection was canceled: {closed_handle}. New handle: {self.handle}")
 *                 self._error(&errorInfo)
 */
        }
        __pyx_L28:;

        /* "pyrfc/_cyrfc.pyx":918
 *             # print("invoke:", errorInfo.group, rc, self.handle, self.is_valid())
 *             if rc != RFC_OK:
 *                 if errorInfo.code in (             # <<<<<<<<<<<<<<
 *                         RFC_COMMUNICATION_FAILURE,
 *                         RFC_ABAP_RUNTIME_FAILURE,
 */
      }

      /* "pyrfc/_cyrfc.pyx":937
 *                     elif errorInfo.code == RFC_CANCELED:
 *                         errorInfo.message = fillString(f"Connection was canceled: {closed_handle}. New handle: {self.handle}")
 *                 self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *             if self.__bconfig & _MASK_RETURN_IMPORT_PARAMS:
 *                 return wrapResult(funcDesc, funcCont, <RFC_DIRECTION> 0, self.__bconfig)
 */
      __pyx_t_4 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 937, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pyrfc/_cyrfc.pyx":917
 *                 cancel_timer.cancel()
 *             # print("invoke:", errorInfo.group, rc, self.handle, self.is_valid())
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 if errorInfo.code in (
 *                         RFC_COMMUNICATION_FAILURE,
 */
    }

    /* "pyrfc/_cyrfc.pyx":938
 *                         errorInfo.message = fillString(f"Connection was canceled: {closed_handle}. New handle: {self.handle}")
 *                 self._error(&errorInfo)
 *             if self.__bconfig & _MASK_RETURN_IMPORT_PARAMS:             # <<<<<<<<<<<<<<
 *                 return wrapResult(funcDesc, funcCont, <RFC_DIRECTION> 0, self.__bconfig)
 *             else:
 */
    __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->__pyx___bconfig); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 938, __pyx_L10_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MASK_RETURN_IMPORT_PARAMS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 938, __pyx_L10_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_13 = PyNumber_And(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 938, __pyx_L10_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 938, __pyx_L10_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (__pyx_t_2) {

      /* "pyrfc/_cyrfc.pyx":939
 *                 self._error(&errorInfo)
 *             if self.__bconfig & _MASK_RETURN_IMPORT_PARAMS:
 *                 return wrapResult(funcDesc, funcCont, <RFC_DIRECTION> 0, self.__bconfig)             # <<<<<<<<<<<<<<
 *             else:
 *                 return wrapResult(funcDesc, funcCont, RFC_IMPORT, self.__bconfig)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_13 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->__pyx___bconfig); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 939, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapResult(__pyx_v_funcDesc, __pyx_v_funcCont, ((RFC_DIRECTION)0), __pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 939, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L9_return;

      /* "pyrfc/_cyrfc.pyx":938
 *                         errorInfo.message = fillString(f"Connection was canceled: {closed_handle}. New handle: {self.handle}")
 *                 self._error(&errorInfo)
 *             if self.__bconfig & _MASK_RETURN_IMPORT_PARAMS:             # <<<<<<<<<<<<<<
 *                 return wrapResult(funcDesc, funcCont, <RFC_DIRECTION> 0, self.__bconfig)
 *             else:
 */
    }

    /* "pyrfc/_cyrfc.pyx":941
 *                 return wrapResult(funcDesc, funcCont, <RFC_DIRECTION> 0, self.__bconfig)
 *             else:
 *                 return wrapResult(funcDesc, funcCont, RFC_IMPORT, self.__bconfig)             # <<<<<<<<<<<<<<
 *         finally:
 *             RfcDestroyFunction(funcCont, NULL)
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->__pyx___bconfig); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 941, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_13 = __pyx_f_5pyrfc_6_cyrfc_wrapResult(__pyx_v_funcDesc, __pyx_v_funcCont, RFC_IMPORT, __pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 941, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_13;
      __pyx_t_13 = 0;
      goto __pyx_L9_return;
    }
  }

  /* "pyrfc/_cyrfc.pyx":943
 *                 return wrapResult(funcDesc, funcCont, RFC_IMPORT, self.__bconfig)
 *         finally:
 *             RfcDestroyFunction(funcCont, NULL)             # <<<<<<<<<<<<<<
 * 
 *     ##########################################################################
 */
  /*finally:*/ {
    __pyx_L10_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
      __Pyx_XGOTREF(__pyx_t_18);
      __Pyx_XGOTREF(__pyx_t_19);
      __Pyx_XGOTREF(__pyx_t_20);
      __Pyx_XGOTREF(__pyx_t_21);
      __Pyx_XGOTREF(__pyx_t_22);
      __Pyx_XGOTREF(__pyx_t_23);
      __pyx_t_6 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
      {
        (void)(RfcDestroyFunction(__pyx_v_funcCont, NULL));
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_21);
        __Pyx_XGIVEREF(__pyx_t_22);
        __Pyx_XGIVEREF(__pyx_t_23);
        __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
      }
      __Pyx_XGIVEREF(__pyx_t_18);
      __Pyx_XGIVEREF(__pyx_t_19);
      __Pyx_XGIVEREF(__pyx_t_20);
      __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
      __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
      __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_17;
      goto __pyx_L1_error;
    }
    __pyx_L9_return: {
      __pyx_t_23 = __pyx_r;
      __pyx_r = 0;
      (void)(RfcDestroyFunction(__pyx_v_funcCont, NULL));
      __pyx_r = __pyx_t_23;
      __pyx_t_23 = 0;
      goto __pyx_L0;
    }
  }

  /* "pyrfc/_cyrfc.pyx":840
 *         return wrapFunctionDescription(funcDesc)
 * 
 *     def call(self, func_name, options=None, **params):             # <<<<<<<<<<<<<<
 *         """ Invokes a remote-enabled function module via RFC.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection.call", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_skip_parameters);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_cancel_timer);
  __Pyx_XDECREF(__pyx_v_timeout);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_closed_handle);
  __Pyx_XDECREF(__pyx_v_options);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":948
 *     #  HELPER METHODS
 * 
 *     def type_desc_get(self, type_name):             # <<<<<<<<<<<<<<
 *         """Removes the Type Description from SAP NW RFC Lib cache
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_35type_desc_get(PyObject *__pyx_v_self, PyObject *__pyx_v_type_name); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Connection_34type_desc_get[] = "Removes the Type Description from SAP NW RFC Lib cache\n\n        :param type_name: system id (connection parameters sysid)\n        :type type_name: string\n\n        :returns: error code\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_35type_desc_get(PyObject *__pyx_v_self, PyObject *__pyx_v_type_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("type_desc_get (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_34type_desc_get(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_type_name));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_34type_desc_get(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_type_name) {
  RFC_ERROR_INFO __pyx_v_errorInfo;
  SAP_UC *__pyx_v_typeName;
  RFC_TYPE_DESC_HANDLE __pyx_v_typeDesc;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  SAP_UC *__pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("type_desc_get", 0);

  /* "pyrfc/_cyrfc.pyx":957
 *         """
 *         cdef RFC_ERROR_INFO errorInfo
 *         typeName = fillString(type_name.upper())             # <<<<<<<<<<<<<<
 *         cdef RFC_TYPE_DESC_HANDLE typeDesc = RfcGetTypeDesc(self._handle, typeName, &errorInfo)
 *         free(typeName)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_type_name, __pyx_n_s_upper); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 957, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_typeName = __pyx_t_4;

  /* "pyrfc/_cyrfc.pyx":958
 *         cdef RFC_ERROR_INFO errorInfo
 *         typeName = fillString(type_name.upper())
 *         cdef RFC_TYPE_DESC_HANDLE typeDesc = RfcGetTypeDesc(self._handle, typeName, &errorInfo)             # <<<<<<<<<<<<<<
 *         free(typeName)
 *         if typeDesc == NULL:
 */
  __pyx_v_typeDesc = RfcGetTypeDesc(__pyx_v_self->_handle, __pyx_v_typeName, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":959
 *         typeName = fillString(type_name.upper())
 *         cdef RFC_TYPE_DESC_HANDLE typeDesc = RfcGetTypeDesc(self._handle, typeName, &errorInfo)
 *         free(typeName)             # <<<<<<<<<<<<<<
 *         if typeDesc == NULL:
 *             self._error(&errorInfo)
 */
  free(__pyx_v_typeName);

  /* "pyrfc/_cyrfc.pyx":960
 *         cdef RFC_TYPE_DESC_HANDLE typeDesc = RfcGetTypeDesc(self._handle, typeName, &errorInfo)
 *         free(typeName)
 *         if typeDesc == NULL:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         return wrapTypeDescription(typeDesc)
 */
  __pyx_t_5 = ((__pyx_v_typeDesc == NULL) != 0);
  if (__pyx_t_5) {

    /* "pyrfc/_cyrfc.pyx":961
 *         free(typeName)
 *         if typeDesc == NULL:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *         return wrapTypeDescription(typeDesc)
 * 
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":960
 *         cdef RFC_TYPE_DESC_HANDLE typeDesc = RfcGetTypeDesc(self._handle, typeName, &errorInfo)
 *         free(typeName)
 *         if typeDesc == NULL:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         return wrapTypeDescription(typeDesc)
 */
  }

  /* "pyrfc/_cyrfc.pyx":962
 *         if typeDesc == NULL:
 *             self._error(&errorInfo)
 *         return wrapTypeDescription(typeDesc)             # <<<<<<<<<<<<<<
 * 
 *     def type_desc_remove(self, sysid, type_name):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapTypeDescription(__pyx_v_typeDesc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":948
 *     #  HELPER METHODS
 * 
 *     def type_desc_get(self, type_name):             # <<<<<<<<<<<<<<
 *         """Removes the Type Description from SAP NW RFC Lib cache
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":964
 *         return wrapTypeDescription(typeDesc)
 * 
 *     def type_desc_remove(self, sysid, type_name):             # <<<<<<<<<<<<<<
 *         """Removes the Type Description from SAP NW RFC Lib cache
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_37type_desc_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Connection_36type_desc_remove[] = "Removes the Type Description from SAP NW RFC Lib cache\n\n        :param sysid: system id (connection parameters sysid)\n        :type sysid: string\n\n        :param type_name: Name of the type to be removed\n        :type func_name: string\n\n        :returns: error code\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_37type_desc_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_sysid = 0;
  PyObject *__pyx_v_type_name = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("type_desc_remove (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sysid,&__pyx_n_s_type_name,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sysid)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_type_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("type_desc_remove", 1, 2, 2, 1); __PYX_ERR(0, 964, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "type_desc_remove") < 0)) __PYX_ERR(0, 964, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_sysid = values[0];
    __pyx_v_type_name = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("type_desc_remove", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 964, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection.type_desc_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_36type_desc_remove(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_sysid, __pyx_v_type_name);

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_36type_desc_remove(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_sysid, PyObject *__pyx_v_type_name) {
  RFC_ERROR_INFO __pyx_v_errorInfo;
  SAP_UC *__pyx_v_sysId;
  SAP_UC *__pyx_v_typeName;
  RFC_RC __pyx_v_rc;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SAP_UC *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("type_desc_remove", 0);

  /* "pyrfc/_cyrfc.pyx":976
 *         """
 *         cdef RFC_ERROR_INFO errorInfo
 *         sysId = fillString(sysid)             # <<<<<<<<<<<<<<
 *         typeName = fillString(type_name)
 *         cdef RFC_RC rc = RfcRemoveTypeDesc(sysId, typeName, &errorInfo)
 */
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_sysid); if (unlikely(__pyx_t_1 == ((SAP_UC *)NULL))) __PYX_ERR(0, 976, __pyx_L1_error)
  __pyx_v_sysId = __pyx_t_1;

  /* "pyrfc/_cyrfc.pyx":977
 *         cdef RFC_ERROR_INFO errorInfo
 *         sysId = fillString(sysid)
 *         typeName = fillString(type_name)             # <<<<<<<<<<<<<<
 *         cdef RFC_RC rc = RfcRemoveTypeDesc(sysId, typeName, &errorInfo)
 *         free(sysId)
 */
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_type_name); if (unlikely(__pyx_t_1 == ((SAP_UC *)NULL))) __PYX_ERR(0, 977, __pyx_L1_error)
  __pyx_v_typeName = __pyx_t_1;

  /* "pyrfc/_cyrfc.pyx":978
 *         sysId = fillString(sysid)
 *         typeName = fillString(type_name)
 *         cdef RFC_RC rc = RfcRemoveTypeDesc(sysId, typeName, &errorInfo)             # <<<<<<<<<<<<<<
 *         free(sysId)
 *         free(typeName)
 */
  __pyx_v_rc = RfcRemoveTypeDesc(__pyx_v_sysId, __pyx_v_typeName, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":979
 *         typeName = fillString(type_name)
 *         cdef RFC_RC rc = RfcRemoveTypeDesc(sysId, typeName, &errorInfo)
 *         free(sysId)             # <<<<<<<<<<<<<<
 *         free(typeName)
 *         if rc != RFC_OK:
 */
  free(__pyx_v_sysId);

  /* "pyrfc/_cyrfc.pyx":980
 *         cdef RFC_RC rc = RfcRemoveTypeDesc(sysId, typeName, &errorInfo)
 *         free(sysId)
 *         free(typeName)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 */
  free(__pyx_v_typeName);

  /* "pyrfc/_cyrfc.pyx":981
 *         free(sysId)
 *         free(typeName)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         return rc
 */
  __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
  if (__pyx_t_2) {

    /* "pyrfc/_cyrfc.pyx":982
 *         free(typeName)
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *         return rc
 * 
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 982, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":981
 *         free(sysId)
 *         free(typeName)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         return rc
 */
  }

  /* "pyrfc/_cyrfc.pyx":983
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 *         return rc             # <<<<<<<<<<<<<<
 * 
 *     def func_desc_remove(self, sysid, func_name):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_RFC_RC(__pyx_v_rc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":964
 *         return wrapTypeDescription(typeDesc)
 * 
 *     def type_desc_remove(self, sysid, type_name):             # <<<<<<<<<<<<<<
 *         """Removes the Type Description from SAP NW RFC Lib cache
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":985
 *         return rc
 * 
 *     def func_desc_remove(self, sysid, func_name):             # <<<<<<<<<<<<<<
 *         """Removes the Function Description from SAP NW RFC Lib cache
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_39func_desc_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Connection_38func_desc_remove[] = "Removes the Function Description from SAP NW RFC Lib cache\n\n        :param sysid: system id (connection parameters sysid)\n        :type sysid: string\n\n        :param func_name: Name of the function module to be removed\n        :type func_name: string\n\n        :returns: error code\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_39func_desc_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_sysid = 0;
  PyObject *__pyx_v_func_name = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func_desc_remove (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sysid,&__pyx_n_s_func_name,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sysid)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_func_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("func_desc_remove", 1, 2, 2, 1); __PYX_ERR(0, 985, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "func_desc_remove") < 0)) __PYX_ERR(0, 985, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_sysid = values[0];
    __pyx_v_func_name = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("func_desc_remove", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 985, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection.func_desc_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_38func_desc_remove(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_sysid, __pyx_v_func_name);

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_38func_desc_remove(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_sysid, PyObject *__pyx_v_func_name) {
  RFC_ERROR_INFO __pyx_v_errorInfo;
  SAP_UC *__pyx_v_sysId;
  SAP_UC *__pyx_v_funcName;
  RFC_RC __pyx_v_rc;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SAP_UC *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("func_desc_remove", 0);

  /* "pyrfc/_cyrfc.pyx":997
 *         """
 *         cdef RFC_ERROR_INFO errorInfo
 *         sysId = fillString(sysid)             # <<<<<<<<<<<<<<
 *         funcName = fillString(func_name)
 *         cdef RFC_RC rc = RfcRemoveFunctionDesc(sysId, funcName, &errorInfo)
 */
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_sysid); if (unlikely(__pyx_t_1 == ((SAP_UC *)NULL))) __PYX_ERR(0, 997, __pyx_L1_error)
  __pyx_v_sysId = __pyx_t_1;

  /* "pyrfc/_cyrfc.pyx":998
 *         cdef RFC_ERROR_INFO errorInfo
 *         sysId = fillString(sysid)
 *         funcName = fillString(func_name)             # <<<<<<<<<<<<<<
 *         cdef RFC_RC rc = RfcRemoveFunctionDesc(sysId, funcName, &errorInfo)
 *         free(sysId)
 */
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_func_name); if (unlikely(__pyx_t_1 == ((SAP_UC *)NULL))) __PYX_ERR(0, 998, __pyx_L1_error)
  __pyx_v_funcName = __pyx_t_1;

  /* "pyrfc/_cyrfc.pyx":999
 *         sysId = fillString(sysid)
 *         funcName = fillString(func_name)
 *         cdef RFC_RC rc = RfcRemoveFunctionDesc(sysId, funcName, &errorInfo)             # <<<<<<<<<<<<<<
 *         free(sysId)
 *         free(funcName)
 */
  __pyx_v_rc = RfcRemoveFunctionDesc(__pyx_v_sysId, __pyx_v_funcName, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":1000
 *         funcName = fillString(func_name)
 *         cdef RFC_RC rc = RfcRemoveFunctionDesc(sysId, funcName, &errorInfo)
 *         free(sysId)             # <<<<<<<<<<<<<<
 *         free(funcName)
 *         if rc != RFC_OK:
 */
  free(__pyx_v_sysId);

  /* "pyrfc/_cyrfc.pyx":1001
 *         cdef RFC_RC rc = RfcRemoveFunctionDesc(sysId, funcName, &errorInfo)
 *         free(sysId)
 *         free(funcName)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 */
  free(__pyx_v_funcName);

  /* "pyrfc/_cyrfc.pyx":1002
 *         free(sysId)
 *         free(funcName)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         return rc
 */
  __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
  if (__pyx_t_2) {

    /* "pyrfc/_cyrfc.pyx":1003
 *         free(funcName)
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *         return rc
 * 
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":1002
 *         free(sysId)
 *         free(funcName)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         return rc
 */
  }

  /* "pyrfc/_cyrfc.pyx":1004
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 *         return rc             # <<<<<<<<<<<<<<
 * 
 *     ##########################################################################
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_RFC_RC(__pyx_v_rc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":985
 *         return rc
 * 
 *     def func_desc_remove(self, sysid, func_name):             # <<<<<<<<<<<<<<
 *         """Removes the Function Description from SAP NW RFC Lib cache
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":1009
 *     #  TRANSACTIONAL / QUEUED RFC
 * 
 *     def _get_transaction_id(self):             # <<<<<<<<<<<<<<
 *         """ Returns a unique 24 char transaction ID (GUID)."""
 *         cdef RFC_RC rc
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_41_get_transaction_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Connection_40_get_transaction_id[] = " Returns a unique 24 char transaction ID (GUID).";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_41_get_transaction_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_transaction_id (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_40_get_transaction_id(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_40_get_transaction_id(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_TID __pyx_v_tid;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_transaction_id", 0);

  /* "pyrfc/_cyrfc.pyx":1015
 *         cdef RFC_TID tid
 * 
 *         if not self.alive:             # <<<<<<<<<<<<<<
 *             self._open()
 *         rc = RfcGetTransactionID(self._handle, tid, &errorInfo)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1015, __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, 1015, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (__pyx_t_3) {

    /* "pyrfc/_cyrfc.pyx":1016
 * 
 *         if not self.alive:
 *             self._open()             # <<<<<<<<<<<<<<
 *         rc = RfcGetTransactionID(self._handle, tid, &errorInfo)
 *         if rc != RFC_OK:
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":1015
 *         cdef RFC_TID tid
 * 
 *         if not self.alive:             # <<<<<<<<<<<<<<
 *             self._open()
 *         rc = RfcGetTransactionID(self._handle, tid, &errorInfo)
 */
  }

  /* "pyrfc/_cyrfc.pyx":1017
 *         if not self.alive:
 *             self._open()
 *         rc = RfcGetTransactionID(self._handle, tid, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 */
  __pyx_v_rc = RfcGetTransactionID(__pyx_v_self->_handle, __pyx_v_tid, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":1018
 *             self._open()
 *         rc = RfcGetTransactionID(self._handle, tid, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         return wrapString(tid, RFC_TID_LN)
 */
  __pyx_t_3 = ((__pyx_v_rc != RFC_OK) != 0);
  if (__pyx_t_3) {

    /* "pyrfc/_cyrfc.pyx":1019
 *         rc = RfcGetTransactionID(self._handle, tid, &errorInfo)
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *         return wrapString(tid, RFC_TID_LN)
 * 
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1019, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":1018
 *             self._open()
 *         rc = RfcGetTransactionID(self._handle, tid, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         return wrapString(tid, RFC_TID_LN)
 */
  }

  /* "pyrfc/_cyrfc.pyx":1020
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 *         return wrapString(tid, RFC_TID_LN)             # <<<<<<<<<<<<<<
 * 
 *     def _create_and_submit_transaction(self, transaction_id, calls, queue_name=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(RFC_TID_LN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5.__pyx_n = 1;
  __pyx_t_5.uclen = __pyx_t_1;
  __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_tid, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":1009
 *     #  TRANSACTIONAL / QUEUED RFC
 * 
 *     def _get_transaction_id(self):             # <<<<<<<<<<<<<<
 *         """ Returns a unique 24 char transaction ID (GUID)."""
 *         cdef RFC_RC rc
 */

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

/* "pyrfc/_cyrfc.pyx":1022
 *         return wrapString(tid, RFC_TID_LN)
 * 
 *     def _create_and_submit_transaction(self, transaction_id, calls, queue_name=None):             # <<<<<<<<<<<<<<
 *         # Note: no persistence action is taken of maintaining the arguments (cf. Schmidt, Li (2009c), p. 5ff)
 *         cdef RFC_RC rc
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_43_create_and_submit_transaction(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_43_create_and_submit_transaction(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_transaction_id = 0;
  PyObject *__pyx_v_calls = 0;
  PyObject *__pyx_v_queue_name = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_create_and_submit_transaction (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_transaction_id,&__pyx_n_s_calls,&__pyx_n_s_queue_name,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transaction_id)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_calls)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_create_and_submit_transaction", 0, 2, 3, 1); __PYX_ERR(0, 1022, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_queue_name);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_create_and_submit_transaction") < 0)) __PYX_ERR(0, 1022, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_transaction_id = values[0];
    __pyx_v_calls = values[1];
    __pyx_v_queue_name = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_create_and_submit_transaction", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1022, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection._create_and_submit_transaction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_42_create_and_submit_transaction(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_transaction_id, __pyx_v_calls, __pyx_v_queue_name);

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_42_create_and_submit_transaction(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_transaction_id, PyObject *__pyx_v_calls, PyObject *__pyx_v_queue_name) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  SAP_UC *__pyx_v_queueName;
  RFC_FUNCTION_DESC_HANDLE __pyx_v_funcDesc;
  RFC_FUNCTION_HANDLE __pyx_v_funcCont;
  SAP_UC *__pyx_v_tid;
  PyObject *__pyx_v_func_name = NULL;
  PyObject *__pyx_v_params = NULL;
  SAP_UC *__pyx_v_funcName;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_value = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  SAP_UC *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *(*__pyx_t_14)(PyObject *);
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  int __pyx_t_17;
  int __pyx_t_18;
  char const *__pyx_t_19;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  char const *__pyx_t_26;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_create_and_submit_transaction", 0);

  /* "pyrfc/_cyrfc.pyx":1030
 *         cdef RFC_FUNCTION_HANDLE funcCont
 * 
 *         if not self.alive:             # <<<<<<<<<<<<<<
 *             self._open()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1030, __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, 1030, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (__pyx_t_3) {

    /* "pyrfc/_cyrfc.pyx":1031
 * 
 *         if not self.alive:
 *             self._open()             # <<<<<<<<<<<<<<
 * 
 *         tid = fillString(transaction_id)
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1031, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":1030
 *         cdef RFC_FUNCTION_HANDLE funcCont
 * 
 *         if not self.alive:             # <<<<<<<<<<<<<<
 *             self._open()
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":1033
 *             self._open()
 * 
 *         tid = fillString(transaction_id)             # <<<<<<<<<<<<<<
 *         queueName = NULL
 *         if queue_name:
 */
  __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_transaction_id); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1033, __pyx_L1_error)
  __pyx_v_tid = __pyx_t_4;

  /* "pyrfc/_cyrfc.pyx":1034
 * 
 *         tid = fillString(transaction_id)
 *         queueName = NULL             # <<<<<<<<<<<<<<
 *         if queue_name:
 *             queueName = fillString(queue_name)
 */
  __pyx_v_queueName = NULL;

  /* "pyrfc/_cyrfc.pyx":1035
 *         tid = fillString(transaction_id)
 *         queueName = NULL
 *         if queue_name:             # <<<<<<<<<<<<<<
 *             queueName = fillString(queue_name)
 *         self._tHandle = RfcCreateTransaction(self._handle, tid, queueName, &errorInfo)
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_queue_name); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1035, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "pyrfc/_cyrfc.pyx":1036
 *         queueName = NULL
 *         if queue_name:
 *             queueName = fillString(queue_name)             # <<<<<<<<<<<<<<
 *         self._tHandle = RfcCreateTransaction(self._handle, tid, queueName, &errorInfo)
 * 
 */
    __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_queue_name); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1036, __pyx_L1_error)
    __pyx_v_queueName = __pyx_t_4;

    /* "pyrfc/_cyrfc.pyx":1035
 *         tid = fillString(transaction_id)
 *         queueName = NULL
 *         if queue_name:             # <<<<<<<<<<<<<<
 *             queueName = fillString(queue_name)
 *         self._tHandle = RfcCreateTransaction(self._handle, tid, queueName, &errorInfo)
 */
  }

  /* "pyrfc/_cyrfc.pyx":1037
 *         if queue_name:
 *             queueName = fillString(queue_name)
 *         self._tHandle = RfcCreateTransaction(self._handle, tid, queueName, &errorInfo)             # <<<<<<<<<<<<<<
 * 
 *         if queue_name:
 */
  __pyx_v_self->_tHandle = RfcCreateTransaction(__pyx_v_self->_handle, __pyx_v_tid, __pyx_v_queueName, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":1039
 *         self._tHandle = RfcCreateTransaction(self._handle, tid, queueName, &errorInfo)
 * 
 *         if queue_name:             # <<<<<<<<<<<<<<
 *             free(queueName)
 *         free(tid)
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_queue_name); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1039, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "pyrfc/_cyrfc.pyx":1040
 * 
 *         if queue_name:
 *             free(queueName)             # <<<<<<<<<<<<<<
 *         free(tid)
 *         if self._tHandle == NULL:
 */
    free(__pyx_v_queueName);

    /* "pyrfc/_cyrfc.pyx":1039
 *         self._tHandle = RfcCreateTransaction(self._handle, tid, queueName, &errorInfo)
 * 
 *         if queue_name:             # <<<<<<<<<<<<<<
 *             free(queueName)
 *         free(tid)
 */
  }

  /* "pyrfc/_cyrfc.pyx":1041
 *         if queue_name:
 *             free(queueName)
 *         free(tid)             # <<<<<<<<<<<<<<
 *         if self._tHandle == NULL:
 *             self._error(&errorInfo)
 */
  free(__pyx_v_tid);

  /* "pyrfc/_cyrfc.pyx":1042
 *             free(queueName)
 *         free(tid)
 *         if self._tHandle == NULL:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         self.active_transaction = True
 */
  __pyx_t_3 = ((__pyx_v_self->_tHandle == NULL) != 0);
  if (__pyx_t_3) {

    /* "pyrfc/_cyrfc.pyx":1043
 *         free(tid)
 *         if self._tHandle == NULL:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *         self.active_transaction = True
 * 
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":1042
 *             free(queueName)
 *         free(tid)
 *         if self._tHandle == NULL:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         self.active_transaction = True
 */
  }

  /* "pyrfc/_cyrfc.pyx":1044
 *         if self._tHandle == NULL:
 *             self._error(&errorInfo)
 *         self.active_transaction = True             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  __pyx_v_self->active_transaction = 1;

  /* "pyrfc/_cyrfc.pyx":1046
 *         self.active_transaction = True
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             for func_name, params in calls:
 *                 funcName = fillString(func_name)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "pyrfc/_cyrfc.pyx":1047
 * 
 *         try:
 *             for func_name, params in calls:             # <<<<<<<<<<<<<<
 *                 funcName = fillString(func_name)
 *                 funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 */
      if (likely(PyList_CheckExact(__pyx_v_calls)) || PyTuple_CheckExact(__pyx_v_calls)) {
        __pyx_t_1 = __pyx_v_calls; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_calls); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1047, __pyx_L7_error)
      }
      for (;;) {
        if (likely(!__pyx_t_9)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1047, __pyx_L7_error)
            #else
            __pyx_t_10 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1047, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_10);
            #endif
          } else {
            if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1047, __pyx_L7_error)
            #else
            __pyx_t_10 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1047, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_10);
            #endif
          }
        } else {
          __pyx_t_10 = __pyx_t_9(__pyx_t_1);
          if (unlikely(!__pyx_t_10)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 1047, __pyx_L7_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_10);
        }
        if ((likely(PyTuple_CheckExact(__pyx_t_10))) || (PyList_CheckExact(__pyx_t_10))) {
          PyObject* sequence = __pyx_t_10;
          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, 1047, __pyx_L7_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_11 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_12 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_11 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_12 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_12);
          #else
          __pyx_t_11 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1047, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_12 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1047, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_12);
          #endif
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_13 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1047, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext;
          index = 0; __pyx_t_11 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_11)) goto __pyx_L15_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_11);
          index = 1; __pyx_t_12 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_12)) goto __pyx_L15_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_12);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) __PYX_ERR(0, 1047, __pyx_L7_error)
          __pyx_t_14 = NULL;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          goto __pyx_L16_unpacking_done;
          __pyx_L15_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __pyx_t_14 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 1047, __pyx_L7_error)
          __pyx_L16_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_func_name, __pyx_t_11);
        __pyx_t_11 = 0;
        __Pyx_XDECREF_SET(__pyx_v_params, __pyx_t_12);
        __pyx_t_12 = 0;

        /* "pyrfc/_cyrfc.pyx":1048
 *         try:
 *             for func_name, params in calls:
 *                 funcName = fillString(func_name)             # <<<<<<<<<<<<<<
 *                 funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 *                 free(funcName)
 */
        __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_func_name); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1048, __pyx_L7_error)
        __pyx_v_funcName = __pyx_t_4;

        /* "pyrfc/_cyrfc.pyx":1049
 *             for func_name, params in calls:
 *                 funcName = fillString(func_name)
 *                 funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)             # <<<<<<<<<<<<<<
 *                 free(funcName)
 *                 if not funcDesc:
 */
        __pyx_v_funcDesc = RfcGetFunctionDesc(__pyx_v_self->_handle, __pyx_v_funcName, (&__pyx_v_errorInfo));

        /* "pyrfc/_cyrfc.pyx":1050
 *                 funcName = fillString(func_name)
 *                 funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 *                 free(funcName)             # <<<<<<<<<<<<<<
 *                 if not funcDesc:
 *                     self._error(&errorInfo)
 */
        free(__pyx_v_funcName);

        /* "pyrfc/_cyrfc.pyx":1051
 *                 funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 *                 free(funcName)
 *                 if not funcDesc:             # <<<<<<<<<<<<<<
 *                     self._error(&errorInfo)
 *                 funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 */
        __pyx_t_3 = ((!(__pyx_v_funcDesc != 0)) != 0);
        if (__pyx_t_3) {

          /* "pyrfc/_cyrfc.pyx":1052
 *                 free(funcName)
 *                 if not funcDesc:
 *                     self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *                 funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 *                 if not funcCont:
 */
          __pyx_t_10 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1052, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

          /* "pyrfc/_cyrfc.pyx":1051
 *                 funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 *                 free(funcName)
 *                 if not funcDesc:             # <<<<<<<<<<<<<<
 *                     self._error(&errorInfo)
 *                 funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 */
        }

        /* "pyrfc/_cyrfc.pyx":1053
 *                 if not funcDesc:
 *                     self._error(&errorInfo)
 *                 funcCont = RfcCreateFunction(funcDesc, &errorInfo)             # <<<<<<<<<<<<<<
 *                 if not funcCont:
 *                     self._error(&errorInfo)
 */
        __pyx_v_funcCont = RfcCreateFunction(__pyx_v_funcDesc, (&__pyx_v_errorInfo));

        /* "pyrfc/_cyrfc.pyx":1054
 *                     self._error(&errorInfo)
 *                 funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 *                 if not funcCont:             # <<<<<<<<<<<<<<
 *                     self._error(&errorInfo)
 *                 try:
 */
        __pyx_t_3 = ((!(__pyx_v_funcCont != 0)) != 0);
        if (__pyx_t_3) {

          /* "pyrfc/_cyrfc.pyx":1055
 *                 funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 *                 if not funcCont:
 *                     self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *                 try:
 *                     for name, value in params.iteritems():
 */
          __pyx_t_10 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1055, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

          /* "pyrfc/_cyrfc.pyx":1054
 *                     self._error(&errorInfo)
 *                 funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 *                 if not funcCont:             # <<<<<<<<<<<<<<
 *                     self._error(&errorInfo)
 *                 try:
 */
        }

        /* "pyrfc/_cyrfc.pyx":1056
 *                 if not funcCont:
 *                     self._error(&errorInfo)
 *                 try:             # <<<<<<<<<<<<<<
 *                     for name, value in params.iteritems():
 *                         fillFunctionParameter(funcDesc, funcCont, name, value)
 */
        /*try:*/ {

          /* "pyrfc/_cyrfc.pyx":1057
 *                     self._error(&errorInfo)
 *                 try:
 *                     for name, value in params.iteritems():             # <<<<<<<<<<<<<<
 *                         fillFunctionParameter(funcDesc, funcCont, name, value)
 *                     # Add RFC call to transaction
 */
          __pyx_t_15 = 0;
          if (unlikely(__pyx_v_params == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems");
            __PYX_ERR(0, 1057, __pyx_L22_error)
          }
          __pyx_t_12 = __Pyx_dict_iterator(__pyx_v_params, 0, __pyx_n_s_iteritems, (&__pyx_t_16), (&__pyx_t_17)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1057, __pyx_L22_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_XDECREF(__pyx_t_10);
          __pyx_t_10 = __pyx_t_12;
          __pyx_t_12 = 0;
          while (1) {
            __pyx_t_18 = __Pyx_dict_iter_next(__pyx_t_10, __pyx_t_16, &__pyx_t_15, &__pyx_t_12, &__pyx_t_11, NULL, __pyx_t_17);
            if (unlikely(__pyx_t_18 == 0)) break;
            if (unlikely(__pyx_t_18 == -1)) __PYX_ERR(0, 1057, __pyx_L22_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_12);
            __pyx_t_12 = 0;
            __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_11);
            __pyx_t_11 = 0;

            /* "pyrfc/_cyrfc.pyx":1058
 *                 try:
 *                     for name, value in params.iteritems():
 *                         fillFunctionParameter(funcDesc, funcCont, name, value)             # <<<<<<<<<<<<<<
 *                     # Add RFC call to transaction
 *                     rc = RfcInvokeInTransaction(self._tHandle, funcCont, &errorInfo)
 */
            __pyx_t_11 = __pyx_f_5pyrfc_6_cyrfc_fillFunctionParameter(__pyx_v_funcDesc, __pyx_v_funcCont, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1058, __pyx_L22_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          }
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

          /* "pyrfc/_cyrfc.pyx":1060
 *                         fillFunctionParameter(funcDesc, funcCont, name, value)
 *                     # Add RFC call to transaction
 *                     rc = RfcInvokeInTransaction(self._tHandle, funcCont, &errorInfo)             # <<<<<<<<<<<<<<
 *                     if rc != RFC_OK:
 *                         self._error(&errorInfo)
 */
          __pyx_v_rc = RfcInvokeInTransaction(__pyx_v_self->_tHandle, __pyx_v_funcCont, (&__pyx_v_errorInfo));

          /* "pyrfc/_cyrfc.pyx":1061
 *                     # Add RFC call to transaction
 *                     rc = RfcInvokeInTransaction(self._tHandle, funcCont, &errorInfo)
 *                     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                         self._error(&errorInfo)
 *                 finally:
 */
          __pyx_t_3 = ((__pyx_v_rc != RFC_OK) != 0);
          if (__pyx_t_3) {

            /* "pyrfc/_cyrfc.pyx":1062
 *                     rc = RfcInvokeInTransaction(self._tHandle, funcCont, &errorInfo)
 *                     if rc != RFC_OK:
 *                         self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *                 finally:
 *                     RfcDestroyFunction(funcCont, NULL)
 */
            __pyx_t_10 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1062, __pyx_L22_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

            /* "pyrfc/_cyrfc.pyx":1061
 *                     # Add RFC call to transaction
 *                     rc = RfcInvokeInTransaction(self._tHandle, funcCont, &errorInfo)
 *                     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                         self._error(&errorInfo)
 *                 finally:
 */
          }
        }

        /* "pyrfc/_cyrfc.pyx":1064
 *                         self._error(&errorInfo)
 *                 finally:
 *                     RfcDestroyFunction(funcCont, NULL)             # <<<<<<<<<<<<<<
 *             # execute
 *             with nogil:
 */
        /*finally:*/ {
          /*normal exit:*/{
            (void)(RfcDestroyFunction(__pyx_v_funcCont, NULL));
            goto __pyx_L23;
          }
          __pyx_L22_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25);
            if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_23);
            __Pyx_XGOTREF(__pyx_t_24);
            __Pyx_XGOTREF(__pyx_t_25);
            __pyx_t_17 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_19 = __pyx_filename;
            {
              (void)(RfcDestroyFunction(__pyx_v_funcCont, NULL));
            }
            if (PY_MAJOR_VERSION >= 3) {
              __Pyx_XGIVEREF(__pyx_t_23);
              __Pyx_XGIVEREF(__pyx_t_24);
              __Pyx_XGIVEREF(__pyx_t_25);
              __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25);
            }
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_ErrRestore(__pyx_t_20, __pyx_t_21, __pyx_t_22);
            __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
            __pyx_lineno = __pyx_t_17; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_19;
            goto __pyx_L7_error;
          }
          __pyx_L23:;
        }

        /* "pyrfc/_cyrfc.pyx":1047
 * 
 *         try:
 *             for func_name, params in calls:             # <<<<<<<<<<<<<<
 *                 funcName = fillString(func_name)
 *                 funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 */
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyrfc/_cyrfc.pyx":1066
 *                     RfcDestroyFunction(funcCont, NULL)
 *             # execute
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 rc = RfcSubmitTransaction(self._tHandle, &errorInfo)
 *             if rc != RFC_OK:
 */
      {
          #ifdef WITH_THREAD
          PyThreadState *_save;
          Py_UNBLOCK_THREADS
          __Pyx_FastGIL_Remember();
          #endif
          /*try:*/ {

            /* "pyrfc/_cyrfc.pyx":1067
 *             # execute
 *             with nogil:
 *                 rc = RfcSubmitTransaction(self._tHandle, &errorInfo)             # <<<<<<<<<<<<<<
 *             if rc != RFC_OK:
 *                 self._error(&errorInfo)
 */
            __pyx_v_rc = RfcSubmitTransaction(__pyx_v_self->_tHandle, (&__pyx_v_errorInfo));
          }

          /* "pyrfc/_cyrfc.pyx":1066
 *                     RfcDestroyFunction(funcCont, NULL)
 *             # execute
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 rc = RfcSubmitTransaction(self._tHandle, &errorInfo)
 *             if rc != RFC_OK:
 */
          /*finally:*/ {
            /*normal exit:*/{
              #ifdef WITH_THREAD
              __Pyx_FastGIL_Forget();
              Py_BLOCK_THREADS
              #endif
              goto __pyx_L33;
            }
            __pyx_L33:;
          }
      }

      /* "pyrfc/_cyrfc.pyx":1068
 *             with nogil:
 *                 rc = RfcSubmitTransaction(self._tHandle, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 self._error(&errorInfo)
 * 
 */
      __pyx_t_3 = ((__pyx_v_rc != RFC_OK) != 0);
      if (__pyx_t_3) {

        /* "pyrfc/_cyrfc.pyx":1069
 *                 rc = RfcSubmitTransaction(self._tHandle, &errorInfo)
 *             if rc != RFC_OK:
 *                 self._error(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *         except RFCError as e:
 */
        __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1069, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyrfc/_cyrfc.pyx":1068
 *             with nogil:
 *                 rc = RfcSubmitTransaction(self._tHandle, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 self._error(&errorInfo)
 * 
 */
      }

      /* "pyrfc/_cyrfc.pyx":1046
 *         self.active_transaction = True
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             for func_name, params in calls:
 *                 funcName = fillString(func_name)
 */
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L12_try_end;
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "pyrfc/_cyrfc.pyx":1071
 *                 self._error(&errorInfo)
 * 
 *         except RFCError as e:             # <<<<<<<<<<<<<<
 *             # clean up actions
 *             RfcDestroyTransaction(self._tHandle, NULL)
 */
    __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_10, &__pyx_t_11);
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1071, __pyx_L9_except_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_18 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_12);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_ErrRestore(__pyx_t_1, __pyx_t_10, __pyx_t_11);
    __pyx_t_1 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
    if (__pyx_t_18) {
      __Pyx_AddTraceback("pyrfc._cyrfc.Connection._create_and_submit_transaction", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_10, &__pyx_t_1) < 0) __PYX_ERR(0, 1071, __pyx_L9_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_10);
      __pyx_v_e = __pyx_t_10;
      /*try:*/ {

        /* "pyrfc/_cyrfc.pyx":1073
 *         except RFCError as e:
 *             # clean up actions
 *             RfcDestroyTransaction(self._tHandle, NULL)             # <<<<<<<<<<<<<<
 *             raise
 * 
 */
        (void)(RfcDestroyTransaction(__pyx_v_self->_tHandle, NULL));

        /* "pyrfc/_cyrfc.pyx":1074
 *             # clean up actions
 *             RfcDestroyTransaction(self._tHandle, NULL)
 *             raise             # <<<<<<<<<<<<<<
 * 
 *     def _destroy_transaction(self):
 */
        __Pyx_GIVEREF(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_ErrRestoreWithState(__pyx_t_11, __pyx_t_10, __pyx_t_1);
        __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_1 = 0; 
        __PYX_ERR(0, 1074, __pyx_L40_error)
      }

      /* "pyrfc/_cyrfc.pyx":1071
 *                 self._error(&errorInfo)
 * 
 *         except RFCError as e:             # <<<<<<<<<<<<<<
 *             # clean up actions
 *             RfcDestroyTransaction(self._tHandle, NULL)
 */
      /*finally:*/ {
        __pyx_L40_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_25, &__pyx_t_24, &__pyx_t_23) < 0)) __Pyx_ErrFetch(&__pyx_t_25, &__pyx_t_24, &__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_25);
          __Pyx_XGOTREF(__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_20);
          __pyx_t_18 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_26 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e);
            __pyx_v_e = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_21, __pyx_t_20);
          }
          __Pyx_XGIVEREF(__pyx_t_25);
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_ErrRestore(__pyx_t_25, __pyx_t_24, __pyx_t_23);
          __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0;
          __pyx_lineno = __pyx_t_18; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_26;
          goto __pyx_L9_except_error;
        }
      }
    }
    goto __pyx_L9_except_error;
    __pyx_L9_except_error:;

    /* "pyrfc/_cyrfc.pyx":1046
 *         self.active_transaction = True
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             for func_name, params in calls:
 *                 funcName = fillString(func_name)
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L12_try_end:;
  }

  /* "pyrfc/_cyrfc.pyx":1022
 *         return wrapString(tid, RFC_TID_LN)
 * 
 *     def _create_and_submit_transaction(self, transaction_id, calls, queue_name=None):             # <<<<<<<<<<<<<<
 *         # Note: no persistence action is taken of maintaining the arguments (cf. Schmidt, Li (2009c), p. 5ff)
 *         cdef RFC_RC rc
 */

  /* 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_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection._create_and_submit_transaction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_func_name);
  __Pyx_XDECREF(__pyx_v_params);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1076
 *             raise
 * 
 *     def _destroy_transaction(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_45_destroy_transaction(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_45_destroy_transaction(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_destroy_transaction (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_44_destroy_transaction(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_44_destroy_transaction(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_destroy_transaction", 0);

  /* "pyrfc/_cyrfc.pyx":1079
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 *         if not self.active_transaction:             # <<<<<<<<<<<<<<
 *             raise RFCError("No transaction handle for this connection available.")
 *         if not self.alive:
 */
  __pyx_t_1 = ((!(__pyx_v_self->active_transaction != 0)) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":1080
 *         cdef RFC_ERROR_INFO errorInfo
 *         if not self.active_transaction:
 *             raise RFCError("No transaction handle for this connection available.")             # <<<<<<<<<<<<<<
 *         if not self.alive:
 *             self._open()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1080, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_No_transaction_handle_for_this_c) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_No_transaction_handle_for_this_c);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1080, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1080, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":1079
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 *         if not self.active_transaction:             # <<<<<<<<<<<<<<
 *             raise RFCError("No transaction handle for this connection available.")
 *         if not self.alive:
 */
  }

  /* "pyrfc/_cyrfc.pyx":1081
 *         if not self.active_transaction:
 *             raise RFCError("No transaction handle for this connection available.")
 *         if not self.alive:             # <<<<<<<<<<<<<<
 *             self._open()
 *         rc = RfcDestroyTransaction(self._tHandle, &errorInfo)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1081, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = ((!__pyx_t_1) != 0);
  if (__pyx_t_5) {

    /* "pyrfc/_cyrfc.pyx":1082
 *             raise RFCError("No transaction handle for this connection available.")
 *         if not self.alive:
 *             self._open()             # <<<<<<<<<<<<<<
 *         rc = RfcDestroyTransaction(self._tHandle, &errorInfo)
 *         self.active_transaction = False
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1082, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrfc/_cyrfc.pyx":1081
 *         if not self.active_transaction:
 *             raise RFCError("No transaction handle for this connection available.")
 *         if not self.alive:             # <<<<<<<<<<<<<<
 *             self._open()
 *         rc = RfcDestroyTransaction(self._tHandle, &errorInfo)
 */
  }

  /* "pyrfc/_cyrfc.pyx":1083
 *         if not self.alive:
 *             self._open()
 *         rc = RfcDestroyTransaction(self._tHandle, &errorInfo)             # <<<<<<<<<<<<<<
 *         self.active_transaction = False
 *         if rc != RFC_OK:
 */
  __pyx_v_rc = RfcDestroyTransaction(__pyx_v_self->_tHandle, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":1084
 *             self._open()
 *         rc = RfcDestroyTransaction(self._tHandle, &errorInfo)
 *         self.active_transaction = False             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 */
  __pyx_v_self->active_transaction = 0;

  /* "pyrfc/_cyrfc.pyx":1085
 *         rc = RfcDestroyTransaction(self._tHandle, &errorInfo)
 *         self.active_transaction = False
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 * 
 */
  __pyx_t_5 = ((__pyx_v_rc != RFC_OK) != 0);
  if (__pyx_t_5) {

    /* "pyrfc/_cyrfc.pyx":1086
 *         self.active_transaction = False
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *     def _confirm_transaction(self):
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1086, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrfc/_cyrfc.pyx":1085
 *         rc = RfcDestroyTransaction(self._tHandle, &errorInfo)
 *         self.active_transaction = False
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":1076
 *             raise
 * 
 *     def _destroy_transaction(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 */

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

/* "pyrfc/_cyrfc.pyx":1088
 *             self._error(&errorInfo)
 * 
 *     def _confirm_transaction(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_47_confirm_transaction(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_47_confirm_transaction(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_confirm_transaction (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_46_confirm_transaction(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_46_confirm_transaction(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_confirm_transaction", 0);

  /* "pyrfc/_cyrfc.pyx":1091
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 *         if not self.active_transaction:             # <<<<<<<<<<<<<<
 *             raise RFCError("No transaction handle for this connection available.")
 *         if not self.alive:
 */
  __pyx_t_1 = ((!(__pyx_v_self->active_transaction != 0)) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":1092
 *         cdef RFC_ERROR_INFO errorInfo
 *         if not self.active_transaction:
 *             raise RFCError("No transaction handle for this connection available.")             # <<<<<<<<<<<<<<
 *         if not self.alive:
 *             self._open()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_No_transaction_handle_for_this_c) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_No_transaction_handle_for_this_c);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1092, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":1091
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 *         if not self.active_transaction:             # <<<<<<<<<<<<<<
 *             raise RFCError("No transaction handle for this connection available.")
 *         if not self.alive:
 */
  }

  /* "pyrfc/_cyrfc.pyx":1093
 *         if not self.active_transaction:
 *             raise RFCError("No transaction handle for this connection available.")
 *         if not self.alive:             # <<<<<<<<<<<<<<
 *             self._open()
 *         rc = RfcConfirmTransaction(self._tHandle, &errorInfo)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = ((!__pyx_t_1) != 0);
  if (__pyx_t_5) {

    /* "pyrfc/_cyrfc.pyx":1094
 *             raise RFCError("No transaction handle for this connection available.")
 *         if not self.alive:
 *             self._open()             # <<<<<<<<<<<<<<
 *         rc = RfcConfirmTransaction(self._tHandle, &errorInfo)
 *         if rc != RFC_OK:
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrfc/_cyrfc.pyx":1093
 *         if not self.active_transaction:
 *             raise RFCError("No transaction handle for this connection available.")
 *         if not self.alive:             # <<<<<<<<<<<<<<
 *             self._open()
 *         rc = RfcConfirmTransaction(self._tHandle, &errorInfo)
 */
  }

  /* "pyrfc/_cyrfc.pyx":1095
 *         if not self.alive:
 *             self._open()
 *         rc = RfcConfirmTransaction(self._tHandle, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 */
  __pyx_v_rc = RfcConfirmTransaction(__pyx_v_self->_tHandle, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":1096
 *             self._open()
 *         rc = RfcConfirmTransaction(self._tHandle, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         rc = RfcDestroyTransaction(self._tHandle, &errorInfo)
 */
  __pyx_t_5 = ((__pyx_v_rc != RFC_OK) != 0);
  if (__pyx_t_5) {

    /* "pyrfc/_cyrfc.pyx":1097
 *         rc = RfcConfirmTransaction(self._tHandle, &errorInfo)
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *         rc = RfcDestroyTransaction(self._tHandle, &errorInfo)
 *         self.active_transaction = False
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1097, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrfc/_cyrfc.pyx":1096
 *             self._open()
 *         rc = RfcConfirmTransaction(self._tHandle, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         rc = RfcDestroyTransaction(self._tHandle, &errorInfo)
 */
  }

  /* "pyrfc/_cyrfc.pyx":1098
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 *         rc = RfcDestroyTransaction(self._tHandle, &errorInfo)             # <<<<<<<<<<<<<<
 *         self.active_transaction = False
 *         if rc != RFC_OK:
 */
  __pyx_v_rc = RfcDestroyTransaction(__pyx_v_self->_tHandle, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":1099
 *             self._error(&errorInfo)
 *         rc = RfcDestroyTransaction(self._tHandle, &errorInfo)
 *         self.active_transaction = False             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 */
  __pyx_v_self->active_transaction = 0;

  /* "pyrfc/_cyrfc.pyx":1100
 *         rc = RfcDestroyTransaction(self._tHandle, &errorInfo)
 *         self.active_transaction = False
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 * 
 */
  __pyx_t_5 = ((__pyx_v_rc != RFC_OK) != 0);
  if (__pyx_t_5) {

    /* "pyrfc/_cyrfc.pyx":1101
 *         self.active_transaction = False
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *     ##########################################################################
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrfc/_cyrfc.pyx":1100
 *         rc = RfcDestroyTransaction(self._tHandle, &errorInfo)
 *         self.active_transaction = False
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":1088
 *             self._error(&errorInfo)
 * 
 *     def _confirm_transaction(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 */

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

/* "pyrfc/_cyrfc.pyx":1106
 *     #  BACKGROUND RFC
 * 
 *     def _get_unit_id(self):             # <<<<<<<<<<<<<<
 *         """Returns a unique 32 char bgRFC unit ID (GUID)."""
 *         cdef RFC_RC rc
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_49_get_unit_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Connection_48_get_unit_id[] = "Returns a unique 32 char bgRFC unit ID (GUID).";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_49_get_unit_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_unit_id (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_48_get_unit_id(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_48_get_unit_id(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_UNITID __pyx_v_uid;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_unit_id", 0);

  /* "pyrfc/_cyrfc.pyx":1112
 *         cdef RFC_UNITID uid
 * 
 *         if not self.alive:             # <<<<<<<<<<<<<<
 *             self._open()
 *         rc = RfcGetUnitID(self._handle, uid, &errorInfo)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1112, __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, 1112, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (__pyx_t_3) {

    /* "pyrfc/_cyrfc.pyx":1113
 * 
 *         if not self.alive:
 *             self._open()             # <<<<<<<<<<<<<<
 *         rc = RfcGetUnitID(self._handle, uid, &errorInfo)
 *         if rc != RFC_OK:
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":1112
 *         cdef RFC_UNITID uid
 * 
 *         if not self.alive:             # <<<<<<<<<<<<<<
 *             self._open()
 *         rc = RfcGetUnitID(self._handle, uid, &errorInfo)
 */
  }

  /* "pyrfc/_cyrfc.pyx":1114
 *         if not self.alive:
 *             self._open()
 *         rc = RfcGetUnitID(self._handle, uid, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 */
  __pyx_v_rc = RfcGetUnitID(__pyx_v_self->_handle, __pyx_v_uid, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":1115
 *             self._open()
 *         rc = RfcGetUnitID(self._handle, uid, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         return wrapString(uid, RFC_UNITID_LN)
 */
  __pyx_t_3 = ((__pyx_v_rc != RFC_OK) != 0);
  if (__pyx_t_3) {

    /* "pyrfc/_cyrfc.pyx":1116
 *         rc = RfcGetUnitID(self._handle, uid, &errorInfo)
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *         return wrapString(uid, RFC_UNITID_LN)
 * 
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":1115
 *             self._open()
 *         rc = RfcGetUnitID(self._handle, uid, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         return wrapString(uid, RFC_UNITID_LN)
 */
  }

  /* "pyrfc/_cyrfc.pyx":1117
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 *         return wrapString(uid, RFC_UNITID_LN)             # <<<<<<<<<<<<<<
 * 
 *     def _create_and_submit_unit(self, unit_id, calls, queue_names=None, attributes=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(RFC_UNITID_LN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5.__pyx_n = 1;
  __pyx_t_5.uclen = __pyx_t_1;
  __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_uid, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":1106
 *     #  BACKGROUND RFC
 * 
 *     def _get_unit_id(self):             # <<<<<<<<<<<<<<
 *         """Returns a unique 32 char bgRFC unit ID (GUID)."""
 *         cdef RFC_RC rc
 */

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

/* "pyrfc/_cyrfc.pyx":1119
 *         return wrapString(uid, RFC_UNITID_LN)
 * 
 *     def _create_and_submit_unit(self, unit_id, calls, queue_names=None, attributes=None):             # <<<<<<<<<<<<<<
 *         # Note: no persistence action is taken of maintaining the arguments (cf. Schmidt, Li (2009c), p. 5ff)
 *         cdef RFC_RC rc
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_51_create_and_submit_unit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_51_create_and_submit_unit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_unit_id = 0;
  PyObject *__pyx_v_calls = 0;
  PyObject *__pyx_v_queue_names = 0;
  PyObject *__pyx_v_attributes = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_create_and_submit_unit (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_unit_id,&__pyx_n_s_calls,&__pyx_n_s_queue_names,&__pyx_n_s_attributes,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_unit_id)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_calls)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_create_and_submit_unit", 0, 2, 4, 1); __PYX_ERR(0, 1119, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_queue_names);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attributes);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_create_and_submit_unit") < 0)) __PYX_ERR(0, 1119, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_unit_id = values[0];
    __pyx_v_calls = values[1];
    __pyx_v_queue_names = values[2];
    __pyx_v_attributes = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_create_and_submit_unit", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1119, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection._create_and_submit_unit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_50_create_and_submit_unit(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_unit_id, __pyx_v_calls, __pyx_v_queue_names, __pyx_v_attributes);

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_50_create_and_submit_unit(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit_id, PyObject *__pyx_v_calls, PyObject *__pyx_v_queue_names, PyObject *__pyx_v_attributes) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  int __pyx_v_queueNameCount;
  SAP_UC **__pyx_v_queueNames;
  RFC_UNIT_ATTRIBUTES __pyx_v_unitAttr;
  RFC_UNIT_IDENTIFIER __pyx_v_uIdentifier;
  RFC_FUNCTION_DESC_HANDLE __pyx_v_funcDesc;
  RFC_FUNCTION_HANDLE __pyx_v_funcCont;
  SAP_UC *__pyx_v_sapuc;
  SAP_UC *__pyx_v_uid;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_queue_name = NULL;
  PyObject *__pyx_v_func_name = NULL;
  PyObject *__pyx_v_params = NULL;
  SAP_UC *__pyx_v_funcName;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_value = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_v_unit_identifier = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  SAP_UC *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  short __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *(*__pyx_t_17)(PyObject *);
  Py_ssize_t __pyx_t_18;
  int __pyx_t_19;
  int __pyx_t_20;
  char const *__pyx_t_21;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  char const *__pyx_t_28;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_create_and_submit_unit", 0);
  __Pyx_INCREF(__pyx_v_queue_names);

  /* "pyrfc/_cyrfc.pyx":1132
 *         cdef SAP_UC* sapuc
 * 
 *         if not self.alive:             # <<<<<<<<<<<<<<
 *             self._open()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1132, __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, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (__pyx_t_3) {

    /* "pyrfc/_cyrfc.pyx":1133
 * 
 *         if not self.alive:
 *             self._open()             # <<<<<<<<<<<<<<
 * 
 *         # uid
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":1132
 *         cdef SAP_UC* sapuc
 * 
 *         if not self.alive:             # <<<<<<<<<<<<<<
 *             self._open()
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":1136
 * 
 *         # uid
 *         uid = fillString(unit_id)             # <<<<<<<<<<<<<<
 *         # queue
 *         queue_names = queue_names or []
 */
  __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_unit_id); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1136, __pyx_L1_error)
  __pyx_v_uid = __pyx_t_4;

  /* "pyrfc/_cyrfc.pyx":1138
 *         uid = fillString(unit_id)
 *         # queue
 *         queue_names = queue_names or []             # <<<<<<<<<<<<<<
 *         if len(queue_names) == 0:
 *             queueNameCount = 0
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_queue_names); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1138, __pyx_L1_error)
  if (!__pyx_t_3) {
  } else {
    __Pyx_INCREF(__pyx_v_queue_names);
    __pyx_t_1 = __pyx_v_queue_names;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_1 = __pyx_t_5;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_queue_names, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1139
 *         # queue
 *         queue_names = queue_names or []
 *         if len(queue_names) == 0:             # <<<<<<<<<<<<<<
 *             queueNameCount = 0
 *             queueNames = NULL
 */
  __pyx_t_6 = PyObject_Length(__pyx_v_queue_names); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1139, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_6 == 0) != 0);
  if (__pyx_t_3) {

    /* "pyrfc/_cyrfc.pyx":1140
 *         queue_names = queue_names or []
 *         if len(queue_names) == 0:
 *             queueNameCount = 0             # <<<<<<<<<<<<<<
 *             queueNames = NULL
 *         else:
 */
    __pyx_v_queueNameCount = 0;

    /* "pyrfc/_cyrfc.pyx":1141
 *         if len(queue_names) == 0:
 *             queueNameCount = 0
 *             queueNames = NULL             # <<<<<<<<<<<<<<
 *         else:
 *             queueNameCount = int(len(queue_names))
 */
    __pyx_v_queueNames = NULL;

    /* "pyrfc/_cyrfc.pyx":1139
 *         # queue
 *         queue_names = queue_names or []
 *         if len(queue_names) == 0:             # <<<<<<<<<<<<<<
 *             queueNameCount = 0
 *             queueNames = NULL
 */
    goto __pyx_L6;
  }

  /* "pyrfc/_cyrfc.pyx":1143
 *             queueNames = NULL
 *         else:
 *             queueNameCount = int(len(queue_names))             # <<<<<<<<<<<<<<
 *             queueNames = <SAP_UC**> mallocU(queueNameCount * sizeof(SAP_UC*))
 *             for i, queue_name in enumerate(queue_names):
 */
  /*else*/ {
    __pyx_t_6 = PyObject_Length(__pyx_v_queue_names); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1143, __pyx_L1_error)
    __pyx_v_queueNameCount = ((int)__pyx_t_6);

    /* "pyrfc/_cyrfc.pyx":1144
 *         else:
 *             queueNameCount = int(len(queue_names))
 *             queueNames = <SAP_UC**> mallocU(queueNameCount * sizeof(SAP_UC*))             # <<<<<<<<<<<<<<
 *             for i, queue_name in enumerate(queue_names):
 *                 queueNames[i] = fillString(queue_name)
 */
    __pyx_v_queueNames = ((SAP_UC **)mallocU((__pyx_v_queueNameCount * (sizeof(SAP_UC *)))));

    /* "pyrfc/_cyrfc.pyx":1145
 *             queueNameCount = int(len(queue_names))
 *             queueNames = <SAP_UC**> mallocU(queueNameCount * sizeof(SAP_UC*))
 *             for i, queue_name in enumerate(queue_names):             # <<<<<<<<<<<<<<
 *                 queueNames[i] = fillString(queue_name)
 *         # attributes
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_1 = __pyx_int_0;
    if (likely(PyList_CheckExact(__pyx_v_queue_names)) || PyTuple_CheckExact(__pyx_v_queue_names)) {
      __pyx_t_5 = __pyx_v_queue_names; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_queue_names); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1145, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1145, __pyx_L1_error)
          #else
          __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1145, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1145, __pyx_L1_error)
          #else
          __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1145, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        }
      } else {
        __pyx_t_8 = __pyx_t_7(__pyx_t_5);
        if (unlikely(!__pyx_t_8)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1145, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_8);
      }
      __Pyx_XDECREF_SET(__pyx_v_queue_name, __pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
      __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1);
      __pyx_t_1 = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "pyrfc/_cyrfc.pyx":1146
 *             queueNames = <SAP_UC**> mallocU(queueNameCount * sizeof(SAP_UC*))
 *             for i, queue_name in enumerate(queue_names):
 *                 queueNames[i] = fillString(queue_name)             # <<<<<<<<<<<<<<
 *         # attributes
 *         # set default values
 */
      __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_queue_name); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1146, __pyx_L1_error)
      __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1146, __pyx_L1_error)
      (__pyx_v_queueNames[__pyx_t_9]) = __pyx_t_4;

      /* "pyrfc/_cyrfc.pyx":1145
 *             queueNameCount = int(len(queue_names))
 *             queueNames = <SAP_UC**> mallocU(queueNameCount * sizeof(SAP_UC*))
 *             for i, queue_name in enumerate(queue_names):             # <<<<<<<<<<<<<<
 *                 queueNames[i] = fillString(queue_name)
 *         # attributes
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L6:;

  /* "pyrfc/_cyrfc.pyx":1149
 *         # attributes
 *         # set default values
 *         memsetR(&unitAttr, 0, sizeof(RFC_UNIT_ATTRIBUTES))             # <<<<<<<<<<<<<<
 *         memsetR(&uIdentifier, 0, sizeof(RFC_UNIT_IDENTIFIER))
 *         # unitAttr.kernelTrace = 0       (short) If != 0, the backend will write kernel traces, while executing this unit.
 */
  memsetR((&__pyx_v_unitAttr), 0, (sizeof(RFC_UNIT_ATTRIBUTES)));

  /* "pyrfc/_cyrfc.pyx":1150
 *         # set default values
 *         memsetR(&unitAttr, 0, sizeof(RFC_UNIT_ATTRIBUTES))
 *         memsetR(&uIdentifier, 0, sizeof(RFC_UNIT_IDENTIFIER))             # <<<<<<<<<<<<<<
 *         # unitAttr.kernelTrace = 0       (short) If != 0, the backend will write kernel traces, while executing this unit.
 *         # unitAttr.satTrace = 0          (short) If != 0, the backend will keep a "history" for this unit.
 */
  memsetR((&__pyx_v_uIdentifier), 0, (sizeof(RFC_UNIT_IDENTIFIER)));

  /* "pyrfc/_cyrfc.pyx":1177
 *         #                                Sending time in UTC (GMT-0). Used only when the external program is server.
 *         #                                In the client case the nwrfclib fills this automatically.
 *         if attributes is not None:             # <<<<<<<<<<<<<<
 *             if 'kernel_trace' in attributes:
 *                 unitAttr.kernelTrace = attributes['kernel_trace']
 */
  __pyx_t_3 = (__pyx_v_attributes != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "pyrfc/_cyrfc.pyx":1178
 *         #                                In the client case the nwrfclib fills this automatically.
 *         if attributes is not None:
 *             if 'kernel_trace' in attributes:             # <<<<<<<<<<<<<<
 *                 unitAttr.kernelTrace = attributes['kernel_trace']
 *             if 'sat_trace' in attributes:
 */
    __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_kernel_trace, __pyx_v_attributes, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1178, __pyx_L1_error)
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (__pyx_t_3) {

      /* "pyrfc/_cyrfc.pyx":1179
 *         if attributes is not None:
 *             if 'kernel_trace' in attributes:
 *                 unitAttr.kernelTrace = attributes['kernel_trace']             # <<<<<<<<<<<<<<
 *             if 'sat_trace' in attributes:
 *                 unitAttr.satTrace = attributes['sat_trace']
 */
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_kernel_trace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyInt_As_short(__pyx_t_1); if (unlikely((__pyx_t_10 == (short)-1) && PyErr_Occurred())) __PYX_ERR(0, 1179, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_unitAttr.kernelTrace = __pyx_t_10;

      /* "pyrfc/_cyrfc.pyx":1178
 *         #                                In the client case the nwrfclib fills this automatically.
 *         if attributes is not None:
 *             if 'kernel_trace' in attributes:             # <<<<<<<<<<<<<<
 *                 unitAttr.kernelTrace = attributes['kernel_trace']
 *             if 'sat_trace' in attributes:
 */
    }

    /* "pyrfc/_cyrfc.pyx":1180
 *             if 'kernel_trace' in attributes:
 *                 unitAttr.kernelTrace = attributes['kernel_trace']
 *             if 'sat_trace' in attributes:             # <<<<<<<<<<<<<<
 *                 unitAttr.satTrace = attributes['sat_trace']
 *             if 'unit_history' in attributes:
 */
    __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_sat_trace, __pyx_v_attributes, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1180, __pyx_L1_error)
    __pyx_t_2 = (__pyx_t_3 != 0);
    if (__pyx_t_2) {

      /* "pyrfc/_cyrfc.pyx":1181
 *                 unitAttr.kernelTrace = attributes['kernel_trace']
 *             if 'sat_trace' in attributes:
 *                 unitAttr.satTrace = attributes['sat_trace']             # <<<<<<<<<<<<<<
 *             if 'unit_history' in attributes:
 *                 unitAttr.unitHistory = attributes['unit_history']
 */
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_sat_trace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1181, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyInt_As_short(__pyx_t_1); if (unlikely((__pyx_t_10 == (short)-1) && PyErr_Occurred())) __PYX_ERR(0, 1181, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_unitAttr.satTrace = __pyx_t_10;

      /* "pyrfc/_cyrfc.pyx":1180
 *             if 'kernel_trace' in attributes:
 *                 unitAttr.kernelTrace = attributes['kernel_trace']
 *             if 'sat_trace' in attributes:             # <<<<<<<<<<<<<<
 *                 unitAttr.satTrace = attributes['sat_trace']
 *             if 'unit_history' in attributes:
 */
    }

    /* "pyrfc/_cyrfc.pyx":1182
 *             if 'sat_trace' in attributes:
 *                 unitAttr.satTrace = attributes['sat_trace']
 *             if 'unit_history' in attributes:             # <<<<<<<<<<<<<<
 *                 unitAttr.unitHistory = attributes['unit_history']
 *             if 'lock' in attributes:
 */
    __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_unit_history, __pyx_v_attributes, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1182, __pyx_L1_error)
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (__pyx_t_3) {

      /* "pyrfc/_cyrfc.pyx":1183
 *                 unitAttr.satTrace = attributes['sat_trace']
 *             if 'unit_history' in attributes:
 *                 unitAttr.unitHistory = attributes['unit_history']             # <<<<<<<<<<<<<<
 *             if 'lock' in attributes:
 *                 unitAttr.lock = attributes['lock']
 */
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_unit_history); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyInt_As_short(__pyx_t_1); if (unlikely((__pyx_t_10 == (short)-1) && PyErr_Occurred())) __PYX_ERR(0, 1183, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_unitAttr.unitHistory = __pyx_t_10;

      /* "pyrfc/_cyrfc.pyx":1182
 *             if 'sat_trace' in attributes:
 *                 unitAttr.satTrace = attributes['sat_trace']
 *             if 'unit_history' in attributes:             # <<<<<<<<<<<<<<
 *                 unitAttr.unitHistory = attributes['unit_history']
 *             if 'lock' in attributes:
 */
    }

    /* "pyrfc/_cyrfc.pyx":1184
 *             if 'unit_history' in attributes:
 *                 unitAttr.unitHistory = attributes['unit_history']
 *             if 'lock' in attributes:             # <<<<<<<<<<<<<<
 *                 unitAttr.lock = attributes['lock']
 *             if 'no_commit_check' in attributes:
 */
    __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_lock, __pyx_v_attributes, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1184, __pyx_L1_error)
    __pyx_t_2 = (__pyx_t_3 != 0);
    if (__pyx_t_2) {

      /* "pyrfc/_cyrfc.pyx":1185
 *                 unitAttr.unitHistory = attributes['unit_history']
 *             if 'lock' in attributes:
 *                 unitAttr.lock = attributes['lock']             # <<<<<<<<<<<<<<
 *             if 'no_commit_check' in attributes:
 *                 unitAttr.noCommitCheck = attributes['no_commit_check']
 */
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyInt_As_short(__pyx_t_1); if (unlikely((__pyx_t_10 == (short)-1) && PyErr_Occurred())) __PYX_ERR(0, 1185, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_unitAttr.lock = __pyx_t_10;

      /* "pyrfc/_cyrfc.pyx":1184
 *             if 'unit_history' in attributes:
 *                 unitAttr.unitHistory = attributes['unit_history']
 *             if 'lock' in attributes:             # <<<<<<<<<<<<<<
 *                 unitAttr.lock = attributes['lock']
 *             if 'no_commit_check' in attributes:
 */
    }

    /* "pyrfc/_cyrfc.pyx":1186
 *             if 'lock' in attributes:
 *                 unitAttr.lock = attributes['lock']
 *             if 'no_commit_check' in attributes:             # <<<<<<<<<<<<<<
 *                 unitAttr.noCommitCheck = attributes['no_commit_check']
 *             if 'user' in attributes and attributes['user'] is not None:
 */
    __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_no_commit_check, __pyx_v_attributes, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1186, __pyx_L1_error)
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (__pyx_t_3) {

      /* "pyrfc/_cyrfc.pyx":1187
 *                 unitAttr.lock = attributes['lock']
 *             if 'no_commit_check' in attributes:
 *                 unitAttr.noCommitCheck = attributes['no_commit_check']             # <<<<<<<<<<<<<<
 *             if 'user' in attributes and attributes['user'] is not None:
 *                 # (SAP_UC[12+1]) Sender User (optional). Default is current operating system User.
 */
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_no_commit_check); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyInt_As_short(__pyx_t_1); if (unlikely((__pyx_t_10 == (short)-1) && PyErr_Occurred())) __PYX_ERR(0, 1187, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_unitAttr.noCommitCheck = __pyx_t_10;

      /* "pyrfc/_cyrfc.pyx":1186
 *             if 'lock' in attributes:
 *                 unitAttr.lock = attributes['lock']
 *             if 'no_commit_check' in attributes:             # <<<<<<<<<<<<<<
 *                 unitAttr.noCommitCheck = attributes['no_commit_check']
 *             if 'user' in attributes and attributes['user'] is not None:
 */
    }

    /* "pyrfc/_cyrfc.pyx":1188
 *             if 'no_commit_check' in attributes:
 *                 unitAttr.noCommitCheck = attributes['no_commit_check']
 *             if 'user' in attributes and attributes['user'] is not None:             # <<<<<<<<<<<<<<
 *                 # (SAP_UC[12+1]) Sender User (optional). Default is current operating system User.
 *                 sapuc = fillString(attributes['user'][0:12])
 */
    __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_user, __pyx_v_attributes, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1188, __pyx_L1_error)
    __pyx_t_11 = (__pyx_t_2 != 0);
    if (__pyx_t_11) {
    } else {
      __pyx_t_3 = __pyx_t_11;
      goto __pyx_L16_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_user); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = (__pyx_t_1 != Py_None);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__pyx_t_11 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L16_bool_binop_done:;
    if (__pyx_t_3) {

      /* "pyrfc/_cyrfc.pyx":1190
 *             if 'user' in attributes and attributes['user'] is not None:
 *                 # (SAP_UC[12+1]) Sender User (optional). Default is current operating system User.
 *                 sapuc = fillString(attributes['user'][0:12])             # <<<<<<<<<<<<<<
 *                 strncpyU(unitAttr.user, sapuc, len(attributes['user'][0:12]) + 1)
 *                 free(sapuc)
 */
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_user); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1190, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 12, NULL, NULL, &__pyx_slice__12, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1190, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_5); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1190, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_sapuc = __pyx_t_4;

      /* "pyrfc/_cyrfc.pyx":1191
 *                 # (SAP_UC[12+1]) Sender User (optional). Default is current operating system User.
 *                 sapuc = fillString(attributes['user'][0:12])
 *                 strncpyU(unitAttr.user, sapuc, len(attributes['user'][0:12]) + 1)             # <<<<<<<<<<<<<<
 *                 free(sapuc)
 *             if 'client' in attributes:
 */
      __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_user); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1191, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 12, NULL, NULL, &__pyx_slice__12, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1191, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1191, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      strncpyU(__pyx_v_unitAttr.user, __pyx_v_sapuc, (__pyx_t_6 + 1));

      /* "pyrfc/_cyrfc.pyx":1192
 *                 sapuc = fillString(attributes['user'][0:12])
 *                 strncpyU(unitAttr.user, sapuc, len(attributes['user'][0:12]) + 1)
 *                 free(sapuc)             # <<<<<<<<<<<<<<
 *             if 'client' in attributes:
 *                 # (SAP_UC[3+1]) Sender Client ("Mandant") (optional). Default is "000".
 */
      free(__pyx_v_sapuc);

      /* "pyrfc/_cyrfc.pyx":1188
 *             if 'no_commit_check' in attributes:
 *                 unitAttr.noCommitCheck = attributes['no_commit_check']
 *             if 'user' in attributes and attributes['user'] is not None:             # <<<<<<<<<<<<<<
 *                 # (SAP_UC[12+1]) Sender User (optional). Default is current operating system User.
 *                 sapuc = fillString(attributes['user'][0:12])
 */
    }

    /* "pyrfc/_cyrfc.pyx":1193
 *                 strncpyU(unitAttr.user, sapuc, len(attributes['user'][0:12]) + 1)
 *                 free(sapuc)
 *             if 'client' in attributes:             # <<<<<<<<<<<<<<
 *                 # (SAP_UC[3+1]) Sender Client ("Mandant") (optional). Default is "000".
 *                 sapuc = fillString(attributes['client'][0:3])
 */
    __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_client, __pyx_v_attributes, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1193, __pyx_L1_error)
    __pyx_t_2 = (__pyx_t_3 != 0);
    if (__pyx_t_2) {

      /* "pyrfc/_cyrfc.pyx":1195
 *             if 'client' in attributes:
 *                 # (SAP_UC[3+1]) Sender Client ("Mandant") (optional). Default is "000".
 *                 sapuc = fillString(attributes['client'][0:3])             # <<<<<<<<<<<<<<
 *                 strncpyU(unitAttr.client, sapuc, len(attributes['client'][0:3]) + 1)
 *                 free(sapuc)
 */
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_client); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1195, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 3, NULL, NULL, &__pyx_slice__13, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1195, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_5); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1195, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_sapuc = __pyx_t_4;

      /* "pyrfc/_cyrfc.pyx":1196
 *                 # (SAP_UC[3+1]) Sender Client ("Mandant") (optional). Default is "000".
 *                 sapuc = fillString(attributes['client'][0:3])
 *                 strncpyU(unitAttr.client, sapuc, len(attributes['client'][0:3]) + 1)             # <<<<<<<<<<<<<<
 *                 free(sapuc)
 *             if 't_code' in attributes:
 */
      __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_client); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1196, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 3, NULL, NULL, &__pyx_slice__13, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1196, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1196, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      strncpyU(__pyx_v_unitAttr.client, __pyx_v_sapuc, (__pyx_t_6 + 1));

      /* "pyrfc/_cyrfc.pyx":1197
 *                 sapuc = fillString(attributes['client'][0:3])
 *                 strncpyU(unitAttr.client, sapuc, len(attributes['client'][0:3]) + 1)
 *                 free(sapuc)             # <<<<<<<<<<<<<<
 *             if 't_code' in attributes:
 *                 # (SAP_UC[20+1]) Sender Transaction Code (optional). Default is "".
 */
      free(__pyx_v_sapuc);

      /* "pyrfc/_cyrfc.pyx":1193
 *                 strncpyU(unitAttr.user, sapuc, len(attributes['user'][0:12]) + 1)
 *                 free(sapuc)
 *             if 'client' in attributes:             # <<<<<<<<<<<<<<
 *                 # (SAP_UC[3+1]) Sender Client ("Mandant") (optional). Default is "000".
 *                 sapuc = fillString(attributes['client'][0:3])
 */
    }

    /* "pyrfc/_cyrfc.pyx":1198
 *                 strncpyU(unitAttr.client, sapuc, len(attributes['client'][0:3]) + 1)
 *                 free(sapuc)
 *             if 't_code' in attributes:             # <<<<<<<<<<<<<<
 *                 # (SAP_UC[20+1]) Sender Transaction Code (optional). Default is "".
 *                 sapuc = fillString(attributes['t_code'][0:20])
 */
    __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_t_code, __pyx_v_attributes, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1198, __pyx_L1_error)
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (__pyx_t_3) {

      /* "pyrfc/_cyrfc.pyx":1200
 *             if 't_code' in attributes:
 *                 # (SAP_UC[20+1]) Sender Transaction Code (optional). Default is "".
 *                 sapuc = fillString(attributes['t_code'][0:20])             # <<<<<<<<<<<<<<
 *                 strncpyU(unitAttr.tCode, sapuc, len(attributes['t_code'][0:20]) + 1)
 *                 free(sapuc)
 */
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_t_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1200, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 20, NULL, NULL, &__pyx_slice__14, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1200, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_5); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1200, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_sapuc = __pyx_t_4;

      /* "pyrfc/_cyrfc.pyx":1201
 *                 # (SAP_UC[20+1]) Sender Transaction Code (optional). Default is "".
 *                 sapuc = fillString(attributes['t_code'][0:20])
 *                 strncpyU(unitAttr.tCode, sapuc, len(attributes['t_code'][0:20]) + 1)             # <<<<<<<<<<<<<<
 *                 free(sapuc)
 *             if 'program' in attributes and attributes['program'] is not None:
 */
      __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_t_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1201, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 20, NULL, NULL, &__pyx_slice__14, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1201, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1201, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      strncpyU(__pyx_v_unitAttr.tCode, __pyx_v_sapuc, (__pyx_t_6 + 1));

      /* "pyrfc/_cyrfc.pyx":1202
 *                 sapuc = fillString(attributes['t_code'][0:20])
 *                 strncpyU(unitAttr.tCode, sapuc, len(attributes['t_code'][0:20]) + 1)
 *                 free(sapuc)             # <<<<<<<<<<<<<<
 *             if 'program' in attributes and attributes['program'] is not None:
 *                 # (SAP_UC[40+1]) Sender Program (optional). Default is current executable name.
 */
      free(__pyx_v_sapuc);

      /* "pyrfc/_cyrfc.pyx":1198
 *                 strncpyU(unitAttr.client, sapuc, len(attributes['client'][0:3]) + 1)
 *                 free(sapuc)
 *             if 't_code' in attributes:             # <<<<<<<<<<<<<<
 *                 # (SAP_UC[20+1]) Sender Transaction Code (optional). Default is "".
 *                 sapuc = fillString(attributes['t_code'][0:20])
 */
    }

    /* "pyrfc/_cyrfc.pyx":1203
 *                 strncpyU(unitAttr.tCode, sapuc, len(attributes['t_code'][0:20]) + 1)
 *                 free(sapuc)
 *             if 'program' in attributes and attributes['program'] is not None:             # <<<<<<<<<<<<<<
 *                 # (SAP_UC[40+1]) Sender Program (optional). Default is current executable name.
 *                 sapuc = fillString(attributes['program'][0:40])
 */
    __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_program, __pyx_v_attributes, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1203, __pyx_L1_error)
    __pyx_t_11 = (__pyx_t_2 != 0);
    if (__pyx_t_11) {
    } else {
      __pyx_t_3 = __pyx_t_11;
      goto __pyx_L21_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_program); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = (__pyx_t_1 != Py_None);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__pyx_t_11 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L21_bool_binop_done:;
    if (__pyx_t_3) {

      /* "pyrfc/_cyrfc.pyx":1205
 *             if 'program' in attributes and attributes['program'] is not None:
 *                 # (SAP_UC[40+1]) Sender Program (optional). Default is current executable name.
 *                 sapuc = fillString(attributes['program'][0:40])             # <<<<<<<<<<<<<<
 *                 strncpyU(unitAttr.program, sapuc, len(attributes['program'][0:40]) + 1)
 *                 free(sapuc)
 */
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_program); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1205, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 40, NULL, NULL, &__pyx_slice__15, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1205, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_5); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1205, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_sapuc = __pyx_t_4;

      /* "pyrfc/_cyrfc.pyx":1206
 *                 # (SAP_UC[40+1]) Sender Program (optional). Default is current executable name.
 *                 sapuc = fillString(attributes['program'][0:40])
 *                 strncpyU(unitAttr.program, sapuc, len(attributes['program'][0:40]) + 1)             # <<<<<<<<<<<<<<
 *                 free(sapuc)
 * 
 */
      __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_program); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1206, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 40, NULL, NULL, &__pyx_slice__15, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1206, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1206, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      strncpyU(__pyx_v_unitAttr.program, __pyx_v_sapuc, (__pyx_t_6 + 1));

      /* "pyrfc/_cyrfc.pyx":1207
 *                 sapuc = fillString(attributes['program'][0:40])
 *                 strncpyU(unitAttr.program, sapuc, len(attributes['program'][0:40]) + 1)
 *                 free(sapuc)             # <<<<<<<<<<<<<<
 * 
 *         self._uHandle = RfcCreateUnit(self._handle, uid, <const_SAP_UC_ptr*> queueNames, queueNameCount, &unitAttr, &uIdentifier, &errorInfo)
 */
      free(__pyx_v_sapuc);

      /* "pyrfc/_cyrfc.pyx":1203
 *                 strncpyU(unitAttr.tCode, sapuc, len(attributes['t_code'][0:20]) + 1)
 *                 free(sapuc)
 *             if 'program' in attributes and attributes['program'] is not None:             # <<<<<<<<<<<<<<
 *                 # (SAP_UC[40+1]) Sender Program (optional). Default is current executable name.
 *                 sapuc = fillString(attributes['program'][0:40])
 */
    }

    /* "pyrfc/_cyrfc.pyx":1177
 *         #                                Sending time in UTC (GMT-0). Used only when the external program is server.
 *         #                                In the client case the nwrfclib fills this automatically.
 *         if attributes is not None:             # <<<<<<<<<<<<<<
 *             if 'kernel_trace' in attributes:
 *                 unitAttr.kernelTrace = attributes['kernel_trace']
 */
  }

  /* "pyrfc/_cyrfc.pyx":1209
 *                 free(sapuc)
 * 
 *         self._uHandle = RfcCreateUnit(self._handle, uid, <const_SAP_UC_ptr*> queueNames, queueNameCount, &unitAttr, &uIdentifier, &errorInfo)             # <<<<<<<<<<<<<<
 * 
 *         # queue (deallocate)
 */
  __pyx_v_self->_uHandle = RfcCreateUnit(__pyx_v_self->_handle, __pyx_v_uid, ((const SAP_UC* *)__pyx_v_queueNames), __pyx_v_queueNameCount, (&__pyx_v_unitAttr), (&__pyx_v_uIdentifier), (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":1212
 * 
 *         # queue (deallocate)
 *         if len(queue_names) > 0:             # <<<<<<<<<<<<<<
 *             for i, queue_name in enumerate(queue_names):
 *                 free(queueNames[i])
 */
  __pyx_t_6 = PyObject_Length(__pyx_v_queue_names); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1212, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrfc/_cyrfc.pyx":1213
 *         # queue (deallocate)
 *         if len(queue_names) > 0:
 *             for i, queue_name in enumerate(queue_names):             # <<<<<<<<<<<<<<
 *                 free(queueNames[i])
 *             free(queueNames)
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_1 = __pyx_int_0;
    if (likely(PyList_CheckExact(__pyx_v_queue_names)) || PyTuple_CheckExact(__pyx_v_queue_names)) {
      __pyx_t_5 = __pyx_v_queue_names; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_queue_names); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1213, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1213, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1213, __pyx_L1_error)
          #else
          __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1213, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1213, __pyx_L1_error)
          #else
          __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1213, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        }
      } else {
        __pyx_t_8 = __pyx_t_7(__pyx_t_5);
        if (unlikely(!__pyx_t_8)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1213, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_8);
      }
      __Pyx_XDECREF_SET(__pyx_v_queue_name, __pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
      __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1213, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1);
      __pyx_t_1 = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "pyrfc/_cyrfc.pyx":1214
 *         if len(queue_names) > 0:
 *             for i, queue_name in enumerate(queue_names):
 *                 free(queueNames[i])             # <<<<<<<<<<<<<<
 *             free(queueNames)
 *         # uid (deallocate)
 */
      __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1214, __pyx_L1_error)
      free((__pyx_v_queueNames[__pyx_t_9]));

      /* "pyrfc/_cyrfc.pyx":1213
 *         # queue (deallocate)
 *         if len(queue_names) > 0:
 *             for i, queue_name in enumerate(queue_names):             # <<<<<<<<<<<<<<
 *                 free(queueNames[i])
 *             free(queueNames)
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":1215
 *             for i, queue_name in enumerate(queue_names):
 *                 free(queueNames[i])
 *             free(queueNames)             # <<<<<<<<<<<<<<
 *         # uid (deallocate)
 *         free(uid)
 */
    free(__pyx_v_queueNames);

    /* "pyrfc/_cyrfc.pyx":1212
 * 
 *         # queue (deallocate)
 *         if len(queue_names) > 0:             # <<<<<<<<<<<<<<
 *             for i, queue_name in enumerate(queue_names):
 *                 free(queueNames[i])
 */
  }

  /* "pyrfc/_cyrfc.pyx":1217
 *             free(queueNames)
 *         # uid (deallocate)
 *         free(uid)             # <<<<<<<<<<<<<<
 * 
 *         if self._uHandle == NULL:
 */
  free(__pyx_v_uid);

  /* "pyrfc/_cyrfc.pyx":1219
 *         free(uid)
 * 
 *         if self._uHandle == NULL:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         self.active_unit = True
 */
  __pyx_t_3 = ((__pyx_v_self->_uHandle == NULL) != 0);
  if (__pyx_t_3) {

    /* "pyrfc/_cyrfc.pyx":1220
 * 
 *         if self._uHandle == NULL:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *         self.active_unit = True
 * 
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":1219
 *         free(uid)
 * 
 *         if self._uHandle == NULL:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         self.active_unit = True
 */
  }

  /* "pyrfc/_cyrfc.pyx":1221
 *         if self._uHandle == NULL:
 *             self._error(&errorInfo)
 *         self.active_unit = True             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  __pyx_v_self->active_unit = 1;

  /* "pyrfc/_cyrfc.pyx":1223
 *         self.active_unit = True
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             for func_name, params in calls:
 *                 funcName = fillString(func_name)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
    __Pyx_XGOTREF(__pyx_t_12);
    __Pyx_XGOTREF(__pyx_t_13);
    __Pyx_XGOTREF(__pyx_t_14);
    /*try:*/ {

      /* "pyrfc/_cyrfc.pyx":1224
 * 
 *         try:
 *             for func_name, params in calls:             # <<<<<<<<<<<<<<
 *                 funcName = fillString(func_name)
 *                 funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 */
      if (likely(PyList_CheckExact(__pyx_v_calls)) || PyTuple_CheckExact(__pyx_v_calls)) {
        __pyx_t_1 = __pyx_v_calls; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
        __pyx_t_7 = NULL;
      } else {
        __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_calls); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1224, __pyx_L27_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1224, __pyx_L27_error)
      }
      for (;;) {
        if (likely(!__pyx_t_7)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1224, __pyx_L27_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1224, __pyx_L27_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          } else {
            if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1224, __pyx_L27_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1224, __pyx_L27_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          }
        } else {
          __pyx_t_5 = __pyx_t_7(__pyx_t_1);
          if (unlikely(!__pyx_t_5)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 1224, __pyx_L27_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_5);
        }
        if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
          PyObject* sequence = __pyx_t_5;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(0, 1224, __pyx_L27_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_15 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_15 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_15);
          #else
          __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1224, __pyx_L27_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_15 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1224, __pyx_L27_error)
          __Pyx_GOTREF(__pyx_t_15);
          #endif
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_16 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1224, __pyx_L27_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_17 = Py_TYPE(__pyx_t_16)->tp_iternext;
          index = 0; __pyx_t_8 = __pyx_t_17(__pyx_t_16); if (unlikely(!__pyx_t_8)) goto __pyx_L35_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_8);
          index = 1; __pyx_t_15 = __pyx_t_17(__pyx_t_16); if (unlikely(!__pyx_t_15)) goto __pyx_L35_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_15);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_16), 2) < 0) __PYX_ERR(0, 1224, __pyx_L27_error)
          __pyx_t_17 = NULL;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          goto __pyx_L36_unpacking_done;
          __pyx_L35_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __pyx_t_17 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 1224, __pyx_L27_error)
          __pyx_L36_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_func_name, __pyx_t_8);
        __pyx_t_8 = 0;
        __Pyx_XDECREF_SET(__pyx_v_params, __pyx_t_15);
        __pyx_t_15 = 0;

        /* "pyrfc/_cyrfc.pyx":1225
 *         try:
 *             for func_name, params in calls:
 *                 funcName = fillString(func_name)             # <<<<<<<<<<<<<<
 *                 funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 *                 free(funcName)
 */
        __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_func_name); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1225, __pyx_L27_error)
        __pyx_v_funcName = __pyx_t_4;

        /* "pyrfc/_cyrfc.pyx":1226
 *             for func_name, params in calls:
 *                 funcName = fillString(func_name)
 *                 funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)             # <<<<<<<<<<<<<<
 *                 free(funcName)
 *                 if not funcDesc:
 */
        __pyx_v_funcDesc = RfcGetFunctionDesc(__pyx_v_self->_handle, __pyx_v_funcName, (&__pyx_v_errorInfo));

        /* "pyrfc/_cyrfc.pyx":1227
 *                 funcName = fillString(func_name)
 *                 funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 *                 free(funcName)             # <<<<<<<<<<<<<<
 *                 if not funcDesc:
 *                     self._error(&errorInfo)
 */
        free(__pyx_v_funcName);

        /* "pyrfc/_cyrfc.pyx":1228
 *                 funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 *                 free(funcName)
 *                 if not funcDesc:             # <<<<<<<<<<<<<<
 *                     self._error(&errorInfo)
 *                 funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 */
        __pyx_t_3 = ((!(__pyx_v_funcDesc != 0)) != 0);
        if (__pyx_t_3) {

          /* "pyrfc/_cyrfc.pyx":1229
 *                 free(funcName)
 *                 if not funcDesc:
 *                     self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *                 funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 *                 if not funcCont:
 */
          __pyx_t_5 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1229, __pyx_L27_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "pyrfc/_cyrfc.pyx":1228
 *                 funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 *                 free(funcName)
 *                 if not funcDesc:             # <<<<<<<<<<<<<<
 *                     self._error(&errorInfo)
 *                 funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 */
        }

        /* "pyrfc/_cyrfc.pyx":1230
 *                 if not funcDesc:
 *                     self._error(&errorInfo)
 *                 funcCont = RfcCreateFunction(funcDesc, &errorInfo)             # <<<<<<<<<<<<<<
 *                 if not funcCont:
 *                     self._error(&errorInfo)
 */
        __pyx_v_funcCont = RfcCreateFunction(__pyx_v_funcDesc, (&__pyx_v_errorInfo));

        /* "pyrfc/_cyrfc.pyx":1231
 *                     self._error(&errorInfo)
 *                 funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 *                 if not funcCont:             # <<<<<<<<<<<<<<
 *                     self._error(&errorInfo)
 *                 try:
 */
        __pyx_t_3 = ((!(__pyx_v_funcCont != 0)) != 0);
        if (__pyx_t_3) {

          /* "pyrfc/_cyrfc.pyx":1232
 *                 funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 *                 if not funcCont:
 *                     self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *                 try:
 *                     for name, value in params.iteritems():
 */
          __pyx_t_5 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1232, __pyx_L27_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "pyrfc/_cyrfc.pyx":1231
 *                     self._error(&errorInfo)
 *                 funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 *                 if not funcCont:             # <<<<<<<<<<<<<<
 *                     self._error(&errorInfo)
 *                 try:
 */
        }

        /* "pyrfc/_cyrfc.pyx":1233
 *                 if not funcCont:
 *                     self._error(&errorInfo)
 *                 try:             # <<<<<<<<<<<<<<
 *                     for name, value in params.iteritems():
 *                         fillFunctionParameter(funcDesc, funcCont, name, value)
 */
        /*try:*/ {

          /* "pyrfc/_cyrfc.pyx":1234
 *                     self._error(&errorInfo)
 *                 try:
 *                     for name, value in params.iteritems():             # <<<<<<<<<<<<<<
 *                         fillFunctionParameter(funcDesc, funcCont, name, value)
 *                     # Add RFC call to unit
 */
          __pyx_t_9 = 0;
          if (unlikely(__pyx_v_params == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems");
            __PYX_ERR(0, 1234, __pyx_L42_error)
          }
          __pyx_t_15 = __Pyx_dict_iterator(__pyx_v_params, 0, __pyx_n_s_iteritems, (&__pyx_t_18), (&__pyx_t_19)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1234, __pyx_L42_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_XDECREF(__pyx_t_5);
          __pyx_t_5 = __pyx_t_15;
          __pyx_t_15 = 0;
          while (1) {
            __pyx_t_20 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_18, &__pyx_t_9, &__pyx_t_15, &__pyx_t_8, NULL, __pyx_t_19);
            if (unlikely(__pyx_t_20 == 0)) break;
            if (unlikely(__pyx_t_20 == -1)) __PYX_ERR(0, 1234, __pyx_L42_error)
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_15);
            __pyx_t_15 = 0;
            __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_8);
            __pyx_t_8 = 0;

            /* "pyrfc/_cyrfc.pyx":1235
 *                 try:
 *                     for name, value in params.iteritems():
 *                         fillFunctionParameter(funcDesc, funcCont, name, value)             # <<<<<<<<<<<<<<
 *                     # Add RFC call to unit
 *                     rc = RfcInvokeInUnit(self._uHandle, funcCont, &errorInfo)
 */
            __pyx_t_8 = __pyx_f_5pyrfc_6_cyrfc_fillFunctionParameter(__pyx_v_funcDesc, __pyx_v_funcCont, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1235, __pyx_L42_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          }
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "pyrfc/_cyrfc.pyx":1237
 *                         fillFunctionParameter(funcDesc, funcCont, name, value)
 *                     # Add RFC call to unit
 *                     rc = RfcInvokeInUnit(self._uHandle, funcCont, &errorInfo)             # <<<<<<<<<<<<<<
 *                     if rc != RFC_OK:
 *                         self._error(&errorInfo)
 */
          __pyx_v_rc = RfcInvokeInUnit(__pyx_v_self->_uHandle, __pyx_v_funcCont, (&__pyx_v_errorInfo));

          /* "pyrfc/_cyrfc.pyx":1238
 *                     # Add RFC call to unit
 *                     rc = RfcInvokeInUnit(self._uHandle, funcCont, &errorInfo)
 *                     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                         self._error(&errorInfo)
 *                 finally:
 */
          __pyx_t_3 = ((__pyx_v_rc != RFC_OK) != 0);
          if (__pyx_t_3) {

            /* "pyrfc/_cyrfc.pyx":1239
 *                     rc = RfcInvokeInUnit(self._uHandle, funcCont, &errorInfo)
 *                     if rc != RFC_OK:
 *                         self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *                 finally:
 *                     RfcDestroyFunction(funcCont, NULL)
 */
            __pyx_t_5 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1239, __pyx_L42_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

            /* "pyrfc/_cyrfc.pyx":1238
 *                     # Add RFC call to unit
 *                     rc = RfcInvokeInUnit(self._uHandle, funcCont, &errorInfo)
 *                     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                         self._error(&errorInfo)
 *                 finally:
 */
          }
        }

        /* "pyrfc/_cyrfc.pyx":1241
 *                         self._error(&errorInfo)
 *                 finally:
 *                     RfcDestroyFunction(funcCont, NULL)             # <<<<<<<<<<<<<<
 *             # execute
 *             print (" Invocation finished. submitting unit.")
 */
        /*finally:*/ {
          /*normal exit:*/{
            (void)(RfcDestroyFunction(__pyx_v_funcCont, NULL));
            goto __pyx_L43;
          }
          __pyx_L42_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0;
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_25, &__pyx_t_26, &__pyx_t_27);
            if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24) < 0)) __Pyx_ErrFetch(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
            __Pyx_XGOTREF(__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_23);
            __Pyx_XGOTREF(__pyx_t_24);
            __Pyx_XGOTREF(__pyx_t_25);
            __Pyx_XGOTREF(__pyx_t_26);
            __Pyx_XGOTREF(__pyx_t_27);
            __pyx_t_19 = __pyx_lineno; __pyx_t_20 = __pyx_clineno; __pyx_t_21 = __pyx_filename;
            {
              (void)(RfcDestroyFunction(__pyx_v_funcCont, NULL));
            }
            if (PY_MAJOR_VERSION >= 3) {
              __Pyx_XGIVEREF(__pyx_t_25);
              __Pyx_XGIVEREF(__pyx_t_26);
              __Pyx_XGIVEREF(__pyx_t_27);
              __Pyx_ExceptionReset(__pyx_t_25, __pyx_t_26, __pyx_t_27);
            }
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_ErrRestore(__pyx_t_22, __pyx_t_23, __pyx_t_24);
            __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0;
            __pyx_lineno = __pyx_t_19; __pyx_clineno = __pyx_t_20; __pyx_filename = __pyx_t_21;
            goto __pyx_L27_error;
          }
          __pyx_L43:;
        }

        /* "pyrfc/_cyrfc.pyx":1224
 * 
 *         try:
 *             for func_name, params in calls:             # <<<<<<<<<<<<<<
 *                 funcName = fillString(func_name)
 *                 funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 */
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyrfc/_cyrfc.pyx":1243
 *                     RfcDestroyFunction(funcCont, NULL)
 *             # execute
 *             print (" Invocation finished. submitting unit.")             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 rc = RfcSubmitUnit(self._uHandle, &errorInfo)
 */
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1243, __pyx_L27_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyrfc/_cyrfc.pyx":1244
 *             # execute
 *             print (" Invocation finished. submitting unit.")
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 rc = RfcSubmitUnit(self._uHandle, &errorInfo)
 *             if rc != RFC_OK:
 */
      {
          #ifdef WITH_THREAD
          PyThreadState *_save;
          Py_UNBLOCK_THREADS
          __Pyx_FastGIL_Remember();
          #endif
          /*try:*/ {

            /* "pyrfc/_cyrfc.pyx":1245
 *             print (" Invocation finished. submitting unit.")
 *             with nogil:
 *                 rc = RfcSubmitUnit(self._uHandle, &errorInfo)             # <<<<<<<<<<<<<<
 *             if rc != RFC_OK:
 *                 self._error(&errorInfo)
 */
            __pyx_v_rc = RfcSubmitUnit(__pyx_v_self->_uHandle, (&__pyx_v_errorInfo));
          }

          /* "pyrfc/_cyrfc.pyx":1244
 *             # execute
 *             print (" Invocation finished. submitting unit.")
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 rc = RfcSubmitUnit(self._uHandle, &errorInfo)
 *             if rc != RFC_OK:
 */
          /*finally:*/ {
            /*normal exit:*/{
              #ifdef WITH_THREAD
              __Pyx_FastGIL_Forget();
              Py_BLOCK_THREADS
              #endif
              goto __pyx_L53;
            }
            __pyx_L53:;
          }
      }

      /* "pyrfc/_cyrfc.pyx":1246
 *             with nogil:
 *                 rc = RfcSubmitUnit(self._uHandle, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 self._error(&errorInfo)
 * 
 */
      __pyx_t_3 = ((__pyx_v_rc != RFC_OK) != 0);
      if (__pyx_t_3) {

        /* "pyrfc/_cyrfc.pyx":1247
 *                 rc = RfcSubmitUnit(self._uHandle, &errorInfo)
 *             if rc != RFC_OK:
 *                 self._error(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *         except RFCError as e:
 */
        __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1247, __pyx_L27_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyrfc/_cyrfc.pyx":1246
 *             with nogil:
 *                 rc = RfcSubmitUnit(self._uHandle, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 self._error(&errorInfo)
 * 
 */
      }

      /* "pyrfc/_cyrfc.pyx":1223
 *         self.active_unit = True
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             for func_name, params in calls:
 *                 funcName = fillString(func_name)
 */
    }
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    goto __pyx_L32_try_end;
    __pyx_L27_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrfc/_cyrfc.pyx":1249
 *                 self._error(&errorInfo)
 * 
 *         except RFCError as e:             # <<<<<<<<<<<<<<
 *             # clean up actions
 *             RfcDestroyUnit(self._uHandle, NULL)
 */
    __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_8);
    __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1249, __pyx_L29_except_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_20 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_15);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_8);
    __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_8 = 0;
    if (__pyx_t_20) {
      __Pyx_AddTraceback("pyrfc._cyrfc.Connection._create_and_submit_unit", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(0, 1249, __pyx_L29_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_e = __pyx_t_5;
      /*try:*/ {

        /* "pyrfc/_cyrfc.pyx":1251
 *         except RFCError as e:
 *             # clean up actions
 *             RfcDestroyUnit(self._uHandle, NULL)             # <<<<<<<<<<<<<<
 *             raise
 * 
 */
        (void)(RfcDestroyUnit(__pyx_v_self->_uHandle, NULL));

        /* "pyrfc/_cyrfc.pyx":1252
 *             # clean up actions
 *             RfcDestroyUnit(self._uHandle, NULL)
 *             raise             # <<<<<<<<<<<<<<
 * 
 *         unit_identifier = wrapUnitIdentifier(uIdentifier)
 */
        __Pyx_GIVEREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_5);
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_ErrRestoreWithState(__pyx_t_8, __pyx_t_5, __pyx_t_1);
        __pyx_t_8 = 0; __pyx_t_5 = 0; __pyx_t_1 = 0; 
        __PYX_ERR(0, 1252, __pyx_L60_error)
      }

      /* "pyrfc/_cyrfc.pyx":1249
 *                 self._error(&errorInfo)
 * 
 *         except RFCError as e:             # <<<<<<<<<<<<<<
 *             # clean up actions
 *             RfcDestroyUnit(self._uHandle, NULL)
 */
      /*finally:*/ {
        __pyx_L60_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_27 = 0; __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_24, &__pyx_t_23, &__pyx_t_22);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_27, &__pyx_t_26, &__pyx_t_25) < 0)) __Pyx_ErrFetch(&__pyx_t_27, &__pyx_t_26, &__pyx_t_25);
          __Pyx_XGOTREF(__pyx_t_27);
          __Pyx_XGOTREF(__pyx_t_26);
          __Pyx_XGOTREF(__pyx_t_25);
          __Pyx_XGOTREF(__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_22);
          __pyx_t_20 = __pyx_lineno; __pyx_t_19 = __pyx_clineno; __pyx_t_28 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e);
            __pyx_v_e = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_ExceptionReset(__pyx_t_24, __pyx_t_23, __pyx_t_22);
          }
          __Pyx_XGIVEREF(__pyx_t_27);
          __Pyx_XGIVEREF(__pyx_t_26);
          __Pyx_XGIVEREF(__pyx_t_25);
          __Pyx_ErrRestore(__pyx_t_27, __pyx_t_26, __pyx_t_25);
          __pyx_t_27 = 0; __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0;
          __pyx_lineno = __pyx_t_20; __pyx_clineno = __pyx_t_19; __pyx_filename = __pyx_t_28;
          goto __pyx_L29_except_error;
        }
      }
    }
    goto __pyx_L29_except_error;
    __pyx_L29_except_error:;

    /* "pyrfc/_cyrfc.pyx":1223
 *         self.active_unit = True
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             for func_name, params in calls:
 *                 funcName = fillString(func_name)
 */
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
    goto __pyx_L1_error;
    __pyx_L32_try_end:;
  }

  /* "pyrfc/_cyrfc.pyx":1254
 *             raise
 * 
 *         unit_identifier = wrapUnitIdentifier(uIdentifier)             # <<<<<<<<<<<<<<
 *         return unit_identifier["queued"]
 * 
 */
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapUnitIdentifier(__pyx_v_uIdentifier); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_unit_identifier = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1255
 * 
 *         unit_identifier = wrapUnitIdentifier(uIdentifier)
 *         return unit_identifier["queued"]             # <<<<<<<<<<<<<<
 * 
 *     def _get_unit_state(self, unit):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit_identifier, __pyx_n_u_queued); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":1119
 *         return wrapString(uid, RFC_UNITID_LN)
 * 
 *     def _create_and_submit_unit(self, unit_id, calls, queue_names=None, attributes=None):             # <<<<<<<<<<<<<<
 *         # Note: no persistence action is taken of maintaining the arguments (cf. Schmidt, Li (2009c), p. 5ff)
 *         cdef RFC_RC rc
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection._create_and_submit_unit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_queue_name);
  __Pyx_XDECREF(__pyx_v_func_name);
  __Pyx_XDECREF(__pyx_v_params);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_unit_identifier);
  __Pyx_XDECREF(__pyx_v_queue_names);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1257
 *         return unit_identifier["queued"]
 * 
 *     def _get_unit_state(self, unit):             # <<<<<<<<<<<<<<
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_53_get_unit_state(PyObject *__pyx_v_self, PyObject *__pyx_v_unit); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_53_get_unit_state(PyObject *__pyx_v_self, PyObject *__pyx_v_unit) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_unit_state (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_52_get_unit_state(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_unit));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_52_get_unit_state(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_UNIT_IDENTIFIER __pyx_v_uIdentifier;
  RFC_UNIT_STATE __pyx_v_state;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  RFC_UNIT_IDENTIFIER __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_unit_state", 0);

  /* "pyrfc/_cyrfc.pyx":1260
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_UNIT_IDENTIFIER uIdentifier = fillUnitIdentifier(unit)             # <<<<<<<<<<<<<<
 *         cdef RFC_UNIT_STATE state
 * 
 */
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_fillUnitIdentifier(__pyx_v_unit); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1260, __pyx_L1_error)
  __pyx_v_uIdentifier = __pyx_t_1;

  /* "pyrfc/_cyrfc.pyx":1263
 *         cdef RFC_UNIT_STATE state
 * 
 *         if not self.active_unit:             # <<<<<<<<<<<<<<
 *             raise RFCError("No unit handle for this connection available.")
 *         if not self.alive:
 */
  __pyx_t_2 = ((!(__pyx_v_self->active_unit != 0)) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":1264
 * 
 *         if not self.active_unit:
 *             raise RFCError("No unit handle for this connection available.")             # <<<<<<<<<<<<<<
 *         if not self.alive:
 *             self._open()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_No_unit_handle_for_this_connecti) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_No_unit_handle_for_this_connecti);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1264, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":1263
 *         cdef RFC_UNIT_STATE state
 * 
 *         if not self.active_unit:             # <<<<<<<<<<<<<<
 *             raise RFCError("No unit handle for this connection available.")
 *         if not self.alive:
 */
  }

  /* "pyrfc/_cyrfc.pyx":1265
 *         if not self.active_unit:
 *             raise RFCError("No unit handle for this connection available.")
 *         if not self.alive:             # <<<<<<<<<<<<<<
 *             self._open()
 *         rc = RfcGetUnitState(self._handle, &uIdentifier, &state, &errorInfo)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1265, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = ((!__pyx_t_2) != 0);
  if (__pyx_t_6) {

    /* "pyrfc/_cyrfc.pyx":1266
 *             raise RFCError("No unit handle for this connection available.")
 *         if not self.alive:
 *             self._open()             # <<<<<<<<<<<<<<
 *         rc = RfcGetUnitState(self._handle, &uIdentifier, &state, &errorInfo)
 *         if rc != RFC_OK:
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":1265
 *         if not self.active_unit:
 *             raise RFCError("No unit handle for this connection available.")
 *         if not self.alive:             # <<<<<<<<<<<<<<
 *             self._open()
 *         rc = RfcGetUnitState(self._handle, &uIdentifier, &state, &errorInfo)
 */
  }

  /* "pyrfc/_cyrfc.pyx":1267
 *         if not self.alive:
 *             self._open()
 *         rc = RfcGetUnitState(self._handle, &uIdentifier, &state, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 */
  __pyx_v_rc = RfcGetUnitState(__pyx_v_self->_handle, (&__pyx_v_uIdentifier), (&__pyx_v_state), (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":1268
 *             self._open()
 *         rc = RfcGetUnitState(self._handle, &uIdentifier, &state, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         if state not in enum_values(UnitState):
 */
  __pyx_t_6 = ((__pyx_v_rc != RFC_OK) != 0);
  if (__pyx_t_6) {

    /* "pyrfc/_cyrfc.pyx":1269
 *         rc = RfcGetUnitState(self._handle, &uIdentifier, &state, &errorInfo)
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *         if state not in enum_values(UnitState):
 *             raise RFCError(f"Unit {unit['id']} has invalid state '{state}'")
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":1268
 *             self._open()
 *         rc = RfcGetUnitState(self._handle, &uIdentifier, &state, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         if state not in enum_values(UnitState):
 */
  }

  /* "pyrfc/_cyrfc.pyx":1270
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 *         if state not in enum_values(UnitState):             # <<<<<<<<<<<<<<
 *             raise RFCError(f"Unit {unit['id']} has invalid state '{state}'")
 *         return UnitState(state).name
 */
  __pyx_t_3 = __Pyx_PyInt_From_RFC_UNIT_STATE(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_enum_values); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_UnitState); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_4, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1270, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = (__pyx_t_6 != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":1271
 *             self._error(&errorInfo)
 *         if state not in enum_values(UnitState):
 *             raise RFCError(f"Unit {unit['id']} has invalid state '{state}'")             # <<<<<<<<<<<<<<
 *         return UnitState(state).name
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = 0;
    __pyx_t_10 = 127;
    __Pyx_INCREF(__pyx_kp_u_Unit);
    __pyx_t_9 += 5;
    __Pyx_GIVEREF(__pyx_kp_u_Unit);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Unit);
    __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit, __pyx_n_u_id); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_10;
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_8);
    __pyx_t_8 = 0;
    __Pyx_INCREF(__pyx_kp_u_has_invalid_state);
    __pyx_t_9 += 20;
    __Pyx_GIVEREF(__pyx_kp_u_has_invalid_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_has_invalid_state);
    __pyx_t_8 = __Pyx_PyUnicode_From_RFC_UNIT_STATE(__pyx_v_state, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_10;
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_8);
    __pyx_t_8 = 0;
    __Pyx_INCREF(__pyx_kp_u__6);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__6);
    PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__6);
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
    __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, 1271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 1271, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":1270
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 *         if state not in enum_values(UnitState):             # <<<<<<<<<<<<<<
 *             raise RFCError(f"Unit {unit['id']} has invalid state '{state}'")
 *         return UnitState(state).name
 */
  }

  /* "pyrfc/_cyrfc.pyx":1272
 *         if state not in enum_values(UnitState):
 *             raise RFCError(f"Unit {unit['id']} has invalid state '{state}'")
 *         return UnitState(state).name             # <<<<<<<<<<<<<<
 * 
 *     def _destroy_unit(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_UnitState); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_RFC_UNIT_STATE(__pyx_v_state); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __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, 1272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":1257
 *         return unit_identifier["queued"]
 * 
 *     def _get_unit_state(self, unit):             # <<<<<<<<<<<<<<
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 */

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

/* "pyrfc/_cyrfc.pyx":1274
 *         return UnitState(state).name
 * 
 *     def _destroy_unit(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_55_destroy_unit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_55_destroy_unit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_destroy_unit (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_54_destroy_unit(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_54_destroy_unit(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_destroy_unit", 0);

  /* "pyrfc/_cyrfc.pyx":1277
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 *         if not self.active_unit:             # <<<<<<<<<<<<<<
 *             raise RFCError("No unit handle for this connection available.")
 *         if not self.alive:
 */
  __pyx_t_1 = ((!(__pyx_v_self->active_unit != 0)) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":1278
 *         cdef RFC_ERROR_INFO errorInfo
 *         if not self.active_unit:
 *             raise RFCError("No unit handle for this connection available.")             # <<<<<<<<<<<<<<
 *         if not self.alive:
 *             self._open()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_No_unit_handle_for_this_connecti) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_No_unit_handle_for_this_connecti);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1278, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":1277
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 *         if not self.active_unit:             # <<<<<<<<<<<<<<
 *             raise RFCError("No unit handle for this connection available.")
 *         if not self.alive:
 */
  }

  /* "pyrfc/_cyrfc.pyx":1279
 *         if not self.active_unit:
 *             raise RFCError("No unit handle for this connection available.")
 *         if not self.alive:             # <<<<<<<<<<<<<<
 *             self._open()
 *         rc = RfcDestroyUnit(self._uHandle, &errorInfo)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1279, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = ((!__pyx_t_1) != 0);
  if (__pyx_t_5) {

    /* "pyrfc/_cyrfc.pyx":1280
 *             raise RFCError("No unit handle for this connection available.")
 *         if not self.alive:
 *             self._open()             # <<<<<<<<<<<<<<
 *         rc = RfcDestroyUnit(self._uHandle, &errorInfo)
 *         self.active_unit = False
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrfc/_cyrfc.pyx":1279
 *         if not self.active_unit:
 *             raise RFCError("No unit handle for this connection available.")
 *         if not self.alive:             # <<<<<<<<<<<<<<
 *             self._open()
 *         rc = RfcDestroyUnit(self._uHandle, &errorInfo)
 */
  }

  /* "pyrfc/_cyrfc.pyx":1281
 *         if not self.alive:
 *             self._open()
 *         rc = RfcDestroyUnit(self._uHandle, &errorInfo)             # <<<<<<<<<<<<<<
 *         self.active_unit = False
 *         if rc != RFC_OK:
 */
  __pyx_v_rc = RfcDestroyUnit(__pyx_v_self->_uHandle, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":1282
 *             self._open()
 *         rc = RfcDestroyUnit(self._uHandle, &errorInfo)
 *         self.active_unit = False             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 */
  __pyx_v_self->active_unit = 0;

  /* "pyrfc/_cyrfc.pyx":1283
 *         rc = RfcDestroyUnit(self._uHandle, &errorInfo)
 *         self.active_unit = False
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 * 
 */
  __pyx_t_5 = ((__pyx_v_rc != RFC_OK) != 0);
  if (__pyx_t_5) {

    /* "pyrfc/_cyrfc.pyx":1284
 *         self.active_unit = False
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *     def _confirm_unit(self, unit):
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrfc/_cyrfc.pyx":1283
 *         rc = RfcDestroyUnit(self._uHandle, &errorInfo)
 *         self.active_unit = False
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":1274
 *         return UnitState(state).name
 * 
 *     def _destroy_unit(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 */

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

/* "pyrfc/_cyrfc.pyx":1286
 *             self._error(&errorInfo)
 * 
 *     def _confirm_unit(self, unit):             # <<<<<<<<<<<<<<
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_57_confirm_unit(PyObject *__pyx_v_self, PyObject *__pyx_v_unit); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_57_confirm_unit(PyObject *__pyx_v_self, PyObject *__pyx_v_unit) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_confirm_unit (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_56_confirm_unit(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_unit));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_56_confirm_unit(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_UNIT_IDENTIFIER __pyx_v_uIdentifier;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  RFC_UNIT_IDENTIFIER __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_confirm_unit", 0);

  /* "pyrfc/_cyrfc.pyx":1289
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_UNIT_IDENTIFIER uIdentifier = fillUnitIdentifier(unit)             # <<<<<<<<<<<<<<
 * 
 *         if not self.active_unit:
 */
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_fillUnitIdentifier(__pyx_v_unit); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1289, __pyx_L1_error)
  __pyx_v_uIdentifier = __pyx_t_1;

  /* "pyrfc/_cyrfc.pyx":1291
 *         cdef RFC_UNIT_IDENTIFIER uIdentifier = fillUnitIdentifier(unit)
 * 
 *         if not self.active_unit:             # <<<<<<<<<<<<<<
 *             raise RFCError("No unit handle for this connection available.")
 *         if not self.alive:
 */
  __pyx_t_2 = ((!(__pyx_v_self->active_unit != 0)) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":1292
 * 
 *         if not self.active_unit:
 *             raise RFCError("No unit handle for this connection available.")             # <<<<<<<<<<<<<<
 *         if not self.alive:
 *             self._open()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_No_unit_handle_for_this_connecti) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_No_unit_handle_for_this_connecti);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1292, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":1291
 *         cdef RFC_UNIT_IDENTIFIER uIdentifier = fillUnitIdentifier(unit)
 * 
 *         if not self.active_unit:             # <<<<<<<<<<<<<<
 *             raise RFCError("No unit handle for this connection available.")
 *         if not self.alive:
 */
  }

  /* "pyrfc/_cyrfc.pyx":1293
 *         if not self.active_unit:
 *             raise RFCError("No unit handle for this connection available.")
 *         if not self.alive:             # <<<<<<<<<<<<<<
 *             self._open()
 *         rc = RfcConfirmUnit(self._handle, &uIdentifier, &errorInfo)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1293, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = ((!__pyx_t_2) != 0);
  if (__pyx_t_6) {

    /* "pyrfc/_cyrfc.pyx":1294
 *             raise RFCError("No unit handle for this connection available.")
 *         if not self.alive:
 *             self._open()             # <<<<<<<<<<<<<<
 *         rc = RfcConfirmUnit(self._handle, &uIdentifier, &errorInfo)
 *         if rc != RFC_OK:
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1294, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":1293
 *         if not self.active_unit:
 *             raise RFCError("No unit handle for this connection available.")
 *         if not self.alive:             # <<<<<<<<<<<<<<
 *             self._open()
 *         rc = RfcConfirmUnit(self._handle, &uIdentifier, &errorInfo)
 */
  }

  /* "pyrfc/_cyrfc.pyx":1295
 *         if not self.alive:
 *             self._open()
 *         rc = RfcConfirmUnit(self._handle, &uIdentifier, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 */
  __pyx_v_rc = RfcConfirmUnit(__pyx_v_self->_handle, (&__pyx_v_uIdentifier), (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":1296
 *             self._open()
 *         rc = RfcConfirmUnit(self._handle, &uIdentifier, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         rc = RfcDestroyUnit(self._uHandle, &errorInfo)
 */
  __pyx_t_6 = ((__pyx_v_rc != RFC_OK) != 0);
  if (__pyx_t_6) {

    /* "pyrfc/_cyrfc.pyx":1297
 *         rc = RfcConfirmUnit(self._handle, &uIdentifier, &errorInfo)
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *         rc = RfcDestroyUnit(self._uHandle, &errorInfo)
 *         self.active_unit = False
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":1296
 *             self._open()
 *         rc = RfcConfirmUnit(self._handle, &uIdentifier, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         rc = RfcDestroyUnit(self._uHandle, &errorInfo)
 */
  }

  /* "pyrfc/_cyrfc.pyx":1298
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 *         rc = RfcDestroyUnit(self._uHandle, &errorInfo)             # <<<<<<<<<<<<<<
 *         self.active_unit = False
 *         if rc != RFC_OK:
 */
  __pyx_v_rc = RfcDestroyUnit(__pyx_v_self->_uHandle, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":1299
 *             self._error(&errorInfo)
 *         rc = RfcDestroyUnit(self._uHandle, &errorInfo)
 *         self.active_unit = False             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 */
  __pyx_v_self->active_unit = 0;

  /* "pyrfc/_cyrfc.pyx":1300
 *         rc = RfcDestroyUnit(self._uHandle, &errorInfo)
 *         self.active_unit = False
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 * 
 */
  __pyx_t_6 = ((__pyx_v_rc != RFC_OK) != 0);
  if (__pyx_t_6) {

    /* "pyrfc/_cyrfc.pyx":1301
 *         self.active_unit = False
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *     ##########################################################################
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":1300
 *         rc = RfcDestroyUnit(self._uHandle, &errorInfo)
 *         self.active_unit = False
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":1286
 *             self._error(&errorInfo)
 * 
 *     def _confirm_unit(self, unit):             # <<<<<<<<<<<<<<
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection._confirm_unit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1311
 *     # * queued - boolean, set on fill_and_submit_unit() call
 * 
 *     def initialize_unit(self, background=True):             # <<<<<<<<<<<<<<
 *         """ Initializes a logical unit of work (LUW), shorthand: unit
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_59initialize_unit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Connection_58initialize_unit[] = " Initializes a logical unit of work (LUW), shorthand: unit\n\n        .. warning::\n\n           The background protocol (bgRFC) is not working in the current version.\n           Please use only tRFC/qRFC protocols.\n\n        :param background: The bgRFC protocol will be used. If set to False,\n               the t/qRFC protocol will be used. Note that the bgRFC protocol\n               has extended functionality. Default: True\n        :type background: boolean\n\n        :returns: A dictionary describing the unit.\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_59initialize_unit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_background = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("initialize_unit (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_background,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_background);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initialize_unit") < 0)) __PYX_ERR(0, 1311, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_background = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("initialize_unit", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1311, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection.initialize_unit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_58initialize_unit(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_background);

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_58initialize_unit(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_background) {
  PyObject *__pyx_v_id = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("initialize_unit", 0);

  /* "pyrfc/_cyrfc.pyx":1326
 *         :returns: A dictionary describing the unit.
 *         """
 *         if background is True:     # use bgRFC             # <<<<<<<<<<<<<<
 *             id = self._get_unit_id()
 *         elif background is False:  # classic t/qRFC
 */
  __pyx_t_1 = (__pyx_v_background == Py_True);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrfc/_cyrfc.pyx":1327
 *         """
 *         if background is True:     # use bgRFC
 *             id = self._get_unit_id()             # <<<<<<<<<<<<<<
 *         elif background is False:  # classic t/qRFC
 *             id = self._get_transaction_id()
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_unit_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_id = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":1326
 *         :returns: A dictionary describing the unit.
 *         """
 *         if background is True:     # use bgRFC             # <<<<<<<<<<<<<<
 *             id = self._get_unit_id()
 *         elif background is False:  # classic t/qRFC
 */
    goto __pyx_L3;
  }

  /* "pyrfc/_cyrfc.pyx":1328
 *         if background is True:     # use bgRFC
 *             id = self._get_unit_id()
 *         elif background is False:  # classic t/qRFC             # <<<<<<<<<<<<<<
 *             id = self._get_transaction_id()
 *         else:
 */
  __pyx_t_2 = (__pyx_v_background == Py_False);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (likely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":1329
 *             id = self._get_unit_id()
 *         elif background is False:  # classic t/qRFC
 *             id = self._get_transaction_id()             # <<<<<<<<<<<<<<
 *         else:
 *             raise RFCError("Argument 'background' must be a boolean value.")
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_transaction_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_id = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":1328
 *         if background is True:     # use bgRFC
 *             id = self._get_unit_id()
 *         elif background is False:  # classic t/qRFC             # <<<<<<<<<<<<<<
 *             id = self._get_transaction_id()
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pyrfc/_cyrfc.pyx":1331
 *             id = self._get_transaction_id()
 *         else:
 *             raise RFCError("Argument 'background' must be a boolean value.")             # <<<<<<<<<<<<<<
 *         return {'background': background, 'id': id, "queued": False}
 * 
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_Argument_background_must_be_a_bo) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_Argument_background_must_be_a_bo);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1331, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrfc/_cyrfc.pyx":1332
 *         else:
 *             raise RFCError("Argument 'background' must be a boolean value.")
 *         return {'background': background, 'id': id, "queued": False}             # <<<<<<<<<<<<<<
 * 
 *     def fill_and_submit_unit(self, unit, calls, queue_names=None, attributes=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_background, __pyx_v_background) < 0) __PYX_ERR(0, 1332, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_id, __pyx_v_id) < 0) __PYX_ERR(0, 1332, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_queued, Py_False) < 0) __PYX_ERR(0, 1332, __pyx_L1_error)
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":1311
 *     # * queued - boolean, set on fill_and_submit_unit() call
 * 
 *     def initialize_unit(self, background=True):             # <<<<<<<<<<<<<<
 *         """ Initializes a logical unit of work (LUW), shorthand: unit
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":1334
 *         return {'background': background, 'id': id, "queued": False}
 * 
 *     def fill_and_submit_unit(self, unit, calls, queue_names=None, attributes=None):             # <<<<<<<<<<<<<<
 *         """ Fills a unit with one or more RFC and submits it to the backend.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_61fill_and_submit_unit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Connection_60fill_and_submit_unit[] = " Fills a unit with one or more RFC and submits it to the backend.\n\n        Fills a unit for this connection, prepare the invocation\n        of multiple RFC function modules in it, and submits the unit\n        to the backend.\n\n        Afterwards, the unit is still attached to the connection object,\n        until confirm_unit() or destroy_unit() is called. Until one of these\n        methods are called, no other unit could be filled and submitted.\n\n        :param unit: a unit descriptor as returned by\n               :meth:`~pyrfc.Connection.initialize_unit`.\n        :param calls: a list of call descriptions. Each call description is a\n               tuple that contains the function name as the first element and\n               the function arguments in form of a dictionary as the second element.\n        :param queue_names:\n               If the unit uses the background protocol, various queue names can\n               be given (leading to a asynchronous unit, type 'Q'). If parameter\n               is an empty list or None, a synchronous unit (type 'T') is created.\n\n               If the unit does not use the background protocol, the queue name\n               may be a list with exactly one element, leading to a qRFC, or\n               an empty list or None, leading to a tRFC.\n        :type queue_names: list of strings or None (default)\n        :param attributes: optional argument for attributes of the unit -- only valid if the background protocol\n              is used. The attributes dict may contain the following keywords:\n\n              =============== ============================= ======================= ==========================================================================================\n              keyword         default                       type                    description\n              =============== ============================= ======================= =======================================================================""===================\n              kernel_trace    0                             int                     If != 0, the backend will write kernel traces, while executing this unit.\n              sat_trace       0                             int                     If != 0, the backend will write statistic records, while executing this unit.\n              unit_history    0                             int                     If != 0, the backend will keep a \"history\" for this unit.\n              lock            0                             int                     Used only for type Q: If != 0, the unit will be written to the queue, but not processed.\n                                                                                    The unit can then be started manually in the ABAP debugger.\n              no_commit_check 0                             int                     Per default the backend will check during execution of a unit, whether one of the\n                                                                                    unit's function modules triggers an explicit or implicit COMMITWORK.\n                                                                                    In this case the unit is aborted with an error, because the transactional integrity of\n                                                                                    this unit cannot be guaranteed. By setting \"no_commit_check\" to true (!=0), this behavior\n                                                                                    can be suppressed, meaning the unit will be executed anyway, even if one of it's\n                                                                                    function modules \"misbehaves\" and triggers a COMMIT WORK.\n              user            current operating system user String, len |nbsp| 12   Sender User (optional).\n              client          \"000\"                         String, len |nbsp| 3    Sender Client (""\"Mandant\") (optional).\n              t_code          \"\"                            String, len |nbsp| 20   Sender Transaction Code (optional).\n              program         current executable name       String, len |nbsp| 40   Sender Program (optional).\n              =============== ============================= ======================= ==========================================================================================\n\n        :type attributes: dict or None (default)\n        :raises: :exc:`~pyrfc.RFCError` or a subclass thereof if an error\n                 occurred. In this case, the unit is destroyed.\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_61fill_and_submit_unit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_unit = 0;
  PyObject *__pyx_v_calls = 0;
  PyObject *__pyx_v_queue_names = 0;
  PyObject *__pyx_v_attributes = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fill_and_submit_unit (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_unit,&__pyx_n_s_calls,&__pyx_n_s_queue_names,&__pyx_n_s_attributes,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_unit)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_calls)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fill_and_submit_unit", 0, 2, 4, 1); __PYX_ERR(0, 1334, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_queue_names);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attributes);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fill_and_submit_unit") < 0)) __PYX_ERR(0, 1334, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_unit = values[0];
    __pyx_v_calls = values[1];
    __pyx_v_queue_names = values[2];
    __pyx_v_attributes = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fill_and_submit_unit", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1334, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection.fill_and_submit_unit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_60fill_and_submit_unit(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_unit, __pyx_v_calls, __pyx_v_queue_names, __pyx_v_attributes);

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_60fill_and_submit_unit(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit, PyObject *__pyx_v_calls, PyObject *__pyx_v_queue_names, PyObject *__pyx_v_attributes) {
  PyObject *__pyx_v_func_name = NULL;
  PyObject *__pyx_v_params = NULL;
  PyObject *__pyx_v_bg = NULL;
  PyObject *__pyx_v_unit_id = NULL;
  PyObject *__pyx_v_queue_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  Py_UCS4 __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fill_and_submit_unit", 0);

  /* "pyrfc/_cyrfc.pyx":1387
 *         """
 * 
 *         if type(unit) is not dict or 'id' not in unit or 'background' not in unit:             # <<<<<<<<<<<<<<
 *             raise TypeError("Parameter 'unit' not valid. Please use initialize_unit() to retrieve a valid unit.")
 *         if not isinstance(calls, Iterable):
 */
  __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_unit)) != ((PyObject *)(&PyDict_Type)));
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_id, __pyx_v_unit, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1387, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_background, __pyx_v_unit, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1387, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_2 != 0);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":1388
 * 
 *         if type(unit) is not dict or 'id' not in unit or 'background' not in unit:
 *             raise TypeError("Parameter 'unit' not valid. Please use initialize_unit() to retrieve a valid unit.")             # <<<<<<<<<<<<<<
 *         if not isinstance(calls, Iterable):
 *             raise TypeError("Parameter 'calls' must be iterable.")
 */
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1388, __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, 1388, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":1387
 *         """
 * 
 *         if type(unit) is not dict or 'id' not in unit or 'background' not in unit:             # <<<<<<<<<<<<<<
 *             raise TypeError("Parameter 'unit' not valid. Please use initialize_unit() to retrieve a valid unit.")
 *         if not isinstance(calls, Iterable):
 */
  }

  /* "pyrfc/_cyrfc.pyx":1389
 *         if type(unit) is not dict or 'id' not in unit or 'background' not in unit:
 *             raise TypeError("Parameter 'unit' not valid. Please use initialize_unit() to retrieve a valid unit.")
 *         if not isinstance(calls, Iterable):             # <<<<<<<<<<<<<<
 *             raise TypeError("Parameter 'calls' must be iterable.")
 *         if len(calls)==0:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Iterable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_IsInstance(__pyx_v_calls, __pyx_t_4); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1389, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0);
  if (unlikely(__pyx_t_3)) {

    /* "pyrfc/_cyrfc.pyx":1390
 *             raise TypeError("Parameter 'unit' not valid. Please use initialize_unit() to retrieve a valid unit.")
 *         if not isinstance(calls, Iterable):
 *             raise TypeError("Parameter 'calls' must be iterable.")             # <<<<<<<<<<<<<<
 *         if len(calls)==0:
 *             raise TypeError("Parameter 'calls' must contain at least on call description (func_name, params).")
 */
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1390, __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, 1390, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":1389
 *         if type(unit) is not dict or 'id' not in unit or 'background' not in unit:
 *             raise TypeError("Parameter 'unit' not valid. Please use initialize_unit() to retrieve a valid unit.")
 *         if not isinstance(calls, Iterable):             # <<<<<<<<<<<<<<
 *             raise TypeError("Parameter 'calls' must be iterable.")
 *         if len(calls)==0:
 */
  }

  /* "pyrfc/_cyrfc.pyx":1391
 *         if not isinstance(calls, Iterable):
 *             raise TypeError("Parameter 'calls' must be iterable.")
 *         if len(calls)==0:             # <<<<<<<<<<<<<<
 *             raise TypeError("Parameter 'calls' must contain at least on call description (func_name, params).")
 *         for func_name, params in calls:
 */
  __pyx_t_5 = PyObject_Length(__pyx_v_calls); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1391, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_5 == 0) != 0);
  if (unlikely(__pyx_t_3)) {

    /* "pyrfc/_cyrfc.pyx":1392
 *             raise TypeError("Parameter 'calls' must be iterable.")
 *         if len(calls)==0:
 *             raise TypeError("Parameter 'calls' must contain at least on call description (func_name, params).")             # <<<<<<<<<<<<<<
 *         for func_name, params in calls:
 *             if type(func_name) is not str or type(params) is not dict:
 */
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1392, __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, 1392, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":1391
 *         if not isinstance(calls, Iterable):
 *             raise TypeError("Parameter 'calls' must be iterable.")
 *         if len(calls)==0:             # <<<<<<<<<<<<<<
 *             raise TypeError("Parameter 'calls' must contain at least on call description (func_name, params).")
 *         for func_name, params in calls:
 */
  }

  /* "pyrfc/_cyrfc.pyx":1393
 *         if len(calls)==0:
 *             raise TypeError("Parameter 'calls' must contain at least on call description (func_name, params).")
 *         for func_name, params in calls:             # <<<<<<<<<<<<<<
 *             if type(func_name) is not str or type(params) is not dict:
 *                 raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).")
 */
  if (likely(PyList_CheckExact(__pyx_v_calls)) || PyTuple_CheckExact(__pyx_v_calls)) {
    __pyx_t_4 = __pyx_v_calls; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_calls); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1393, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1393, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1393, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1393, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1393, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1393, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
      PyObject* sequence = __pyx_t_7;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1393, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_9);
      #else
      __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1393, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1393, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      #endif
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_10 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1393, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
      index = 0; __pyx_t_8 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L11_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L11_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 1393, __pyx_L1_error)
      __pyx_t_11 = NULL;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L12_unpacking_done;
      __pyx_L11_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_11 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1393, __pyx_L1_error)
      __pyx_L12_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_func_name, __pyx_t_8);
    __pyx_t_8 = 0;
    __Pyx_XDECREF_SET(__pyx_v_params, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pyrfc/_cyrfc.pyx":1394
 *             raise TypeError("Parameter 'calls' must contain at least on call description (func_name, params).")
 *         for func_name, params in calls:
 *             if type(func_name) is not str or type(params) is not dict:             # <<<<<<<<<<<<<<
 *                 raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).")
 *         if self.active_unit:
 */
    __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_func_name)) != ((PyObject *)(&PyUnicode_Type)));
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L14_bool_binop_done;
    }
    __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_params)) != ((PyObject *)(&PyDict_Type)));
    __pyx_t_1 = (__pyx_t_2 != 0);
    __pyx_t_3 = __pyx_t_1;
    __pyx_L14_bool_binop_done:;
    if (unlikely(__pyx_t_3)) {

      /* "pyrfc/_cyrfc.pyx":1395
 *         for func_name, params in calls:
 *             if type(func_name) is not str or type(params) is not dict:
 *                 raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).")             # <<<<<<<<<<<<<<
 *         if self.active_unit:
 *             raise RFCError("There is an active unit for this connection. "
 */
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1395, __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, 1395, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":1394
 *             raise TypeError("Parameter 'calls' must contain at least on call description (func_name, params).")
 *         for func_name, params in calls:
 *             if type(func_name) is not str or type(params) is not dict:             # <<<<<<<<<<<<<<
 *                 raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).")
 *         if self.active_unit:
 */
    }

    /* "pyrfc/_cyrfc.pyx":1393
 *         if len(calls)==0:
 *             raise TypeError("Parameter 'calls' must contain at least on call description (func_name, params).")
 *         for func_name, params in calls:             # <<<<<<<<<<<<<<
 *             if type(func_name) is not str or type(params) is not dict:
 *                 raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).")
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":1396
 *             if type(func_name) is not str or type(params) is not dict:
 *                 raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).")
 *         if self.active_unit:             # <<<<<<<<<<<<<<
 *             raise RFCError("There is an active unit for this connection. "
 *                            "Use destroy_unit() " +
 */
  __pyx_t_3 = (__pyx_v_self->active_unit != 0);
  if (unlikely(__pyx_t_3)) {

    /* "pyrfc/_cyrfc.pyx":1397
 *                 raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).")
 *         if self.active_unit:
 *             raise RFCError("There is an active unit for this connection. "             # <<<<<<<<<<<<<<
 *                            "Use destroy_unit() " +
 *                            "or confirm_unit().")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_kp_u_There_is_an_active_unit_for_this) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_u_There_is_an_active_unit_for_this);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 1397, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":1396
 *             if type(func_name) is not str or type(params) is not dict:
 *                 raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).")
 *         if self.active_unit:             # <<<<<<<<<<<<<<
 *             raise RFCError("There is an active unit for this connection. "
 *                            "Use destroy_unit() " +
 */
  }

  /* "pyrfc/_cyrfc.pyx":1400
 *                            "Use destroy_unit() " +
 *                            "or confirm_unit().")
 *         bg = unit['background']             # <<<<<<<<<<<<<<
 *         unit_id = unit['id']
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit, __pyx_n_u_background); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_bg = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":1401
 *                            "or confirm_unit().")
 *         bg = unit['background']
 *         unit_id = unit['id']             # <<<<<<<<<<<<<<
 * 
 *         if bg is True:
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit, __pyx_n_u_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_unit_id = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":1403
 *         unit_id = unit['id']
 * 
 *         if bg is True:             # <<<<<<<<<<<<<<
 *             if len(unit_id) != RFC_UNITID_LN:
 *                 raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_UNITID_LN} chars, found {len(unit_id)}.")
 */
  __pyx_t_3 = (__pyx_v_bg == Py_True);
  __pyx_t_1 = (__pyx_t_3 != 0);
  if (__pyx_t_1) {

    /* "pyrfc/_cyrfc.pyx":1404
 * 
 *         if bg is True:
 *             if len(unit_id) != RFC_UNITID_LN:             # <<<<<<<<<<<<<<
 *                 raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_UNITID_LN} chars, found {len(unit_id)}.")
 *             unit['queued'] = self._create_and_submit_unit(unit_id, calls, queue_names, attributes)
 */
    __pyx_t_5 = PyObject_Length(__pyx_v_unit_id); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1404, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_5 != RFC_UNITID_LN) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "pyrfc/_cyrfc.pyx":1405
 *         if bg is True:
 *             if len(unit_id) != RFC_UNITID_LN:
 *                 raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_UNITID_LN} chars, found {len(unit_id)}.")             # <<<<<<<<<<<<<<
 *             unit['queued'] = self._create_and_submit_unit(unit_id, calls, queue_names, attributes)
 *         elif bg is False:
 */
      __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1405, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = 0;
      __pyx_t_12 = 127;
      __Pyx_INCREF(__pyx_kp_u_Length_of_parameter_unit_id_must);
      __pyx_t_5 += 41;
      __Pyx_GIVEREF(__pyx_kp_u_Length_of_parameter_unit_id_must);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Length_of_parameter_unit_id_must);
      __pyx_t_7 = __Pyx_PyUnicode_From_int(RFC_UNITID_LN, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1405, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7);
      __pyx_t_7 = 0;
      __Pyx_INCREF(__pyx_kp_u_chars_found);
      __pyx_t_5 += 14;
      __Pyx_GIVEREF(__pyx_kp_u_chars_found);
      PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_chars_found);
      __pyx_t_13 = PyObject_Length(__pyx_v_unit_id); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1405, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_13, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1405, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_7);
      __pyx_t_7 = 0;
      __Pyx_INCREF(__pyx_kp_u__21);
      __pyx_t_5 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__21);
      PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_u__21);
      __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, __pyx_t_5, __pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1405, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1405, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(0, 1405, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":1404
 * 
 *         if bg is True:
 *             if len(unit_id) != RFC_UNITID_LN:             # <<<<<<<<<<<<<<
 *                 raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_UNITID_LN} chars, found {len(unit_id)}.")
 *             unit['queued'] = self._create_and_submit_unit(unit_id, calls, queue_names, attributes)
 */
    }

    /* "pyrfc/_cyrfc.pyx":1406
 *             if len(unit_id) != RFC_UNITID_LN:
 *                 raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_UNITID_LN} chars, found {len(unit_id)}.")
 *             unit['queued'] = self._create_and_submit_unit(unit_id, calls, queue_names, attributes)             # <<<<<<<<<<<<<<
 *         elif bg is False:
 *             if len(unit_id) != RFC_TID_LN:
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_and_submit_unit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_14 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_14 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[5] = {__pyx_t_9, __pyx_v_unit_id, __pyx_v_calls, __pyx_v_queue_names, __pyx_v_attributes};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 4+__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1406, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[5] = {__pyx_t_9, __pyx_v_unit_id, __pyx_v_calls, __pyx_v_queue_names, __pyx_v_attributes};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 4+__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1406, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(4+__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1406, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_9) {
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __pyx_t_9 = NULL;
      }
      __Pyx_INCREF(__pyx_v_unit_id);
      __Pyx_GIVEREF(__pyx_v_unit_id);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_14, __pyx_v_unit_id);
      __Pyx_INCREF(__pyx_v_calls);
      __Pyx_GIVEREF(__pyx_v_calls);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_14, __pyx_v_calls);
      __Pyx_INCREF(__pyx_v_queue_names);
      __Pyx_GIVEREF(__pyx_v_queue_names);
      PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_14, __pyx_v_queue_names);
      __Pyx_INCREF(__pyx_v_attributes);
      __Pyx_GIVEREF(__pyx_v_attributes);
      PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_14, __pyx_v_attributes);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1406, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_unit, __pyx_n_u_queued, __pyx_t_4) < 0)) __PYX_ERR(0, 1406, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrfc/_cyrfc.pyx":1403
 *         unit_id = unit['id']
 * 
 *         if bg is True:             # <<<<<<<<<<<<<<
 *             if len(unit_id) != RFC_UNITID_LN:
 *                 raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_UNITID_LN} chars, found {len(unit_id)}.")
 */
    goto __pyx_L17;
  }

  /* "pyrfc/_cyrfc.pyx":1407
 *                 raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_UNITID_LN} chars, found {len(unit_id)}.")
 *             unit['queued'] = self._create_and_submit_unit(unit_id, calls, queue_names, attributes)
 *         elif bg is False:             # <<<<<<<<<<<<<<
 *             if len(unit_id) != RFC_TID_LN:
 *                 raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_TID_LN} chars, found {len(unit_id)}.")
 */
  __pyx_t_1 = (__pyx_v_bg == Py_False);
  __pyx_t_3 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_3)) {

    /* "pyrfc/_cyrfc.pyx":1408
 *             unit['queued'] = self._create_and_submit_unit(unit_id, calls, queue_names, attributes)
 *         elif bg is False:
 *             if len(unit_id) != RFC_TID_LN:             # <<<<<<<<<<<<<<
 *                 raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_TID_LN} chars, found {len(unit_id)}.")
 *             if attributes is not None:
 */
    __pyx_t_5 = PyObject_Length(__pyx_v_unit_id); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1408, __pyx_L1_error)
    __pyx_t_3 = ((__pyx_t_5 != RFC_TID_LN) != 0);
    if (unlikely(__pyx_t_3)) {

      /* "pyrfc/_cyrfc.pyx":1409
 *         elif bg is False:
 *             if len(unit_id) != RFC_TID_LN:
 *                 raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_TID_LN} chars, found {len(unit_id)}.")             # <<<<<<<<<<<<<<
 *             if attributes is not None:
 *                 raise RFCError("Argument 'attributes' not valid. (t/qRFC does not support attributes.)")
 */
      __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1409, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = 0;
      __pyx_t_12 = 127;
      __Pyx_INCREF(__pyx_kp_u_Length_of_parameter_unit_id_must);
      __pyx_t_5 += 41;
      __Pyx_GIVEREF(__pyx_kp_u_Length_of_parameter_unit_id_must);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Length_of_parameter_unit_id_must);
      __pyx_t_7 = __Pyx_PyUnicode_From_int(RFC_TID_LN, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1409, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7);
      __pyx_t_7 = 0;
      __Pyx_INCREF(__pyx_kp_u_chars_found);
      __pyx_t_5 += 14;
      __Pyx_GIVEREF(__pyx_kp_u_chars_found);
      PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_chars_found);
      __pyx_t_13 = PyObject_Length(__pyx_v_unit_id); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1409, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_13, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1409, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_7);
      __pyx_t_7 = 0;
      __Pyx_INCREF(__pyx_kp_u__21);
      __pyx_t_5 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__21);
      PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_u__21);
      __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, __pyx_t_5, __pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1409, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1409, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(0, 1409, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":1408
 *             unit['queued'] = self._create_and_submit_unit(unit_id, calls, queue_names, attributes)
 *         elif bg is False:
 *             if len(unit_id) != RFC_TID_LN:             # <<<<<<<<<<<<<<
 *                 raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_TID_LN} chars, found {len(unit_id)}.")
 *             if attributes is not None:
 */
    }

    /* "pyrfc/_cyrfc.pyx":1410
 *             if len(unit_id) != RFC_TID_LN:
 *                 raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_TID_LN} chars, found {len(unit_id)}.")
 *             if attributes is not None:             # <<<<<<<<<<<<<<
 *                 raise RFCError("Argument 'attributes' not valid. (t/qRFC does not support attributes.)")
 *             if queue_names is None or type(queue_names) is list and len(queue_names) == 0:
 */
    __pyx_t_3 = (__pyx_v_attributes != Py_None);
    __pyx_t_1 = (__pyx_t_3 != 0);
    if (unlikely(__pyx_t_1)) {

      /* "pyrfc/_cyrfc.pyx":1411
 *                 raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_TID_LN} chars, found {len(unit_id)}.")
 *             if attributes is not None:
 *                 raise RFCError("Argument 'attributes' not valid. (t/qRFC does not support attributes.)")             # <<<<<<<<<<<<<<
 *             if queue_names is None or type(queue_names) is list and len(queue_names) == 0:
 *                 self._create_and_submit_transaction(unit_id, calls)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1411, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_kp_u_Argument_attributes_not_valid_t) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_u_Argument_attributes_not_valid_t);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1411, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(0, 1411, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":1410
 *             if len(unit_id) != RFC_TID_LN:
 *                 raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_TID_LN} chars, found {len(unit_id)}.")
 *             if attributes is not None:             # <<<<<<<<<<<<<<
 *                 raise RFCError("Argument 'attributes' not valid. (t/qRFC does not support attributes.)")
 *             if queue_names is None or type(queue_names) is list and len(queue_names) == 0:
 */
    }

    /* "pyrfc/_cyrfc.pyx":1412
 *             if attributes is not None:
 *                 raise RFCError("Argument 'attributes' not valid. (t/qRFC does not support attributes.)")
 *             if queue_names is None or type(queue_names) is list and len(queue_names) == 0:             # <<<<<<<<<<<<<<
 *                 self._create_and_submit_transaction(unit_id, calls)
 *                 unit['queued'] = False
 */
    __pyx_t_3 = (__pyx_v_queue_names == Py_None);
    __pyx_t_2 = (__pyx_t_3 != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L22_bool_binop_done;
    }
    __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_queue_names)) == ((PyObject *)(&PyList_Type)));
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L22_bool_binop_done;
    }
    __pyx_t_5 = PyObject_Length(__pyx_v_queue_names); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1412, __pyx_L1_error)
    __pyx_t_3 = ((__pyx_t_5 == 0) != 0);
    __pyx_t_1 = __pyx_t_3;
    __pyx_L22_bool_binop_done:;
    if (__pyx_t_1) {

      /* "pyrfc/_cyrfc.pyx":1413
 *                 raise RFCError("Argument 'attributes' not valid. (t/qRFC does not support attributes.)")
 *             if queue_names is None or type(queue_names) is list and len(queue_names) == 0:
 *                 self._create_and_submit_transaction(unit_id, calls)             # <<<<<<<<<<<<<<
 *                 unit['queued'] = False
 *             elif len(queue_names) == 1:
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_and_submit_transaction); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1413, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      __pyx_t_14 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_14 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_unit_id, __pyx_v_calls};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1413, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_unit_id, __pyx_v_calls};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1413, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1413, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__pyx_t_8) {
          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        }
        __Pyx_INCREF(__pyx_v_unit_id);
        __Pyx_GIVEREF(__pyx_v_unit_id);
        PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_14, __pyx_v_unit_id);
        __Pyx_INCREF(__pyx_v_calls);
        __Pyx_GIVEREF(__pyx_v_calls);
        PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_14, __pyx_v_calls);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1413, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pyrfc/_cyrfc.pyx":1414
 *             if queue_names is None or type(queue_names) is list and len(queue_names) == 0:
 *                 self._create_and_submit_transaction(unit_id, calls)
 *                 unit['queued'] = False             # <<<<<<<<<<<<<<
 *             elif len(queue_names) == 1:
 *                 queue_name = queue_names[0]
 */
      if (unlikely(PyObject_SetItem(__pyx_v_unit, __pyx_n_u_queued, Py_False) < 0)) __PYX_ERR(0, 1414, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":1412
 *             if attributes is not None:
 *                 raise RFCError("Argument 'attributes' not valid. (t/qRFC does not support attributes.)")
 *             if queue_names is None or type(queue_names) is list and len(queue_names) == 0:             # <<<<<<<<<<<<<<
 *                 self._create_and_submit_transaction(unit_id, calls)
 *                 unit['queued'] = False
 */
      goto __pyx_L21;
    }

    /* "pyrfc/_cyrfc.pyx":1415
 *                 self._create_and_submit_transaction(unit_id, calls)
 *                 unit['queued'] = False
 *             elif len(queue_names) == 1:             # <<<<<<<<<<<<<<
 *                 queue_name = queue_names[0]
 *                 self._create_and_submit_transaction(unit_id, calls, queue_name)
 */
    __pyx_t_5 = PyObject_Length(__pyx_v_queue_names); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1415, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_5 == 1) != 0);
    if (likely(__pyx_t_1)) {

      /* "pyrfc/_cyrfc.pyx":1416
 *                 unit['queued'] = False
 *             elif len(queue_names) == 1:
 *                 queue_name = queue_names[0]             # <<<<<<<<<<<<<<
 *                 self._create_and_submit_transaction(unit_id, calls, queue_name)
 *                 unit['queued'] = True
 */
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_queue_names, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1416, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_queue_name = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "pyrfc/_cyrfc.pyx":1417
 *             elif len(queue_names) == 1:
 *                 queue_name = queue_names[0]
 *                 self._create_and_submit_transaction(unit_id, calls, queue_name)             # <<<<<<<<<<<<<<
 *                 unit['queued'] = True
 *             else:
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_and_submit_transaction); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1417, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = NULL;
      __pyx_t_14 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_14 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_unit_id, __pyx_v_calls, __pyx_v_queue_name};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1417, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_unit_id, __pyx_v_calls, __pyx_v_queue_name};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1417, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1417, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__pyx_t_9) {
          __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __pyx_t_9 = NULL;
        }
        __Pyx_INCREF(__pyx_v_unit_id);
        __Pyx_GIVEREF(__pyx_v_unit_id);
        PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_14, __pyx_v_unit_id);
        __Pyx_INCREF(__pyx_v_calls);
        __Pyx_GIVEREF(__pyx_v_calls);
        PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_14, __pyx_v_calls);
        __Pyx_INCREF(__pyx_v_queue_name);
        __Pyx_GIVEREF(__pyx_v_queue_name);
        PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_14, __pyx_v_queue_name);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1417, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pyrfc/_cyrfc.pyx":1418
 *                 queue_name = queue_names[0]
 *                 self._create_and_submit_transaction(unit_id, calls, queue_name)
 *                 unit['queued'] = True             # <<<<<<<<<<<<<<
 *             else:
 *                 raise RFCError("Argument 'queue_names' not valid. (t/qRFC only support one queue name.)")
 */
      if (unlikely(PyObject_SetItem(__pyx_v_unit, __pyx_n_u_queued, Py_True) < 0)) __PYX_ERR(0, 1418, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":1415
 *                 self._create_and_submit_transaction(unit_id, calls)
 *                 unit['queued'] = False
 *             elif len(queue_names) == 1:             # <<<<<<<<<<<<<<
 *                 queue_name = queue_names[0]
 *                 self._create_and_submit_transaction(unit_id, calls, queue_name)
 */
      goto __pyx_L21;
    }

    /* "pyrfc/_cyrfc.pyx":1420
 *                 unit['queued'] = True
 *             else:
 *                 raise RFCError("Argument 'queue_names' not valid. (t/qRFC only support one queue name.)")             # <<<<<<<<<<<<<<
 *         else:
 *             raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)")
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1420, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_kp_u_Argument_queue_names_not_valid_t) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_u_Argument_queue_names_not_valid_t);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1420, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(0, 1420, __pyx_L1_error)
    }
    __pyx_L21:;

    /* "pyrfc/_cyrfc.pyx":1407
 *                 raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_UNITID_LN} chars, found {len(unit_id)}.")
 *             unit['queued'] = self._create_and_submit_unit(unit_id, calls, queue_names, attributes)
 *         elif bg is False:             # <<<<<<<<<<<<<<
 *             if len(unit_id) != RFC_TID_LN:
 *                 raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_TID_LN} chars, found {len(unit_id)}.")
 */
    goto __pyx_L17;
  }

  /* "pyrfc/_cyrfc.pyx":1422
 *                 raise RFCError("Argument 'queue_names' not valid. (t/qRFC only support one queue name.)")
 *         else:
 *             raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)")             # <<<<<<<<<<<<<<
 *         return unit
 * 
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_kp_u_Argument_unit_not_valid_Is_unit) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_u_Argument_unit_not_valid_Is_unit);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 1422, __pyx_L1_error)
  }
  __pyx_L17:;

  /* "pyrfc/_cyrfc.pyx":1423
 *         else:
 *             raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)")
 *         return unit             # <<<<<<<<<<<<<<
 * 
 *     def get_unit_state(self, unit):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_unit);
  __pyx_r = __pyx_v_unit;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":1334
 *         return {'background': background, 'id': id, "queued": False}
 * 
 *     def fill_and_submit_unit(self, unit, calls, queue_names=None, attributes=None):             # <<<<<<<<<<<<<<
 *         """ Fills a unit with one or more RFC and submits it to the backend.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection.fill_and_submit_unit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_func_name);
  __Pyx_XDECREF(__pyx_v_params);
  __Pyx_XDECREF(__pyx_v_bg);
  __Pyx_XDECREF(__pyx_v_unit_id);
  __Pyx_XDECREF(__pyx_v_queue_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1425
 *         return unit
 * 
 *     def get_unit_state(self, unit):             # <<<<<<<<<<<<<<
 *         """Retrieves the processing status of the given background unit.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_63get_unit_state(PyObject *__pyx_v_self, PyObject *__pyx_v_unit); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Connection_62get_unit_state[] = "Retrieves the processing status of the given background unit.\n\n        .. note::\n           Only available for background units.\n\n        :param unit: a unit descriptor as returned by\n               :meth:`~pyrfc.Connection.initialize_unit`.\n        :return: The state of the current bgRFC unit. Possible values are:\n            RFC_UNIT_NOT_FOUND\n            RFC_UNIT_IN_PROCESS\n            RFC_UNIT_COMMITTED\n            RFC_UNIT_ROLLED_BACK\n            RFC_UNIT_CONFIRMED\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_63get_unit_state(PyObject *__pyx_v_self, PyObject *__pyx_v_unit) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_unit_state (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_62get_unit_state(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_unit));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_62get_unit_state(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit) {
  PyObject *__pyx_v_bg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_unit_state", 0);

  /* "pyrfc/_cyrfc.pyx":1440
 *             RFC_UNIT_CONFIRMED
 *         """
 *         bg = unit['background']             # <<<<<<<<<<<<<<
 *         if bg is True:
 *             return self._get_unit_state(unit)
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit, __pyx_n_u_background); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1441
 *         """
 *         bg = unit['background']
 *         if bg is True:             # <<<<<<<<<<<<<<
 *             return self._get_unit_state(unit)
 *         elif bg is False:
 */
  __pyx_t_2 = (__pyx_v_bg == Py_True);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "pyrfc/_cyrfc.pyx":1442
 *         bg = unit['background']
 *         if bg is True:
 *             return self._get_unit_state(unit)             # <<<<<<<<<<<<<<
 *         elif bg is False:
 *             raise RFCError("No state check possible of non-bgRFC units.")
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_unit_state); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_unit) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_unit);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pyrfc/_cyrfc.pyx":1441
 *         """
 *         bg = unit['background']
 *         if bg is True:             # <<<<<<<<<<<<<<
 *             return self._get_unit_state(unit)
 *         elif bg is False:
 */
  }

  /* "pyrfc/_cyrfc.pyx":1443
 *         if bg is True:
 *             return self._get_unit_state(unit)
 *         elif bg is False:             # <<<<<<<<<<<<<<
 *             raise RFCError("No state check possible of non-bgRFC units.")
 *         else:
 */
  __pyx_t_3 = (__pyx_v_bg == Py_False);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":1444
 *             return self._get_unit_state(unit)
 *         elif bg is False:
 *             raise RFCError("No state check possible of non-bgRFC units.")             # <<<<<<<<<<<<<<
 *         else:
 *             raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_No_state_check_possible_of_non_b) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_No_state_check_possible_of_non_b);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1444, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":1443
 *         if bg is True:
 *             return self._get_unit_state(unit)
 *         elif bg is False:             # <<<<<<<<<<<<<<
 *             raise RFCError("No state check possible of non-bgRFC units.")
 *         else:
 */
  }

  /* "pyrfc/_cyrfc.pyx":1446
 *             raise RFCError("No state check possible of non-bgRFC units.")
 *         else:
 *             raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)")             # <<<<<<<<<<<<<<
 * 
 *     def destroy_unit(self, unit):
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_Argument_unit_not_valid_Is_unit) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_Argument_unit_not_valid_Is_unit);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1446, __pyx_L1_error)
  }

  /* "pyrfc/_cyrfc.pyx":1425
 *         return unit
 * 
 *     def get_unit_state(self, unit):             # <<<<<<<<<<<<<<
 *         """Retrieves the processing status of the given background unit.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection.get_unit_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_bg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1448
 *             raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)")
 * 
 *     def destroy_unit(self, unit):             # <<<<<<<<<<<<<<
 *         """ Destroy the current unit.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_65destroy_unit(PyObject *__pyx_v_self, PyObject *__pyx_v_unit); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Connection_64destroy_unit[] = " Destroy the current unit.\n\n        E.g. if the completed unit could not be recorded in the frontend.\n\n        :param unit: a unit descriptor as returned by\n               :meth:`~pyrfc.Connection.initialize_unit`.\n        :raises: :exc:`~pyrfc.RFCError` or a subclass\n                 thereof if the connection attempt fails.\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_65destroy_unit(PyObject *__pyx_v_self, PyObject *__pyx_v_unit) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy_unit (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_64destroy_unit(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_unit));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_64destroy_unit(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit) {
  PyObject *__pyx_v_bg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("destroy_unit", 0);

  /* "pyrfc/_cyrfc.pyx":1458
 *                  thereof if the connection attempt fails.
 *         """
 *         bg = unit['background']             # <<<<<<<<<<<<<<
 *         if bg is True:
 *             self._destroy_unit()
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit, __pyx_n_u_background); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1459
 *         """
 *         bg = unit['background']
 *         if bg is True:             # <<<<<<<<<<<<<<
 *             self._destroy_unit()
 *         elif bg is False:
 */
  __pyx_t_2 = (__pyx_v_bg == Py_True);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "pyrfc/_cyrfc.pyx":1460
 *         bg = unit['background']
 *         if bg is True:
 *             self._destroy_unit()             # <<<<<<<<<<<<<<
 *         elif bg is False:
 *             self._destroy_transaction()
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_destroy_unit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":1459
 *         """
 *         bg = unit['background']
 *         if bg is True:             # <<<<<<<<<<<<<<
 *             self._destroy_unit()
 *         elif bg is False:
 */
    goto __pyx_L3;
  }

  /* "pyrfc/_cyrfc.pyx":1461
 *         if bg is True:
 *             self._destroy_unit()
 *         elif bg is False:             # <<<<<<<<<<<<<<
 *             self._destroy_transaction()
 *         else:
 */
  __pyx_t_3 = (__pyx_v_bg == Py_False);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (likely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":1462
 *             self._destroy_unit()
 *         elif bg is False:
 *             self._destroy_transaction()             # <<<<<<<<<<<<<<
 *         else:
 *             raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)")
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_destroy_transaction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":1461
 *         if bg is True:
 *             self._destroy_unit()
 *         elif bg is False:             # <<<<<<<<<<<<<<
 *             self._destroy_transaction()
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pyrfc/_cyrfc.pyx":1464
 *             self._destroy_transaction()
 *         else:
 *             raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)")             # <<<<<<<<<<<<<<
 * 
 *     def confirm_unit(self, unit):
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_Argument_unit_not_valid_Is_unit) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_Argument_unit_not_valid_Is_unit);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1464, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrfc/_cyrfc.pyx":1448
 *             raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)")
 * 
 *     def destroy_unit(self, unit):             # <<<<<<<<<<<<<<
 *         """ Destroy the current unit.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection.destroy_unit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_bg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1466
 *             raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)")
 * 
 *     def confirm_unit(self, unit):             # <<<<<<<<<<<<<<
 *         """ Confirm the current unit in the backend.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_67confirm_unit(PyObject *__pyx_v_self, PyObject *__pyx_v_unit); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Connection_66confirm_unit[] = " Confirm the current unit in the backend.\n\n        This also destroys the unit.\n\n        :param unit: a unit descriptor as returned by\n               :meth:`~pyrfc.Connection.initialize_unit`.\n        :raises: :exc:`~pyrfc.RFCError` or a subclass\n                 thereof if the connection attempt fails.\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_67confirm_unit(PyObject *__pyx_v_self, PyObject *__pyx_v_unit) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("confirm_unit (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_66confirm_unit(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_unit));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_66confirm_unit(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit) {
  PyObject *__pyx_v_bg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("confirm_unit", 0);

  /* "pyrfc/_cyrfc.pyx":1476
 *                  thereof if the connection attempt fails.
 *         """
 *         bg = unit['background']             # <<<<<<<<<<<<<<
 *         if bg is True:
 *             self._confirm_unit(unit)
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit, __pyx_n_u_background); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1477
 *         """
 *         bg = unit['background']
 *         if bg is True:             # <<<<<<<<<<<<<<
 *             self._confirm_unit(unit)
 *         elif bg is False:
 */
  __pyx_t_2 = (__pyx_v_bg == Py_True);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "pyrfc/_cyrfc.pyx":1478
 *         bg = unit['background']
 *         if bg is True:
 *             self._confirm_unit(unit)             # <<<<<<<<<<<<<<
 *         elif bg is False:
 *             self._confirm_transaction()
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_confirm_unit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1478, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_unit) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_unit);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1478, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":1477
 *         """
 *         bg = unit['background']
 *         if bg is True:             # <<<<<<<<<<<<<<
 *             self._confirm_unit(unit)
 *         elif bg is False:
 */
    goto __pyx_L3;
  }

  /* "pyrfc/_cyrfc.pyx":1479
 *         if bg is True:
 *             self._confirm_unit(unit)
 *         elif bg is False:             # <<<<<<<<<<<<<<
 *             self._confirm_transaction()
 *         else:
 */
  __pyx_t_3 = (__pyx_v_bg == Py_False);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (likely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":1480
 *             self._confirm_unit(unit)
 *         elif bg is False:
 *             self._confirm_transaction()             # <<<<<<<<<<<<<<
 *         else:
 *             raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)")
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_confirm_transaction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":1479
 *         if bg is True:
 *             self._confirm_unit(unit)
 *         elif bg is False:             # <<<<<<<<<<<<<<
 *             self._confirm_transaction()
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pyrfc/_cyrfc.pyx":1482
 *             self._confirm_transaction()
 *         else:
 *             raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_Argument_unit_not_valid_Is_unit) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_Argument_unit_not_valid_Is_unit);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1482, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrfc/_cyrfc.pyx":1466
 *             raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)")
 * 
 *     def confirm_unit(self, unit):             # <<<<<<<<<<<<<<
 *         """ Confirm the current unit in the backend.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection.confirm_unit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_bg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":545
 *     """
 *     cdef unsigned __bconfig
 *     cdef public dict __config             # <<<<<<<<<<<<<<
 *     cdef bint active_transaction
 *     cdef bint active_unit
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_8__config_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_8__config_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_8__config___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_8__config___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->__config);
  __pyx_r = __pyx_v_self->__config;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5pyrfc_6_cyrfc_10Connection_8__config_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5pyrfc_6_cyrfc_10Connection_8__config_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_8__config_2__set__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5pyrfc_6_cyrfc_10Connection_8__config_2__set__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 545, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__config);
  __Pyx_DECREF(__pyx_v_self->__config);
  __pyx_v_self->__config = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrfc._cyrfc.Connection.__config.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5pyrfc_6_cyrfc_10Connection_8__config_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5pyrfc_6_cyrfc_10Connection_8__config_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_8__config_4__del__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

static int __pyx_pf_5pyrfc_6_cyrfc_10Connection_8__config_4__del__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->__config);
  __Pyx_DECREF(__pyx_v_self->__config);
  __pyx_v_self->__config = ((PyObject*)Py_None);

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

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

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_69__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_69__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_68__reduce_cython__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self));

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

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

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self._handle,self._tHandle,self._uHandle cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._handle,self._tHandle,self._uHandle cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrfc._cyrfc.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._handle,self._tHandle,self._uHandle cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self._handle,self._tHandle,self._uHandle cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_71__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_71__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_70__setstate_cython__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

  /* "(tree fragment)":4
 *     raise TypeError("self._handle,self._tHandle,self._uHandle cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._handle,self._tHandle,self._uHandle cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

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

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

/* "pyrfc/_cyrfc.pyx":1501
 * 
 * 
 * def default_auth_check(func_name=False, request_context = None):             # <<<<<<<<<<<<<<
 *     request_context = request_context or {}
 *     _server_log(f"authorization check for '{func_name}'", request_context['server_context'])
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_17default_auth_check(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_17default_auth_check = {"default_auth_check", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_17default_auth_check, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_17default_auth_check(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_func_name = 0;
  PyObject *__pyx_v_request_context = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("default_auth_check (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func_name,&__pyx_n_s_request_context,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_False);
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_func_name);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_request_context);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "default_auth_check") < 0)) __PYX_ERR(0, 1501, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_func_name = values[0];
    __pyx_v_request_context = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("default_auth_check", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1501, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.default_auth_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_16default_auth_check(__pyx_self, __pyx_v_func_name, __pyx_v_request_context);

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_16default_auth_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func_name, PyObject *__pyx_v_request_context) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  Py_UCS4 __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("default_auth_check", 0);
  __Pyx_INCREF(__pyx_v_request_context);

  /* "pyrfc/_cyrfc.pyx":1502
 * 
 * def default_auth_check(func_name=False, request_context = None):
 *     request_context = request_context or {}             # <<<<<<<<<<<<<<
 *     _server_log(f"authorization check for '{func_name}'", request_context['server_context'])
 *     return RFC_OK
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_request_context); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1502, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __Pyx_INCREF(__pyx_v_request_context);
    __pyx_t_1 = __pyx_v_request_context;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_request_context, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1503
 * def default_auth_check(func_name=False, request_context = None):
 *     request_context = request_context or {}
 *     _server_log(f"authorization check for '{func_name}'", request_context['server_context'])             # <<<<<<<<<<<<<<
 *     return RFC_OK
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_server_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 0;
  __pyx_t_6 = 127;
  __Pyx_INCREF(__pyx_kp_u_authorization_check_for);
  __pyx_t_5 += 25;
  __Pyx_GIVEREF(__pyx_kp_u_authorization_check_for);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_authorization_check_for);
  __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_6;
  __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7);
  __pyx_t_7 = 0;
  __Pyx_INCREF(__pyx_kp_u__6);
  __pyx_t_5 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__6);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__6);
  __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_request_context, __pyx_n_u_server_context); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1503, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1503, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_4);
    __pyx_t_7 = 0;
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1504
 *     request_context = request_context or {}
 *     _server_log(f"authorization check for '{func_name}'", request_context['server_context'])
 *     return RFC_OK             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_RFC_RC(RFC_OK); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":1501
 * 
 * 
 * def default_auth_check(func_name=False, request_context = None):             # <<<<<<<<<<<<<<
 *     request_context = request_context or {}
 *     _server_log(f"authorization check for '{func_name}'", request_context['server_context'])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrfc._cyrfc.default_auth_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_request_context);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1507
 * 
 * 
 * def _server_log(origin, log_message):             # <<<<<<<<<<<<<<
 *     if server_context["server_log"]:
 *         print (f"[{datetime.utcnow()} UTC] {origin} '{log_message}'")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_19_server_log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_19_server_log = {"_server_log", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_19_server_log, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_19_server_log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_origin = 0;
  PyObject *__pyx_v_log_message = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_server_log (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_origin,&__pyx_n_s_log_message,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_origin)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_log_message)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_server_log", 1, 2, 2, 1); __PYX_ERR(0, 1507, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_server_log") < 0)) __PYX_ERR(0, 1507, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_origin = values[0];
    __pyx_v_log_message = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_server_log", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1507, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc._server_log", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_18_server_log(__pyx_self, __pyx_v_origin, __pyx_v_log_message);

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_18_server_log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_origin, PyObject *__pyx_v_log_message) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_server_log", 0);

  /* "pyrfc/_cyrfc.pyx":1508
 * 
 * def _server_log(origin, log_message):
 *     if server_context["server_log"]:             # <<<<<<<<<<<<<<
 *         print (f"[{datetime.utcnow()} UTC] {origin} '{log_message}'")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_server_log_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1508, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "pyrfc/_cyrfc.pyx":1509
 * def _server_log(origin, log_message):
 *     if server_context["server_log"]:
 *         print (f"[{datetime.utcnow()} UTC] {origin} '{log_message}'")             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_2 = PyTuple_New(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = 0;
    __pyx_t_5 = 127;
    __Pyx_INCREF(__pyx_kp_u__24);
    __pyx_t_4 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__24);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u__24);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_datetime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_utcnow); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_5;
    __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_kp_u_UTC);
    __pyx_t_4 += 6;
    __Pyx_GIVEREF(__pyx_kp_u_UTC);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_UTC);
    __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_origin, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_5;
    __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_kp_u__25);
    __pyx_t_4 += 2;
    __Pyx_GIVEREF(__pyx_kp_u__25);
    PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__25);
    __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_log_message, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_5;
    __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_kp_u__6);
    __pyx_t_4 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__6);
    PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_kp_u__6);
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_2, 7, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrfc/_cyrfc.pyx":1508
 * 
 * def _server_log(origin, log_message):
 *     if server_context["server_log"]:             # <<<<<<<<<<<<<<
 *         print (f"[{datetime.utcnow()} UTC] {origin} '{log_message}'")
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":1507
 * 
 * 
 * def _server_log(origin, log_message):             # <<<<<<<<<<<<<<
 *     if server_context["server_log"]:
 *         print (f"[{datetime.utcnow()} UTC] {origin} '{log_message}'")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrfc._cyrfc._server_log", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1518
 *     cdef public bint rstrip
 * 
 *     def __init__(self, **params):             # <<<<<<<<<<<<<<
 *         self._connection = ConnectionParameters(**params)
 *         self._handle = NULL
 */

/* Python wrapper */
static int __pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_params = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_params = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_params)) return -1;
  __Pyx_GOTREF(__pyx_v_params);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_16ServerConnection___init__(((struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *)__pyx_v_self), __pyx_v_params);

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

static int __pyx_pf_5pyrfc_6_cyrfc_16ServerConnection___init__(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__pyx_v_self, PyObject *__pyx_v_params) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyrfc/_cyrfc.pyx":1519
 * 
 *     def __init__(self, **params):
 *         self._connection = ConnectionParameters(**params)             # <<<<<<<<<<<<<<
 *         self._handle = NULL
 *         self._open()
 */
  __pyx_t_1 = PyDict_Copy(__pyx_v_params); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_connection);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_connection));
  __pyx_v_self->_connection = ((struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":1520
 *     def __init__(self, **params):
 *         self._connection = ConnectionParameters(**params)
 *         self._handle = NULL             # <<<<<<<<<<<<<<
 *         self._open()
 * 
 */
  __pyx_v_self->_handle = NULL;

  /* "pyrfc/_cyrfc.pyx":1521
 *         self._connection = ConnectionParameters(**params)
 *         self._handle = NULL
 *         self._open()             # <<<<<<<<<<<<<<
 * 
 *     cdef _open(self):
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_ServerConnection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":1518
 *     cdef public bint rstrip
 * 
 *     def __init__(self, **params):             # <<<<<<<<<<<<<<
 *         self._connection = ConnectionParameters(**params)
 *         self._handle = NULL
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrfc._cyrfc.ServerConnection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1523
 *         self._open()
 * 
 *     cdef _open(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         with nogil:
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_16ServerConnection__open(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__pyx_v_self) {
  RFC_ERROR_INFO __pyx_v_errorInfo;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_open", 0);

  /* "pyrfc/_cyrfc.pyx":1525
 *     cdef _open(self):
 *         cdef RFC_ERROR_INFO errorInfo
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self._handle = RfcCreateServer(self._connection._params, self._connection._params_count, &errorInfo)
 *         if errorInfo.code != RFC_OK:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "pyrfc/_cyrfc.pyx":1526
 *         cdef RFC_ERROR_INFO errorInfo
 *         with nogil:
 *             self._handle = RfcCreateServer(self._connection._params, self._connection._params_count, &errorInfo)             # <<<<<<<<<<<<<<
 *         if errorInfo.code != RFC_OK:
 *             self._handle = NULL
 */
        __pyx_v_self->_handle = RfcCreateServer(__pyx_v_self->_connection->_params, __pyx_v_self->_connection->_params_count, (&__pyx_v_errorInfo));
      }

      /* "pyrfc/_cyrfc.pyx":1525
 *     cdef _open(self):
 *         cdef RFC_ERROR_INFO errorInfo
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self._handle = RfcCreateServer(self._connection._params, self._connection._params_count, &errorInfo)
 *         if errorInfo.code != RFC_OK:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "pyrfc/_cyrfc.pyx":1527
 *         with nogil:
 *             self._handle = RfcCreateServer(self._connection._params, self._connection._params_count, &errorInfo)
 *         if errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._handle = NULL
 *             raise wrapError(&errorInfo)
 */
  __pyx_t_1 = ((__pyx_v_errorInfo.code != RFC_OK) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":1528
 *             self._handle = RfcCreateServer(self._connection._params, self._connection._params_count, &errorInfo)
 *         if errorInfo.code != RFC_OK:
 *             self._handle = NULL             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         _server_log("Server connection", f"{<uintptr_t>self._handle}")
 */
    __pyx_v_self->_handle = NULL;

    /* "pyrfc/_cyrfc.pyx":1529
 *         if errorInfo.code != RFC_OK:
 *             self._handle = NULL
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         _server_log("Server connection", f"{<uintptr_t>self._handle}")
 * 
 */
    __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1529, __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, 1529, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":1527
 *         with nogil:
 *             self._handle = RfcCreateServer(self._connection._params, self._connection._params_count, &errorInfo)
 *         if errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._handle = NULL
 *             raise wrapError(&errorInfo)
 */
  }

  /* "pyrfc/_cyrfc.pyx":1530
 *             self._handle = NULL
 *             raise wrapError(&errorInfo)
 *         _server_log("Server connection", f"{<uintptr_t>self._handle}")             # <<<<<<<<<<<<<<
 * 
 *     cdef _close(self):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_server_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_self->_handle)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_u_Server_connection, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1530, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_u_Server_connection, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1530, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1530, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_kp_u_Server_connection);
    __Pyx_GIVEREF(__pyx_kp_u_Server_connection);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_u_Server_connection);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1530, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":1523
 *         self._open()
 * 
 *     cdef _open(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         with nogil:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrfc._cyrfc.ServerConnection._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1532
 *         _server_log("Server connection", f"{<uintptr_t>self._handle}")
 * 
 *     cdef _close(self):             # <<<<<<<<<<<<<<
 *         if self._handle != NULL:
 *             _server_log("Server close", <uintptr_t>self._handle)
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_16ServerConnection__close(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_close", 0);

  /* "pyrfc/_cyrfc.pyx":1533
 * 
 *     cdef _close(self):
 *         if self._handle != NULL:             # <<<<<<<<<<<<<<
 *             _server_log("Server close", <uintptr_t>self._handle)
 *             with nogil:
 */
  __pyx_t_1 = ((__pyx_v_self->_handle != NULL) != 0);
  if (__pyx_t_1) {

    /* "pyrfc/_cyrfc.pyx":1534
 *     cdef _close(self):
 *         if self._handle != NULL:
 *             _server_log("Server close", <uintptr_t>self._handle)             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 RfcShutdownServer(self._handle, 60, NULL)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_server_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_self->_handle)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_u_Server_close, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1534, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_u_Server_close, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1534, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1534, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_u_Server_close);
      __Pyx_GIVEREF(__pyx_kp_u_Server_close);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_u_Server_close);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1534, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrfc/_cyrfc.pyx":1535
 *         if self._handle != NULL:
 *             _server_log("Server close", <uintptr_t>self._handle)
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 RfcShutdownServer(self._handle, 60, NULL)
 *                 RfcDestroyServer(self._handle, NULL)
 */
    {
        #ifdef WITH_THREAD
        PyThreadState *_save;
        Py_UNBLOCK_THREADS
        __Pyx_FastGIL_Remember();
        #endif
        /*try:*/ {

          /* "pyrfc/_cyrfc.pyx":1536
 *             _server_log("Server close", <uintptr_t>self._handle)
 *             with nogil:
 *                 RfcShutdownServer(self._handle, 60, NULL)             # <<<<<<<<<<<<<<
 *                 RfcDestroyServer(self._handle, NULL)
 *                 self._handle = NULL
 */
          (void)(RfcShutdownServer(__pyx_v_self->_handle, 60, NULL));

          /* "pyrfc/_cyrfc.pyx":1537
 *             with nogil:
 *                 RfcShutdownServer(self._handle, 60, NULL)
 *                 RfcDestroyServer(self._handle, NULL)             # <<<<<<<<<<<<<<
 *                 self._handle = NULL
 * 
 */
          (void)(RfcDestroyServer(__pyx_v_self->_handle, NULL));

          /* "pyrfc/_cyrfc.pyx":1538
 *                 RfcShutdownServer(self._handle, 60, NULL)
 *                 RfcDestroyServer(self._handle, NULL)
 *                 self._handle = NULL             # <<<<<<<<<<<<<<
 * 
 *     def open(self):
 */
          __pyx_v_self->_handle = NULL;
        }

        /* "pyrfc/_cyrfc.pyx":1535
 *         if self._handle != NULL:
 *             _server_log("Server close", <uintptr_t>self._handle)
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 RfcShutdownServer(self._handle, 60, NULL)
 *                 RfcDestroyServer(self._handle, NULL)
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            __Pyx_FastGIL_Forget();
            Py_BLOCK_THREADS
            #endif
            goto __pyx_L6;
          }
          __pyx_L6:;
        }
    }

    /* "pyrfc/_cyrfc.pyx":1533
 * 
 *     cdef _close(self):
 *         if self._handle != NULL:             # <<<<<<<<<<<<<<
 *             _server_log("Server close", <uintptr_t>self._handle)
 *             with nogil:
 */
  }

  /* "pyrfc/_cyrfc.pyx":1532
 *         _server_log("Server connection", f"{<uintptr_t>self._handle}")
 * 
 *     cdef _close(self):             # <<<<<<<<<<<<<<
 *         if self._handle != NULL:
 *             _server_log("Server close", <uintptr_t>self._handle)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrfc._cyrfc.ServerConnection._close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1540
 *                 self._handle = NULL
 * 
 *     def open(self):             # <<<<<<<<<<<<<<
 *         self._open()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_3open(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_3open(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("open (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_2open(((struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_2open(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__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("open", 0);

  /* "pyrfc/_cyrfc.pyx":1541
 * 
 *     def open(self):
 *         self._open()             # <<<<<<<<<<<<<<
 * 
 *     def close(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_ServerConnection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1540
 *                 self._handle = NULL
 * 
 *     def open(self):             # <<<<<<<<<<<<<<
 *         self._open()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrfc._cyrfc.ServerConnection.open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1543
 *         self._open()
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         self._close()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_5close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_5close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("close (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_4close(((struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_4close(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__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("close", 0);

  /* "pyrfc/_cyrfc.pyx":1544
 * 
 *     def close(self):
 *         self._close()             # <<<<<<<<<<<<<<
 * 
 *     def __bool__(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_ServerConnection *)__pyx_v_self->__pyx_vtab)->_close(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1543
 *         self._open()
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         self._close()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrfc._cyrfc.ServerConnection.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1546
 *         self._close()
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         return self.alive
 * 
 */

/* Python wrapper */
static int __pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_7__bool__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_7__bool__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_6__bool__(((struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *)__pyx_v_self));

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

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

  /* "pyrfc/_cyrfc.pyx":1547
 * 
 *     def __bool__(self):
 *         return self.alive             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1547, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":1546
 *         self._close()
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         return self.alive
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrfc._cyrfc.ServerConnection.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1550
 * 
 *     @property
 *     def handle(self):             # <<<<<<<<<<<<<<
 *         """Server connection handle
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_6handle_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_6handle_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_6handle___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_6handle___get__(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__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);

  /* "pyrfc/_cyrfc.pyx":1556
 *         :type: uitptr_t
 *         """
 *         return <uintptr_t>self._handle             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_self->_handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":1550
 * 
 *     @property
 *     def handle(self):             # <<<<<<<<<<<<<<
 *         """Server connection handle
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":1559
 * 
 *     @property
 *     def alive(self):             # <<<<<<<<<<<<<<
 *         """Conection alive property
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_5alive_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_5alive_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_5alive___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_5alive___get__(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__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);

  /* "pyrfc/_cyrfc.pyx":1565
 *         :type: boolean
 *         """
 *         return self._handle != NULL             # <<<<<<<<<<<<<<
 * 
 *     def __del__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->_handle != NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":1559
 * 
 *     @property
 *     def alive(self):             # <<<<<<<<<<<<<<
 *         """Conection alive property
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":1567
 *         return self._handle != NULL
 * 
 *     def __del__(self):             # <<<<<<<<<<<<<<
 *         self._close()
 *         self._connection._free()
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_9__del__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_9__del__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_8__del__(((struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_8__del__(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);

  /* "pyrfc/_cyrfc.pyx":1568
 * 
 *     def __del__(self):
 *         self._close()             # <<<<<<<<<<<<<<
 *         self._connection._free()
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_ServerConnection *)__pyx_v_self->__pyx_vtab)->_close(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1569
 *     def __del__(self):
 *         self._close()
 *         self._connection._free()             # <<<<<<<<<<<<<<
 * 
 * cdef RFC_RC metadataLookup(
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_connection), __pyx_n_s_free); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1567
 *         return self._handle != NULL
 * 
 *     def __del__(self):             # <<<<<<<<<<<<<<
 *         self._close()
 *         self._connection._free()
 */

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

/* "pyrfc/_cyrfc.pyx":1515
 *     cdef ConnectionParameters _connection
 *     cdef RFC_SERVER_HANDLE _handle
 *     cdef public bint debug             # <<<<<<<<<<<<<<
 *     cdef public bint rstrip
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_5debug_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_5debug_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_5debug___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_5debug___get__(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->debug); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_5debug_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_5debug_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_5debug_2__set__(((struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_5debug_2__set__(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1515, __pyx_L1_error)
  __pyx_v_self->debug = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.ServerConnection.debug.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1516
 *     cdef RFC_SERVER_HANDLE _handle
 *     cdef public bint debug
 *     cdef public bint rstrip             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, **params):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_6rstrip_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_6rstrip_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_6rstrip___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_6rstrip___get__(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->rstrip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_6rstrip_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_6rstrip_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_6rstrip_2__set__(((struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_6rstrip_2__set__(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1516, __pyx_L1_error)
  __pyx_v_self->rstrip = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.ServerConnection.rstrip.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_10__reduce_cython__(((struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *)__pyx_v_self));

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

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

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self._handle cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._handle cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrfc._cyrfc.ServerConnection.__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._handle cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self._handle cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_16ServerConnection_12__setstate_cython__(((struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

  /* "(tree fragment)":4
 *     raise TypeError("self._handle cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._handle cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

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

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

/* "pyrfc/_cyrfc.pyx":1571
 *         self._connection._free()
 * 
 * cdef RFC_RC metadataLookup(             # <<<<<<<<<<<<<<
 *             const SAP_UC* functionName,
 *             RFC_ATTRIBUTES rfcAttributes,
 */

static RFC_RC __pyx_f_5pyrfc_6_cyrfc_metadataLookup(SAP_UC const *__pyx_v_functionName, CYTHON_UNUSED RFC_ATTRIBUTES __pyx_v_rfcAttributes, RFC_FUNCTION_DESC_HANDLE *__pyx_v_funcDescHandle) {
  PyObject *__pyx_v_function_name = NULL;
  PyObject *__pyx_v_func_metadata = NULL;
  RFC_RC __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  Py_UCS4 __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  uintptr_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("metadataLookup", 0);

  /* "pyrfc/_cyrfc.pyx":1577
 *         ) with gil:
 *     global server_functions
 *     function_name = wrapString(functionName)             # <<<<<<<<<<<<<<
 *     if function_name not in server_functions:
 *         _server_log("metadataLookup", f"No metadata found for function '{function_name}'.")
 */
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_functionName, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_function_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1578
 *     global server_functions
 *     function_name = wrapString(functionName)
 *     if function_name not in server_functions:             # <<<<<<<<<<<<<<
 *         _server_log("metadataLookup", f"No metadata found for function '{function_name}'.")
 *         return RFC_NOT_FOUND
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_functions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_function_name, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1578, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "pyrfc/_cyrfc.pyx":1579
 *     function_name = wrapString(functionName)
 *     if function_name not in server_functions:
 *         _server_log("metadataLookup", f"No metadata found for function '{function_name}'.")             # <<<<<<<<<<<<<<
 *         return RFC_NOT_FOUND
 *     func_metadata = server_functions[function_name]
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_server_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 0;
    __pyx_t_7 = 127;
    __Pyx_INCREF(__pyx_kp_u_No_metadata_found_for_function);
    __pyx_t_6 += 32;
    __Pyx_GIVEREF(__pyx_kp_u_No_metadata_found_for_function);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_No_metadata_found_for_function);
    __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_function_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_7;
    __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_8);
    __pyx_t_8 = 0;
    __Pyx_INCREF(__pyx_kp_u__28);
    __pyx_t_6 += 2;
    __Pyx_GIVEREF(__pyx_kp_u__28);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__28);
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_u_metadataLookup, __pyx_t_8};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1579, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_u_metadataLookup, __pyx_t_8};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1579, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1579, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_n_u_metadataLookup);
      __Pyx_GIVEREF(__pyx_n_u_metadataLookup);
      PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_n_u_metadataLookup);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1579, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":1580
 *     if function_name not in server_functions:
 *         _server_log("metadataLookup", f"No metadata found for function '{function_name}'.")
 *         return RFC_NOT_FOUND             # <<<<<<<<<<<<<<
 *     func_metadata = server_functions[function_name]
 *     # callback = func_metadata['callback']
 */
    __pyx_r = RFC_NOT_FOUND;
    goto __pyx_L0;

    /* "pyrfc/_cyrfc.pyx":1578
 *     global server_functions
 *     function_name = wrapString(functionName)
 *     if function_name not in server_functions:             # <<<<<<<<<<<<<<
 *         _server_log("metadataLookup", f"No metadata found for function '{function_name}'.")
 *         return RFC_NOT_FOUND
 */
  }

  /* "pyrfc/_cyrfc.pyx":1581
 *         _server_log("metadataLookup", f"No metadata found for function '{function_name}'.")
 *         return RFC_NOT_FOUND
 *     func_metadata = server_functions[function_name]             # <<<<<<<<<<<<<<
 *     # callback = func_metadata['callback']
 *     funcDescHandle[0] = <RFC_FUNCTION_DESC_HANDLE><uintptr_t>func_metadata['func_desc_handle']
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_functions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_function_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_func_metadata = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":1583
 *     func_metadata = server_functions[function_name]
 *     # callback = func_metadata['callback']
 *     funcDescHandle[0] = <RFC_FUNCTION_DESC_HANDLE><uintptr_t>func_metadata['func_desc_handle']             # <<<<<<<<<<<<<<
 *     _server_log("metadataLookup", f"Function '{function_name}' handle {<uintptr_t>funcDescHandle[0]}.")
 *     return RFC_OK
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_func_metadata, __pyx_n_u_func_desc_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_11 = __Pyx_PyInt_As_size_t(__pyx_t_4); if (unlikely((__pyx_t_11 == ((uintptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1583, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  (__pyx_v_funcDescHandle[0]) = ((RFC_FUNCTION_DESC_HANDLE)((uintptr_t)__pyx_t_11));

  /* "pyrfc/_cyrfc.pyx":1584
 *     # callback = func_metadata['callback']
 *     funcDescHandle[0] = <RFC_FUNCTION_DESC_HANDLE><uintptr_t>func_metadata['func_desc_handle']
 *     _server_log("metadataLookup", f"Function '{function_name}' handle {<uintptr_t>funcDescHandle[0]}.")             # <<<<<<<<<<<<<<
 *     return RFC_OK
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_10 = PyTuple_New(5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_6 = 0;
  __pyx_t_7 = 127;
  __Pyx_INCREF(__pyx_kp_u_Function);
  __pyx_t_6 += 10;
  __Pyx_GIVEREF(__pyx_kp_u_Function);
  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_kp_u_Function);
  __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_function_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_7;
  __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8);
  __pyx_t_8 = 0;
  __Pyx_INCREF(__pyx_kp_u_handle_2);
  __pyx_t_6 += 9;
  __Pyx_GIVEREF(__pyx_kp_u_handle_2);
  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_kp_u_handle_2);
  __pyx_t_8 = __Pyx_PyInt_FromSize_t(((uintptr_t)(__pyx_v_funcDescHandle[0]))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_7;
  __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__21);
  __pyx_t_6 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__21);
  PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_kp_u__21);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_10, 5, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_n_u_metadataLookup, __pyx_t_5};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1584, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_n_u_metadataLookup, __pyx_t_5};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1584, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_10) {
      __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10); __pyx_t_10 = NULL;
    }
    __Pyx_INCREF(__pyx_n_u_metadataLookup);
    __Pyx_GIVEREF(__pyx_n_u_metadataLookup);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_n_u_metadataLookup);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":1585
 *     funcDescHandle[0] = <RFC_FUNCTION_DESC_HANDLE><uintptr_t>func_metadata['func_desc_handle']
 *     _server_log("metadataLookup", f"Function '{function_name}' handle {<uintptr_t>funcDescHandle[0]}.")
 *     return RFC_OK             # <<<<<<<<<<<<<<
 * 
 * cdef get_server_context(RFC_CONNECTION_HANDLE rfcHandle, RFC_ERROR_INFO* serverErrorInfo):
 */
  __pyx_r = RFC_OK;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":1571
 *         self._connection._free()
 * 
 * cdef RFC_RC metadataLookup(             # <<<<<<<<<<<<<<
 *             const SAP_UC* functionName,
 *             RFC_ATTRIBUTES rfcAttributes,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_WriteUnraisable("pyrfc._cyrfc.metadataLookup", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = (RFC_RC) 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_function_name);
  __Pyx_XDECREF(__pyx_v_func_metadata);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1587
 *     return RFC_OK
 * 
 * cdef get_server_context(RFC_CONNECTION_HANDLE rfcHandle, RFC_ERROR_INFO* serverErrorInfo):             # <<<<<<<<<<<<<<
 *     cdef RFC_SERVER_CONTEXT context
 *     cdef RFC_RC rc = RfcGetServerContext(rfcHandle, &context, serverErrorInfo)
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_get_server_context(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_ERROR_INFO *__pyx_v_serverErrorInfo) {
  RFC_SERVER_CONTEXT __pyx_v_context;
  RFC_RC __pyx_v_rc;
  PyObject *__pyx_v_server_context = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_server_context", 0);

  /* "pyrfc/_cyrfc.pyx":1589
 * cdef get_server_context(RFC_CONNECTION_HANDLE rfcHandle, RFC_ERROR_INFO* serverErrorInfo):
 *     cdef RFC_SERVER_CONTEXT context
 *     cdef RFC_RC rc = RfcGetServerContext(rfcHandle, &context, serverErrorInfo)             # <<<<<<<<<<<<<<
 *     if rc != RFC_OK or serverErrorInfo.code != RFC_OK:
 *         return None
 */
  __pyx_v_rc = RfcGetServerContext(__pyx_v_rfcHandle, (&__pyx_v_context), __pyx_v_serverErrorInfo);

  /* "pyrfc/_cyrfc.pyx":1590
 *     cdef RFC_SERVER_CONTEXT context
 *     cdef RFC_RC rc = RfcGetServerContext(rfcHandle, &context, serverErrorInfo)
 *     if rc != RFC_OK or serverErrorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
  __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_serverErrorInfo->code != RFC_OK) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrfc/_cyrfc.pyx":1591
 *     cdef RFC_RC rc = RfcGetServerContext(rfcHandle, &context, serverErrorInfo)
 *     if rc != RFC_OK or serverErrorInfo.code != RFC_OK:
 *         return None             # <<<<<<<<<<<<<<
 * 
 *     server_context = {
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "pyrfc/_cyrfc.pyx":1590
 *     cdef RFC_SERVER_CONTEXT context
 *     cdef RFC_RC rc = RfcGetServerContext(rfcHandle, &context, serverErrorInfo)
 *     if rc != RFC_OK or serverErrorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":1594
 * 
 *     server_context = {
 *         "call_type": UnitCallType(context.type),             # <<<<<<<<<<<<<<
 *         "is_stateful": context.isStateful != 0
 *     }
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_UnitCallType); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_RFC_CALL_TYPE(__pyx_v_context.type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_call_type, __pyx_t_4) < 0) __PYX_ERR(0, 1594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":1595
 *     server_context = {
 *         "call_type": UnitCallType(context.type),
 *         "is_stateful": context.isStateful != 0             # <<<<<<<<<<<<<<
 *     }
 *     if context.type != RFC_SYNCHRONOUS:
 */
  __pyx_t_4 = __Pyx_PyBool_FromLong((__pyx_v_context.isStateful != 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_is_stateful, __pyx_t_4) < 0) __PYX_ERR(0, 1594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_server_context = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":1597
 *         "is_stateful": context.isStateful != 0
 *     }
 *     if context.type != RFC_SYNCHRONOUS:             # <<<<<<<<<<<<<<
 *         server_context["unit_identifier"] = wrapUnitIdentifier(context.unitIdentifier[0])
 *     if context.type == RFC_BACKGROUND_UNIT:
 */
  __pyx_t_1 = ((__pyx_v_context.type != RFC_SYNCHRONOUS) != 0);
  if (__pyx_t_1) {

    /* "pyrfc/_cyrfc.pyx":1598
 *     }
 *     if context.type != RFC_SYNCHRONOUS:
 *         server_context["unit_identifier"] = wrapUnitIdentifier(context.unitIdentifier[0])             # <<<<<<<<<<<<<<
 *     if context.type == RFC_BACKGROUND_UNIT:
 *         server_context ["unit_attributes"] = wrapUnitAttributes(context.unitAttributes)
 */
    __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapUnitIdentifier((__pyx_v_context.unitIdentifier[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_server_context, __pyx_n_u_unit_identifier, __pyx_t_3) < 0)) __PYX_ERR(0, 1598, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":1597
 *         "is_stateful": context.isStateful != 0
 *     }
 *     if context.type != RFC_SYNCHRONOUS:             # <<<<<<<<<<<<<<
 *         server_context["unit_identifier"] = wrapUnitIdentifier(context.unitIdentifier[0])
 *     if context.type == RFC_BACKGROUND_UNIT:
 */
  }

  /* "pyrfc/_cyrfc.pyx":1599
 *     if context.type != RFC_SYNCHRONOUS:
 *         server_context["unit_identifier"] = wrapUnitIdentifier(context.unitIdentifier[0])
 *     if context.type == RFC_BACKGROUND_UNIT:             # <<<<<<<<<<<<<<
 *         server_context ["unit_attributes"] = wrapUnitAttributes(context.unitAttributes)
 * 
 */
  __pyx_t_1 = ((__pyx_v_context.type == RFC_BACKGROUND_UNIT) != 0);
  if (__pyx_t_1) {

    /* "pyrfc/_cyrfc.pyx":1600
 *         server_context["unit_identifier"] = wrapUnitIdentifier(context.unitIdentifier[0])
 *     if context.type == RFC_BACKGROUND_UNIT:
 *         server_context ["unit_attributes"] = wrapUnitAttributes(context.unitAttributes)             # <<<<<<<<<<<<<<
 * 
 *     return server_context
 */
    __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapUnitAttributes(__pyx_v_context.unitAttributes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_server_context, __pyx_n_u_unit_attributes, __pyx_t_3) < 0)) __PYX_ERR(0, 1600, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":1599
 *     if context.type != RFC_SYNCHRONOUS:
 *         server_context["unit_identifier"] = wrapUnitIdentifier(context.unitIdentifier[0])
 *     if context.type == RFC_BACKGROUND_UNIT:             # <<<<<<<<<<<<<<
 *         server_context ["unit_attributes"] = wrapUnitAttributes(context.unitAttributes)
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":1602
 *         server_context ["unit_attributes"] = wrapUnitAttributes(context.unitAttributes)
 * 
 *     return server_context             # <<<<<<<<<<<<<<
 * 
 * cdef RFC_RC genericHandler(RFC_CONNECTION_HANDLE rfcHandle, RFC_FUNCTION_HANDLE funcHandle, RFC_ERROR_INFO* serverErrorInfo) with gil:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_server_context);
  __pyx_r = __pyx_v_server_context;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":1587
 *     return RFC_OK
 * 
 * cdef get_server_context(RFC_CONNECTION_HANDLE rfcHandle, RFC_ERROR_INFO* serverErrorInfo):             # <<<<<<<<<<<<<<
 *     cdef RFC_SERVER_CONTEXT context
 *     cdef RFC_RC rc = RfcGetServerContext(rfcHandle, &context, serverErrorInfo)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrfc._cyrfc.get_server_context", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_server_context);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1604
 *     return server_context
 * 
 * cdef RFC_RC genericHandler(RFC_CONNECTION_HANDLE rfcHandle, RFC_FUNCTION_HANDLE funcHandle, RFC_ERROR_INFO* serverErrorInfo) with gil:             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

static RFC_RC __pyx_f_5pyrfc_6_cyrfc_genericHandler(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_FUNCTION_HANDLE __pyx_v_funcHandle, RFC_ERROR_INFO *__pyx_v_serverErrorInfo) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_ATTRIBUTES __pyx_v_attributes;
  RFC_FUNCTION_DESC_HANDLE __pyx_v_funcDesc;
  RFC_ABAP_NAME __pyx_v_funcName;
  PyObject *__pyx_v_context = NULL;
  PyObject *__pyx_v_err_msg = NULL;
  PyObject *__pyx_v_new_error = NULL;
  PyObject *__pyx_v_func_name = NULL;
  PyObject *__pyx_v_func_data = NULL;
  PyObject *__pyx_v_callback = NULL;
  PyObject *__pyx_v_server = NULL;
  PyObject *__pyx_v_conn_attr = NULL;
  PyObject *__pyx_v_request_context = NULL;
  PyObject *__pyx_v_auth_function = NULL;
  PyObject *__pyx_v_func_handle_variables = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_e = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_ex = NULL;
  PyObject *__pyx_v_exctype = NULL;
  RFC_RC __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  RFC_RC __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  int __pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  char const *__pyx_t_20;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  char const *__pyx_t_27;
  char const *__pyx_t_28;
  PyObject *(*__pyx_t_29)(PyObject *);
  char const *__pyx_t_30;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("genericHandler", 0);

  /* "pyrfc/_cyrfc.pyx":1614
 * 
 *     # section 5.6.2 of SAP NWRFC SDK Programming Guide 7.50
 *     context = get_server_context(rfcHandle, serverErrorInfo)             # <<<<<<<<<<<<<<
 *     if context is None:
 *         err_msg = f"Error code {serverErrorInfo.code} when getting server context for connection '{<uintptr_t>rfcHandle}'"
 */
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_get_server_context(__pyx_v_rfcHandle, __pyx_v_serverErrorInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_context = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1615
 *     # section 5.6.2 of SAP NWRFC SDK Programming Guide 7.50
 *     context = get_server_context(rfcHandle, serverErrorInfo)
 *     if context is None:             # <<<<<<<<<<<<<<
 *         err_msg = f"Error code {serverErrorInfo.code} when getting server context for connection '{<uintptr_t>rfcHandle}'"
 *         new_error = ExternalRuntimeError(
 */
  __pyx_t_2 = (__pyx_v_context == Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "pyrfc/_cyrfc.pyx":1616
 *     context = get_server_context(rfcHandle, serverErrorInfo)
 *     if context is None:
 *         err_msg = f"Error code {serverErrorInfo.code} when getting server context for connection '{<uintptr_t>rfcHandle}'"             # <<<<<<<<<<<<<<
 *         new_error = ExternalRuntimeError(
 *             message=err_msg,
 */
    __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = 0;
    __pyx_t_5 = 127;
    __Pyx_INCREF(__pyx_kp_u_Error_code);
    __pyx_t_4 += 11;
    __Pyx_GIVEREF(__pyx_kp_u_Error_code);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Error_code);
    __pyx_t_6 = __Pyx_PyUnicode_From_RFC_RC(__pyx_v_serverErrorInfo->code, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
    __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u_when_getting_server_context_for);
    __pyx_t_4 += 45;
    __Pyx_GIVEREF(__pyx_kp_u_when_getting_server_context_for);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_when_getting_server_context_for);
    __pyx_t_6 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_rfcHandle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_5;
    __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_kp_u__6);
    __pyx_t_4 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__6);
    PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__6);
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_err_msg = ((PyObject*)__pyx_t_7);
    __pyx_t_7 = 0;

    /* "pyrfc/_cyrfc.pyx":1617
 *     if context is None:
 *         err_msg = f"Error code {serverErrorInfo.code} when getting server context for connection '{<uintptr_t>rfcHandle}'"
 *         new_error = ExternalRuntimeError(             # <<<<<<<<<<<<<<
 *             message=err_msg,
 *             code=RFC_EXTERNAL_FAILURE
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ExternalRuntimeError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);

    /* "pyrfc/_cyrfc.pyx":1618
 *         err_msg = f"Error code {serverErrorInfo.code} when getting server context for connection '{<uintptr_t>rfcHandle}'"
 *         new_error = ExternalRuntimeError(
 *             message=err_msg,             # <<<<<<<<<<<<<<
 *             code=RFC_EXTERNAL_FAILURE
 *         )
 */
    __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_message, __pyx_v_err_msg) < 0) __PYX_ERR(0, 1618, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":1619
 *         new_error = ExternalRuntimeError(
 *             message=err_msg,
 *             code=RFC_EXTERNAL_FAILURE             # <<<<<<<<<<<<<<
 *         )
 *         fillError(new_error, serverErrorInfo)
 */
    __pyx_t_6 = __Pyx_PyInt_From_RFC_RC(RFC_EXTERNAL_FAILURE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_code, __pyx_t_6) < 0) __PYX_ERR(0, 1618, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pyrfc/_cyrfc.pyx":1617
 *     if context is None:
 *         err_msg = f"Error code {serverErrorInfo.code} when getting server context for connection '{<uintptr_t>rfcHandle}'"
 *         new_error = ExternalRuntimeError(             # <<<<<<<<<<<<<<
 *             message=err_msg,
 *             code=RFC_EXTERNAL_FAILURE
 */
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_new_error = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "pyrfc/_cyrfc.pyx":1621
 *             code=RFC_EXTERNAL_FAILURE
 *         )
 *         fillError(new_error, serverErrorInfo)             # <<<<<<<<<<<<<<
 *         return RFC_EXTERNAL_FAILURE
 * 
 */
    __pyx_t_6 = __pyx_f_5pyrfc_6_cyrfc_fillError(__pyx_v_new_error, __pyx_v_serverErrorInfo); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pyrfc/_cyrfc.pyx":1622
 *         )
 *         fillError(new_error, serverErrorInfo)
 *         return RFC_EXTERNAL_FAILURE             # <<<<<<<<<<<<<<
 * 
 *     funcDesc = RfcDescribeFunction(funcHandle, NULL)
 */
    __pyx_r = RFC_EXTERNAL_FAILURE;
    goto __pyx_L0;

    /* "pyrfc/_cyrfc.pyx":1615
 *     # section 5.6.2 of SAP NWRFC SDK Programming Guide 7.50
 *     context = get_server_context(rfcHandle, serverErrorInfo)
 *     if context is None:             # <<<<<<<<<<<<<<
 *         err_msg = f"Error code {serverErrorInfo.code} when getting server context for connection '{<uintptr_t>rfcHandle}'"
 *         new_error = ExternalRuntimeError(
 */
  }

  /* "pyrfc/_cyrfc.pyx":1624
 *         return RFC_EXTERNAL_FAILURE
 * 
 *     funcDesc = RfcDescribeFunction(funcHandle, NULL)             # <<<<<<<<<<<<<<
 *     RfcGetFunctionName(funcDesc, funcName, NULL)
 * 
 */
  __pyx_v_funcDesc = RfcDescribeFunction(__pyx_v_funcHandle, NULL);

  /* "pyrfc/_cyrfc.pyx":1625
 * 
 *     funcDesc = RfcDescribeFunction(funcHandle, NULL)
 *     RfcGetFunctionName(funcDesc, funcName, NULL)             # <<<<<<<<<<<<<<
 * 
 *     func_name = wrapString(funcName)
 */
  (void)(RfcGetFunctionName(__pyx_v_funcDesc, __pyx_v_funcName, NULL));

  /* "pyrfc/_cyrfc.pyx":1627
 *     RfcGetFunctionName(funcDesc, funcName, NULL)
 * 
 *     func_name = wrapString(funcName)             # <<<<<<<<<<<<<<
 *     if func_name not in server_functions:
 *         _server_log("genericHandler", f"No metadata found for function '{function_name}'")
 */
  __pyx_t_6 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_funcName, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_func_name = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "pyrfc/_cyrfc.pyx":1628
 * 
 *     func_name = wrapString(funcName)
 *     if func_name not in server_functions:             # <<<<<<<<<<<<<<
 *         _server_log("genericHandler", f"No metadata found for function '{function_name}'")
 *         return RFC_NOT_FOUND
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_server_functions); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_func_name, __pyx_t_6, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1628, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "pyrfc/_cyrfc.pyx":1629
 *     func_name = wrapString(funcName)
 *     if func_name not in server_functions:
 *         _server_log("genericHandler", f"No metadata found for function '{function_name}'")             # <<<<<<<<<<<<<<
 *         return RFC_NOT_FOUND
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_4 = 0;
    __pyx_t_5 = 127;
    __Pyx_INCREF(__pyx_kp_u_No_metadata_found_for_function);
    __pyx_t_4 += 32;
    __Pyx_GIVEREF(__pyx_kp_u_No_metadata_found_for_function);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_No_metadata_found_for_function);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_function_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_5;
    __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9);
    __pyx_t_9 = 0;
    __Pyx_INCREF(__pyx_kp_u__6);
    __pyx_t_4 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__6);
    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_kp_u__6);
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_7, 3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_10 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_n_u_genericHandler, __pyx_t_9};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1629, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_n_u_genericHandler, __pyx_t_9};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1629, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1629, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_n_u_genericHandler);
      __Pyx_GIVEREF(__pyx_n_u_genericHandler);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_10, __pyx_n_u_genericHandler);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_10, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1629, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pyrfc/_cyrfc.pyx":1630
 *     if func_name not in server_functions:
 *         _server_log("genericHandler", f"No metadata found for function '{function_name}'")
 *         return RFC_NOT_FOUND             # <<<<<<<<<<<<<<
 * 
 *     func_data = server_functions[func_name]
 */
    __pyx_r = RFC_NOT_FOUND;
    goto __pyx_L0;

    /* "pyrfc/_cyrfc.pyx":1628
 * 
 *     func_name = wrapString(funcName)
 *     if func_name not in server_functions:             # <<<<<<<<<<<<<<
 *         _server_log("genericHandler", f"No metadata found for function '{function_name}'")
 *         return RFC_NOT_FOUND
 */
  }

  /* "pyrfc/_cyrfc.pyx":1632
 *         return RFC_NOT_FOUND
 * 
 *     func_data = server_functions[func_name]             # <<<<<<<<<<<<<<
 *     callback = func_data['callback']
 *     server = func_data['server']
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_server_functions); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_v_func_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_func_data = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1633
 * 
 *     func_data = server_functions[func_name]
 *     callback = func_data['callback']             # <<<<<<<<<<<<<<
 *     server = func_data['server']
 *     # func_desc = func_data['func_desc_handle']
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_func_data, __pyx_n_u_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_callback = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1634
 *     func_data = server_functions[func_name]
 *     callback = func_data['callback']
 *     server = func_data['server']             # <<<<<<<<<<<<<<
 *     # func_desc = func_data['func_desc_handle']
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_func_data, __pyx_n_u_server); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_server = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1637
 *     # func_desc = func_data['func_desc_handle']
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         rc = RfcGetConnectionAttributes(rfcHandle, &attributes, &errorInfo)
 *         if rc != RFC_OK:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
    __Pyx_XGOTREF(__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_12);
    __Pyx_XGOTREF(__pyx_t_13);
    /*try:*/ {

      /* "pyrfc/_cyrfc.pyx":1638
 * 
 *     try:
 *         rc = RfcGetConnectionAttributes(rfcHandle, &attributes, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             _server_log("genericHandler", f"Request for '{func_name}': Error while retrieving connection attributes (rc={rc}).")
 */
      __pyx_v_rc = RfcGetConnectionAttributes(__pyx_v_rfcHandle, (&__pyx_v_attributes), (&__pyx_v_errorInfo));

      /* "pyrfc/_cyrfc.pyx":1639
 *     try:
 *         rc = RfcGetConnectionAttributes(rfcHandle, &attributes, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             _server_log("genericHandler", f"Request for '{func_name}': Error while retrieving connection attributes (rc={rc}).")
 *             if not server.debug:
 */
      __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
      if (__pyx_t_2) {

        /* "pyrfc/_cyrfc.pyx":1640
 *         rc = RfcGetConnectionAttributes(rfcHandle, &attributes, &errorInfo)
 *         if rc != RFC_OK:
 *             _server_log("genericHandler", f"Request for '{func_name}': Error while retrieving connection attributes (rc={rc}).")             # <<<<<<<<<<<<<<
 *             if not server.debug:
 *                 raise ExternalRuntimeError(message="Invalid connection handle.")
 */
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_server_log); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1640, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_8 = PyTuple_New(5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1640, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_4 = 0;
        __pyx_t_5 = 127;
        __Pyx_INCREF(__pyx_kp_u_Request_for);
        __pyx_t_4 += 13;
        __Pyx_GIVEREF(__pyx_kp_u_Request_for);
        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_Request_for);
        __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1640, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_5;
        __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_9);
        __pyx_t_9 = 0;
        __Pyx_INCREF(__pyx_kp_u_Error_while_retrieving_connecti);
        __pyx_t_4 += 52;
        __Pyx_GIVEREF(__pyx_kp_u_Error_while_retrieving_connecti);
        PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u_Error_while_retrieving_connecti);
        __pyx_t_9 = __Pyx_PyUnicode_From_RFC_RC(__pyx_v_rc, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1640, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_5;
        __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_9);
        __pyx_t_9 = 0;
        __Pyx_INCREF(__pyx_kp_u__29);
        __pyx_t_4 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__29);
        PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_kp_u__29);
        __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1640, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = NULL;
        __pyx_t_10 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_10 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_n_u_genericHandler, __pyx_t_9};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L5_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_n_u_genericHandler, __pyx_t_9};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L5_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else
        #endif
        {
          __pyx_t_7 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1640, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_7);
          if (__pyx_t_8) {
            __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL;
          }
          __Pyx_INCREF(__pyx_n_u_genericHandler);
          __Pyx_GIVEREF(__pyx_n_u_genericHandler);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_10, __pyx_n_u_genericHandler);
          __Pyx_GIVEREF(__pyx_t_9);
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_10, __pyx_t_9);
          __pyx_t_9 = 0;
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyrfc/_cyrfc.pyx":1641
 *         if rc != RFC_OK:
 *             _server_log("genericHandler", f"Request for '{func_name}': Error while retrieving connection attributes (rc={rc}).")
 *             if not server.debug:             # <<<<<<<<<<<<<<
 *                 raise ExternalRuntimeError(message="Invalid connection handle.")
 *             conn_attr = {}
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_server, __pyx_n_s_debug); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1641, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1641, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_3 = ((!__pyx_t_2) != 0);
        if (unlikely(__pyx_t_3)) {

          /* "pyrfc/_cyrfc.pyx":1642
 *             _server_log("genericHandler", f"Request for '{func_name}': Error while retrieving connection attributes (rc={rc}).")
 *             if not server.debug:
 *                 raise ExternalRuntimeError(message="Invalid connection handle.")             # <<<<<<<<<<<<<<
 *             conn_attr = {}
 *         else:
 */
          __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ExternalRuntimeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1642, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1642, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_message, __pyx_kp_u_Invalid_connection_handle) < 0) __PYX_ERR(0, 1642, __pyx_L5_error)
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1642, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_Raise(__pyx_t_7, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __PYX_ERR(0, 1642, __pyx_L5_error)

          /* "pyrfc/_cyrfc.pyx":1641
 *         if rc != RFC_OK:
 *             _server_log("genericHandler", f"Request for '{func_name}': Error while retrieving connection attributes (rc={rc}).")
 *             if not server.debug:             # <<<<<<<<<<<<<<
 *                 raise ExternalRuntimeError(message="Invalid connection handle.")
 *             conn_attr = {}
 */
        }

        /* "pyrfc/_cyrfc.pyx":1643
 *             if not server.debug:
 *                 raise ExternalRuntimeError(message="Invalid connection handle.")
 *             conn_attr = {}             # <<<<<<<<<<<<<<
 *         else:
 *             conn_attr = wrapConnectionAttributes(attributes)
 */
        __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1643, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_v_conn_attr = __pyx_t_7;
        __pyx_t_7 = 0;

        /* "pyrfc/_cyrfc.pyx":1639
 *     try:
 *         rc = RfcGetConnectionAttributes(rfcHandle, &attributes, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             _server_log("genericHandler", f"Request for '{func_name}': Error while retrieving connection attributes (rc={rc}).")
 *             if not server.debug:
 */
        goto __pyx_L11;
      }

      /* "pyrfc/_cyrfc.pyx":1645
 *             conn_attr = {}
 *         else:
 *             conn_attr = wrapConnectionAttributes(attributes)             # <<<<<<<<<<<<<<
 *             _server_log(
 *                 "genericHandler",
 */
      /*else*/ {
        __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_wrapConnectionAttributes(__pyx_v_attributes); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1645, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_v_conn_attr = __pyx_t_7;
        __pyx_t_7 = 0;

        /* "pyrfc/_cyrfc.pyx":1646
 *         else:
 *             conn_attr = wrapConnectionAttributes(attributes)
 *             _server_log(             # <<<<<<<<<<<<<<
 *                 "genericHandler",
 *                 "User '{user}' from system '{sysId}' client '{client}' host '{partnerHost}' invokes '{func_name}'"
 */
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_server_log); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1646, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_6);

        /* "pyrfc/_cyrfc.pyx":1649
 *                 "genericHandler",
 *                 "User '{user}' from system '{sysId}' client '{client}' host '{partnerHost}' invokes '{func_name}'"
 *                 .format(func_name=func_name, **conn_attr)             # <<<<<<<<<<<<<<
 *             )
 * 
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_User_user_from_system_sysId_clie, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1649, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1649, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_func_name, __pyx_v_func_name) < 0) __PYX_ERR(0, 1649, __pyx_L5_error)
        __pyx_t_9 = __pyx_t_8;
        __pyx_t_8 = 0;
        if (unlikely(__pyx_v_conn_attr == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
          __PYX_ERR(0, 1649, __pyx_L5_error)
        }
        if (__Pyx_MergeKeywords(__pyx_t_9, __pyx_v_conn_attr) < 0) __PYX_ERR(0, 1649, __pyx_L5_error)
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1649, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = NULL;
        __pyx_t_10 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_10 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_n_u_genericHandler, __pyx_t_8};
          __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1646, __pyx_L5_error)
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_n_u_genericHandler, __pyx_t_8};
          __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1646, __pyx_L5_error)
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        } else
        #endif
        {
          __pyx_t_1 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1646, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (__pyx_t_9) {
            __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9); __pyx_t_9 = NULL;
          }
          __Pyx_INCREF(__pyx_n_u_genericHandler);
          __Pyx_GIVEREF(__pyx_n_u_genericHandler);
          PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_10, __pyx_n_u_genericHandler);
          __Pyx_GIVEREF(__pyx_t_8);
          PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_10, __pyx_t_8);
          __pyx_t_8 = 0;
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1646, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __pyx_L11:;

      /* "pyrfc/_cyrfc.pyx":1654
 *         # Context of the request. Might later be extended by activeParameter information.
 *         request_context = {
 *             'connection_attributes': conn_attr,             # <<<<<<<<<<<<<<
 *             'server_context': context
 *         }
 */
      __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1654, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_connection_attributes, __pyx_v_conn_attr) < 0) __PYX_ERR(0, 1654, __pyx_L5_error)

      /* "pyrfc/_cyrfc.pyx":1655
 *         request_context = {
 *             'connection_attributes': conn_attr,
 *             'server_context': context             # <<<<<<<<<<<<<<
 *         }
 * 
 */
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_server_context, __pyx_v_context) < 0) __PYX_ERR(0, 1654, __pyx_L5_error)
      __pyx_v_request_context = ((PyObject*)__pyx_t_7);
      __pyx_t_7 = 0;

      /* "pyrfc/_cyrfc.pyx":1659
 * 
 *         # Authorization check
 *         auth_function = server_context["auth_check"]             # <<<<<<<<<<<<<<
 *         rc = auth_function(func_name, request_context)
 *         if rc != RFC_OK:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_server_context); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1659, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_7, __pyx_n_u_auth_check); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1659, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_v_auth_function = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "pyrfc/_cyrfc.pyx":1660
 *         # Authorization check
 *         auth_function = server_context["auth_check"]
 *         rc = auth_function(func_name, request_context)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             new_error = ExternalRuntimeError(
 */
      __Pyx_INCREF(__pyx_v_auth_function);
      __pyx_t_7 = __pyx_v_auth_function; __pyx_t_1 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_10 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_func_name, __pyx_v_request_context};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1660, __pyx_L5_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_func_name, __pyx_v_request_context};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1660, __pyx_L5_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1660, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__pyx_t_1) {
          __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL;
        }
        __Pyx_INCREF(__pyx_v_func_name);
        __Pyx_GIVEREF(__pyx_v_func_name);
        PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_10, __pyx_v_func_name);
        __Pyx_INCREF(__pyx_v_request_context);
        __Pyx_GIVEREF(__pyx_v_request_context);
        PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_10, __pyx_v_request_context);
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1660, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_14 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_6)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1660, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_rc = __pyx_t_14;

      /* "pyrfc/_cyrfc.pyx":1661
 *         auth_function = server_context["auth_check"]
 *         rc = auth_function(func_name, request_context)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             new_error = ExternalRuntimeError(
 *                 message=f"Authentication exception raised by callback function: '{func_name}'",
 */
      __pyx_t_3 = ((__pyx_v_rc != RFC_OK) != 0);
      if (__pyx_t_3) {

        /* "pyrfc/_cyrfc.pyx":1662
 *         rc = auth_function(func_name, request_context)
 *         if rc != RFC_OK:
 *             new_error = ExternalRuntimeError(             # <<<<<<<<<<<<<<
 *                 message=f"Authentication exception raised by callback function: '{func_name}'",
 *                 code=RFC_EXTERNAL_FAILURE
 */
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ExternalRuntimeError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1662, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_6);

        /* "pyrfc/_cyrfc.pyx":1663
 *         if rc != RFC_OK:
 *             new_error = ExternalRuntimeError(
 *                 message=f"Authentication exception raised by callback function: '{func_name}'",             # <<<<<<<<<<<<<<
 *                 code=RFC_EXTERNAL_FAILURE
 *             )
 */
        __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1663, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1663, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_4 = 0;
        __pyx_t_5 = 127;
        __Pyx_INCREF(__pyx_kp_u_Authentication_exception_raised);
        __pyx_t_4 += 55;
        __Pyx_GIVEREF(__pyx_kp_u_Authentication_exception_raised);
        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_Authentication_exception_raised);
        __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1663, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_5;
        __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_1);
        __pyx_t_1 = 0;
        __Pyx_INCREF(__pyx_kp_u__6);
        __pyx_t_4 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__6);
        PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u__6);
        __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1663, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_message, __pyx_t_1) < 0) __PYX_ERR(0, 1663, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyrfc/_cyrfc.pyx":1664
 *             new_error = ExternalRuntimeError(
 *                 message=f"Authentication exception raised by callback function: '{func_name}'",
 *                 code=RFC_EXTERNAL_FAILURE             # <<<<<<<<<<<<<<
 *             )
 *             fillError(new_error, serverErrorInfo)
 */
        __pyx_t_1 = __Pyx_PyInt_From_RFC_RC(RFC_EXTERNAL_FAILURE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1664, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_code, __pyx_t_1) < 0) __PYX_ERR(0, 1663, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyrfc/_cyrfc.pyx":1662
 *         rc = auth_function(func_name, request_context)
 *         if rc != RFC_OK:
 *             new_error = ExternalRuntimeError(             # <<<<<<<<<<<<<<
 *                 message=f"Authentication exception raised by callback function: '{func_name}'",
 *                 code=RFC_EXTERNAL_FAILURE
 */
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1662, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_v_new_error = __pyx_t_1;
        __pyx_t_1 = 0;

        /* "pyrfc/_cyrfc.pyx":1666
 *                 code=RFC_EXTERNAL_FAILURE
 *             )
 *             fillError(new_error, serverErrorInfo)             # <<<<<<<<<<<<<<
 *             return RFC_EXTERNAL_FAILURE
 * 
 */
        __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_fillError(__pyx_v_new_error, __pyx_v_serverErrorInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1666, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyrfc/_cyrfc.pyx":1667
 *             )
 *             fillError(new_error, serverErrorInfo)
 *             return RFC_EXTERNAL_FAILURE             # <<<<<<<<<<<<<<
 * 
 *         # Filter out variables that are of direction u'RFC_EXPORT'
 */
        __pyx_r = RFC_EXTERNAL_FAILURE;
        goto __pyx_L9_try_return;

        /* "pyrfc/_cyrfc.pyx":1661
 *         auth_function = server_context["auth_check"]
 *         rc = auth_function(func_name, request_context)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             new_error = ExternalRuntimeError(
 *                 message=f"Authentication exception raised by callback function: '{func_name}'",
 */
      }

      /* "pyrfc/_cyrfc.pyx":1671
 *         # Filter out variables that are of direction u'RFC_EXPORT'
 *         # (these will be set by the callback function)
 *         func_handle_variables = wrapResult(funcDesc, funcHandle, RFC_EXPORT, server.rstrip)             # <<<<<<<<<<<<<<
 * 
 *         # Invoke callback function
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_server, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1671, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_wrapResult(__pyx_v_funcDesc, __pyx_v_funcHandle, RFC_EXPORT, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1671, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_func_handle_variables = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "pyrfc/_cyrfc.pyx":1674
 * 
 *         # Invoke callback function
 *         result = callback(request_context, **func_handle_variables)             # <<<<<<<<<<<<<<
 * 
 *         # Return results
 */
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1674, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_request_context);
      __Pyx_GIVEREF(__pyx_v_request_context);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_request_context);
      if (unlikely(__pyx_v_func_handle_variables == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
        __PYX_ERR(0, 1674, __pyx_L5_error)
      }
      if (likely(PyDict_CheckExact(__pyx_v_func_handle_variables))) {
        __pyx_t_1 = PyDict_Copy(__pyx_v_func_handle_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1674, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
      } else {
        __pyx_t_1 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_func_handle_variables, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1674, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_v_callback, __pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1674, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_result = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "pyrfc/_cyrfc.pyx":1677
 * 
 *         # Return results
 *         if context["call_type"] != UnitCallType.background_unit:             # <<<<<<<<<<<<<<
 *             for name, value in result.iteritems():
 *                 fillFunctionParameter(funcDesc, funcHandle, name, value)
 */
      __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_context, __pyx_n_u_call_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1677, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_UnitCallType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1677, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_background_unit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1677, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_t_7, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1677, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1677, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_3) {

        /* "pyrfc/_cyrfc.pyx":1678
 *         # Return results
 *         if context["call_type"] != UnitCallType.background_unit:
 *             for name, value in result.iteritems():             # <<<<<<<<<<<<<<
 *                 fillFunctionParameter(funcDesc, funcHandle, name, value)
 * 
 */
        __pyx_t_4 = 0;
        if (unlikely(__pyx_v_result == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems");
          __PYX_ERR(0, 1678, __pyx_L5_error)
        }
        __pyx_t_7 = __Pyx_dict_iterator(__pyx_v_result, 0, __pyx_n_s_iteritems, (&__pyx_t_15), (&__pyx_t_10)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1678, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_1);
        __pyx_t_1 = __pyx_t_7;
        __pyx_t_7 = 0;
        while (1) {
          __pyx_t_16 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_15, &__pyx_t_4, &__pyx_t_7, &__pyx_t_6, NULL, __pyx_t_10);
          if (unlikely(__pyx_t_16 == 0)) break;
          if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 1678, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_7);
          __pyx_t_7 = 0;
          __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
          __pyx_t_6 = 0;

          /* "pyrfc/_cyrfc.pyx":1679
 *         if context["call_type"] != UnitCallType.background_unit:
 *             for name, value in result.iteritems():
 *                 fillFunctionParameter(funcDesc, funcHandle, name, value)             # <<<<<<<<<<<<<<
 * 
 *     # Server exception handling: cf. SAP NetWeaver RFC SDK 7.50
 */
          __pyx_t_6 = __pyx_f_5pyrfc_6_cyrfc_fillFunctionParameter(__pyx_v_funcDesc, __pyx_v_funcHandle, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1679, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyrfc/_cyrfc.pyx":1677
 * 
 *         # Return results
 *         if context["call_type"] != UnitCallType.background_unit:             # <<<<<<<<<<<<<<
 *             for name, value in result.iteritems():
 *                 fillFunctionParameter(funcDesc, funcHandle, name, value)
 */
      }

      /* "pyrfc/_cyrfc.pyx":1637
 *     # func_desc = func_data['func_desc_handle']
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         rc = RfcGetConnectionAttributes(rfcHandle, &attributes, &errorInfo)
 *         if rc != RFC_OK:
 */
    }
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    goto __pyx_L10_try_end;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrfc/_cyrfc.pyx":1683
 *     # Server exception handling: cf. SAP NetWeaver RFC SDK 7.50
 *     # 5.1 Preparing a Server Program for Receiving RFC Requests
 *     except ExternalRuntimeError as e:  # System failure             # <<<<<<<<<<<<<<
 *         # Parameter: message (optional: msg_type, msg_class, msg_number, msg_v1-v4)
 *         # returns:   RFC_EXTERNAL_FAILURE
 */
    __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_ExternalRuntimeError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1683, __pyx_L7_except_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_8);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_ErrRestore(__pyx_t_1, __pyx_t_6, __pyx_t_7);
    __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0;
    if (__pyx_t_10) {
      __Pyx_AddTraceback("pyrfc._cyrfc.genericHandler", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(0, 1683, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_e = __pyx_t_6;
      /*try:*/ {

        /* "pyrfc/_cyrfc.pyx":1686
 *         # Parameter: message (optional: msg_type, msg_class, msg_number, msg_v1-v4)
 *         # returns:   RFC_EXTERNAL_FAILURE
 *         fillError(e, serverErrorInfo)             # <<<<<<<<<<<<<<
 *         serverErrorInfo.code = RFC_EXTERNAL_FAILURE  # Overwrite code, if set.
 *         _server_log("genericHandler", f"Request for '{func_name}' raises ExternalRuntimeError {e} - code set to RFC_EXTERNAL_FAILURE.")
 */
        __pyx_t_8 = __pyx_f_5pyrfc_6_cyrfc_fillError(__pyx_v_e, __pyx_v_serverErrorInfo); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1686, __pyx_L22_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pyrfc/_cyrfc.pyx":1687
 *         # returns:   RFC_EXTERNAL_FAILURE
 *         fillError(e, serverErrorInfo)
 *         serverErrorInfo.code = RFC_EXTERNAL_FAILURE  # Overwrite code, if set.             # <<<<<<<<<<<<<<
 *         _server_log("genericHandler", f"Request for '{func_name}' raises ExternalRuntimeError {e} - code set to RFC_EXTERNAL_FAILURE.")
 *         return RFC_EXTERNAL_FAILURE
 */
        __pyx_v_serverErrorInfo->code = RFC_EXTERNAL_FAILURE;

        /* "pyrfc/_cyrfc.pyx":1688
 *         fillError(e, serverErrorInfo)
 *         serverErrorInfo.code = RFC_EXTERNAL_FAILURE  # Overwrite code, if set.
 *         _server_log("genericHandler", f"Request for '{func_name}' raises ExternalRuntimeError {e} - code set to RFC_EXTERNAL_FAILURE.")             # <<<<<<<<<<<<<<
 *         return RFC_EXTERNAL_FAILURE
 *     except ABAPRuntimeError as e:  # ABAP Message
 */
        __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_server_log); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1688, __pyx_L22_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_17 = PyTuple_New(5); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1688, __pyx_L22_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_15 = 0;
        __pyx_t_5 = 127;
        __Pyx_INCREF(__pyx_kp_u_Request_for);
        __pyx_t_15 += 13;
        __Pyx_GIVEREF(__pyx_kp_u_Request_for);
        PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_kp_u_Request_for);
        __pyx_t_18 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1688, __pyx_L22_error)
        __Pyx_GOTREF(__pyx_t_18);
        __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) : __pyx_t_5;
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_18);
        __pyx_t_18 = 0;
        __Pyx_INCREF(__pyx_kp_u_raises_ExternalRuntimeError);
        __pyx_t_15 += 30;
        __Pyx_GIVEREF(__pyx_kp_u_raises_ExternalRuntimeError);
        PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_kp_u_raises_ExternalRuntimeError);
        __pyx_t_18 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1688, __pyx_L22_error)
        __Pyx_GOTREF(__pyx_t_18);
        __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) : __pyx_t_5;
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_17, 3, __pyx_t_18);
        __pyx_t_18 = 0;
        __Pyx_INCREF(__pyx_kp_u_code_set_to_RFC_EXTERNAL_FAILUR);
        __pyx_t_15 += 36;
        __Pyx_GIVEREF(__pyx_kp_u_code_set_to_RFC_EXTERNAL_FAILUR);
        PyTuple_SET_ITEM(__pyx_t_17, 4, __pyx_kp_u_code_set_to_RFC_EXTERNAL_FAILUR);
        __pyx_t_18 = __Pyx_PyUnicode_Join(__pyx_t_17, 5, __pyx_t_15, __pyx_t_5); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1688, __pyx_L22_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __pyx_t_17 = NULL;
        __pyx_t_10 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_17)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_17);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
            __pyx_t_10 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_n_u_genericHandler, __pyx_t_18};
          __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1688, __pyx_L22_error)
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_n_u_genericHandler, __pyx_t_18};
          __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1688, __pyx_L22_error)
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        } else
        #endif
        {
          __pyx_t_19 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1688, __pyx_L22_error)
          __Pyx_GOTREF(__pyx_t_19);
          if (__pyx_t_17) {
            __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_17); __pyx_t_17 = NULL;
          }
          __Pyx_INCREF(__pyx_n_u_genericHandler);
          __Pyx_GIVEREF(__pyx_n_u_genericHandler);
          PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_10, __pyx_n_u_genericHandler);
          __Pyx_GIVEREF(__pyx_t_18);
          PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_10, __pyx_t_18);
          __pyx_t_18 = 0;
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_19, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1688, __pyx_L22_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pyrfc/_cyrfc.pyx":1689
 *         serverErrorInfo.code = RFC_EXTERNAL_FAILURE  # Overwrite code, if set.
 *         _server_log("genericHandler", f"Request for '{func_name}' raises ExternalRuntimeError {e} - code set to RFC_EXTERNAL_FAILURE.")
 *         return RFC_EXTERNAL_FAILURE             # <<<<<<<<<<<<<<
 *     except ABAPRuntimeError as e:  # ABAP Message
 *         # Parameter: msg_type, msg_class, msg_number, msg_v1-v4
 */
        __pyx_r = RFC_EXTERNAL_FAILURE;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L21_return;
      }

      /* "pyrfc/_cyrfc.pyx":1683
 *     # Server exception handling: cf. SAP NetWeaver RFC SDK 7.50
 *     # 5.1 Preparing a Server Program for Receiving RFC Requests
 *     except ExternalRuntimeError as e:  # System failure             # <<<<<<<<<<<<<<
 *         # Parameter: message (optional: msg_type, msg_class, msg_number, msg_v1-v4)
 *         # returns:   RFC_EXTERNAL_FAILURE
 */
      /*finally:*/ {
        __pyx_L22_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23) < 0)) __Pyx_ErrFetch(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_25);
          __Pyx_XGOTREF(__pyx_t_26);
          __pyx_t_10 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_20 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e);
            __pyx_v_e = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_XGIVEREF(__pyx_t_25);
            __Pyx_XGIVEREF(__pyx_t_26);
            __Pyx_ExceptionReset(__pyx_t_24, __pyx_t_25, __pyx_t_26);
          }
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_ErrRestore(__pyx_t_21, __pyx_t_22, __pyx_t_23);
          __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0;
          __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_20;
          goto __pyx_L7_except_error;
        }
        __pyx_L21_return: {
          __pyx_t_14 = __pyx_r;
          __Pyx_DECREF(__pyx_v_e);
          __pyx_v_e = NULL;
          __pyx_r = __pyx_t_14;
          goto __pyx_L8_except_return;
        }
      }
    }

    /* "pyrfc/_cyrfc.pyx":1690
 *         _server_log("genericHandler", f"Request for '{func_name}' raises ExternalRuntimeError {e} - code set to RFC_EXTERNAL_FAILURE.")
 *         return RFC_EXTERNAL_FAILURE
 *     except ABAPRuntimeError as e:  # ABAP Message             # <<<<<<<<<<<<<<
 *         # Parameter: msg_type, msg_class, msg_number, msg_v1-v4
 *         # returns:   RFC_ABAP_MESSAGE
 */
    __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_ABAPRuntimeError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1690, __pyx_L7_except_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_16 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_8);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_ErrRestore(__pyx_t_1, __pyx_t_6, __pyx_t_7);
    __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0;
    if (__pyx_t_16) {
      __Pyx_AddTraceback("pyrfc._cyrfc.genericHandler", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(0, 1690, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_e = __pyx_t_6;
      /*try:*/ {

        /* "pyrfc/_cyrfc.pyx":1693
 *         # Parameter: msg_type, msg_class, msg_number, msg_v1-v4
 *         # returns:   RFC_ABAP_MESSAGE
 *         fillError(e, serverErrorInfo)             # <<<<<<<<<<<<<<
 *         serverErrorInfo.code = RFC_ABAP_MESSAGE  # Overwrite code, if set.
 *         _server_log("genericHandler", f"Request for '{func_name}' raises ABAPRuntimeError {e} - code set to RFC_ABAP_MESSAGE.")
 */
        __pyx_t_8 = __pyx_f_5pyrfc_6_cyrfc_fillError(__pyx_v_e, __pyx_v_serverErrorInfo); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1693, __pyx_L33_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pyrfc/_cyrfc.pyx":1694
 *         # returns:   RFC_ABAP_MESSAGE
 *         fillError(e, serverErrorInfo)
 *         serverErrorInfo.code = RFC_ABAP_MESSAGE  # Overwrite code, if set.             # <<<<<<<<<<<<<<
 *         _server_log("genericHandler", f"Request for '{func_name}' raises ABAPRuntimeError {e} - code set to RFC_ABAP_MESSAGE.")
 *         return RFC_ABAP_MESSAGE
 */
        __pyx_v_serverErrorInfo->code = RFC_ABAP_MESSAGE;

        /* "pyrfc/_cyrfc.pyx":1695
 *         fillError(e, serverErrorInfo)
 *         serverErrorInfo.code = RFC_ABAP_MESSAGE  # Overwrite code, if set.
 *         _server_log("genericHandler", f"Request for '{func_name}' raises ABAPRuntimeError {e} - code set to RFC_ABAP_MESSAGE.")             # <<<<<<<<<<<<<<
 *         return RFC_ABAP_MESSAGE
 *     except ABAPApplicationError as e:  # ABAP Exception in implementing function
 */
        __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_server_log); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1695, __pyx_L33_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_19 = PyTuple_New(5); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1695, __pyx_L33_error)
        __Pyx_GOTREF(__pyx_t_19);
        __pyx_t_15 = 0;
        __pyx_t_5 = 127;
        __Pyx_INCREF(__pyx_kp_u_Request_for);
        __pyx_t_15 += 13;
        __Pyx_GIVEREF(__pyx_kp_u_Request_for);
        PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_kp_u_Request_for);
        __pyx_t_18 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1695, __pyx_L33_error)
        __Pyx_GOTREF(__pyx_t_18);
        __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) : __pyx_t_5;
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_18);
        __pyx_t_18 = 0;
        __Pyx_INCREF(__pyx_kp_u_raises_ABAPRuntimeError);
        __pyx_t_15 += 26;
        __Pyx_GIVEREF(__pyx_kp_u_raises_ABAPRuntimeError);
        PyTuple_SET_ITEM(__pyx_t_19, 2, __pyx_kp_u_raises_ABAPRuntimeError);
        __pyx_t_18 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1695, __pyx_L33_error)
        __Pyx_GOTREF(__pyx_t_18);
        __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) : __pyx_t_5;
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_19, 3, __pyx_t_18);
        __pyx_t_18 = 0;
        __Pyx_INCREF(__pyx_kp_u_code_set_to_RFC_ABAP_MESSAGE);
        __pyx_t_15 += 32;
        __Pyx_GIVEREF(__pyx_kp_u_code_set_to_RFC_ABAP_MESSAGE);
        PyTuple_SET_ITEM(__pyx_t_19, 4, __pyx_kp_u_code_set_to_RFC_ABAP_MESSAGE);
        __pyx_t_18 = __Pyx_PyUnicode_Join(__pyx_t_19, 5, __pyx_t_15, __pyx_t_5); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1695, __pyx_L33_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
        __pyx_t_19 = NULL;
        __pyx_t_16 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_19)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_19);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
            __pyx_t_16 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[3] = {__pyx_t_19, __pyx_n_u_genericHandler, __pyx_t_18};
          __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1695, __pyx_L33_error)
          __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[3] = {__pyx_t_19, __pyx_n_u_genericHandler, __pyx_t_18};
          __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1695, __pyx_L33_error)
          __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        } else
        #endif
        {
          __pyx_t_17 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1695, __pyx_L33_error)
          __Pyx_GOTREF(__pyx_t_17);
          if (__pyx_t_19) {
            __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_19); __pyx_t_19 = NULL;
          }
          __Pyx_INCREF(__pyx_n_u_genericHandler);
          __Pyx_GIVEREF(__pyx_n_u_genericHandler);
          PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_16, __pyx_n_u_genericHandler);
          __Pyx_GIVEREF(__pyx_t_18);
          PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_16, __pyx_t_18);
          __pyx_t_18 = 0;
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_17, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1695, __pyx_L33_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pyrfc/_cyrfc.pyx":1696
 *         serverErrorInfo.code = RFC_ABAP_MESSAGE  # Overwrite code, if set.
 *         _server_log("genericHandler", f"Request for '{func_name}' raises ABAPRuntimeError {e} - code set to RFC_ABAP_MESSAGE.")
 *         return RFC_ABAP_MESSAGE             # <<<<<<<<<<<<<<
 *     except ABAPApplicationError as e:  # ABAP Exception in implementing function
 *         # Parameter: key (optional: msg_type, msg_class, msg_number, msg_v1-v4)
 */
        __pyx_r = RFC_ABAP_MESSAGE;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L32_return;
      }

      /* "pyrfc/_cyrfc.pyx":1690
 *         _server_log("genericHandler", f"Request for '{func_name}' raises ExternalRuntimeError {e} - code set to RFC_EXTERNAL_FAILURE.")
 *         return RFC_EXTERNAL_FAILURE
 *     except ABAPRuntimeError as e:  # ABAP Message             # <<<<<<<<<<<<<<
 *         # Parameter: msg_type, msg_class, msg_number, msg_v1-v4
 *         # returns:   RFC_ABAP_MESSAGE
 */
      /*finally:*/ {
        __pyx_L33_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_26, &__pyx_t_25, &__pyx_t_24) < 0)) __Pyx_ErrFetch(&__pyx_t_26, &__pyx_t_25, &__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_26);
          __Pyx_XGOTREF(__pyx_t_25);
          __Pyx_XGOTREF(__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_21);
          __pyx_t_16 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_27 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e);
            __pyx_v_e = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_22, __pyx_t_21);
          }
          __Pyx_XGIVEREF(__pyx_t_26);
          __Pyx_XGIVEREF(__pyx_t_25);
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_ErrRestore(__pyx_t_26, __pyx_t_25, __pyx_t_24);
          __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0;
          __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_27;
          goto __pyx_L7_except_error;
        }
        __pyx_L32_return: {
          __pyx_t_14 = __pyx_r;
          __Pyx_DECREF(__pyx_v_e);
          __pyx_v_e = NULL;
          __pyx_r = __pyx_t_14;
          goto __pyx_L8_except_return;
        }
      }
    }

    /* "pyrfc/_cyrfc.pyx":1697
 *         _server_log("genericHandler", f"Request for '{func_name}' raises ABAPRuntimeError {e} - code set to RFC_ABAP_MESSAGE.")
 *         return RFC_ABAP_MESSAGE
 *     except ABAPApplicationError as e:  # ABAP Exception in implementing function             # <<<<<<<<<<<<<<
 *         # Parameter: key (optional: msg_type, msg_class, msg_number, msg_v1-v4)
 *         # returns:   RFC_ABAP_EXCEPTION
 */
    __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_ABAPApplicationError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1697, __pyx_L7_except_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_8);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_ErrRestore(__pyx_t_1, __pyx_t_6, __pyx_t_7);
    __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0;
    if (__pyx_t_10) {
      __Pyx_AddTraceback("pyrfc._cyrfc.genericHandler", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(0, 1697, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_e = __pyx_t_6;
      /*try:*/ {

        /* "pyrfc/_cyrfc.pyx":1700
 *         # Parameter: key (optional: msg_type, msg_class, msg_number, msg_v1-v4)
 *         # returns:   RFC_ABAP_EXCEPTION
 *         fillError(e, serverErrorInfo)             # <<<<<<<<<<<<<<
 *         serverErrorInfo.code = RFC_ABAP_EXCEPTION  # Overwrite code, if set.
 *         _server_log("genericHandler", f"Request for '{func_name}' raises ABAPApplicationError {e} - code set to RFC_ABAP_EXCEPTION.")
 */
        __pyx_t_8 = __pyx_f_5pyrfc_6_cyrfc_fillError(__pyx_v_e, __pyx_v_serverErrorInfo); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1700, __pyx_L44_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pyrfc/_cyrfc.pyx":1701
 *         # returns:   RFC_ABAP_EXCEPTION
 *         fillError(e, serverErrorInfo)
 *         serverErrorInfo.code = RFC_ABAP_EXCEPTION  # Overwrite code, if set.             # <<<<<<<<<<<<<<
 *         _server_log("genericHandler", f"Request for '{func_name}' raises ABAPApplicationError {e} - code set to RFC_ABAP_EXCEPTION.")
 *         return RFC_ABAP_EXCEPTION
 */
        __pyx_v_serverErrorInfo->code = RFC_ABAP_EXCEPTION;

        /* "pyrfc/_cyrfc.pyx":1702
 *         fillError(e, serverErrorInfo)
 *         serverErrorInfo.code = RFC_ABAP_EXCEPTION  # Overwrite code, if set.
 *         _server_log("genericHandler", f"Request for '{func_name}' raises ABAPApplicationError {e} - code set to RFC_ABAP_EXCEPTION.")             # <<<<<<<<<<<<<<
 *         return RFC_ABAP_EXCEPTION
 *     except Exception as ex:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_server_log); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1702, __pyx_L44_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_17 = PyTuple_New(5); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1702, __pyx_L44_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_15 = 0;
        __pyx_t_5 = 127;
        __Pyx_INCREF(__pyx_kp_u_Request_for);
        __pyx_t_15 += 13;
        __Pyx_GIVEREF(__pyx_kp_u_Request_for);
        PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_kp_u_Request_for);
        __pyx_t_18 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1702, __pyx_L44_error)
        __Pyx_GOTREF(__pyx_t_18);
        __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) : __pyx_t_5;
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_18);
        __pyx_t_18 = 0;
        __Pyx_INCREF(__pyx_kp_u_raises_ABAPApplicationError);
        __pyx_t_15 += 30;
        __Pyx_GIVEREF(__pyx_kp_u_raises_ABAPApplicationError);
        PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_kp_u_raises_ABAPApplicationError);
        __pyx_t_18 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1702, __pyx_L44_error)
        __Pyx_GOTREF(__pyx_t_18);
        __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) : __pyx_t_5;
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_17, 3, __pyx_t_18);
        __pyx_t_18 = 0;
        __Pyx_INCREF(__pyx_kp_u_code_set_to_RFC_ABAP_EXCEPTION);
        __pyx_t_15 += 34;
        __Pyx_GIVEREF(__pyx_kp_u_code_set_to_RFC_ABAP_EXCEPTION);
        PyTuple_SET_ITEM(__pyx_t_17, 4, __pyx_kp_u_code_set_to_RFC_ABAP_EXCEPTION);
        __pyx_t_18 = __Pyx_PyUnicode_Join(__pyx_t_17, 5, __pyx_t_15, __pyx_t_5); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1702, __pyx_L44_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __pyx_t_17 = NULL;
        __pyx_t_10 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_17)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_17);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
            __pyx_t_10 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_n_u_genericHandler, __pyx_t_18};
          __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1702, __pyx_L44_error)
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_n_u_genericHandler, __pyx_t_18};
          __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1702, __pyx_L44_error)
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        } else
        #endif
        {
          __pyx_t_19 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1702, __pyx_L44_error)
          __Pyx_GOTREF(__pyx_t_19);
          if (__pyx_t_17) {
            __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_17); __pyx_t_17 = NULL;
          }
          __Pyx_INCREF(__pyx_n_u_genericHandler);
          __Pyx_GIVEREF(__pyx_n_u_genericHandler);
          PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_10, __pyx_n_u_genericHandler);
          __Pyx_GIVEREF(__pyx_t_18);
          PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_10, __pyx_t_18);
          __pyx_t_18 = 0;
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_19, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1702, __pyx_L44_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pyrfc/_cyrfc.pyx":1703
 *         serverErrorInfo.code = RFC_ABAP_EXCEPTION  # Overwrite code, if set.
 *         _server_log("genericHandler", f"Request for '{func_name}' raises ABAPApplicationError {e} - code set to RFC_ABAP_EXCEPTION.")
 *         return RFC_ABAP_EXCEPTION             # <<<<<<<<<<<<<<
 *     except Exception as ex:
 *         exctype, value = exc_info()[:2]
 */
        __pyx_r = RFC_ABAP_EXCEPTION;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L43_return;
      }

      /* "pyrfc/_cyrfc.pyx":1697
 *         _server_log("genericHandler", f"Request for '{func_name}' raises ABAPRuntimeError {e} - code set to RFC_ABAP_MESSAGE.")
 *         return RFC_ABAP_MESSAGE
 *     except ABAPApplicationError as e:  # ABAP Exception in implementing function             # <<<<<<<<<<<<<<
 *         # Parameter: key (optional: msg_type, msg_class, msg_number, msg_v1-v4)
 *         # returns:   RFC_ABAP_EXCEPTION
 */
      /*finally:*/ {
        __pyx_L44_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23) < 0)) __Pyx_ErrFetch(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_25);
          __Pyx_XGOTREF(__pyx_t_26);
          __pyx_t_10 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_28 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e);
            __pyx_v_e = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_XGIVEREF(__pyx_t_25);
            __Pyx_XGIVEREF(__pyx_t_26);
            __Pyx_ExceptionReset(__pyx_t_24, __pyx_t_25, __pyx_t_26);
          }
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_ErrRestore(__pyx_t_21, __pyx_t_22, __pyx_t_23);
          __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0;
          __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_28;
          goto __pyx_L7_except_error;
        }
        __pyx_L43_return: {
          __pyx_t_14 = __pyx_r;
          __Pyx_DECREF(__pyx_v_e);
          __pyx_v_e = NULL;
          __pyx_r = __pyx_t_14;
          goto __pyx_L8_except_return;
        }
      }
    }

    /* "pyrfc/_cyrfc.pyx":1704
 *         _server_log("genericHandler", f"Request for '{func_name}' raises ABAPApplicationError {e} - code set to RFC_ABAP_EXCEPTION.")
 *         return RFC_ABAP_EXCEPTION
 *     except Exception as ex:             # <<<<<<<<<<<<<<
 *         exctype, value = exc_info()[:2]
 *         _server_log(
 */
    __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_16) {
      __Pyx_AddTraceback("pyrfc._cyrfc.genericHandler", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1704, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_ex = __pyx_t_6;
      /*try:*/ {

        /* "pyrfc/_cyrfc.pyx":1705
 *         return RFC_ABAP_EXCEPTION
 *     except Exception as ex:
 *         exctype, value = exc_info()[:2]             # <<<<<<<<<<<<<<
 *         _server_log(
 *             "genericHandler",
 */
        __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1705, __pyx_L55_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_19 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_19)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_19);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
          }
        }
        __pyx_t_8 = (__pyx_t_19) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_19) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
        __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1705, __pyx_L55_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_t_8, 0, 2, NULL, NULL, &__pyx_slice__30, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1705, __pyx_L55_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) {
          PyObject* sequence = __pyx_t_9;
          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, 1705, __pyx_L55_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_19 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_19 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_19);
          #else
          __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1705, __pyx_L55_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_19 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1705, __pyx_L55_error)
          __Pyx_GOTREF(__pyx_t_19);
          #endif
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_18 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1705, __pyx_L55_error)
          __Pyx_GOTREF(__pyx_t_18);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_29 = Py_TYPE(__pyx_t_18)->tp_iternext;
          index = 0; __pyx_t_8 = __pyx_t_29(__pyx_t_18); if (unlikely(!__pyx_t_8)) goto __pyx_L57_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_8);
          index = 1; __pyx_t_19 = __pyx_t_29(__pyx_t_18); if (unlikely(!__pyx_t_19)) goto __pyx_L57_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_19);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_29(__pyx_t_18), 2) < 0) __PYX_ERR(0, 1705, __pyx_L55_error)
          __pyx_t_29 = NULL;
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          goto __pyx_L58_unpacking_done;
          __pyx_L57_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          __pyx_t_29 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 1705, __pyx_L55_error)
          __pyx_L58_unpacking_done:;
        }
        __pyx_v_exctype = __pyx_t_8;
        __pyx_t_8 = 0;
        __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_19);
        __pyx_t_19 = 0;

        /* "pyrfc/_cyrfc.pyx":1706
 *     except Exception as ex:
 *         exctype, value = exc_info()[:2]
 *         _server_log(             # <<<<<<<<<<<<<<
 *             "genericHandler",
 *             f"Request for '{func_name}' raises an invalid exception:\n Exception: {exctype}\n Values: {value}\n"
 */
        __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_server_log); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1706, __pyx_L55_error)
        __Pyx_GOTREF(__pyx_t_19);

        /* "pyrfc/_cyrfc.pyx":1708
 *         _server_log(
 *             "genericHandler",
 *             f"Request for '{func_name}' raises an invalid exception:\n Exception: {exctype}\n Values: {value}\n"             # <<<<<<<<<<<<<<
 *             "Callback functions may only raise ABAPApplicationError, ABAPRuntimeError, or ExternalRuntimeError.\n"
 *             "The values of the request were:\n"
 */
        __pyx_t_8 = PyTuple_New(10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1708, __pyx_L55_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_15 = 0;
        __pyx_t_5 = 127;
        __Pyx_INCREF(__pyx_kp_u_Request_for);
        __pyx_t_15 += 13;
        __Pyx_GIVEREF(__pyx_kp_u_Request_for);
        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_Request_for);
        __pyx_t_18 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1708, __pyx_L55_error)
        __Pyx_GOTREF(__pyx_t_18);
        __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) : __pyx_t_5;
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_18);
        __pyx_t_18 = 0;
        __Pyx_INCREF(__pyx_kp_u_raises_an_invalid_exception_Exc);
        __pyx_t_15 += 43;
        __Pyx_GIVEREF(__pyx_kp_u_raises_an_invalid_exception_Exc);
        PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u_raises_an_invalid_exception_Exc);
        __pyx_t_18 = __Pyx_PyObject_FormatSimple(__pyx_v_exctype, __pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1708, __pyx_L55_error)
        __Pyx_GOTREF(__pyx_t_18);
        __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) : __pyx_t_5;
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_18);
        __pyx_t_18 = 0;
        __Pyx_INCREF(__pyx_kp_u_Values);
        __pyx_t_15 += 10;
        __Pyx_GIVEREF(__pyx_kp_u_Values);
        PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_kp_u_Values);
        __pyx_t_18 = __Pyx_PyObject_FormatSimple(__pyx_v_value, __pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1708, __pyx_L55_error)
        __Pyx_GOTREF(__pyx_t_18);
        __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) : __pyx_t_5;
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_t_18);
        __pyx_t_18 = 0;
        __Pyx_INCREF(__pyx_kp_u_Callback_functions_may_only_rai);
        __pyx_t_15 += 140;
        __Pyx_GIVEREF(__pyx_kp_u_Callback_functions_may_only_rai);
        PyTuple_SET_ITEM(__pyx_t_8, 6, __pyx_kp_u_Callback_functions_may_only_rai);

        /* "pyrfc/_cyrfc.pyx":1711
 *             "Callback functions may only raise ABAPApplicationError, ABAPRuntimeError, or ExternalRuntimeError.\n"
 *             "The values of the request were:\n"
 *             f"params: {func_handle_variables}\nrequest_context: {request_context}"             # <<<<<<<<<<<<<<
 *         )
 *         new_error = ExternalRuntimeError(
 */
        if (unlikely(!__pyx_v_func_handle_variables)) { __Pyx_RaiseUnboundLocalError("func_handle_variables"); __PYX_ERR(0, 1711, __pyx_L55_error) }
        __pyx_t_18 = __Pyx_PyObject_FormatSimple(__pyx_v_func_handle_variables, __pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1711, __pyx_L55_error)
        __Pyx_GOTREF(__pyx_t_18);
        __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) : __pyx_t_5;
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_8, 7, __pyx_t_18);
        __pyx_t_18 = 0;
        __Pyx_INCREF(__pyx_kp_u_request_context_2);
        __pyx_t_15 += 18;
        __Pyx_GIVEREF(__pyx_kp_u_request_context_2);
        PyTuple_SET_ITEM(__pyx_t_8, 8, __pyx_kp_u_request_context_2);
        if (unlikely(!__pyx_v_request_context)) { __Pyx_RaiseUnboundLocalError("request_context"); __PYX_ERR(0, 1711, __pyx_L55_error) }
        __pyx_t_18 = __Pyx_PyObject_FormatSimple(__pyx_v_request_context, __pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1711, __pyx_L55_error)
        __Pyx_GOTREF(__pyx_t_18);
        __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) : __pyx_t_5;
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_8, 9, __pyx_t_18);
        __pyx_t_18 = 0;

        /* "pyrfc/_cyrfc.pyx":1708
 *         _server_log(
 *             "genericHandler",
 *             f"Request for '{func_name}' raises an invalid exception:\n Exception: {exctype}\n Values: {value}\n"             # <<<<<<<<<<<<<<
 *             "Callback functions may only raise ABAPApplicationError, ABAPRuntimeError, or ExternalRuntimeError.\n"
 *             "The values of the request were:\n"
 */
        __pyx_t_18 = __Pyx_PyUnicode_Join(__pyx_t_8, 10, __pyx_t_15, __pyx_t_5); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1708, __pyx_L55_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = NULL;
        __pyx_t_16 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_19))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_19);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_19, function);
            __pyx_t_16 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_19)) {
          PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_n_u_genericHandler, __pyx_t_18};
          __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1706, __pyx_L55_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_19)) {
          PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_n_u_genericHandler, __pyx_t_18};
          __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1706, __pyx_L55_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        } else
        #endif
        {
          __pyx_t_17 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1706, __pyx_L55_error)
          __Pyx_GOTREF(__pyx_t_17);
          if (__pyx_t_8) {
            __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_8); __pyx_t_8 = NULL;
          }
          __Pyx_INCREF(__pyx_n_u_genericHandler);
          __Pyx_GIVEREF(__pyx_n_u_genericHandler);
          PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_16, __pyx_n_u_genericHandler);
          __Pyx_GIVEREF(__pyx_t_18);
          PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_16, __pyx_t_18);
          __pyx_t_18 = 0;
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_t_17, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1706, __pyx_L55_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        }
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "pyrfc/_cyrfc.pyx":1713
 *             f"params: {func_handle_variables}\nrequest_context: {request_context}"
 *         )
 *         new_error = ExternalRuntimeError(             # <<<<<<<<<<<<<<
 *             message="Invalid exception raised by callback function.",
 *             code=RFC_EXTERNAL_FAILURE
 */
        __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_ExternalRuntimeError); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1713, __pyx_L55_error)
        __Pyx_GOTREF(__pyx_t_9);

        /* "pyrfc/_cyrfc.pyx":1714
 *         )
 *         new_error = ExternalRuntimeError(
 *             message="Invalid exception raised by callback function.",             # <<<<<<<<<<<<<<
 *             code=RFC_EXTERNAL_FAILURE
 *         )
 */
        __pyx_t_19 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1714, __pyx_L55_error)
        __Pyx_GOTREF(__pyx_t_19);
        if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_message, __pyx_kp_u_Invalid_exception_raised_by_call) < 0) __PYX_ERR(0, 1714, __pyx_L55_error)

        /* "pyrfc/_cyrfc.pyx":1715
 *         new_error = ExternalRuntimeError(
 *             message="Invalid exception raised by callback function.",
 *             code=RFC_EXTERNAL_FAILURE             # <<<<<<<<<<<<<<
 *         )
 *         fillError(new_error, serverErrorInfo)
 */
        __pyx_t_17 = __Pyx_PyInt_From_RFC_RC(RFC_EXTERNAL_FAILURE); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1715, __pyx_L55_error)
        __Pyx_GOTREF(__pyx_t_17);
        if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_code, __pyx_t_17) < 0) __PYX_ERR(0, 1714, __pyx_L55_error)
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

        /* "pyrfc/_cyrfc.pyx":1713
 *             f"params: {func_handle_variables}\nrequest_context: {request_context}"
 *         )
 *         new_error = ExternalRuntimeError(             # <<<<<<<<<<<<<<
 *             message="Invalid exception raised by callback function.",
 *             code=RFC_EXTERNAL_FAILURE
 */
        __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_19); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1713, __pyx_L55_error)
        __Pyx_GOTREF(__pyx_t_17);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
        __Pyx_XDECREF_SET(__pyx_v_new_error, __pyx_t_17);
        __pyx_t_17 = 0;

        /* "pyrfc/_cyrfc.pyx":1717
 *             code=RFC_EXTERNAL_FAILURE
 *         )
 *         fillError(new_error, serverErrorInfo)             # <<<<<<<<<<<<<<
 *         return RFC_EXTERNAL_FAILURE
 * 
 */
        __pyx_t_17 = __pyx_f_5pyrfc_6_cyrfc_fillError(__pyx_v_new_error, __pyx_v_serverErrorInfo); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1717, __pyx_L55_error)
        __Pyx_GOTREF(__pyx_t_17);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

        /* "pyrfc/_cyrfc.pyx":1718
 *         )
 *         fillError(new_error, serverErrorInfo)
 *         return RFC_EXTERNAL_FAILURE             # <<<<<<<<<<<<<<
 * 
 *     return RFC_OK
 */
        __pyx_r = RFC_EXTERNAL_FAILURE;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L54_return;
      }

      /* "pyrfc/_cyrfc.pyx":1704
 *         _server_log("genericHandler", f"Request for '{func_name}' raises ABAPApplicationError {e} - code set to RFC_ABAP_EXCEPTION.")
 *         return RFC_ABAP_EXCEPTION
 *     except Exception as ex:             # <<<<<<<<<<<<<<
 *         exctype, value = exc_info()[:2]
 *         _server_log(
 */
      /*finally:*/ {
        __pyx_L55_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_26, &__pyx_t_25, &__pyx_t_24) < 0)) __Pyx_ErrFetch(&__pyx_t_26, &__pyx_t_25, &__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_26);
          __Pyx_XGOTREF(__pyx_t_25);
          __Pyx_XGOTREF(__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_21);
          __pyx_t_16 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_30 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_ex);
            __pyx_v_ex = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_22, __pyx_t_21);
          }
          __Pyx_XGIVEREF(__pyx_t_26);
          __Pyx_XGIVEREF(__pyx_t_25);
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_ErrRestore(__pyx_t_26, __pyx_t_25, __pyx_t_24);
          __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0;
          __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_30;
          goto __pyx_L7_except_error;
        }
        __pyx_L54_return: {
          __pyx_t_14 = __pyx_r;
          __Pyx_DECREF(__pyx_v_ex);
          __pyx_v_ex = NULL;
          __pyx_r = __pyx_t_14;
          goto __pyx_L8_except_return;
        }
      }
    }
    goto __pyx_L7_except_error;
    __pyx_L7_except_error:;

    /* "pyrfc/_cyrfc.pyx":1637
 *     # func_desc = func_data['func_desc_handle']
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         rc = RfcGetConnectionAttributes(rfcHandle, &attributes, &errorInfo)
 *         if rc != RFC_OK:
 */
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
    goto __pyx_L1_error;
    __pyx_L9_try_return:;
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
    goto __pyx_L0;
    __pyx_L8_except_return:;
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
    goto __pyx_L0;
    __pyx_L10_try_end:;
  }

  /* "pyrfc/_cyrfc.pyx":1720
 *         return RFC_EXTERNAL_FAILURE
 * 
 *     return RFC_OK             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = RFC_OK;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":1604
 *     return server_context
 * 
 * cdef RFC_RC genericHandler(RFC_CONNECTION_HANDLE rfcHandle, RFC_FUNCTION_HANDLE funcHandle, RFC_ERROR_INFO* serverErrorInfo) with gil:             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_WriteUnraisable("pyrfc._cyrfc.genericHandler", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = (RFC_RC) 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_context);
  __Pyx_XDECREF(__pyx_v_err_msg);
  __Pyx_XDECREF(__pyx_v_new_error);
  __Pyx_XDECREF(__pyx_v_func_name);
  __Pyx_XDECREF(__pyx_v_func_data);
  __Pyx_XDECREF(__pyx_v_callback);
  __Pyx_XDECREF(__pyx_v_server);
  __Pyx_XDECREF(__pyx_v_conn_attr);
  __Pyx_XDECREF(__pyx_v_request_context);
  __Pyx_XDECREF(__pyx_v_auth_function);
  __Pyx_XDECREF(__pyx_v_func_handle_variables);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_ex);
  __Pyx_XDECREF(__pyx_v_exctype);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1769
 *     }
 * 
 *     def __cinit__(self, server_params, client_params, config=None):             # <<<<<<<<<<<<<<
 *         # config parsing
 *         config = config or {}
 */

/* Python wrapper */
static int __pyx_pw_5pyrfc_6_cyrfc_6Server_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5pyrfc_6_cyrfc_6Server_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_server_params = 0;
  PyObject *__pyx_v_client_params = 0;
  PyObject *__pyx_v_config = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_server_params,&__pyx_n_s_client_params,&__pyx_n_s_config,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_server_params)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_client_params)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(0, 1769, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_config);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1769, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_server_params = values[0];
    __pyx_v_client_params = values[1];
    __pyx_v_config = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1769, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.Server.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server___cinit__(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self), __pyx_v_server_params, __pyx_v_client_params, __pyx_v_config);

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

static int __pyx_pf_5pyrfc_6_cyrfc_6Server___cinit__(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, PyObject *__pyx_v_server_params, PyObject *__pyx_v_client_params, PyObject *__pyx_v_config) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_INCREF(__pyx_v_config);

  /* "pyrfc/_cyrfc.pyx":1771
 *     def __cinit__(self, server_params, client_params, config=None):
 *         # config parsing
 *         config = config or {}             # <<<<<<<<<<<<<<
 *         self.debug = config.get('debug', False)
 *         self.rstrip = config.get('rstrip', True)
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_config); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1771, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __Pyx_INCREF(__pyx_v_config);
    __pyx_t_1 = __pyx_v_config;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_config, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1772
 *         # config parsing
 *         config = config or {}
 *         self.debug = config.get('debug', False)             # <<<<<<<<<<<<<<
 *         self.rstrip = config.get('rstrip', True)
 *         server_context["server_log"] = config.get("server_log", False)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1772, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_self->debug = __pyx_t_2;

  /* "pyrfc/_cyrfc.pyx":1773
 *         config = config or {}
 *         self.debug = config.get('debug', False)
 *         self.rstrip = config.get('rstrip', True)             # <<<<<<<<<<<<<<
 *         server_context["server_log"] = config.get("server_log", False)
 *         server_context["auth_check"] = config.get("auth_check", default_auth_check)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1773, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->rstrip = __pyx_t_2;

  /* "pyrfc/_cyrfc.pyx":1774
 *         self.debug = config.get('debug', False)
 *         self.rstrip = config.get('rstrip', True)
 *         server_context["server_log"] = config.get("server_log", False)             # <<<<<<<<<<<<<<
 *         server_context["auth_check"] = config.get("auth_check", default_auth_check)
 *         server_context["port"] = config.get("port", 8080)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_n_u_server_log_2, __pyx_t_3) < 0)) __PYX_ERR(0, 1774, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":1775
 *         self.rstrip = config.get('rstrip', True)
 *         server_context["server_log"] = config.get("server_log", False)
 *         server_context["auth_check"] = config.get("auth_check", default_auth_check)             # <<<<<<<<<<<<<<
 *         server_context["port"] = config.get("port", 8080)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_default_auth_check); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_u_auth_check, __pyx_t_4};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1775, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_u_auth_check, __pyx_t_4};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1775, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1775, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(__pyx_n_u_auth_check);
    __Pyx_GIVEREF(__pyx_n_u_auth_check);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_n_u_auth_check);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1775, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_n_u_auth_check, __pyx_t_3) < 0)) __PYX_ERR(0, 1775, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":1776
 *         server_context["server_log"] = config.get("server_log", False)
 *         server_context["auth_check"] = config.get("auth_check", default_auth_check)
 *         server_context["port"] = config.get("port", 8080)             # <<<<<<<<<<<<<<
 * 
 *         self._client_connection = Connection(**client_params)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_server_context); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(PyObject_SetItem(__pyx_t_3, __pyx_n_u_port, __pyx_t_1) < 0)) __PYX_ERR(0, 1776, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1778
 *         server_context["port"] = config.get("port", 8080)
 * 
 *         self._client_connection = Connection(**client_params)             # <<<<<<<<<<<<<<
 *         self._server_connection = ServerConnection(**server_params)
 *         self._server_thread=Thread(target=self.serve)
 */
  if (unlikely(__pyx_v_client_params == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 1778, __pyx_L1_error)
  }
  if (likely(PyDict_CheckExact(__pyx_v_client_params))) {
    __pyx_t_1 = PyDict_Copy(__pyx_v_client_params); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_1 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_client_params, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_client_connection);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_client_connection));
  __pyx_v_self->_client_connection = ((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":1779
 * 
 *         self._client_connection = Connection(**client_params)
 *         self._server_connection = ServerConnection(**server_params)             # <<<<<<<<<<<<<<
 *         self._server_thread=Thread(target=self.serve)
 * 
 */
  if (unlikely(__pyx_v_server_params == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 1779, __pyx_L1_error)
  }
  if (likely(PyDict_CheckExact(__pyx_v_server_params))) {
    __pyx_t_3 = PyDict_Copy(__pyx_v_server_params); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    __pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_server_params, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_ServerConnection), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_server_connection);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_server_connection));
  __pyx_v_self->_server_connection = ((struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1780
 *         self._client_connection = Connection(**client_params)
 *         self._server_connection = ServerConnection(**server_params)
 *         self._server_thread=Thread(target=self.serve)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Thread); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serve); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_target, __pyx_t_7) < 0) __PYX_ERR(0, 1780, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_7);
  __Pyx_GOTREF(__pyx_v_self->_server_thread);
  __Pyx_DECREF(__pyx_v_self->_server_thread);
  __pyx_v_self->_server_thread = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "pyrfc/_cyrfc.pyx":1769
 *     }
 * 
 *     def __cinit__(self, server_params, client_params, config=None):             # <<<<<<<<<<<<<<
 *         # config parsing
 *         config = config or {}
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrfc._cyrfc.Server.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_config);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1783
 * 
 *     @staticmethod
 *     cdef RFC_RC __onCheckFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil:             # <<<<<<<<<<<<<<
 *         handler = Server.__bgRfcFunction["check"]
 *         if handler is None:
 */

static RFC_RC __pyx_f_5pyrfc_6_cyrfc_6Server___onCheckFunction(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_UNIT_IDENTIFIER const *__pyx_v_identifier) {
  PyObject *__pyx_v_handler = NULL;
  PyObject *__pyx_v_unit_identifier = NULL;
  PyObject *__pyx_v_ex = NULL;
  RFC_RC __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  RFC_RC __pyx_t_5;
  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;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  char const *__pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("__onCheckFunction", 0);

  /* "pyrfc/_cyrfc.pyx":1784
 *     @staticmethod
 *     cdef RFC_RC __onCheckFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil:
 *         handler = Server.__bgRfcFunction["check"]             # <<<<<<<<<<<<<<
 *         if handler is None:
 *             return RCStatus.OK.value
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Server), __pyx_n_s_bgRfcFunction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_handler = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":1785
 *     cdef RFC_RC __onCheckFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil:
 *         handler = Server.__bgRfcFunction["check"]
 *         if handler is None:             # <<<<<<<<<<<<<<
 *             return RCStatus.OK.value
 *         try:
 */
  __pyx_t_3 = (__pyx_v_handler == Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "pyrfc/_cyrfc.pyx":1786
 *         handler = Server.__bgRfcFunction["check"]
 *         if handler is None:
 *             return RCStatus.OK.value             # <<<<<<<<<<<<<<
 *         try:
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_RCStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_OK); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1786, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    goto __pyx_L0;

    /* "pyrfc/_cyrfc.pyx":1785
 *     cdef RFC_RC __onCheckFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil:
 *         handler = Server.__bgRfcFunction["check"]
 *         if handler is None:             # <<<<<<<<<<<<<<
 *             return RCStatus.OK.value
 *         try:
 */
  }

  /* "pyrfc/_cyrfc.pyx":1787
 *         if handler is None:
 *             return RCStatus.OK.value
 *         try:             # <<<<<<<<<<<<<<
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    /*try:*/ {

      /* "pyrfc/_cyrfc.pyx":1788
 *             return RCStatus.OK.value
 *         try:
 *             unit_identifier = wrapUnitIdentifier(identifier[0])             # <<<<<<<<<<<<<<
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 *         except Exception as ex:
 */
      __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapUnitIdentifier((__pyx_v_identifier[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1788, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_unit_identifier = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pyrfc/_cyrfc.pyx":1789
 *         try:
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value             # <<<<<<<<<<<<<<
 *         except Exception as ex:
 *             _server_log("Error in bgRFC handler onCheck:", ex)
 */
      __pyx_t_1 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_rfcHandle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1789, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_handler);
      __pyx_t_9 = __pyx_v_handler; __pyx_t_10 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_1, __pyx_v_unit_identifier};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1789, __pyx_L4_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_1, __pyx_v_unit_identifier};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1789, __pyx_L4_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1789, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_10) {
          __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_1);
        __Pyx_INCREF(__pyx_v_unit_identifier);
        __Pyx_GIVEREF(__pyx_v_unit_identifier);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_v_unit_identifier);
        __pyx_t_1 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1789, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1789, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_5 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_9)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1789, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_r = __pyx_t_5;
      goto __pyx_L8_try_return;

      /* "pyrfc/_cyrfc.pyx":1787
 *         if handler is None:
 *             return RCStatus.OK.value
 *         try:             # <<<<<<<<<<<<<<
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 */
    }
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrfc/_cyrfc.pyx":1790
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 *         except Exception as ex:             # <<<<<<<<<<<<<<
 *             _server_log("Error in bgRFC handler onCheck:", ex)
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 */
    __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_11) {
      __Pyx_AddTraceback("pyrfc._cyrfc.Server.__onCheckFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_2, &__pyx_t_12) < 0) __PYX_ERR(0, 1790, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_ex = __pyx_t_2;
      /*try:*/ {

        /* "pyrfc/_cyrfc.pyx":1791
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 *         except Exception as ex:
 *             _server_log("Error in bgRFC handler onCheck:", ex)             # <<<<<<<<<<<<<<
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_server_log); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1791, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_13 = NULL;
        __pyx_t_11 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
            __pyx_t_11 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_kp_u_Error_in_bgRFC_handler_onCheck, __pyx_v_ex};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1791, __pyx_L15_error)
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_kp_u_Error_in_bgRFC_handler_onCheck, __pyx_v_ex};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1791, __pyx_L15_error)
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        {
          __pyx_t_14 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1791, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_14);
          if (__pyx_t_13) {
            __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL;
          }
          __Pyx_INCREF(__pyx_kp_u_Error_in_bgRFC_handler_onCheck);
          __Pyx_GIVEREF(__pyx_kp_u_Error_in_bgRFC_handler_onCheck);
          PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_11, __pyx_kp_u_Error_in_bgRFC_handler_onCheck);
          __Pyx_INCREF(__pyx_v_ex);
          __Pyx_GIVEREF(__pyx_v_ex);
          PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_11, __pyx_v_ex);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1791, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        }
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyrfc/_cyrfc.pyx":1792
 *         except Exception as ex:
 *             _server_log("Error in bgRFC handler onCheck:", ex)
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_RCStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1792, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_RFC_EXTERNAL_FAILURE); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1792, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1792, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_5 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1792, __pyx_L15_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L14_return;
      }

      /* "pyrfc/_cyrfc.pyx":1790
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 *         except Exception as ex:             # <<<<<<<<<<<<<<
 *             _server_log("Error in bgRFC handler onCheck:", ex)
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 */
      /*finally:*/ {
        __pyx_L15_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __pyx_t_11 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_ex);
            __pyx_v_ex = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          }
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
          goto __pyx_L6_except_error;
        }
        __pyx_L14_return: {
          __pyx_t_5 = __pyx_r;
          __Pyx_DECREF(__pyx_v_ex);
          __pyx_v_ex = NULL;
          __pyx_r = __pyx_t_5;
          goto __pyx_L7_except_return;
        }
      }
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrfc/_cyrfc.pyx":1787
 *         if handler is None:
 *             return RCStatus.OK.value
 *         try:             # <<<<<<<<<<<<<<
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 */
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L1_error;
    __pyx_L8_try_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
    __pyx_L7_except_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
  }

  /* "pyrfc/_cyrfc.pyx":1783
 * 
 *     @staticmethod
 *     cdef RFC_RC __onCheckFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil:             # <<<<<<<<<<<<<<
 *         handler = Server.__bgRfcFunction["check"]
 *         if handler is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_WriteUnraisable("pyrfc._cyrfc.Server.__onCheckFunction", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = (RFC_RC) 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_handler);
  __Pyx_XDECREF(__pyx_v_unit_identifier);
  __Pyx_XDECREF(__pyx_v_ex);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1795
 * 
 *     @staticmethod
 *     cdef RFC_RC __onCommitFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil:             # <<<<<<<<<<<<<<
 *         handler = Server.__bgRfcFunction["commit"]
 *         if handler is None:
 */

static RFC_RC __pyx_f_5pyrfc_6_cyrfc_6Server___onCommitFunction(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_UNIT_IDENTIFIER const *__pyx_v_identifier) {
  PyObject *__pyx_v_handler = NULL;
  PyObject *__pyx_v_unit_identifier = NULL;
  PyObject *__pyx_v_ex = NULL;
  RFC_RC __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  RFC_RC __pyx_t_5;
  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;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  char const *__pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("__onCommitFunction", 0);

  /* "pyrfc/_cyrfc.pyx":1796
 *     @staticmethod
 *     cdef RFC_RC __onCommitFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil:
 *         handler = Server.__bgRfcFunction["commit"]             # <<<<<<<<<<<<<<
 *         if handler is None:
 *             return RCStatus.OK.value
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Server), __pyx_n_s_bgRfcFunction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_commit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_handler = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":1797
 *     cdef RFC_RC __onCommitFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil:
 *         handler = Server.__bgRfcFunction["commit"]
 *         if handler is None:             # <<<<<<<<<<<<<<
 *             return RCStatus.OK.value
 *         try:
 */
  __pyx_t_3 = (__pyx_v_handler == Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "pyrfc/_cyrfc.pyx":1798
 *         handler = Server.__bgRfcFunction["commit"]
 *         if handler is None:
 *             return RCStatus.OK.value             # <<<<<<<<<<<<<<
 *         try:
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_RCStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_OK); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1798, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    goto __pyx_L0;

    /* "pyrfc/_cyrfc.pyx":1797
 *     cdef RFC_RC __onCommitFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil:
 *         handler = Server.__bgRfcFunction["commit"]
 *         if handler is None:             # <<<<<<<<<<<<<<
 *             return RCStatus.OK.value
 *         try:
 */
  }

  /* "pyrfc/_cyrfc.pyx":1799
 *         if handler is None:
 *             return RCStatus.OK.value
 *         try:             # <<<<<<<<<<<<<<
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    /*try:*/ {

      /* "pyrfc/_cyrfc.pyx":1800
 *             return RCStatus.OK.value
 *         try:
 *             unit_identifier = wrapUnitIdentifier(identifier[0])             # <<<<<<<<<<<<<<
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 *         except Exception as ex:
 */
      __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapUnitIdentifier((__pyx_v_identifier[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1800, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_unit_identifier = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pyrfc/_cyrfc.pyx":1801
 *         try:
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value             # <<<<<<<<<<<<<<
 *         except Exception as ex:
 *             _server_log("Error in bgRFC handler onCommit:", ex)
 */
      __pyx_t_1 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_rfcHandle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1801, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_handler);
      __pyx_t_9 = __pyx_v_handler; __pyx_t_10 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_1, __pyx_v_unit_identifier};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1801, __pyx_L4_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_1, __pyx_v_unit_identifier};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1801, __pyx_L4_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1801, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_10) {
          __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_1);
        __Pyx_INCREF(__pyx_v_unit_identifier);
        __Pyx_GIVEREF(__pyx_v_unit_identifier);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_v_unit_identifier);
        __pyx_t_1 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1801, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1801, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_5 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_9)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1801, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_r = __pyx_t_5;
      goto __pyx_L8_try_return;

      /* "pyrfc/_cyrfc.pyx":1799
 *         if handler is None:
 *             return RCStatus.OK.value
 *         try:             # <<<<<<<<<<<<<<
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 */
    }
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrfc/_cyrfc.pyx":1802
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 *         except Exception as ex:             # <<<<<<<<<<<<<<
 *             _server_log("Error in bgRFC handler onCommit:", ex)
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 */
    __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_11) {
      __Pyx_AddTraceback("pyrfc._cyrfc.Server.__onCommitFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_2, &__pyx_t_12) < 0) __PYX_ERR(0, 1802, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_ex = __pyx_t_2;
      /*try:*/ {

        /* "pyrfc/_cyrfc.pyx":1803
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 *         except Exception as ex:
 *             _server_log("Error in bgRFC handler onCommit:", ex)             # <<<<<<<<<<<<<<
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_server_log); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1803, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_13 = NULL;
        __pyx_t_11 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
            __pyx_t_11 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_kp_u_Error_in_bgRFC_handler_onCommit, __pyx_v_ex};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1803, __pyx_L15_error)
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_kp_u_Error_in_bgRFC_handler_onCommit, __pyx_v_ex};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1803, __pyx_L15_error)
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        {
          __pyx_t_14 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1803, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_14);
          if (__pyx_t_13) {
            __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL;
          }
          __Pyx_INCREF(__pyx_kp_u_Error_in_bgRFC_handler_onCommit);
          __Pyx_GIVEREF(__pyx_kp_u_Error_in_bgRFC_handler_onCommit);
          PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_11, __pyx_kp_u_Error_in_bgRFC_handler_onCommit);
          __Pyx_INCREF(__pyx_v_ex);
          __Pyx_GIVEREF(__pyx_v_ex);
          PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_11, __pyx_v_ex);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1803, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        }
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyrfc/_cyrfc.pyx":1804
 *         except Exception as ex:
 *             _server_log("Error in bgRFC handler onCommit:", ex)
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_RCStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1804, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_RFC_EXTERNAL_FAILURE); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1804, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1804, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_5 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1804, __pyx_L15_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L14_return;
      }

      /* "pyrfc/_cyrfc.pyx":1802
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 *         except Exception as ex:             # <<<<<<<<<<<<<<
 *             _server_log("Error in bgRFC handler onCommit:", ex)
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 */
      /*finally:*/ {
        __pyx_L15_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __pyx_t_11 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_ex);
            __pyx_v_ex = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          }
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
          goto __pyx_L6_except_error;
        }
        __pyx_L14_return: {
          __pyx_t_5 = __pyx_r;
          __Pyx_DECREF(__pyx_v_ex);
          __pyx_v_ex = NULL;
          __pyx_r = __pyx_t_5;
          goto __pyx_L7_except_return;
        }
      }
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrfc/_cyrfc.pyx":1799
 *         if handler is None:
 *             return RCStatus.OK.value
 *         try:             # <<<<<<<<<<<<<<
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 */
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L1_error;
    __pyx_L8_try_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
    __pyx_L7_except_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
  }

  /* "pyrfc/_cyrfc.pyx":1795
 * 
 *     @staticmethod
 *     cdef RFC_RC __onCommitFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil:             # <<<<<<<<<<<<<<
 *         handler = Server.__bgRfcFunction["commit"]
 *         if handler is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_WriteUnraisable("pyrfc._cyrfc.Server.__onCommitFunction", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = (RFC_RC) 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_handler);
  __Pyx_XDECREF(__pyx_v_unit_identifier);
  __Pyx_XDECREF(__pyx_v_ex);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1807
 * 
 *     @staticmethod
 *     cdef RFC_RC __onRollbackFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil:             # <<<<<<<<<<<<<<
 *         handler = Server.__bgRfcFunction["rollback"]
 *         if handler is None:
 */

static RFC_RC __pyx_f_5pyrfc_6_cyrfc_6Server___onRollbackFunction(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_UNIT_IDENTIFIER const *__pyx_v_identifier) {
  PyObject *__pyx_v_handler = NULL;
  PyObject *__pyx_v_unit_identifier = NULL;
  PyObject *__pyx_v_ex = NULL;
  RFC_RC __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  RFC_RC __pyx_t_5;
  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;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  char const *__pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("__onRollbackFunction", 0);

  /* "pyrfc/_cyrfc.pyx":1808
 *     @staticmethod
 *     cdef RFC_RC __onRollbackFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil:
 *         handler = Server.__bgRfcFunction["rollback"]             # <<<<<<<<<<<<<<
 *         if handler is None:
 *             return RCStatus.OK.value
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Server), __pyx_n_s_bgRfcFunction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_rollback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_handler = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":1809
 *     cdef RFC_RC __onRollbackFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil:
 *         handler = Server.__bgRfcFunction["rollback"]
 *         if handler is None:             # <<<<<<<<<<<<<<
 *             return RCStatus.OK.value
 *         try:
 */
  __pyx_t_3 = (__pyx_v_handler == Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "pyrfc/_cyrfc.pyx":1810
 *         handler = Server.__bgRfcFunction["rollback"]
 *         if handler is None:
 *             return RCStatus.OK.value             # <<<<<<<<<<<<<<
 *         try:
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_RCStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1810, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_OK); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1810, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1810, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1810, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    goto __pyx_L0;

    /* "pyrfc/_cyrfc.pyx":1809
 *     cdef RFC_RC __onRollbackFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil:
 *         handler = Server.__bgRfcFunction["rollback"]
 *         if handler is None:             # <<<<<<<<<<<<<<
 *             return RCStatus.OK.value
 *         try:
 */
  }

  /* "pyrfc/_cyrfc.pyx":1811
 *         if handler is None:
 *             return RCStatus.OK.value
 *         try:             # <<<<<<<<<<<<<<
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    /*try:*/ {

      /* "pyrfc/_cyrfc.pyx":1812
 *             return RCStatus.OK.value
 *         try:
 *             unit_identifier = wrapUnitIdentifier(identifier[0])             # <<<<<<<<<<<<<<
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 *         except Exception as ex:
 */
      __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapUnitIdentifier((__pyx_v_identifier[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1812, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_unit_identifier = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pyrfc/_cyrfc.pyx":1813
 *         try:
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value             # <<<<<<<<<<<<<<
 *         except Exception as ex:
 *             _server_log("Error in bgRFC handler onRollback:", ex)
 */
      __pyx_t_1 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_rfcHandle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1813, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_handler);
      __pyx_t_9 = __pyx_v_handler; __pyx_t_10 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_1, __pyx_v_unit_identifier};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1813, __pyx_L4_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_1, __pyx_v_unit_identifier};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1813, __pyx_L4_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1813, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_10) {
          __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_1);
        __Pyx_INCREF(__pyx_v_unit_identifier);
        __Pyx_GIVEREF(__pyx_v_unit_identifier);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_v_unit_identifier);
        __pyx_t_1 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1813, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1813, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_5 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_9)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1813, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_r = __pyx_t_5;
      goto __pyx_L8_try_return;

      /* "pyrfc/_cyrfc.pyx":1811
 *         if handler is None:
 *             return RCStatus.OK.value
 *         try:             # <<<<<<<<<<<<<<
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 */
    }
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrfc/_cyrfc.pyx":1814
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 *         except Exception as ex:             # <<<<<<<<<<<<<<
 *             _server_log("Error in bgRFC handler onRollback:", ex)
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 */
    __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_11) {
      __Pyx_AddTraceback("pyrfc._cyrfc.Server.__onRollbackFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_2, &__pyx_t_12) < 0) __PYX_ERR(0, 1814, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_ex = __pyx_t_2;
      /*try:*/ {

        /* "pyrfc/_cyrfc.pyx":1815
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 *         except Exception as ex:
 *             _server_log("Error in bgRFC handler onRollback:", ex)             # <<<<<<<<<<<<<<
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_server_log); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1815, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_13 = NULL;
        __pyx_t_11 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
            __pyx_t_11 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_kp_u_Error_in_bgRFC_handler_onRollbac, __pyx_v_ex};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1815, __pyx_L15_error)
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_kp_u_Error_in_bgRFC_handler_onRollbac, __pyx_v_ex};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1815, __pyx_L15_error)
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        {
          __pyx_t_14 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1815, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_14);
          if (__pyx_t_13) {
            __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL;
          }
          __Pyx_INCREF(__pyx_kp_u_Error_in_bgRFC_handler_onRollbac);
          __Pyx_GIVEREF(__pyx_kp_u_Error_in_bgRFC_handler_onRollbac);
          PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_11, __pyx_kp_u_Error_in_bgRFC_handler_onRollbac);
          __Pyx_INCREF(__pyx_v_ex);
          __Pyx_GIVEREF(__pyx_v_ex);
          PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_11, __pyx_v_ex);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1815, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        }
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyrfc/_cyrfc.pyx":1816
 *         except Exception as ex:
 *             _server_log("Error in bgRFC handler onRollback:", ex)
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_RCStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1816, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_RFC_EXTERNAL_FAILURE); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1816, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1816, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_5 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1816, __pyx_L15_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L14_return;
      }

      /* "pyrfc/_cyrfc.pyx":1814
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 *         except Exception as ex:             # <<<<<<<<<<<<<<
 *             _server_log("Error in bgRFC handler onRollback:", ex)
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 */
      /*finally:*/ {
        __pyx_L15_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __pyx_t_11 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_ex);
            __pyx_v_ex = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          }
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
          goto __pyx_L6_except_error;
        }
        __pyx_L14_return: {
          __pyx_t_5 = __pyx_r;
          __Pyx_DECREF(__pyx_v_ex);
          __pyx_v_ex = NULL;
          __pyx_r = __pyx_t_5;
          goto __pyx_L7_except_return;
        }
      }
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrfc/_cyrfc.pyx":1811
 *         if handler is None:
 *             return RCStatus.OK.value
 *         try:             # <<<<<<<<<<<<<<
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 */
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L1_error;
    __pyx_L8_try_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
    __pyx_L7_except_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
  }

  /* "pyrfc/_cyrfc.pyx":1807
 * 
 *     @staticmethod
 *     cdef RFC_RC __onRollbackFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil:             # <<<<<<<<<<<<<<
 *         handler = Server.__bgRfcFunction["rollback"]
 *         if handler is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_WriteUnraisable("pyrfc._cyrfc.Server.__onRollbackFunction", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = (RFC_RC) 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_handler);
  __Pyx_XDECREF(__pyx_v_unit_identifier);
  __Pyx_XDECREF(__pyx_v_ex);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1819
 * 
 *     @staticmethod
 *     cdef RFC_RC __onConfirmFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil:             # <<<<<<<<<<<<<<
 *         handler = Server.__bgRfcFunction["confirm"]
 *         if handler is None:
 */

static RFC_RC __pyx_f_5pyrfc_6_cyrfc_6Server___onConfirmFunction(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_UNIT_IDENTIFIER const *__pyx_v_identifier) {
  PyObject *__pyx_v_handler = NULL;
  PyObject *__pyx_v_unit_identifier = NULL;
  PyObject *__pyx_v_ex = NULL;
  RFC_RC __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  RFC_RC __pyx_t_5;
  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;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  char const *__pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("__onConfirmFunction", 0);

  /* "pyrfc/_cyrfc.pyx":1820
 *     @staticmethod
 *     cdef RFC_RC __onConfirmFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil:
 *         handler = Server.__bgRfcFunction["confirm"]             # <<<<<<<<<<<<<<
 *         if handler is None:
 *             return RCStatus.OK.value
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Server), __pyx_n_s_bgRfcFunction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_confirm); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_handler = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":1821
 *     cdef RFC_RC __onConfirmFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil:
 *         handler = Server.__bgRfcFunction["confirm"]
 *         if handler is None:             # <<<<<<<<<<<<<<
 *             return RCStatus.OK.value
 *         try:
 */
  __pyx_t_3 = (__pyx_v_handler == Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "pyrfc/_cyrfc.pyx":1822
 *         handler = Server.__bgRfcFunction["confirm"]
 *         if handler is None:
 *             return RCStatus.OK.value             # <<<<<<<<<<<<<<
 *         try:
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_RCStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_OK); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1822, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    goto __pyx_L0;

    /* "pyrfc/_cyrfc.pyx":1821
 *     cdef RFC_RC __onConfirmFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil:
 *         handler = Server.__bgRfcFunction["confirm"]
 *         if handler is None:             # <<<<<<<<<<<<<<
 *             return RCStatus.OK.value
 *         try:
 */
  }

  /* "pyrfc/_cyrfc.pyx":1823
 *         if handler is None:
 *             return RCStatus.OK.value
 *         try:             # <<<<<<<<<<<<<<
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    /*try:*/ {

      /* "pyrfc/_cyrfc.pyx":1824
 *             return RCStatus.OK.value
 *         try:
 *             unit_identifier = wrapUnitIdentifier(identifier[0])             # <<<<<<<<<<<<<<
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 *         except Exception as ex:
 */
      __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapUnitIdentifier((__pyx_v_identifier[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1824, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_unit_identifier = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pyrfc/_cyrfc.pyx":1825
 *         try:
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value             # <<<<<<<<<<<<<<
 *         except Exception as ex:
 *             _server_log("Error in bgRFC handler onConfirm:", ex)
 */
      __pyx_t_1 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_rfcHandle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1825, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_handler);
      __pyx_t_9 = __pyx_v_handler; __pyx_t_10 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_1, __pyx_v_unit_identifier};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1825, __pyx_L4_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_1, __pyx_v_unit_identifier};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1825, __pyx_L4_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1825, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_10) {
          __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_1);
        __Pyx_INCREF(__pyx_v_unit_identifier);
        __Pyx_GIVEREF(__pyx_v_unit_identifier);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_v_unit_identifier);
        __pyx_t_1 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1825, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1825, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_5 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_9)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1825, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_r = __pyx_t_5;
      goto __pyx_L8_try_return;

      /* "pyrfc/_cyrfc.pyx":1823
 *         if handler is None:
 *             return RCStatus.OK.value
 *         try:             # <<<<<<<<<<<<<<
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 */
    }
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrfc/_cyrfc.pyx":1826
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 *         except Exception as ex:             # <<<<<<<<<<<<<<
 *             _server_log("Error in bgRFC handler onConfirm:", ex)
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 */
    __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_11) {
      __Pyx_AddTraceback("pyrfc._cyrfc.Server.__onConfirmFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_2, &__pyx_t_12) < 0) __PYX_ERR(0, 1826, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_ex = __pyx_t_2;
      /*try:*/ {

        /* "pyrfc/_cyrfc.pyx":1827
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 *         except Exception as ex:
 *             _server_log("Error in bgRFC handler onConfirm:", ex)             # <<<<<<<<<<<<<<
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_server_log); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1827, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_13 = NULL;
        __pyx_t_11 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
            __pyx_t_11 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_kp_u_Error_in_bgRFC_handler_onConfirm, __pyx_v_ex};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1827, __pyx_L15_error)
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_kp_u_Error_in_bgRFC_handler_onConfirm, __pyx_v_ex};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1827, __pyx_L15_error)
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        {
          __pyx_t_14 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1827, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_14);
          if (__pyx_t_13) {
            __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL;
          }
          __Pyx_INCREF(__pyx_kp_u_Error_in_bgRFC_handler_onConfirm);
          __Pyx_GIVEREF(__pyx_kp_u_Error_in_bgRFC_handler_onConfirm);
          PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_11, __pyx_kp_u_Error_in_bgRFC_handler_onConfirm);
          __Pyx_INCREF(__pyx_v_ex);
          __Pyx_GIVEREF(__pyx_v_ex);
          PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_11, __pyx_v_ex);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1827, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        }
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyrfc/_cyrfc.pyx":1828
 *         except Exception as ex:
 *             _server_log("Error in bgRFC handler onConfirm:", ex)
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_RCStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1828, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_RFC_EXTERNAL_FAILURE); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1828, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1828, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_5 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1828, __pyx_L15_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L14_return;
      }

      /* "pyrfc/_cyrfc.pyx":1826
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 *         except Exception as ex:             # <<<<<<<<<<<<<<
 *             _server_log("Error in bgRFC handler onConfirm:", ex)
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 */
      /*finally:*/ {
        __pyx_L15_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __pyx_t_11 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_ex);
            __pyx_v_ex = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          }
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
          goto __pyx_L6_except_error;
        }
        __pyx_L14_return: {
          __pyx_t_5 = __pyx_r;
          __Pyx_DECREF(__pyx_v_ex);
          __pyx_v_ex = NULL;
          __pyx_r = __pyx_t_5;
          goto __pyx_L7_except_return;
        }
      }
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrfc/_cyrfc.pyx":1823
 *         if handler is None:
 *             return RCStatus.OK.value
 *         try:             # <<<<<<<<<<<<<<
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             return handler(<uintptr_t>rfcHandle, unit_identifier).value
 */
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L1_error;
    __pyx_L8_try_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
    __pyx_L7_except_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
  }

  /* "pyrfc/_cyrfc.pyx":1819
 * 
 *     @staticmethod
 *     cdef RFC_RC __onConfirmFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil:             # <<<<<<<<<<<<<<
 *         handler = Server.__bgRfcFunction["confirm"]
 *         if handler is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_WriteUnraisable("pyrfc._cyrfc.Server.__onConfirmFunction", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = (RFC_RC) 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_handler);
  __Pyx_XDECREF(__pyx_v_unit_identifier);
  __Pyx_XDECREF(__pyx_v_ex);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1831
 * 
 *     @staticmethod
 *     cdef RFC_RC __onGetStateFunction(             # <<<<<<<<<<<<<<
 *                 RFC_CONNECTION_HANDLE rfcHandle,
 *                 const RFC_UNIT_IDENTIFIER *identifier,
 */

static RFC_RC __pyx_f_5pyrfc_6_cyrfc_6Server___onGetStateFunction(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_UNIT_IDENTIFIER const *__pyx_v_identifier, RFC_UNIT_STATE *__pyx_v_unitState) {
  PyObject *__pyx_v_handler = NULL;
  PyObject *__pyx_v_unit_identifier = NULL;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v_ex = NULL;
  RFC_RC __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  RFC_RC __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  Py_UCS4 __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  char const *__pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("__onGetStateFunction", 0);

  /* "pyrfc/_cyrfc.pyx":1836
 *                 RFC_UNIT_STATE *unitState
 *             ) with gil:
 *         handler = Server.__bgRfcFunction["getState"]             # <<<<<<<<<<<<<<
 *         if handler is None:
 *             _server_log("bgRFC handler onGetState is not registered for server connection handle '{<uintptr_t>rfcHandle}'")
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Server), __pyx_n_s_bgRfcFunction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_getState); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_handler = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":1837
 *             ) with gil:
 *         handler = Server.__bgRfcFunction["getState"]
 *         if handler is None:             # <<<<<<<<<<<<<<
 *             _server_log("bgRFC handler onGetState is not registered for server connection handle '{<uintptr_t>rfcHandle}'")
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 */
  __pyx_t_3 = (__pyx_v_handler == Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "pyrfc/_cyrfc.pyx":1838
 *         handler = Server.__bgRfcFunction["getState"]
 *         if handler is None:
 *             _server_log("bgRFC handler onGetState is not registered for server connection handle '{<uintptr_t>rfcHandle}'")             # <<<<<<<<<<<<<<
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 *         try:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1838, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_kp_u_bgRFC_handler_onGetState_is_not) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_u_bgRFC_handler_onGetState_is_not);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1838, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrfc/_cyrfc.pyx":1839
 *         if handler is None:
 *             _server_log("bgRFC handler onGetState is not registered for server connection handle '{<uintptr_t>rfcHandle}'")
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value             # <<<<<<<<<<<<<<
 *         try:
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_RCStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_RFC_EXTERNAL_FAILURE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1839, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    goto __pyx_L0;

    /* "pyrfc/_cyrfc.pyx":1837
 *             ) with gil:
 *         handler = Server.__bgRfcFunction["getState"]
 *         if handler is None:             # <<<<<<<<<<<<<<
 *             _server_log("bgRFC handler onGetState is not registered for server connection handle '{<uintptr_t>rfcHandle}'")
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 */
  }

  /* "pyrfc/_cyrfc.pyx":1840
 *             _server_log("bgRFC handler onGetState is not registered for server connection handle '{<uintptr_t>rfcHandle}'")
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 *         try:             # <<<<<<<<<<<<<<
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             state = handler(<uintptr_t>rfcHandle, unit_identifier)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    /*try:*/ {

      /* "pyrfc/_cyrfc.pyx":1841
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 *         try:
 *             unit_identifier = wrapUnitIdentifier(identifier[0])             # <<<<<<<<<<<<<<
 *             state = handler(<uintptr_t>rfcHandle, unit_identifier)
 *             # section 5.6.3 pg 84 of SAP NWRFC SDK Programming Guide 7.50
 */
      __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapUnitIdentifier((__pyx_v_identifier[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1841, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_unit_identifier = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pyrfc/_cyrfc.pyx":1842
 *         try:
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             state = handler(<uintptr_t>rfcHandle, unit_identifier)             # <<<<<<<<<<<<<<
 *             # section 5.6.3 pg 84 of SAP NWRFC SDK Programming Guide 7.50
 *             if state == UnitState.created or state == UnitState.executed:
 */
      __pyx_t_1 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_rfcHandle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1842, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_handler);
      __pyx_t_5 = __pyx_v_handler; __pyx_t_10 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_1, __pyx_v_unit_identifier};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1842, __pyx_L4_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_1, __pyx_v_unit_identifier};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1842, __pyx_L4_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1842, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_10) {
          __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_1);
        __Pyx_INCREF(__pyx_v_unit_identifier);
        __Pyx_GIVEREF(__pyx_v_unit_identifier);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_v_unit_identifier);
        __pyx_t_1 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1842, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_state = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pyrfc/_cyrfc.pyx":1844
 *             state = handler(<uintptr_t>rfcHandle, unit_identifier)
 *             # section 5.6.3 pg 84 of SAP NWRFC SDK Programming Guide 7.50
 *             if state == UnitState.created or state == UnitState.executed:             # <<<<<<<<<<<<<<
 *                 unitState[0] = RFC_UNIT_IN_PROCESS
 *             elif state == UnitState.committed:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_UnitState); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1844, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_created); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1844, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_state, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1844, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1844, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!__pyx_t_3) {
      } else {
        __pyx_t_4 = __pyx_t_3;
        goto __pyx_L11_bool_binop_done;
      }
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_UnitState); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1844, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_executed); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1844, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_state, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1844, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1844, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_4 = __pyx_t_3;
      __pyx_L11_bool_binop_done:;
      if (__pyx_t_4) {

        /* "pyrfc/_cyrfc.pyx":1845
 *             # section 5.6.3 pg 84 of SAP NWRFC SDK Programming Guide 7.50
 *             if state == UnitState.created or state == UnitState.executed:
 *                 unitState[0] = RFC_UNIT_IN_PROCESS             # <<<<<<<<<<<<<<
 *             elif state == UnitState.committed:
 *                 idunitStateentifier[0] = RFC_UNIT_COMMITTED
 */
        (__pyx_v_unitState[0]) = RFC_UNIT_IN_PROCESS;

        /* "pyrfc/_cyrfc.pyx":1844
 *             state = handler(<uintptr_t>rfcHandle, unit_identifier)
 *             # section 5.6.3 pg 84 of SAP NWRFC SDK Programming Guide 7.50
 *             if state == UnitState.created or state == UnitState.executed:             # <<<<<<<<<<<<<<
 *                 unitState[0] = RFC_UNIT_IN_PROCESS
 *             elif state == UnitState.committed:
 */
        goto __pyx_L10;
      }

      /* "pyrfc/_cyrfc.pyx":1846
 *             if state == UnitState.created or state == UnitState.executed:
 *                 unitState[0] = RFC_UNIT_IN_PROCESS
 *             elif state == UnitState.committed:             # <<<<<<<<<<<<<<
 *                 idunitStateentifier[0] = RFC_UNIT_COMMITTED
 *             elif state == UnitState.rolled_back:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_UnitState); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1846, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_committed); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1846, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_state, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1846, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1846, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_4) {

        /* "pyrfc/_cyrfc.pyx":1847
 *                 unitState[0] = RFC_UNIT_IN_PROCESS
 *             elif state == UnitState.committed:
 *                 idunitStateentifier[0] = RFC_UNIT_COMMITTED             # <<<<<<<<<<<<<<
 *             elif state == UnitState.rolled_back:
 *                 unitState[0] = RFC_UNIT_ROLLED_BACK
 */
        __pyx_t_2 = __Pyx_PyInt_From_RFC_UNIT_STATE(RFC_UNIT_COMMITTED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1847, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_idunitStateentifier); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1847, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (unlikely(__Pyx_SetItemInt(__pyx_t_5, 0, __pyx_t_2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 1847, __pyx_L4_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "pyrfc/_cyrfc.pyx":1846
 *             if state == UnitState.created or state == UnitState.executed:
 *                 unitState[0] = RFC_UNIT_IN_PROCESS
 *             elif state == UnitState.committed:             # <<<<<<<<<<<<<<
 *                 idunitStateentifier[0] = RFC_UNIT_COMMITTED
 *             elif state == UnitState.rolled_back:
 */
        goto __pyx_L10;
      }

      /* "pyrfc/_cyrfc.pyx":1848
 *             elif state == UnitState.committed:
 *                 idunitStateentifier[0] = RFC_UNIT_COMMITTED
 *             elif state == UnitState.rolled_back:             # <<<<<<<<<<<<<<
 *                 unitState[0] = RFC_UNIT_ROLLED_BACK
 *             elif state == UnitState.confirmed:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_UnitState); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1848, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_rolled_back); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1848, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_state, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1848, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1848, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_4) {

        /* "pyrfc/_cyrfc.pyx":1849
 *                 idunitStateentifier[0] = RFC_UNIT_COMMITTED
 *             elif state == UnitState.rolled_back:
 *                 unitState[0] = RFC_UNIT_ROLLED_BACK             # <<<<<<<<<<<<<<
 *             elif state == UnitState.confirmed:
 *                 unitState[0] = RFC_UNIT_CONFIRMED
 */
        (__pyx_v_unitState[0]) = RFC_UNIT_ROLLED_BACK;

        /* "pyrfc/_cyrfc.pyx":1848
 *             elif state == UnitState.committed:
 *                 idunitStateentifier[0] = RFC_UNIT_COMMITTED
 *             elif state == UnitState.rolled_back:             # <<<<<<<<<<<<<<
 *                 unitState[0] = RFC_UNIT_ROLLED_BACK
 *             elif state == UnitState.confirmed:
 */
        goto __pyx_L10;
      }

      /* "pyrfc/_cyrfc.pyx":1850
 *             elif state == UnitState.rolled_back:
 *                 unitState[0] = RFC_UNIT_ROLLED_BACK
 *             elif state == UnitState.confirmed:             # <<<<<<<<<<<<<<
 *                 unitState[0] = RFC_UNIT_CONFIRMED
 *             else:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_UnitState); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1850, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_confirmed); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1850, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_state, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1850, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1850, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (likely(__pyx_t_4)) {

        /* "pyrfc/_cyrfc.pyx":1851
 *                 unitState[0] = RFC_UNIT_ROLLED_BACK
 *             elif state == UnitState.confirmed:
 *                 unitState[0] = RFC_UNIT_CONFIRMED             # <<<<<<<<<<<<<<
 *             else:
 *                 raise Exception(f"TID {unit_identifier['id']} invalid state '{state}'")
 */
        (__pyx_v_unitState[0]) = RFC_UNIT_CONFIRMED;

        /* "pyrfc/_cyrfc.pyx":1850
 *             elif state == UnitState.rolled_back:
 *                 unitState[0] = RFC_UNIT_ROLLED_BACK
 *             elif state == UnitState.confirmed:             # <<<<<<<<<<<<<<
 *                 unitState[0] = RFC_UNIT_CONFIRMED
 *             else:
 */
        goto __pyx_L10;
      }

      /* "pyrfc/_cyrfc.pyx":1853
 *                 unitState[0] = RFC_UNIT_CONFIRMED
 *             else:
 *                 raise Exception(f"TID {unit_identifier['id']} invalid state '{state}'")             # <<<<<<<<<<<<<<
 *             return RCStatus.OK.value
 *         except Exception as ex:
 */
      /*else*/ {
        __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1853, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_13 = 0;
        __pyx_t_14 = 127;
        __Pyx_INCREF(__pyx_kp_u_TID);
        __pyx_t_13 += 4;
        __Pyx_GIVEREF(__pyx_kp_u_TID);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_TID);
        __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit_identifier, __pyx_n_u_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1853, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1853, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_14 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_14) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_14;
        __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_12);
        __pyx_t_12 = 0;
        __Pyx_INCREF(__pyx_kp_u_invalid_state);
        __pyx_t_13 += 16;
        __Pyx_GIVEREF(__pyx_kp_u_invalid_state);
        PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_invalid_state);
        __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_state, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1853, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_14 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_14) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_14;
        __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_12);
        __pyx_t_12 = 0;
        __Pyx_INCREF(__pyx_kp_u__6);
        __pyx_t_13 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__6);
        PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__6);
        __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1853, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1853, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 1853, __pyx_L4_error)
      }
      __pyx_L10:;

      /* "pyrfc/_cyrfc.pyx":1854
 *             else:
 *                 raise Exception(f"TID {unit_identifier['id']} invalid state '{state}'")
 *             return RCStatus.OK.value             # <<<<<<<<<<<<<<
 *         except Exception as ex:
 *             _server_log("Error in bgRFC handler onGetState:\n", ex)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_RCStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1854, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_OK); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1854, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1854, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_6 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1854, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_6;
      goto __pyx_L8_try_return;

      /* "pyrfc/_cyrfc.pyx":1840
 *             _server_log("bgRFC handler onGetState is not registered for server connection handle '{<uintptr_t>rfcHandle}'")
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 *         try:             # <<<<<<<<<<<<<<
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             state = handler(<uintptr_t>rfcHandle, unit_identifier)
 */
    }
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyrfc/_cyrfc.pyx":1855
 *                 raise Exception(f"TID {unit_identifier['id']} invalid state '{state}'")
 *             return RCStatus.OK.value
 *         except Exception as ex:             # <<<<<<<<<<<<<<
 *             _server_log("Error in bgRFC handler onGetState:\n", ex)
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 */
    __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_11) {
      __Pyx_AddTraceback("pyrfc._cyrfc.Server.__onGetStateFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_12, &__pyx_t_5) < 0) __PYX_ERR(0, 1855, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_12);
      __pyx_v_ex = __pyx_t_12;
      /*try:*/ {

        /* "pyrfc/_cyrfc.pyx":1856
 *             return RCStatus.OK.value
 *         except Exception as ex:
 *             _server_log("Error in bgRFC handler onGetState:\n", ex)             # <<<<<<<<<<<<<<
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_server_log); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1856, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_15 = NULL;
        __pyx_t_11 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_15)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_15);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
            __pyx_t_11 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_kp_u_Error_in_bgRFC_handler_onGetStat, __pyx_v_ex};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L18_error)
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_kp_u_Error_in_bgRFC_handler_onGetStat, __pyx_v_ex};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L18_error)
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        {
          __pyx_t_16 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1856, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_16);
          if (__pyx_t_15) {
            __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15); __pyx_t_15 = NULL;
          }
          __Pyx_INCREF(__pyx_kp_u_Error_in_bgRFC_handler_onGetStat);
          __Pyx_GIVEREF(__pyx_kp_u_Error_in_bgRFC_handler_onGetStat);
          PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_11, __pyx_kp_u_Error_in_bgRFC_handler_onGetStat);
          __Pyx_INCREF(__pyx_v_ex);
          __Pyx_GIVEREF(__pyx_v_ex);
          PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_11, __pyx_v_ex);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        }
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyrfc/_cyrfc.pyx":1857
 *         except Exception as ex:
 *             _server_log("Error in bgRFC handler onGetState:\n", ex)
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value             # <<<<<<<<<<<<<<
 * 
 *     def bgrfc_init(self, sysId, bgRfcFunction):
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_RCStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1857, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_RFC_EXTERNAL_FAILURE); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1857, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1857, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_6 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1857, __pyx_L18_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_r = __pyx_t_6;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L17_return;
      }

      /* "pyrfc/_cyrfc.pyx":1855
 *                 raise Exception(f"TID {unit_identifier['id']} invalid state '{state}'")
 *             return RCStatus.OK.value
 *         except Exception as ex:             # <<<<<<<<<<<<<<
 *             _server_log("Error in bgRFC handler onGetState:\n", ex)
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 */
      /*finally:*/ {
        __pyx_L18_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __pyx_t_11 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_ex);
            __pyx_v_ex = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
          }
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
          goto __pyx_L6_except_error;
        }
        __pyx_L17_return: {
          __pyx_t_6 = __pyx_r;
          __Pyx_DECREF(__pyx_v_ex);
          __pyx_v_ex = NULL;
          __pyx_r = __pyx_t_6;
          goto __pyx_L7_except_return;
        }
      }
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrfc/_cyrfc.pyx":1840
 *             _server_log("bgRFC handler onGetState is not registered for server connection handle '{<uintptr_t>rfcHandle}'")
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 *         try:             # <<<<<<<<<<<<<<
 *             unit_identifier = wrapUnitIdentifier(identifier[0])
 *             state = handler(<uintptr_t>rfcHandle, unit_identifier)
 */
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L1_error;
    __pyx_L8_try_return:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L0;
    __pyx_L7_except_return:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L0;
  }

  /* "pyrfc/_cyrfc.pyx":1831
 * 
 *     @staticmethod
 *     cdef RFC_RC __onGetStateFunction(             # <<<<<<<<<<<<<<
 *                 RFC_CONNECTION_HANDLE rfcHandle,
 *                 const RFC_UNIT_IDENTIFIER *identifier,
 */

  /* 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_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_WriteUnraisable("pyrfc._cyrfc.Server.__onGetStateFunction", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = (RFC_RC) 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_handler);
  __Pyx_XDECREF(__pyx_v_unit_identifier);
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v_ex);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1859
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 * 
 *     def bgrfc_init(self, sysId, bgRfcFunction):             # <<<<<<<<<<<<<<
 *         """Installs the necessary callback functions for processing incoming bgRFC calls.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_3bgrfc_init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_6Server_2bgrfc_init[] = "Installs the necessary callback functions for processing incoming bgRFC calls.\n\n        These functions need to be implemented by Python application and will be used by the RFC runtime.\n        When no callback function is provided, the default one is used,\n        not necessarily matching your application requirements.\n\n        For more info search for the ``RfcInstallBgRfcHandlers`` method in\n        `SAP NetWeaver RFC SDK Doxygen Documentation <https://support.sap.com/en/product/connectors/nwrfcsdk.html>`_\n\n        :param sysId: System ID of the SAP system for which to use this set of transaction handlers, or None\n                      When None value provided, the transaction handlers will be used for bgRFC calls from\n                      any backend system, for which no explicit handlers have been installed.\n        :type sysId: string or None\n\n        :param bgRfcFunction: Function callbacks\n        :type bgRfcFunction: dict(str, function)\n\n            * \"check\": onCheckFunction,\n            * \"commit\": onCommitFunction,\n            * \"rollback\": onRollbackFunction,\n            * \"confirm\": onConfirmFunction,\n            * \"getState\": onGetStateFunction,\n\n        :return: error code, zero when no error\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_3bgrfc_init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_sysId = 0;
  PyObject *__pyx_v_bgRfcFunction = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bgrfc_init (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sysId,&__pyx_n_s_bgRfcFunction_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sysId)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bgRfcFunction_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("bgrfc_init", 1, 2, 2, 1); __PYX_ERR(0, 1859, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bgrfc_init") < 0)) __PYX_ERR(0, 1859, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_sysId = values[0];
    __pyx_v_bgRfcFunction = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("bgrfc_init", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1859, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.Server.bgrfc_init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_2bgrfc_init(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self), __pyx_v_sysId, __pyx_v_bgRfcFunction);

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_2bgrfc_init(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, PyObject *__pyx_v_sysId, PyObject *__pyx_v_bgRfcFunction) {
  PyObject *__pyx_v_func_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bgrfc_init", 0);

  /* "pyrfc/_cyrfc.pyx":1885
 *         :return: error code, zero when no error
 *         """
 *         for func_name in bgRfcFunction:             # <<<<<<<<<<<<<<
 *             if func_name not in Server.__bgRfcFunction:
 *                 raise TypeError(f"BgRfc callback function key not supported: '{func_name}'")
 */
  if (likely(PyList_CheckExact(__pyx_v_bgRfcFunction)) || PyTuple_CheckExact(__pyx_v_bgRfcFunction)) {
    __pyx_t_1 = __pyx_v_bgRfcFunction; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_bgRfcFunction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1885, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1885, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1885, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1885, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1885, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1885, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_func_name, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrfc/_cyrfc.pyx":1886
 *         """
 *         for func_name in bgRfcFunction:
 *             if func_name not in Server.__bgRfcFunction:             # <<<<<<<<<<<<<<
 *                 raise TypeError(f"BgRfc callback function key not supported: '{func_name}'")
 *             if not callable(bgRfcFunction[func_name]):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Server), __pyx_n_s_bgRfcFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_func_name, __pyx_t_4, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1886, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (unlikely(__pyx_t_6)) {

      /* "pyrfc/_cyrfc.pyx":1887
 *         for func_name in bgRfcFunction:
 *             if func_name not in Server.__bgRfcFunction:
 *                 raise TypeError(f"BgRfc callback function key not supported: '{func_name}'")             # <<<<<<<<<<<<<<
 *             if not callable(bgRfcFunction[func_name]):
 *                 raise TypeError(f"BgRfc callback function referenced by '{func_name}' is not callable: '{bgRfcFunction[func_name]}'")
 */
      __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1887, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = 0;
      __pyx_t_8 = 127;
      __Pyx_INCREF(__pyx_kp_u_BgRfc_callback_function_key_not);
      __pyx_t_7 += 44;
      __Pyx_GIVEREF(__pyx_kp_u_BgRfc_callback_function_key_not);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_BgRfc_callback_function_key_not);
      __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1887, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_INCREF(__pyx_kp_u__6);
      __pyx_t_7 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__6);
      PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__6);
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1887, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1887, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(0, 1887, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":1886
 *         """
 *         for func_name in bgRfcFunction:
 *             if func_name not in Server.__bgRfcFunction:             # <<<<<<<<<<<<<<
 *                 raise TypeError(f"BgRfc callback function key not supported: '{func_name}'")
 *             if not callable(bgRfcFunction[func_name]):
 */
    }

    /* "pyrfc/_cyrfc.pyx":1888
 *             if func_name not in Server.__bgRfcFunction:
 *                 raise TypeError(f"BgRfc callback function key not supported: '{func_name}'")
 *             if not callable(bgRfcFunction[func_name]):             # <<<<<<<<<<<<<<
 *                 raise TypeError(f"BgRfc callback function referenced by '{func_name}' is not callable: '{bgRfcFunction[func_name]}'")
 *             Server.__bgRfcFunction[func_name] = bgRfcFunction[func_name]
 */
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_bgRfcFunction, __pyx_v_func_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1888, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyCallable_Check(__pyx_t_4); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1888, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = ((!(__pyx_t_6 != 0)) != 0);
    if (unlikely(__pyx_t_5)) {

      /* "pyrfc/_cyrfc.pyx":1889
 *                 raise TypeError(f"BgRfc callback function key not supported: '{func_name}'")
 *             if not callable(bgRfcFunction[func_name]):
 *                 raise TypeError(f"BgRfc callback function referenced by '{func_name}' is not callable: '{bgRfcFunction[func_name]}'")             # <<<<<<<<<<<<<<
 *             Server.__bgRfcFunction[func_name] = bgRfcFunction[func_name]
 *         return self.install_bgrfc_handlers(sysId)
 */
      __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = 0;
      __pyx_t_8 = 127;
      __Pyx_INCREF(__pyx_kp_u_BgRfc_callback_function_referenc);
      __pyx_t_7 += 39;
      __Pyx_GIVEREF(__pyx_kp_u_BgRfc_callback_function_referenc);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_BgRfc_callback_function_referenc);
      __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_INCREF(__pyx_kp_u_is_not_callable);
      __pyx_t_7 += 20;
      __Pyx_GIVEREF(__pyx_kp_u_is_not_callable);
      PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_is_not_callable);
      __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_bgRfcFunction, __pyx_v_func_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_t_9, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_10);
      __pyx_t_10 = 0;
      __Pyx_INCREF(__pyx_kp_u__6);
      __pyx_t_7 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__6);
      PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_u__6);
      __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(0, 1889, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":1888
 *             if func_name not in Server.__bgRfcFunction:
 *                 raise TypeError(f"BgRfc callback function key not supported: '{func_name}'")
 *             if not callable(bgRfcFunction[func_name]):             # <<<<<<<<<<<<<<
 *                 raise TypeError(f"BgRfc callback function referenced by '{func_name}' is not callable: '{bgRfcFunction[func_name]}'")
 *             Server.__bgRfcFunction[func_name] = bgRfcFunction[func_name]
 */
    }

    /* "pyrfc/_cyrfc.pyx":1890
 *             if not callable(bgRfcFunction[func_name]):
 *                 raise TypeError(f"BgRfc callback function referenced by '{func_name}' is not callable: '{bgRfcFunction[func_name]}'")
 *             Server.__bgRfcFunction[func_name] = bgRfcFunction[func_name]             # <<<<<<<<<<<<<<
 *         return self.install_bgrfc_handlers(sysId)
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_bgRfcFunction, __pyx_v_func_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Server), __pyx_n_s_bgRfcFunction); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (unlikely(PyObject_SetItem(__pyx_t_10, __pyx_v_func_name, __pyx_t_4) < 0)) __PYX_ERR(0, 1890, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrfc/_cyrfc.pyx":1885
 *         :return: error code, zero when no error
 *         """
 *         for func_name in bgRfcFunction:             # <<<<<<<<<<<<<<
 *             if func_name not in Server.__bgRfcFunction:
 *                 raise TypeError(f"BgRfc callback function key not supported: '{func_name}'")
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1891
 *                 raise TypeError(f"BgRfc callback function referenced by '{func_name}' is not callable: '{bgRfcFunction[func_name]}'")
 *             Server.__bgRfcFunction[func_name] = bgRfcFunction[func_name]
 *         return self.install_bgrfc_handlers(sysId)             # <<<<<<<<<<<<<<
 * 
 *     def install_bgrfc_handlers(self, sysId):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_install_bgrfc_handlers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_10, __pyx_v_sysId) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_sysId);
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":1859
 *             return RCStatus.RFC_EXTERNAL_FAILURE.value
 * 
 *     def bgrfc_init(self, sysId, bgRfcFunction):             # <<<<<<<<<<<<<<
 *         """Installs the necessary callback functions for processing incoming bgRFC calls.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrfc._cyrfc.Server.bgrfc_init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_func_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1893
 *         return self.install_bgrfc_handlers(sysId)
 * 
 *     def install_bgrfc_handlers(self, sysId):             # <<<<<<<<<<<<<<
 *         ucSysId = fillString(sysId) if sysId is not None else NULL
 *         cdef RFC_ERROR_INFO errorInfo
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_5install_bgrfc_handlers(PyObject *__pyx_v_self, PyObject *__pyx_v_sysId); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_5install_bgrfc_handlers(PyObject *__pyx_v_self, PyObject *__pyx_v_sysId) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("install_bgrfc_handlers (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_4install_bgrfc_handlers(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self), ((PyObject *)__pyx_v_sysId));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_4install_bgrfc_handlers(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, PyObject *__pyx_v_sysId) {
  SAP_UC *__pyx_v_ucSysId;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_RC __pyx_v_rc;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SAP_UC *__pyx_t_1;
  int __pyx_t_2;
  SAP_UC *__pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("install_bgrfc_handlers", 0);

  /* "pyrfc/_cyrfc.pyx":1894
 * 
 *     def install_bgrfc_handlers(self, sysId):
 *         ucSysId = fillString(sysId) if sysId is not None else NULL             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc = RfcInstallBgRfcHandlers(
 */
  __pyx_t_2 = (__pyx_v_sysId != Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_sysId); if (unlikely(__pyx_t_3 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1894, __pyx_L1_error)
    __pyx_t_1 = __pyx_t_3;
  } else {
    __pyx_t_1 = NULL;
  }
  __pyx_v_ucSysId = __pyx_t_1;

  /* "pyrfc/_cyrfc.pyx":1896
 *         ucSysId = fillString(sysId) if sysId is not None else NULL
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc = RfcInstallBgRfcHandlers(             # <<<<<<<<<<<<<<
 *                             ucSysId,
 *                             Server.__onCheckFunction,
 */
  __pyx_v_rc = RfcInstallBgRfcHandlers(__pyx_v_ucSysId, __pyx_f_5pyrfc_6_cyrfc_6Server___onCheckFunction, __pyx_f_5pyrfc_6_cyrfc_6Server___onCommitFunction, __pyx_f_5pyrfc_6_cyrfc_6Server___onRollbackFunction, __pyx_f_5pyrfc_6_cyrfc_6Server___onConfirmFunction, __pyx_f_5pyrfc_6_cyrfc_6Server___onGetStateFunction, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":1905
 *                             &errorInfo
 *                         )
 *         free(ucSysId)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
  free(__pyx_v_ucSysId);

  /* "pyrfc/_cyrfc.pyx":1906
 *                         )
 *         free(ucSysId)
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         return rc
 */
  __pyx_t_4 = ((__pyx_v_rc != RFC_OK) != 0);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = ((__pyx_v_errorInfo.code != RFC_OK) != 0);
  __pyx_t_2 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":1907
 *         free(ucSysId)
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         return rc
 * 
 */
    __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1907, __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, 1907, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":1906
 *                         )
 *         free(ucSysId)
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         return rc
 */
  }

  /* "pyrfc/_cyrfc.pyx":1908
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         return rc             # <<<<<<<<<<<<<<
 * 
 *     def add_function(self, func_name, callback):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyInt_From_RFC_RC(__pyx_v_rc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":1893
 *         return self.install_bgrfc_handlers(sysId)
 * 
 *     def install_bgrfc_handlers(self, sysId):             # <<<<<<<<<<<<<<
 *         ucSysId = fillString(sysId) if sysId is not None else NULL
 *         cdef RFC_ERROR_INFO errorInfo
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrfc._cyrfc.Server.install_bgrfc_handlers", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1910
 *         return rc
 * 
 *     def add_function(self, func_name, callback):             # <<<<<<<<<<<<<<
 *         """
 *         Installs a function in the server.
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_7add_function(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_6Server_6add_function[] = "\n        Installs a function in the server.\n\n        :param func_name: ABAP remote function module name\n        :type func_name: string\n\n        :param callback: A callback function that implements the logic.\n            The function must accept a ``request_context`` parameter and\n            all IMPORT, CHANGING, and TABLE parameters of the given\n            ``func_desc``.\n        :raises: :exc:`TypeError` if a function with the name given is already\n            installed.\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_7add_function(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_func_name = 0;
  PyObject *__pyx_v_callback = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_function (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func_name,&__pyx_n_s_callback,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_func_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_function", 1, 2, 2, 1); __PYX_ERR(0, 1910, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_function") < 0)) __PYX_ERR(0, 1910, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_func_name = values[0];
    __pyx_v_callback = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_function", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1910, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.Server.add_function", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_6add_function(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self), __pyx_v_func_name, __pyx_v_callback);

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_6add_function(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, PyObject *__pyx_v_func_name, PyObject *__pyx_v_callback) {
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_ABAP_NAME __pyx_v_funcName;
  RFC_FUNCTION_DESC_HANDLE __pyx_v_func_desc_handle;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  SAP_UC *__pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_function", 0);

  /* "pyrfc/_cyrfc.pyx":1925
 *         """
 *         global server_functions
 *         if func_name in server_functions:             # <<<<<<<<<<<<<<
 *             raise TypeError(f"Server function '{func_name}' already installed.")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_functions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_func_name, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1925, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (unlikely(__pyx_t_3)) {

    /* "pyrfc/_cyrfc.pyx":1926
 *         global server_functions
 *         if func_name in server_functions:
 *             raise TypeError(f"Server function '{func_name}' already installed.")             # <<<<<<<<<<<<<<
 * 
 *         if not self._client_connection:
 */
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = 0;
    __pyx_t_5 = 127;
    __Pyx_INCREF(__pyx_kp_u_Server_function);
    __pyx_t_4 += 17;
    __Pyx_GIVEREF(__pyx_kp_u_Server_function);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Server_function);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
    __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u_already_installed);
    __pyx_t_4 += 20;
    __Pyx_GIVEREF(__pyx_kp_u_already_installed);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_already_installed);
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1926, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":1925
 *         """
 *         global server_functions
 *         if func_name in server_functions:             # <<<<<<<<<<<<<<
 *             raise TypeError(f"Server function '{func_name}' already installed.")
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":1928
 *             raise TypeError(f"Server function '{func_name}' already installed.")
 * 
 *         if not self._client_connection:             # <<<<<<<<<<<<<<
 *             self._client_connection.open()
 *         cdef RFC_ERROR_INFO errorInfo
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->_client_connection)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1928, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_3) != 0);
  if (__pyx_t_2) {

    /* "pyrfc/_cyrfc.pyx":1929
 * 
 *         if not self._client_connection:
 *             self._client_connection.open()             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_ABAP_NAME funcName = fillString(func_name)
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_client_connection), __pyx_n_s_open); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1929, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1929, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":1928
 *             raise TypeError(f"Server function '{func_name}' already installed.")
 * 
 *         if not self._client_connection:             # <<<<<<<<<<<<<<
 *             self._client_connection.open()
 *         cdef RFC_ERROR_INFO errorInfo
 */
  }

  /* "pyrfc/_cyrfc.pyx":1931
 *             self._client_connection.open()
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_ABAP_NAME funcName = fillString(func_name)             # <<<<<<<<<<<<<<
 *         cdef RFC_FUNCTION_DESC_HANDLE func_desc_handle = RfcGetFunctionDesc(self._client_connection._handle, funcName, &errorInfo)
 *         self._client_connection.close()
 */
  __pyx_t_8 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_func_name); if (unlikely(__pyx_t_8 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1931, __pyx_L1_error)
  memcpy(&(__pyx_v_funcName[0]), __pyx_t_8, sizeof(__pyx_v_funcName[0]) * ((30 + 1) - 0));

  /* "pyrfc/_cyrfc.pyx":1932
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_ABAP_NAME funcName = fillString(func_name)
 *         cdef RFC_FUNCTION_DESC_HANDLE func_desc_handle = RfcGetFunctionDesc(self._client_connection._handle, funcName, &errorInfo)             # <<<<<<<<<<<<<<
 *         self._client_connection.close()
 * 
 */
  __pyx_v_func_desc_handle = RfcGetFunctionDesc(__pyx_v_self->_client_connection->_handle, __pyx_v_funcName, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":1933
 *         cdef RFC_ABAP_NAME funcName = fillString(func_name)
 *         cdef RFC_FUNCTION_DESC_HANDLE func_desc_handle = RfcGetFunctionDesc(self._client_connection._handle, funcName, &errorInfo)
 *         self._client_connection.close()             # <<<<<<<<<<<<<<
 * 
 *         if errorInfo.code != RFC_OK:
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_client_connection), __pyx_n_s_close_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1935
 *         self._client_connection.close()
 * 
 *         if errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 * 
 */
  __pyx_t_2 = ((__pyx_v_errorInfo.code != RFC_OK) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":1936
 * 
 *         if errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *         server_functions[func_name] = {
 */
    __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1936, __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, 1936, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":1935
 *         self._client_connection.close()
 * 
 *         if errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":1939
 * 
 *         server_functions[func_name] = {
 *             "func_desc_handle": <uintptr_t>func_desc_handle,             # <<<<<<<<<<<<<<
 *             "callback": callback,
 *             "server": self
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_func_desc_handle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_func_desc_handle, __pyx_t_6) < 0) __PYX_ERR(0, 1939, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyrfc/_cyrfc.pyx":1940
 *         server_functions[func_name] = {
 *             "func_desc_handle": <uintptr_t>func_desc_handle,
 *             "callback": callback,             # <<<<<<<<<<<<<<
 *             "server": self
 *         }
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1939, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":1941
 *             "func_desc_handle": <uintptr_t>func_desc_handle,
 *             "callback": callback,
 *             "server": self             # <<<<<<<<<<<<<<
 *         }
 * 
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_server, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 1939, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":1938
 *             raise wrapError(&errorInfo)
 * 
 *         server_functions[func_name] = {             # <<<<<<<<<<<<<<
 *             "func_desc_handle": <uintptr_t>func_desc_handle,
 *             "callback": callback,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_server_functions); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_v_func_name, __pyx_t_1) < 0)) __PYX_ERR(0, 1938, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1944
 *         }
 * 
 *         _server_log("Server function installed", func_name)             # <<<<<<<<<<<<<<
 *         _server_log("Server function installed", server_functions[func_name])
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_server_log); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_u_Server_function_installed, __pyx_v_func_name};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1944, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_u_Server_function_installed, __pyx_v_func_name};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1944, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(__pyx_kp_u_Server_function_installed);
    __Pyx_GIVEREF(__pyx_kp_u_Server_function_installed);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_kp_u_Server_function_installed);
    __Pyx_INCREF(__pyx_v_func_name);
    __Pyx_GIVEREF(__pyx_v_func_name);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_func_name);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1945
 * 
 *         _server_log("Server function installed", func_name)
 *         _server_log("Server function installed", server_functions[func_name])             # <<<<<<<<<<<<<<
 * 
 *     def serve(self):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_server_log); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_server_functions); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_v_func_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_kp_u_Server_function_installed, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1945, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_kp_u_Server_function_installed, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1945, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  {
    __pyx_t_11 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1945, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__pyx_t_10) {
      __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
    }
    __Pyx_INCREF(__pyx_kp_u_Server_function_installed);
    __Pyx_GIVEREF(__pyx_kp_u_Server_function_installed);
    PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_9, __pyx_kp_u_Server_function_installed);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_9, __pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1945, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1910
 *         return rc
 * 
 *     def add_function(self, func_name, callback):             # <<<<<<<<<<<<<<
 *         """
 *         Installs a function in the server.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("pyrfc._cyrfc.Server.add_function", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1947
 *         _server_log("Server function installed", server_functions[func_name])
 * 
 *     def serve(self):             # <<<<<<<<<<<<<<
 *         """
 *         Starts the RFC server, waiting for incoming requests and processes them.
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_9serve(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_6Server_8serve[] = "\n        Starts the RFC server, waiting for incoming requests and processes them.\n\n        :raises: :exc:`~pyrfc.RFCError` or a subclass\n                 thereof if the server processing fails.\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_9serve(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serve (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_8serve(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_8serve(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self) {
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_RC __pyx_v_rc;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serve", 0);

  /* "pyrfc/_cyrfc.pyx":1956
 *         cdef RFC_ERROR_INFO errorInfo
 * 
 *         cdef RFC_RC rc = RfcInstallGenericServerFunction(genericHandler, metadataLookup, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
  __pyx_v_rc = RfcInstallGenericServerFunction(__pyx_f_5pyrfc_6_cyrfc_genericHandler, __pyx_f_5pyrfc_6_cyrfc_metadataLookup, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":1957
 * 
 *         cdef RFC_RC rc = RfcInstallGenericServerFunction(genericHandler, metadataLookup, &errorInfo)
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 * 
 */
  __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_errorInfo.code != RFC_OK) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":1958
 *         cdef RFC_RC rc = RfcInstallGenericServerFunction(genericHandler, metadataLookup, &errorInfo)
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *         rc = RfcLaunchServer(self._server_connection._handle, &errorInfo)
 */
    __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1958, __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, 1958, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":1957
 * 
 *         cdef RFC_RC rc = RfcInstallGenericServerFunction(genericHandler, metadataLookup, &errorInfo)
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":1960
 *             raise wrapError(&errorInfo)
 * 
 *         rc = RfcLaunchServer(self._server_connection._handle, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
  __pyx_v_rc = RfcLaunchServer(__pyx_v_self->_server_connection->_handle, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":1961
 * 
 *         rc = RfcLaunchServer(self._server_connection._handle, &errorInfo)
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         _server_log("Server", f"launched {self._server_connection.handle}")
 */
  __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_errorInfo.code != RFC_OK) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L7_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":1962
 *         rc = RfcLaunchServer(self._server_connection._handle, &errorInfo)
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         _server_log("Server", f"launched {self._server_connection.handle}")
 * 
 */
    __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1962, __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, 1962, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":1961
 * 
 *         rc = RfcLaunchServer(self._server_connection._handle, &errorInfo)
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         _server_log("Server", f"launched {self._server_connection.handle}")
 */
  }

  /* "pyrfc/_cyrfc.pyx":1963
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         _server_log("Server", f"launched {self._server_connection.handle}")             # <<<<<<<<<<<<<<
 * 
 *         return rc
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_server_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_server_connection), __pyx_n_s_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_launched, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_u_Server, __pyx_t_5};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1963, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_u_Server, __pyx_t_5};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1963, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_n_u_Server);
    __Pyx_GIVEREF(__pyx_n_u_Server);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_n_u_Server);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":1965
 *         _server_log("Server", f"launched {self._server_connection.handle}")
 * 
 *         return rc             # <<<<<<<<<<<<<<
 * 
 *     def start(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_RFC_RC(__pyx_v_rc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":1947
 *         _server_log("Server function installed", server_functions[func_name])
 * 
 *     def serve(self):             # <<<<<<<<<<<<<<
 *         """
 *         Starts the RFC server, waiting for incoming requests and processes them.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrfc._cyrfc.Server.serve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1967
 *         return rc
 * 
 *     def start(self):             # <<<<<<<<<<<<<<
 *         """
 *         Start the RFC server in new thread, waiting for incoming requests and processes them.
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_11start(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_6Server_10start[] = "\n        Start the RFC server in new thread, waiting for incoming requests and processes them.\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_11start(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("start (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_10start(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_10start(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("start", 0);

  /* "pyrfc/_cyrfc.pyx":1971
 *         Start the RFC server in new thread, waiting for incoming requests and processes them.
 *         """
 *         self._server_thread.start()             # <<<<<<<<<<<<<<
 * 
 *     def stop(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_server_thread, __pyx_n_s_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1967
 *         return rc
 * 
 *     def start(self):             # <<<<<<<<<<<<<<
 *         """
 *         Start the RFC server in new thread, waiting for incoming requests and processes them.
 */

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

/* "pyrfc/_cyrfc.pyx":1973
 *         self._server_thread.start()
 * 
 *     def stop(self):             # <<<<<<<<<<<<<<
 *         """
 *         Stop the RFC server thread.
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_13stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_6Server_12stop[] = "\n        Stop the RFC server thread.\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_13stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("stop (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_12stop(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_12stop(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("stop", 0);

  /* "pyrfc/_cyrfc.pyx":1977
 *         Stop the RFC server thread.
 *         """
 *         if self._server_thread.is_alive():             # <<<<<<<<<<<<<<
 *             self._server_thread.join()
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_server_thread, __pyx_n_s_is_alive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1977, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "pyrfc/_cyrfc.pyx":1978
 *         """
 *         if self._server_thread.is_alive():
 *             self._server_thread.join()             # <<<<<<<<<<<<<<
 * 
 *     def close(self):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_server_thread, __pyx_n_s_join); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1978, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1978, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":1977
 *         Stop the RFC server thread.
 *         """
 *         if self._server_thread.is_alive():             # <<<<<<<<<<<<<<
 *             self._server_thread.join()
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":1973
 *         self._server_thread.start()
 * 
 *     def stop(self):             # <<<<<<<<<<<<<<
 *         """
 *         Stop the RFC server thread.
 */

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

/* "pyrfc/_cyrfc.pyx":1980
 *             self._server_thread.join()
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         """ Explicitly close the registration.
 *         Note that this is usually not necessary as the registration will be closed
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_15close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_6Server_14close[] = " Explicitly close the registration.\n        Note that this is usually not necessary as the registration will be closed\n        automatically upon object destruction. However, if the the object destruction\n        is delayed by the garbage collection, problems may occur when too many\n        servers are registered.\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_15close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("close (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_14close(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_14close(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("close", 0);

  /* "pyrfc/_cyrfc.pyx":1987
 *         servers are registered.
 *         """
 *         self.stop()             # <<<<<<<<<<<<<<
 *         self._close()
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_stop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1988
 *         """
 *         self.stop()
 *         self._close()             # <<<<<<<<<<<<<<
 * 
 *     def get_server_attributes(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":1980
 *             self._server_thread.join()
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         """ Explicitly close the registration.
 *         Note that this is usually not necessary as the registration will be closed
 */

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

/* "pyrfc/_cyrfc.pyx":1990
 *         self._close()
 * 
 *     def get_server_attributes(self):             # <<<<<<<<<<<<<<
 *         """Retrieves detailed information about a multi-count Registered Server or a TCP Socket Server.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_17get_server_attributes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_6Server_16get_server_attributes[] = "Retrieves detailed information about a multi-count Registered Server or a TCP Socket Server.\n\n        :returns: Dictionary with server state and attributes\n        :rtype: dict(str, str or int)\n\n            * serverName: This server's name as given when creating the server.\n            * protocolType: This RFC server's type:\n              RFC_MULTI_COUNT_REGISTERED_SERVER or RFC_TCP_SOCKET_SERVER\n            * registrationCount: The current number of active registrations (in case of a Registered Server)\n              or the maximum number of parallel connections the server will accept (in case of a TCP Socket Server)\n            * state: Used in state information in order to indicate the current state of an RFC Server.\n            * currentBusyCount: The number of requests currently being processed.\n            * peakBusyCount: The maximum number of requests the server has been processing in parallel since it has been created\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_17get_server_attributes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_server_attributes (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_16get_server_attributes(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_16get_server_attributes(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self) {
  RFC_RC __pyx_v_rc;
  RFC_SERVER_ATTRIBUTES __pyx_v_attributes;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  PyObject *__pyx_v_rfcServerState = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_server_attributes", 0);

  /* "pyrfc/_cyrfc.pyx":2009
 *         cdef RFC_ERROR_INFO errorInfo
 * 
 *         rc = RfcGetServerAttributes(self._server_connection._handle, &attributes, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
  __pyx_v_rc = RfcGetServerAttributes(__pyx_v_self->_server_connection->_handle, (&__pyx_v_attributes), (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":2010
 * 
 *         rc = RfcGetServerAttributes(self._server_connection._handle, &attributes, &errorInfo)
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         rfcServerState = wrapString(RfcGetServerStateAsString(attributes.state), -1, True)
 */
  __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_errorInfo.code != RFC_OK) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":2011
 *         rc = RfcGetServerAttributes(self._server_connection._handle, &attributes, &errorInfo)
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         rfcServerState = wrapString(RfcGetServerStateAsString(attributes.state), -1, True)
 *         return {
 */
    __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2011, __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, 2011, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2010
 * 
 *         rc = RfcGetServerAttributes(self._server_connection._handle, &attributes, &errorInfo)
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         rfcServerState = wrapString(RfcGetServerStateAsString(attributes.state), -1, True)
 */
  }

  /* "pyrfc/_cyrfc.pyx":2012
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         rfcServerState = wrapString(RfcGetServerStateAsString(attributes.state), -1, True)             # <<<<<<<<<<<<<<
 *         return {
 *             # This server's name as given when creating the server.
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_neg_1;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(RfcGetServerStateAsString(__pyx_v_attributes.state), &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_rfcServerState = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":2013
 *             raise wrapError(&errorInfo)
 *         rfcServerState = wrapString(RfcGetServerStateAsString(attributes.state), -1, True)
 *         return {             # <<<<<<<<<<<<<<
 *             # This server's name as given when creating the server.
 *             'serverName': wrapString(attributes.serverName, -1, True)
 */
  __Pyx_XDECREF(__pyx_r);

  /* "pyrfc/_cyrfc.pyx":2015
 *         return {
 *             # This server's name as given when creating the server.
 *             'serverName': wrapString(attributes.serverName, -1, True)             # <<<<<<<<<<<<<<
 *             # This RFC server's type. Will be one of RFC_MULTI_COUNT_REGISTERED_SERVER or RFC_TCP_SOCKET_SERVER
 *             , 'protocolType': "multi count" if attributes.type == RFC_MULTI_COUNT_REGISTERED_SERVER
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_neg_1;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.serverName, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_serverName, __pyx_t_5) < 0) __PYX_ERR(0, 2015, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pyrfc/_cyrfc.pyx":2017
 *             'serverName': wrapString(attributes.serverName, -1, True)
 *             # This RFC server's type. Will be one of RFC_MULTI_COUNT_REGISTERED_SERVER or RFC_TCP_SOCKET_SERVER
 *             , 'protocolType': "multi count" if attributes.type == RFC_MULTI_COUNT_REGISTERED_SERVER             # <<<<<<<<<<<<<<
 *             else socket.gethostname()  # Own host name
 *             # The current number of active registrations (in case of a Registered Server)
 */
  if (((__pyx_v_attributes.type == RFC_MULTI_COUNT_REGISTERED_SERVER) != 0)) {
    __Pyx_INCREF(__pyx_kp_u_multi_count);
    __pyx_t_5 = __pyx_kp_u_multi_count;
  } else {

    /* "pyrfc/_cyrfc.pyx":2018
 *             # This RFC server's type. Will be one of RFC_MULTI_COUNT_REGISTERED_SERVER or RFC_TCP_SOCKET_SERVER
 *             , 'protocolType': "multi count" if attributes.type == RFC_MULTI_COUNT_REGISTERED_SERVER
 *             else socket.gethostname()  # Own host name             # <<<<<<<<<<<<<<
 *             # The current number of active registrations (in case of a Registered Server)
 *             # or the maximum number of parallel connections the server will accept (in case of a TCP Socket Server)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_socket); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_gethostname); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_5 = __pyx_t_6;
    __pyx_t_6 = 0;
  }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_protocolType, __pyx_t_5) < 0) __PYX_ERR(0, 2015, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pyrfc/_cyrfc.pyx":2021
 *             # The current number of active registrations (in case of a Registered Server)
 *             # or the maximum number of parallel connections the server will accept (in case of a TCP Socket Server)
 *             , 'registrationCount': attributes.registrationCount             # <<<<<<<<<<<<<<
 *             # Used in state information in order to indicate the current state of an RFC Server.
 *             , 'state': rfcServerState
 */
  __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_attributes.registrationCount); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_registrationCount, __pyx_t_5) < 0) __PYX_ERR(0, 2015, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pyrfc/_cyrfc.pyx":2023
 *             , 'registrationCount': attributes.registrationCount
 *             # Used in state information in order to indicate the current state of an RFC Server.
 *             , 'state': rfcServerState             # <<<<<<<<<<<<<<
 *             # The number of requests currently being processed.
 *             , 'currentBusyCount': attributes.currentBusyCount
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_state, __pyx_v_rfcServerState) < 0) __PYX_ERR(0, 2015, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":2025
 *             , 'state': rfcServerState
 *             # The number of requests currently being processed.
 *             , 'currentBusyCount': attributes.currentBusyCount             # <<<<<<<<<<<<<<
 *             # The maximum number of requests the server has been processing in parallel since it has been created
 *             , 'peakBusyCount': attributes.peakBusyCount
 */
  __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_attributes.currentBusyCount); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_currentBusyCount, __pyx_t_5) < 0) __PYX_ERR(0, 2015, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pyrfc/_cyrfc.pyx":2027
 *             , 'currentBusyCount': attributes.currentBusyCount
 *             # The maximum number of requests the server has been processing in parallel since it has been created
 *             , 'peakBusyCount': attributes.peakBusyCount             # <<<<<<<<<<<<<<
 *         }
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_attributes.peakBusyCount); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_peakBusyCount, __pyx_t_5) < 0) __PYX_ERR(0, 2015, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":1990
 *         self._close()
 * 
 *     def get_server_attributes(self):             # <<<<<<<<<<<<<<
 *         """Retrieves detailed information about a multi-count Registered Server or a TCP Socket Server.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrfc._cyrfc.Server.get_server_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rfcServerState);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2030
 *         }
 * 
 *     def _close(self):             # <<<<<<<<<<<<<<
 *         """ Close the connection (private function)
 *         :raises: :exc:`~pyrfc.RFCError` or a subclass
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_19_close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_6Server_18_close[] = " Close the connection (private function)\n        :raises: :exc:`~pyrfc.RFCError` or a subclass\n                 thereof if the connection cannot be closed cleanly.\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_19_close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_close (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_18_close(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_18_close(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self) {
  PyObject *__pyx_v_after_remove = NULL;
  PyObject *__pyx_v_func_name = NULL;
  PyObject *__pyx_v_func_data = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_close", 0);

  /* "pyrfc/_cyrfc.pyx":2036
 *         """
 *         # Shutdown server
 *         if self._server_connection:             # <<<<<<<<<<<<<<
 *             self._server_connection.close()
 *         # Remove all installed server functions
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->_server_connection)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2036, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrfc/_cyrfc.pyx":2037
 *         # Shutdown server
 *         if self._server_connection:
 *             self._server_connection.close()             # <<<<<<<<<<<<<<
 *         # Remove all installed server functions
 *         after_remove = {}
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_server_connection), __pyx_n_s_close_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2037, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2037, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrfc/_cyrfc.pyx":2036
 *         """
 *         # Shutdown server
 *         if self._server_connection:             # <<<<<<<<<<<<<<
 *             self._server_connection.close()
 *         # Remove all installed server functions
 */
  }

  /* "pyrfc/_cyrfc.pyx":2039
 *             self._server_connection.close()
 *         # Remove all installed server functions
 *         after_remove = {}             # <<<<<<<<<<<<<<
 *         global server_functions
 *         for func_name, func_data in server_functions.items():
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_after_remove = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2041
 *         after_remove = {}
 *         global server_functions
 *         for func_name, func_data in server_functions.items():             # <<<<<<<<<<<<<<
 *             if func_data["server"] != self:
 *                 after_remove[func_name] = func_data
 */
  __pyx_t_5 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_server_functions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(__pyx_t_3 == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 2041, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_dict_iterator(__pyx_t_3, 0, __pyx_n_s_items, (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_XDECREF(__pyx_t_2);
  __pyx_t_2 = __pyx_t_4;
  __pyx_t_4 = 0;
  while (1) {
    __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_6, &__pyx_t_5, &__pyx_t_4, &__pyx_t_3, NULL, __pyx_t_7);
    if (unlikely(__pyx_t_8 == 0)) break;
    if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 2041, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_func_name, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_func_data, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":2042
 *         global server_functions
 *         for func_name, func_data in server_functions.items():
 *             if func_data["server"] != self:             # <<<<<<<<<<<<<<
 *                 after_remove[func_name] = func_data
 *         server_functions = after_remove
 */
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_func_data, __pyx_n_u_server); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_v_self), Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2042, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2042, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "pyrfc/_cyrfc.pyx":2043
 *         for func_name, func_data in server_functions.items():
 *             if func_data["server"] != self:
 *                 after_remove[func_name] = func_data             # <<<<<<<<<<<<<<
 *         server_functions = after_remove
 * 
 */
      if (unlikely(PyDict_SetItem(__pyx_v_after_remove, __pyx_v_func_name, __pyx_v_func_data) < 0)) __PYX_ERR(0, 2043, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":2042
 *         global server_functions
 *         for func_name, func_data in server_functions.items():
 *             if func_data["server"] != self:             # <<<<<<<<<<<<<<
 *                 after_remove[func_name] = func_data
 *         server_functions = after_remove
 */
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2044
 *             if func_data["server"] != self:
 *                 after_remove[func_name] = func_data
 *         server_functions = after_remove             # <<<<<<<<<<<<<<
 * 
 *     cdef _error(self, RFC_ERROR_INFO* errorInfo):
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_server_functions, __pyx_v_after_remove) < 0) __PYX_ERR(0, 2044, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":2030
 *         }
 * 
 *     def _close(self):             # <<<<<<<<<<<<<<
 *         """ Close the connection (private function)
 *         :raises: :exc:`~pyrfc.RFCError` or a subclass
 */

  /* 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("pyrfc._cyrfc.Server._close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_after_remove);
  __Pyx_XDECREF(__pyx_v_func_name);
  __Pyx_XDECREF(__pyx_v_func_data);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2046
 *         server_functions = after_remove
 * 
 *     cdef _error(self, RFC_ERROR_INFO* errorInfo):             # <<<<<<<<<<<<<<
 *         """
 *         Error treatment of a connection.
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_6Server__error(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, RFC_ERROR_INFO *__pyx_v_errorInfo) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_error", 0);

  /* "pyrfc/_cyrfc.pyx":2061
 *         #    self.alive = False
 * 
 *         raise wrapError(errorInfo)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError(__pyx_v_errorInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2061, __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, 2061, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":2046
 *         server_functions = after_remove
 * 
 *     cdef _error(self, RFC_ERROR_INFO* errorInfo):             # <<<<<<<<<<<<<<
 *         """
 *         Error treatment of a connection.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrfc._cyrfc.Server._error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1755
 *              thereof if the connection attempt fails.
 *     """
 *     cdef public bint debug             # <<<<<<<<<<<<<<
 *     cdef public bint rstrip
 *     cdef Connection _client_connection
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_5debug_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_5debug_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_5debug___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_5debug___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->debug); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5pyrfc_6_cyrfc_6Server_5debug_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5pyrfc_6_cyrfc_6Server_5debug_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_5debug_2__set__(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5pyrfc_6_cyrfc_6Server_5debug_2__set__(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1755, __pyx_L1_error)
  __pyx_v_self->debug = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.Server.debug.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":1756
 *     """
 *     cdef public bint debug
 *     cdef public bint rstrip             # <<<<<<<<<<<<<<
 *     cdef Connection _client_connection
 *     cdef ServerConnection _server_connection
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_6rstrip_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_6rstrip_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_6rstrip___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_6rstrip___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->rstrip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5pyrfc_6_cyrfc_6Server_6rstrip_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5pyrfc_6_cyrfc_6Server_6rstrip_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_6rstrip_2__set__(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5pyrfc_6_cyrfc_6Server_6rstrip_2__set__(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1756, __pyx_L1_error)
  __pyx_v_self->rstrip = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.Server.rstrip.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_21__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_21__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_20__reduce_cython__(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self));

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

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

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

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

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_23__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_23__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_22__setstate_cython__(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

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

/* "pyrfc/_cyrfc.pyx":2064
 * 
 * 
 * cdef RFC_TYPE_DESC_HANDLE fillTypeDescription(type_desc):             # <<<<<<<<<<<<<<
 *     """
 *     :param type_desc: object of class TypeDescription
 */

static RFC_TYPE_DESC_HANDLE __pyx_f_5pyrfc_6_cyrfc_fillTypeDescription(PyObject *__pyx_v_type_desc) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_TYPE_DESC_HANDLE __pyx_v_typeDesc;
  RFC_FIELD_DESC __pyx_v_fieldDesc;
  SAP_UC *__pyx_v_sapuc;
  PyObject *__pyx_v_field_desc = NULL;
  RFC_TYPE_DESC_HANDLE __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  SAP_UC *__pyx_t_2;
  int __pyx_t_3;
  unsigned int __pyx_t_4;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  RFCTYPE __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fillTypeDescription", 0);

  /* "pyrfc/_cyrfc.pyx":2069
 *     :return: Handle of RFC_TYPE_DESC_HANDLE
 *     """
 *     cdef RFC_RC rc = RFC_OK             # <<<<<<<<<<<<<<
 *     cdef RFC_ERROR_INFO errorInfo
 *     cdef RFC_TYPE_DESC_HANDLE typeDesc
 */
  __pyx_v_rc = RFC_OK;

  /* "pyrfc/_cyrfc.pyx":2076
 * 
 *     # Set name, nuc_length, and uc_length
 *     sapuc = fillString(type_desc.name)             # <<<<<<<<<<<<<<
 *     typeDesc = RfcCreateTypeDesc(sapuc, &errorInfo)
 *     free(sapuc)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_type_desc, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_2 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2076, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_sapuc = __pyx_t_2;

  /* "pyrfc/_cyrfc.pyx":2077
 *     # Set name, nuc_length, and uc_length
 *     sapuc = fillString(type_desc.name)
 *     typeDesc = RfcCreateTypeDesc(sapuc, &errorInfo)             # <<<<<<<<<<<<<<
 *     free(sapuc)
 *     if typeDesc == NULL:
 */
  __pyx_v_typeDesc = RfcCreateTypeDesc(__pyx_v_sapuc, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":2078
 *     sapuc = fillString(type_desc.name)
 *     typeDesc = RfcCreateTypeDesc(sapuc, &errorInfo)
 *     free(sapuc)             # <<<<<<<<<<<<<<
 *     if typeDesc == NULL:
 *         raise wrapError(&errorInfo)
 */
  free(__pyx_v_sapuc);

  /* "pyrfc/_cyrfc.pyx":2079
 *     typeDesc = RfcCreateTypeDesc(sapuc, &errorInfo)
 *     free(sapuc)
 *     if typeDesc == NULL:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     rc = RfcSetTypeLength(typeDesc, type_desc.nuc_length, type_desc.uc_length, &errorInfo)
 */
  __pyx_t_3 = ((__pyx_v_typeDesc == NULL) != 0);
  if (unlikely(__pyx_t_3)) {

    /* "pyrfc/_cyrfc.pyx":2080
 *     free(sapuc)
 *     if typeDesc == NULL:
 *         raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *     rc = RfcSetTypeLength(typeDesc, type_desc.nuc_length, type_desc.uc_length, &errorInfo)
 *     if rc != RFC_OK:
 */
    __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2080, __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, 2080, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2079
 *     typeDesc = RfcCreateTypeDesc(sapuc, &errorInfo)
 *     free(sapuc)
 *     if typeDesc == NULL:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     rc = RfcSetTypeLength(typeDesc, type_desc.nuc_length, type_desc.uc_length, &errorInfo)
 */
  }

  /* "pyrfc/_cyrfc.pyx":2081
 *     if typeDesc == NULL:
 *         raise wrapError(&errorInfo)
 *     rc = RfcSetTypeLength(typeDesc, type_desc.nuc_length, type_desc.uc_length, &errorInfo)             # <<<<<<<<<<<<<<
 *     if rc != RFC_OK:
 *         RfcDestroyTypeDesc(typeDesc, NULL)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_type_desc, __pyx_n_s_nuc_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2081, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_type_desc, __pyx_n_s_uc_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyInt_As_unsigned_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2081, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_rc = RfcSetTypeLength(__pyx_v_typeDesc, __pyx_t_4, __pyx_t_5, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":2082
 *         raise wrapError(&errorInfo)
 *     rc = RfcSetTypeLength(typeDesc, type_desc.nuc_length, type_desc.uc_length, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         RfcDestroyTypeDesc(typeDesc, NULL)
 *         raise wrapError(&errorInfo)
 */
  __pyx_t_3 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_3)) {

    /* "pyrfc/_cyrfc.pyx":2083
 *     rc = RfcSetTypeLength(typeDesc, type_desc.nuc_length, type_desc.uc_length, &errorInfo)
 *     if rc != RFC_OK:
 *         RfcDestroyTypeDesc(typeDesc, NULL)             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 * 
 */
    (void)(RfcDestroyTypeDesc(__pyx_v_typeDesc, NULL));

    /* "pyrfc/_cyrfc.pyx":2084
 *     if rc != RFC_OK:
 *         RfcDestroyTypeDesc(typeDesc, NULL)
 *         raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *     for field_desc in type_desc.fields:
 */
    __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2084, __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, 2084, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2082
 *         raise wrapError(&errorInfo)
 *     rc = RfcSetTypeLength(typeDesc, type_desc.nuc_length, type_desc.uc_length, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         RfcDestroyTypeDesc(typeDesc, NULL)
 *         raise wrapError(&errorInfo)
 */
  }

  /* "pyrfc/_cyrfc.pyx":2086
 *         raise wrapError(&errorInfo)
 * 
 *     for field_desc in type_desc.fields:             # <<<<<<<<<<<<<<
 *         # Set name
 *         sapuc = fillString(field_desc['name'])
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_type_desc, __pyx_n_s_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2086, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2086, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_6))) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 2086, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2086, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 2086, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2086, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_8(__pyx_t_6);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2086, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_field_desc, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":2088
 *     for field_desc in type_desc.fields:
 *         # Set name
 *         sapuc = fillString(field_desc['name'])             # <<<<<<<<<<<<<<
 *         strncpyU(fieldDesc.name, sapuc, len(field_desc['name']) + 1)
 *         free(sapuc)
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2088, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_2 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2088, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_sapuc = __pyx_t_2;

    /* "pyrfc/_cyrfc.pyx":2089
 *         # Set name
 *         sapuc = fillString(field_desc['name'])
 *         strncpyU(fieldDesc.name, sapuc, len(field_desc['name']) + 1)             # <<<<<<<<<<<<<<
 *         free(sapuc)
 *         fieldDesc.type = RfcFieldType[field_desc['field_type']].value
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2089, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2089, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    strncpyU(__pyx_v_fieldDesc.name, __pyx_v_sapuc, (__pyx_t_9 + 1));

    /* "pyrfc/_cyrfc.pyx":2090
 *         sapuc = fillString(field_desc['name'])
 *         strncpyU(fieldDesc.name, sapuc, len(field_desc['name']) + 1)
 *         free(sapuc)             # <<<<<<<<<<<<<<
 *         fieldDesc.type = RfcFieldType[field_desc['field_type']].value
 *         fieldDesc.nucLength = field_desc['nuc_length']
 */
    free(__pyx_v_sapuc);

    /* "pyrfc/_cyrfc.pyx":2091
 *         strncpyU(fieldDesc.name, sapuc, len(field_desc['name']) + 1)
 *         free(sapuc)
 *         fieldDesc.type = RfcFieldType[field_desc['field_type']].value             # <<<<<<<<<<<<<<
 *         fieldDesc.nucLength = field_desc['nuc_length']
 *         fieldDesc.nucOffset = field_desc['nuc_offset']
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_RfcFieldType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2091, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_field_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2091, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2091, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2091, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_12 = ((RFCTYPE)__Pyx_PyInt_As_RFCTYPE(__pyx_t_10)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2091, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_v_fieldDesc.type = __pyx_t_12;

    /* "pyrfc/_cyrfc.pyx":2092
 *         free(sapuc)
 *         fieldDesc.type = RfcFieldType[field_desc['field_type']].value
 *         fieldDesc.nucLength = field_desc['nuc_length']             # <<<<<<<<<<<<<<
 *         fieldDesc.nucOffset = field_desc['nuc_offset']
 *         fieldDesc.ucLength = field_desc['uc_length']
 */
    __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_nuc_length); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_int(__pyx_t_10); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2092, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_v_fieldDesc.nucLength = __pyx_t_5;

    /* "pyrfc/_cyrfc.pyx":2093
 *         fieldDesc.type = RfcFieldType[field_desc['field_type']].value
 *         fieldDesc.nucLength = field_desc['nuc_length']
 *         fieldDesc.nucOffset = field_desc['nuc_offset']             # <<<<<<<<<<<<<<
 *         fieldDesc.ucLength = field_desc['uc_length']
 *         fieldDesc.ucOffset = field_desc['uc_offset']
 */
    __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_nuc_offset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_int(__pyx_t_10); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2093, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_v_fieldDesc.nucOffset = __pyx_t_5;

    /* "pyrfc/_cyrfc.pyx":2094
 *         fieldDesc.nucLength = field_desc['nuc_length']
 *         fieldDesc.nucOffset = field_desc['nuc_offset']
 *         fieldDesc.ucLength = field_desc['uc_length']             # <<<<<<<<<<<<<<
 *         fieldDesc.ucOffset = field_desc['uc_offset']
 *         fieldDesc.decimals = field_desc['decimals']
 */
    __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_uc_length); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_int(__pyx_t_10); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2094, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_v_fieldDesc.ucLength = __pyx_t_5;

    /* "pyrfc/_cyrfc.pyx":2095
 *         fieldDesc.nucOffset = field_desc['nuc_offset']
 *         fieldDesc.ucLength = field_desc['uc_length']
 *         fieldDesc.ucOffset = field_desc['uc_offset']             # <<<<<<<<<<<<<<
 *         fieldDesc.decimals = field_desc['decimals']
 *         if field_desc['type_description'] is not None:
 */
    __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_uc_offset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_int(__pyx_t_10); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2095, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_v_fieldDesc.ucOffset = __pyx_t_5;

    /* "pyrfc/_cyrfc.pyx":2096
 *         fieldDesc.ucLength = field_desc['uc_length']
 *         fieldDesc.ucOffset = field_desc['uc_offset']
 *         fieldDesc.decimals = field_desc['decimals']             # <<<<<<<<<<<<<<
 *         if field_desc['type_description'] is not None:
 *             fieldDesc.typeDescHandle = fillTypeDescription(field_desc['type_description'])
 */
    __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_decimals); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2096, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_int(__pyx_t_10); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2096, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_v_fieldDesc.decimals = __pyx_t_5;

    /* "pyrfc/_cyrfc.pyx":2097
 *         fieldDesc.ucOffset = field_desc['uc_offset']
 *         fieldDesc.decimals = field_desc['decimals']
 *         if field_desc['type_description'] is not None:             # <<<<<<<<<<<<<<
 *             fieldDesc.typeDescHandle = fillTypeDescription(field_desc['type_description'])
 *         else:
 */
    __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_type_description); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2097, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_3 = (__pyx_t_10 != Py_None);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_13 = (__pyx_t_3 != 0);
    if (__pyx_t_13) {

      /* "pyrfc/_cyrfc.pyx":2098
 *         fieldDesc.decimals = field_desc['decimals']
 *         if field_desc['type_description'] is not None:
 *             fieldDesc.typeDescHandle = fillTypeDescription(field_desc['type_description'])             # <<<<<<<<<<<<<<
 *         else:
 *             fieldDesc.typeDescHandle = NULL
 */
      __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_type_description); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2098, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_v_fieldDesc.typeDescHandle = __pyx_f_5pyrfc_6_cyrfc_fillTypeDescription(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "pyrfc/_cyrfc.pyx":2097
 *         fieldDesc.ucOffset = field_desc['uc_offset']
 *         fieldDesc.decimals = field_desc['decimals']
 *         if field_desc['type_description'] is not None:             # <<<<<<<<<<<<<<
 *             fieldDesc.typeDescHandle = fillTypeDescription(field_desc['type_description'])
 *         else:
 */
      goto __pyx_L7;
    }

    /* "pyrfc/_cyrfc.pyx":2100
 *             fieldDesc.typeDescHandle = fillTypeDescription(field_desc['type_description'])
 *         else:
 *             fieldDesc.typeDescHandle = NULL             # <<<<<<<<<<<<<<
 *         fieldDesc.extendedDescription = NULL
 *         rc = RfcAddTypeField(typeDesc, &fieldDesc, &errorInfo)
 */
    /*else*/ {
      __pyx_v_fieldDesc.typeDescHandle = NULL;
    }
    __pyx_L7:;

    /* "pyrfc/_cyrfc.pyx":2101
 *         else:
 *             fieldDesc.typeDescHandle = NULL
 *         fieldDesc.extendedDescription = NULL             # <<<<<<<<<<<<<<
 *         rc = RfcAddTypeField(typeDesc, &fieldDesc, &errorInfo)
 *         if rc != RFC_OK:
 */
    __pyx_v_fieldDesc.extendedDescription = NULL;

    /* "pyrfc/_cyrfc.pyx":2102
 *             fieldDesc.typeDescHandle = NULL
 *         fieldDesc.extendedDescription = NULL
 *         rc = RfcAddTypeField(typeDesc, &fieldDesc, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             RfcDestroyTypeDesc(typeDesc, NULL)
 */
    __pyx_v_rc = RfcAddTypeField(__pyx_v_typeDesc, (&__pyx_v_fieldDesc), (&__pyx_v_errorInfo));

    /* "pyrfc/_cyrfc.pyx":2103
 *         fieldDesc.extendedDescription = NULL
 *         rc = RfcAddTypeField(typeDesc, &fieldDesc, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             RfcDestroyTypeDesc(typeDesc, NULL)
 *             raise wrapError(&errorInfo)
 */
    __pyx_t_13 = ((__pyx_v_rc != RFC_OK) != 0);
    if (unlikely(__pyx_t_13)) {

      /* "pyrfc/_cyrfc.pyx":2104
 *         rc = RfcAddTypeField(typeDesc, &fieldDesc, &errorInfo)
 *         if rc != RFC_OK:
 *             RfcDestroyTypeDesc(typeDesc, NULL)             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 * 
 */
      (void)(RfcDestroyTypeDesc(__pyx_v_typeDesc, NULL));

      /* "pyrfc/_cyrfc.pyx":2105
 *         if rc != RFC_OK:
 *             RfcDestroyTypeDesc(typeDesc, NULL)
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *     return typeDesc
 */
      __pyx_t_10 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2105, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __PYX_ERR(0, 2105, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":2103
 *         fieldDesc.extendedDescription = NULL
 *         rc = RfcAddTypeField(typeDesc, &fieldDesc, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             RfcDestroyTypeDesc(typeDesc, NULL)
 *             raise wrapError(&errorInfo)
 */
    }

    /* "pyrfc/_cyrfc.pyx":2086
 *         raise wrapError(&errorInfo)
 * 
 *     for field_desc in type_desc.fields:             # <<<<<<<<<<<<<<
 *         # Set name
 *         sapuc = fillString(field_desc['name'])
 */
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyrfc/_cyrfc.pyx":2107
 *             raise wrapError(&errorInfo)
 * 
 *     return typeDesc             # <<<<<<<<<<<<<<
 * 
 * cdef RFC_FUNCTION_DESC_HANDLE fillFunctionDescription(func_desc):
 */
  __pyx_r = __pyx_v_typeDesc;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":2064
 * 
 * 
 * cdef RFC_TYPE_DESC_HANDLE fillTypeDescription(type_desc):             # <<<<<<<<<<<<<<
 *     """
 *     :param type_desc: object of class TypeDescription
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_WriteUnraisable("pyrfc._cyrfc.fillTypeDescription", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_field_desc);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2109
 *     return typeDesc
 * 
 * cdef RFC_FUNCTION_DESC_HANDLE fillFunctionDescription(func_desc):             # <<<<<<<<<<<<<<
 *     """
 *     :param func_desc: object of class FunctionDescription
 */

static RFC_FUNCTION_DESC_HANDLE __pyx_f_5pyrfc_6_cyrfc_fillFunctionDescription(PyObject *__pyx_v_func_desc) {
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_FUNCTION_DESC_HANDLE __pyx_v_funcDesc;
  RFC_PARAMETER_DESC __pyx_v_paramDesc;
  SAP_UC *__pyx_v_sapuc;
  PyObject *__pyx_v_param_desc = NULL;
  RFC_RC __pyx_v_rc;
  RFC_FUNCTION_DESC_HANDLE __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  SAP_UC *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  RFCTYPE __pyx_t_10;
  RFC_DIRECTION __pyx_t_11;
  unsigned int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fillFunctionDescription", 0);

  /* "pyrfc/_cyrfc.pyx":2120
 * 
 *     # Set name
 *     sapuc = fillString(func_desc.name)             # <<<<<<<<<<<<<<
 *     funcDesc = RfcCreateFunctionDesc(sapuc, &errorInfo)
 *     free(sapuc)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_func_desc, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_2 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2120, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_sapuc = __pyx_t_2;

  /* "pyrfc/_cyrfc.pyx":2121
 *     # Set name
 *     sapuc = fillString(func_desc.name)
 *     funcDesc = RfcCreateFunctionDesc(sapuc, &errorInfo)             # <<<<<<<<<<<<<<
 *     free(sapuc)
 *     if funcDesc == NULL:
 */
  __pyx_v_funcDesc = RfcCreateFunctionDesc(__pyx_v_sapuc, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":2122
 *     sapuc = fillString(func_desc.name)
 *     funcDesc = RfcCreateFunctionDesc(sapuc, &errorInfo)
 *     free(sapuc)             # <<<<<<<<<<<<<<
 *     if funcDesc == NULL:
 *         raise wrapError(&errorInfo)
 */
  free(__pyx_v_sapuc);

  /* "pyrfc/_cyrfc.pyx":2123
 *     funcDesc = RfcCreateFunctionDesc(sapuc, &errorInfo)
 *     free(sapuc)
 *     if funcDesc == NULL:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 * 
 */
  __pyx_t_3 = ((__pyx_v_funcDesc == NULL) != 0);
  if (unlikely(__pyx_t_3)) {

    /* "pyrfc/_cyrfc.pyx":2124
 *     free(sapuc)
 *     if funcDesc == NULL:
 *         raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *     for param_desc in func_desc.parameters:
 */
    __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2124, __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, 2124, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2123
 *     funcDesc = RfcCreateFunctionDesc(sapuc, &errorInfo)
 *     free(sapuc)
 *     if funcDesc == NULL:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":2126
 *         raise wrapError(&errorInfo)
 * 
 *     for param_desc in func_desc.parameters:             # <<<<<<<<<<<<<<
 *         sapuc = fillString(param_desc['name'])
 *         strncpyU(paramDesc.name, sapuc, len(param_desc['name']) + 1)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_func_desc, __pyx_n_s_parameters); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2126, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2126, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2126, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2126, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2126, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2126, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2126, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_param_desc, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":2127
 * 
 *     for param_desc in func_desc.parameters:
 *         sapuc = fillString(param_desc['name'])             # <<<<<<<<<<<<<<
 *         strncpyU(paramDesc.name, sapuc, len(param_desc['name']) + 1)
 *         free(sapuc)
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_2 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2127, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_sapuc = __pyx_t_2;

    /* "pyrfc/_cyrfc.pyx":2128
 *     for param_desc in func_desc.parameters:
 *         sapuc = fillString(param_desc['name'])
 *         strncpyU(paramDesc.name, sapuc, len(param_desc['name']) + 1)             # <<<<<<<<<<<<<<
 *         free(sapuc)
 *         paramDesc.type = RfcFieldType[param_desc['parameter_type']].value
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2128, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    strncpyU(__pyx_v_paramDesc.name, __pyx_v_sapuc, (__pyx_t_7 + 1));

    /* "pyrfc/_cyrfc.pyx":2129
 *         sapuc = fillString(param_desc['name'])
 *         strncpyU(paramDesc.name, sapuc, len(param_desc['name']) + 1)
 *         free(sapuc)             # <<<<<<<<<<<<<<
 *         paramDesc.type = RfcFieldType[param_desc['parameter_type']].value
 *         paramDesc.direction = RfcParameterDirection[param_desc['direction']].value
 */
    free(__pyx_v_sapuc);

    /* "pyrfc/_cyrfc.pyx":2130
 *         strncpyU(paramDesc.name, sapuc, len(param_desc['name']) + 1)
 *         free(sapuc)
 *         paramDesc.type = RfcFieldType[param_desc['parameter_type']].value             # <<<<<<<<<<<<<<
 *         paramDesc.direction = RfcParameterDirection[param_desc['direction']].value
 *         paramDesc.nucLength = param_desc['nuc_length']
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_RfcFieldType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_parameter_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_10 = ((RFCTYPE)__Pyx_PyInt_As_RFCTYPE(__pyx_t_8)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2130, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_paramDesc.type = __pyx_t_10;

    /* "pyrfc/_cyrfc.pyx":2131
 *         free(sapuc)
 *         paramDesc.type = RfcFieldType[param_desc['parameter_type']].value
 *         paramDesc.direction = RfcParameterDirection[param_desc['direction']].value             # <<<<<<<<<<<<<<
 *         paramDesc.nucLength = param_desc['nuc_length']
 *         paramDesc.ucLength = param_desc['uc_length']
 */
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_RfcParameterDirection); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_direction); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_11 = ((RFC_DIRECTION)__Pyx_PyInt_As_RFC_DIRECTION(__pyx_t_9)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2131, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_v_paramDesc.direction = __pyx_t_11;

    /* "pyrfc/_cyrfc.pyx":2132
 *         paramDesc.type = RfcFieldType[param_desc['parameter_type']].value
 *         paramDesc.direction = RfcParameterDirection[param_desc['direction']].value
 *         paramDesc.nucLength = param_desc['nuc_length']             # <<<<<<<<<<<<<<
 *         paramDesc.ucLength = param_desc['uc_length']
 *         paramDesc.decimals = param_desc['decimals']
 */
    __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_nuc_length); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2132, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_v_paramDesc.nucLength = __pyx_t_12;

    /* "pyrfc/_cyrfc.pyx":2133
 *         paramDesc.direction = RfcParameterDirection[param_desc['direction']].value
 *         paramDesc.nucLength = param_desc['nuc_length']
 *         paramDesc.ucLength = param_desc['uc_length']             # <<<<<<<<<<<<<<
 *         paramDesc.decimals = param_desc['decimals']
 *         # defaultValue
 */
    __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_uc_length); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2133, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_v_paramDesc.ucLength = __pyx_t_12;

    /* "pyrfc/_cyrfc.pyx":2134
 *         paramDesc.nucLength = param_desc['nuc_length']
 *         paramDesc.ucLength = param_desc['uc_length']
 *         paramDesc.decimals = param_desc['decimals']             # <<<<<<<<<<<<<<
 *         # defaultValue
 *         sapuc = fillString(param_desc['default_value'])
 */
    __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_decimals); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2134, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_v_paramDesc.decimals = __pyx_t_12;

    /* "pyrfc/_cyrfc.pyx":2136
 *         paramDesc.decimals = param_desc['decimals']
 *         # defaultValue
 *         sapuc = fillString(param_desc['default_value'])             # <<<<<<<<<<<<<<
 *         strncpyU(paramDesc.defaultValue, sapuc, len(param_desc['default_value']) + 1)
 *         free(sapuc)
 */
    __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_default_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_9); if (unlikely(__pyx_t_2 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2136, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_v_sapuc = __pyx_t_2;

    /* "pyrfc/_cyrfc.pyx":2137
 *         # defaultValue
 *         sapuc = fillString(param_desc['default_value'])
 *         strncpyU(paramDesc.defaultValue, sapuc, len(param_desc['default_value']) + 1)             # <<<<<<<<<<<<<<
 *         free(sapuc)
 *         # parameterText
 */
    __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_default_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_7 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2137, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    strncpyU(__pyx_v_paramDesc.defaultValue, __pyx_v_sapuc, (__pyx_t_7 + 1));

    /* "pyrfc/_cyrfc.pyx":2138
 *         sapuc = fillString(param_desc['default_value'])
 *         strncpyU(paramDesc.defaultValue, sapuc, len(param_desc['default_value']) + 1)
 *         free(sapuc)             # <<<<<<<<<<<<<<
 *         # parameterText
 *         sapuc = fillString(param_desc['parameter_text'])
 */
    free(__pyx_v_sapuc);

    /* "pyrfc/_cyrfc.pyx":2140
 *         free(sapuc)
 *         # parameterText
 *         sapuc = fillString(param_desc['parameter_text'])             # <<<<<<<<<<<<<<
 *         strncpyU(paramDesc.parameterText, sapuc, len(param_desc['parameter_text']) + 1)
 *         free(sapuc)
 */
    __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_parameter_text); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_9); if (unlikely(__pyx_t_2 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2140, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_v_sapuc = __pyx_t_2;

    /* "pyrfc/_cyrfc.pyx":2141
 *         # parameterText
 *         sapuc = fillString(param_desc['parameter_text'])
 *         strncpyU(paramDesc.parameterText, sapuc, len(param_desc['parameter_text']) + 1)             # <<<<<<<<<<<<<<
 *         free(sapuc)
 *         paramDesc.optional = <bint> param_desc['optional']
 */
    __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_parameter_text); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_7 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2141, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    strncpyU(__pyx_v_paramDesc.parameterText, __pyx_v_sapuc, (__pyx_t_7 + 1));

    /* "pyrfc/_cyrfc.pyx":2142
 *         sapuc = fillString(param_desc['parameter_text'])
 *         strncpyU(paramDesc.parameterText, sapuc, len(param_desc['parameter_text']) + 1)
 *         free(sapuc)             # <<<<<<<<<<<<<<
 *         paramDesc.optional = <bint> param_desc['optional']
 *         if param_desc['type_description'] is not None:
 */
    free(__pyx_v_sapuc);

    /* "pyrfc/_cyrfc.pyx":2143
 *         strncpyU(paramDesc.parameterText, sapuc, len(param_desc['parameter_text']) + 1)
 *         free(sapuc)
 *         paramDesc.optional = <bint> param_desc['optional']             # <<<<<<<<<<<<<<
 *         if param_desc['type_description'] is not None:
 *             paramDesc.typeDescHandle = fillTypeDescription(param_desc['type_description'])
 */
    __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_optional); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2143, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_v_paramDesc.optional = __pyx_t_3;

    /* "pyrfc/_cyrfc.pyx":2144
 *         free(sapuc)
 *         paramDesc.optional = <bint> param_desc['optional']
 *         if param_desc['type_description'] is not None:             # <<<<<<<<<<<<<<
 *             paramDesc.typeDescHandle = fillTypeDescription(param_desc['type_description'])
 *         else:
 */
    __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_type_description); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_3 = (__pyx_t_9 != Py_None);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_13 = (__pyx_t_3 != 0);
    if (__pyx_t_13) {

      /* "pyrfc/_cyrfc.pyx":2145
 *         paramDesc.optional = <bint> param_desc['optional']
 *         if param_desc['type_description'] is not None:
 *             paramDesc.typeDescHandle = fillTypeDescription(param_desc['type_description'])             # <<<<<<<<<<<<<<
 *         else:
 *             paramDesc.typeDescHandle = NULL
 */
      __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_type_description); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_v_paramDesc.typeDescHandle = __pyx_f_5pyrfc_6_cyrfc_fillTypeDescription(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "pyrfc/_cyrfc.pyx":2144
 *         free(sapuc)
 *         paramDesc.optional = <bint> param_desc['optional']
 *         if param_desc['type_description'] is not None:             # <<<<<<<<<<<<<<
 *             paramDesc.typeDescHandle = fillTypeDescription(param_desc['type_description'])
 *         else:
 */
      goto __pyx_L6;
    }

    /* "pyrfc/_cyrfc.pyx":2147
 *             paramDesc.typeDescHandle = fillTypeDescription(param_desc['type_description'])
 *         else:
 *             paramDesc.typeDescHandle = NULL             # <<<<<<<<<<<<<<
 *         paramDesc.extendedDescription = NULL
 *         rc = RfcAddParameter(funcDesc, &paramDesc, &errorInfo)
 */
    /*else*/ {
      __pyx_v_paramDesc.typeDescHandle = NULL;
    }
    __pyx_L6:;

    /* "pyrfc/_cyrfc.pyx":2148
 *         else:
 *             paramDesc.typeDescHandle = NULL
 *         paramDesc.extendedDescription = NULL             # <<<<<<<<<<<<<<
 *         rc = RfcAddParameter(funcDesc, &paramDesc, &errorInfo)
 *         if rc != RFC_OK:
 */
    __pyx_v_paramDesc.extendedDescription = NULL;

    /* "pyrfc/_cyrfc.pyx":2149
 *             paramDesc.typeDescHandle = NULL
 *         paramDesc.extendedDescription = NULL
 *         rc = RfcAddParameter(funcDesc, &paramDesc, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             RfcDestroyFunctionDesc(funcDesc, NULL)
 */
    __pyx_v_rc = RfcAddParameter(__pyx_v_funcDesc, (&__pyx_v_paramDesc), (&__pyx_v_errorInfo));

    /* "pyrfc/_cyrfc.pyx":2150
 *         paramDesc.extendedDescription = NULL
 *         rc = RfcAddParameter(funcDesc, &paramDesc, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             RfcDestroyFunctionDesc(funcDesc, NULL)
 *             raise wrapError(&errorInfo)
 */
    __pyx_t_13 = ((__pyx_v_rc != RFC_OK) != 0);
    if (unlikely(__pyx_t_13)) {

      /* "pyrfc/_cyrfc.pyx":2151
 *         rc = RfcAddParameter(funcDesc, &paramDesc, &errorInfo)
 *         if rc != RFC_OK:
 *             RfcDestroyFunctionDesc(funcDesc, NULL)             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 * 
 */
      (void)(RfcDestroyFunctionDesc(__pyx_v_funcDesc, NULL));

      /* "pyrfc/_cyrfc.pyx":2152
 *         if rc != RFC_OK:
 *             RfcDestroyFunctionDesc(funcDesc, NULL)
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *     return funcDesc
 */
      __pyx_t_9 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(0, 2152, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":2150
 *         paramDesc.extendedDescription = NULL
 *         rc = RfcAddParameter(funcDesc, &paramDesc, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             RfcDestroyFunctionDesc(funcDesc, NULL)
 *             raise wrapError(&errorInfo)
 */
    }

    /* "pyrfc/_cyrfc.pyx":2126
 *         raise wrapError(&errorInfo)
 * 
 *     for param_desc in func_desc.parameters:             # <<<<<<<<<<<<<<
 *         sapuc = fillString(param_desc['name'])
 *         strncpyU(paramDesc.name, sapuc, len(param_desc['name']) + 1)
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":2154
 *             raise wrapError(&errorInfo)
 * 
 *     return funcDesc             # <<<<<<<<<<<<<<
 * 
 * cdef RFC_UNIT_IDENTIFIER fillUnitIdentifier(unit) except *:
 */
  __pyx_r = __pyx_v_funcDesc;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":2109
 *     return typeDesc
 * 
 * cdef RFC_FUNCTION_DESC_HANDLE fillFunctionDescription(func_desc):             # <<<<<<<<<<<<<<
 *     """
 *     :param func_desc: object of class FunctionDescription
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_WriteUnraisable("pyrfc._cyrfc.fillFunctionDescription", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_param_desc);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2156
 *     return funcDesc
 * 
 * cdef RFC_UNIT_IDENTIFIER fillUnitIdentifier(unit) except *:             # <<<<<<<<<<<<<<
 *     cdef RFC_UNIT_IDENTIFIER uIdentifier
 *     cdef SAP_UC* sapuc
 */

static RFC_UNIT_IDENTIFIER __pyx_f_5pyrfc_6_cyrfc_fillUnitIdentifier(PyObject *__pyx_v_unit) {
  RFC_UNIT_IDENTIFIER __pyx_v_uIdentifier;
  SAP_UC *__pyx_v_sapuc;
  RFC_UNIT_IDENTIFIER __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  SAP_UC *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_UCS4 __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fillUnitIdentifier", 0);

  /* "pyrfc/_cyrfc.pyx":2159
 *     cdef RFC_UNIT_IDENTIFIER uIdentifier
 *     cdef SAP_UC* sapuc
 *     uIdentifier.unitType = fillString("Q" if unit['queued'] else "T")[0]             # <<<<<<<<<<<<<<
 *     if len(unit['id']) != RFC_UNITID_LN:
 *         raise RFCError(f"Invalid length of unit['id'] (should be {RFC_UNITID_LN}, but found {len(unit['id'])}).")
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit, __pyx_n_u_queued); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2159, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
    __Pyx_INCREF(__pyx_n_u_Q);
    __pyx_t_1 = __pyx_n_u_Q;
  } else {
    __Pyx_INCREF(__pyx_n_u_T);
    __pyx_t_1 = __pyx_n_u_T;
  }
  __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2159, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_uIdentifier.unitType = (__pyx_t_4[0]);

  /* "pyrfc/_cyrfc.pyx":2160
 *     cdef SAP_UC* sapuc
 *     uIdentifier.unitType = fillString("Q" if unit['queued'] else "T")[0]
 *     if len(unit['id']) != RFC_UNITID_LN:             # <<<<<<<<<<<<<<
 *         raise RFCError(f"Invalid length of unit['id'] (should be {RFC_UNITID_LN}, but found {len(unit['id'])}).")
 *     sapuc = fillString(unit['id'])
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit, __pyx_n_u_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2160, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((__pyx_t_5 != RFC_UNITID_LN) != 0);
  if (unlikely(__pyx_t_3)) {

    /* "pyrfc/_cyrfc.pyx":2161
 *     uIdentifier.unitType = fillString("Q" if unit['queued'] else "T")[0]
 *     if len(unit['id']) != RFC_UNITID_LN:
 *         raise RFCError(f"Invalid length of unit['id'] (should be {RFC_UNITID_LN}, but found {len(unit['id'])}).")             # <<<<<<<<<<<<<<
 *     sapuc = fillString(unit['id'])
 *     strncpyU(uIdentifier.unitID, sapuc, RFC_UNITID_LN + 1)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = 0;
    __pyx_t_7 = 127;
    __Pyx_INCREF(__pyx_kp_u_Invalid_length_of_unit_id_should);
    __pyx_t_5 += 40;
    __Pyx_GIVEREF(__pyx_kp_u_Invalid_length_of_unit_id_should);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_Invalid_length_of_unit_id_should);
    __pyx_t_8 = __Pyx_PyUnicode_From_int(RFC_UNITID_LN, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_8);
    __pyx_t_8 = 0;
    __Pyx_INCREF(__pyx_kp_u_but_found);
    __pyx_t_5 += 12;
    __Pyx_GIVEREF(__pyx_kp_u_but_found);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_but_found);
    __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit, __pyx_n_u_id); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2161, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_9, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_8);
    __pyx_t_8 = 0;
    __Pyx_INCREF(__pyx_kp_u__29);
    __pyx_t_5 += 2;
    __Pyx_GIVEREF(__pyx_kp_u__29);
    PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u__29);
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2161, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2160
 *     cdef SAP_UC* sapuc
 *     uIdentifier.unitType = fillString("Q" if unit['queued'] else "T")[0]
 *     if len(unit['id']) != RFC_UNITID_LN:             # <<<<<<<<<<<<<<
 *         raise RFCError(f"Invalid length of unit['id'] (should be {RFC_UNITID_LN}, but found {len(unit['id'])}).")
 *     sapuc = fillString(unit['id'])
 */
  }

  /* "pyrfc/_cyrfc.pyx":2162
 *     if len(unit['id']) != RFC_UNITID_LN:
 *         raise RFCError(f"Invalid length of unit['id'] (should be {RFC_UNITID_LN}, but found {len(unit['id'])}).")
 *     sapuc = fillString(unit['id'])             # <<<<<<<<<<<<<<
 *     strncpyU(uIdentifier.unitID, sapuc, RFC_UNITID_LN + 1)
 *     free(sapuc)
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit, __pyx_n_u_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_sapuc = __pyx_t_4;

  /* "pyrfc/_cyrfc.pyx":2163
 *         raise RFCError(f"Invalid length of unit['id'] (should be {RFC_UNITID_LN}, but found {len(unit['id'])}).")
 *     sapuc = fillString(unit['id'])
 *     strncpyU(uIdentifier.unitID, sapuc, RFC_UNITID_LN + 1)             # <<<<<<<<<<<<<<
 *     free(sapuc)
 *     return uIdentifier
 */
  strncpyU(__pyx_v_uIdentifier.unitID, __pyx_v_sapuc, (RFC_UNITID_LN + 1));

  /* "pyrfc/_cyrfc.pyx":2164
 *     sapuc = fillString(unit['id'])
 *     strncpyU(uIdentifier.unitID, sapuc, RFC_UNITID_LN + 1)
 *     free(sapuc)             # <<<<<<<<<<<<<<
 *     return uIdentifier
 * 
 */
  free(__pyx_v_sapuc);

  /* "pyrfc/_cyrfc.pyx":2165
 *     strncpyU(uIdentifier.unitID, sapuc, RFC_UNITID_LN + 1)
 *     free(sapuc)
 *     return uIdentifier             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_uIdentifier;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":2156
 *     return funcDesc
 * 
 * cdef RFC_UNIT_IDENTIFIER fillUnitIdentifier(unit) except *:             # <<<<<<<<<<<<<<
 *     cdef RFC_UNIT_IDENTIFIER uIdentifier
 *     cdef SAP_UC* sapuc
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrfc._cyrfc.fillUnitIdentifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2178
 *     cdef _connections
 * 
 *     def __init__(self, connections = None):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         self._throughput_handle = NULL
 */

/* Python wrapper */
static int __pyx_pw_5pyrfc_6_cyrfc_10Throughput_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5pyrfc_6_cyrfc_10Throughput_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_connections = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_connections,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_connections);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2178, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_connections = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2178, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.Throughput.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput___init__(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self), __pyx_v_connections);

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

static int __pyx_pf_5pyrfc_6_cyrfc_10Throughput___init__(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self, PyObject *__pyx_v_connections) {
  RFC_ERROR_INFO __pyx_v_errorInfo;
  PyObject *__pyx_v_conn = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_connections);

  /* "pyrfc/_cyrfc.pyx":2180
 *     def __init__(self, connections = None):
 *         cdef RFC_ERROR_INFO errorInfo
 *         self._throughput_handle = NULL             # <<<<<<<<<<<<<<
 *         self._connections = set()
 *         self._throughput_handle = RfcCreateThroughput(&errorInfo)
 */
  __pyx_v_self->_throughput_handle = NULL;

  /* "pyrfc/_cyrfc.pyx":2181
 *         cdef RFC_ERROR_INFO errorInfo
 *         self._throughput_handle = NULL
 *         self._connections = set()             # <<<<<<<<<<<<<<
 *         self._throughput_handle = RfcCreateThroughput(&errorInfo)
 *         if errorInfo.code != RFC_OK:
 */
  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_connections);
  __Pyx_DECREF(__pyx_v_self->_connections);
  __pyx_v_self->_connections = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2182
 *         self._throughput_handle = NULL
 *         self._connections = set()
 *         self._throughput_handle = RfcCreateThroughput(&errorInfo)             # <<<<<<<<<<<<<<
 *         if errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
  __pyx_v_self->_throughput_handle = RfcCreateThroughput((&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":2183
 *         self._connections = set()
 *         self._throughput_handle = RfcCreateThroughput(&errorInfo)
 *         if errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         Throughput._registry.append(self)
 */
  __pyx_t_2 = ((__pyx_v_errorInfo.code != RFC_OK) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":2184
 *         self._throughput_handle = RfcCreateThroughput(&errorInfo)
 *         if errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         Throughput._registry.append(self)
 *         connections = connections or []
 */
    __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2184, __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, 2184, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2183
 *         self._connections = set()
 *         self._throughput_handle = RfcCreateThroughput(&errorInfo)
 *         if errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         Throughput._registry.append(self)
 */
  }

  /* "pyrfc/_cyrfc.pyx":2185
 *         if errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         Throughput._registry.append(self)             # <<<<<<<<<<<<<<
 *         connections = connections or []
 *         if type(connections) is not list:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Throughput), __pyx_n_s_registry); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Append(__pyx_t_1, ((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 2185, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2186
 *             raise wrapError(&errorInfo)
 *         Throughput._registry.append(self)
 *         connections = connections or []             # <<<<<<<<<<<<<<
 *         if type(connections) is not list:
 *             connections = [connections]
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_connections); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2186, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __Pyx_INCREF(__pyx_v_connections);
    __pyx_t_1 = __pyx_v_connections;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_1 = __pyx_t_4;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_connections, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2187
 *         Throughput._registry.append(self)
 *         connections = connections or []
 *         if type(connections) is not list:             # <<<<<<<<<<<<<<
 *             connections = [connections]
 *         for conn in connections:
 */
  __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_connections)) != ((PyObject *)(&PyList_Type)));
  __pyx_t_5 = (__pyx_t_2 != 0);
  if (__pyx_t_5) {

    /* "pyrfc/_cyrfc.pyx":2188
 *         connections = connections or []
 *         if type(connections) is not list:
 *             connections = [connections]             # <<<<<<<<<<<<<<
 *         for conn in connections:
 *             if not isinstance(conn, Connection):
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_connections);
    __Pyx_GIVEREF(__pyx_v_connections);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_connections);
    __Pyx_DECREF_SET(__pyx_v_connections, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":2187
 *         Throughput._registry.append(self)
 *         connections = connections or []
 *         if type(connections) is not list:             # <<<<<<<<<<<<<<
 *             connections = [connections]
 *         for conn in connections:
 */
  }

  /* "pyrfc/_cyrfc.pyx":2189
 *         if type(connections) is not list:
 *             connections = [connections]
 *         for conn in connections:             # <<<<<<<<<<<<<<
 *             if not isinstance(conn, Connection):
 *                 raise TypeError('Connection object required, received', conn, 'of type', type(conn))
 */
  if (likely(PyList_CheckExact(__pyx_v_connections)) || PyTuple_CheckExact(__pyx_v_connections)) {
    __pyx_t_1 = __pyx_v_connections; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_connections); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2189, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2189, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2189, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2189, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2189, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_7(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2189, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_conn, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrfc/_cyrfc.pyx":2190
 *             connections = [connections]
 *         for conn in connections:
 *             if not isinstance(conn, Connection):             # <<<<<<<<<<<<<<
 *                 raise TypeError('Connection object required, received', conn, 'of type', type(conn))
 *             self.setOnConnection(conn)
 */
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_conn, __pyx_ptype_5pyrfc_6_cyrfc_Connection); 
    __pyx_t_2 = ((!(__pyx_t_5 != 0)) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "pyrfc/_cyrfc.pyx":2191
 *         for conn in connections:
 *             if not isinstance(conn, Connection):
 *                 raise TypeError('Connection object required, received', conn, 'of type', type(conn))             # <<<<<<<<<<<<<<
 *             self.setOnConnection(conn)
 * 
 */
      __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2191, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_kp_u_Connection_object_required_recei);
      __Pyx_GIVEREF(__pyx_kp_u_Connection_object_required_recei);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Connection_object_required_recei);
      __Pyx_INCREF(__pyx_v_conn);
      __Pyx_GIVEREF(__pyx_v_conn);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_conn);
      __Pyx_INCREF(__pyx_kp_u_of_type);
      __Pyx_GIVEREF(__pyx_kp_u_of_type);
      PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_of_type);
      __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_conn)));
      __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_conn)));
      PyTuple_SET_ITEM(__pyx_t_4, 3, ((PyObject *)Py_TYPE(__pyx_v_conn)));
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2191, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(0, 2191, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":2190
 *             connections = [connections]
 *         for conn in connections:
 *             if not isinstance(conn, Connection):             # <<<<<<<<<<<<<<
 *                 raise TypeError('Connection object required, received', conn, 'of type', type(conn))
 *             self.setOnConnection(conn)
 */
    }

    /* "pyrfc/_cyrfc.pyx":2192
 *             if not isinstance(conn, Connection):
 *                 raise TypeError('Connection object required, received', conn, 'of type', type(conn))
 *             self.setOnConnection(conn)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setOnConnection); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_9, __pyx_v_conn) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_conn);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrfc/_cyrfc.pyx":2189
 *         if type(connections) is not list:
 *             connections = [connections]
 *         for conn in connections:             # <<<<<<<<<<<<<<
 *             if not isinstance(conn, Connection):
 *                 raise TypeError('Connection object required, received', conn, 'of type', type(conn))
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2178
 *     cdef _connections
 * 
 *     def __init__(self, connections = None):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         self._throughput_handle = NULL
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrfc._cyrfc.Throughput.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_conn);
  __Pyx_XDECREF(__pyx_v_connections);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2195
 * 
 *     @property
 *     def connections(self):             # <<<<<<<<<<<<<<
 *         """Get connections attached to throughput monitoring
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_11connections_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_11connections_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput_11connections___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self));

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

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

  /* "pyrfc/_cyrfc.pyx":2201
 *         :type: set of Connection
 *         """
 *         return self._connections             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_connections);
  __pyx_r = __pyx_v_self->_connections;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":2195
 * 
 *     @property
 *     def connections(self):             # <<<<<<<<<<<<<<
 *         """Get connections attached to throughput monitoring
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":2204
 * 
 *     @property
 *     def _handle(self):             # <<<<<<<<<<<<<<
 *         """Get throughput object handle
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_7_handle_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_7_handle_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput_7_handle___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_7_handle___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__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);

  /* "pyrfc/_cyrfc.pyx":2210
 *         :type: uintptr_t
 *         """
 *         return <uintptr_t>self._throughput_handle             # <<<<<<<<<<<<<<
 * 
 *     def setOnConnection(self, Connection connection):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_self->_throughput_handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":2204
 * 
 *     @property
 *     def _handle(self):             # <<<<<<<<<<<<<<
 *         """Get throughput object handle
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":2212
 *         return <uintptr_t>self._throughput_handle
 * 
 *     def setOnConnection(self, Connection connection):             # <<<<<<<<<<<<<<
 *         """Attaches a throughput object to a connection to be monitored by the throughput object.
 *         Once attached to a connection, the throughput object collects the data statistics of
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_3setOnConnection(PyObject *__pyx_v_self, PyObject *__pyx_v_connection); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Throughput_2setOnConnection[] = "Attaches a throughput object to a connection to be monitored by the throughput object.\n        Once attached to a connection, the throughput object collects the data statistics of\n        function calls invoked via this connection.\n\n        For more info search for the ``RfcSetThroughputOnConnection`` method in\n        `SAP NetWeaver RFC SDK Doxygen Documentation <https://support.sap.com/en/product/connectors/nwrfcsdk.html>`_\n\n        :param connection: Connection instance to be attached to throughput monitoring\n        :type connection: Connection\n\n        :return: nothing, raises an error\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_3setOnConnection(PyObject *__pyx_v_self, PyObject *__pyx_v_connection) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setOnConnection (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_connection), __pyx_ptype_5pyrfc_6_cyrfc_Connection, 1, "connection", 0))) __PYX_ERR(0, 2212, __pyx_L1_error)
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput_2setOnConnection(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self), ((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_connection));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_2setOnConnection(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self, struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_connection) {
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_RC __pyx_v_rc;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setOnConnection", 0);

  /* "pyrfc/_cyrfc.pyx":2226
 *         """
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc = RfcSetThroughputOnConnection(connection._handle, self._throughput_handle, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
  __pyx_v_rc = RfcSetThroughputOnConnection(__pyx_v_connection->_handle, __pyx_v_self->_throughput_handle, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":2227
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc = RfcSetThroughputOnConnection(connection._handle, self._throughput_handle, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         self._connections.add(connection)
 */
  __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":2228
 *         cdef RFC_RC rc = RfcSetThroughputOnConnection(connection._handle, self._throughput_handle, &errorInfo)
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         self._connections.add(connection)
 * 
 */
    __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2228, __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, 2228, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2227
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc = RfcSetThroughputOnConnection(connection._handle, self._throughput_handle, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         self._connections.add(connection)
 */
  }

  /* "pyrfc/_cyrfc.pyx":2229
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         self._connections.add(connection)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_connections, __pyx_n_s_add); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_connection)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_connection));
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2212
 *         return <uintptr_t>self._throughput_handle
 * 
 *     def setOnConnection(self, Connection connection):             # <<<<<<<<<<<<<<
 *         """Attaches a throughput object to a connection to be monitored by the throughput object.
 *         Once attached to a connection, the throughput object collects the data statistics of
 */

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

/* "pyrfc/_cyrfc.pyx":2232
 * 
 *     @staticmethod
 *     def getFromConnection(Connection connection):             # <<<<<<<<<<<<<<
 *         """Returns the currently attached throughput object from a connection, if any.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_5getFromConnection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Throughput_4getFromConnection[] = "Returns the currently attached throughput object from a connection, if any.\n\n        For more info search for the ``RfcGetThroughputFromConnection`` method in\n        `SAP NetWeaver RFC SDK Doxygen Documentation <https://support.sap.com/en/product/connectors/nwrfcsdk.html>`_\n\n        :param connection: Connection instance\n        :type connection: Connection\n\n        :returns: Throughput object the connection is attached to, if any\n        :rtype: Throughput\n\n        :raises: :exc:`~pyrfc.RFCError` or a subclass in case of error\n        ";
static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Throughput_5getFromConnection = {"getFromConnection", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_5getFromConnection, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Throughput_4getFromConnection};
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_5getFromConnection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_connection = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getFromConnection (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_connection,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_connection)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getFromConnection") < 0)) __PYX_ERR(0, 2232, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_connection = ((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getFromConnection", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2232, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.Throughput.getFromConnection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_connection), __pyx_ptype_5pyrfc_6_cyrfc_Connection, 1, "connection", 0))) __PYX_ERR(0, 2232, __pyx_L1_error)
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput_4getFromConnection(__pyx_v_connection);

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_4getFromConnection(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_connection) {
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_THROUGHPUT_HANDLE __pyx_v_throughput;
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getFromConnection", 0);

  /* "pyrfc/_cyrfc.pyx":2247
 *         """
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_THROUGHPUT_HANDLE throughput = RfcGetThroughputFromConnection(connection._handle, &errorInfo)             # <<<<<<<<<<<<<<
 *         if errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
  __pyx_v_throughput = RfcGetThroughputFromConnection(__pyx_v_connection->_handle, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":2248
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_THROUGHPUT_HANDLE throughput = RfcGetThroughputFromConnection(connection._handle, &errorInfo)
 *         if errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         for t in Throughput._registry:
 */
  __pyx_t_1 = ((__pyx_v_errorInfo.code != RFC_OK) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":2249
 *         cdef RFC_THROUGHPUT_HANDLE throughput = RfcGetThroughputFromConnection(connection._handle, &errorInfo)
 *         if errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         for t in Throughput._registry:
 *             if t._handle == <uintptr_t>throughput:
 */
    __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2249, __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, 2249, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2248
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_THROUGHPUT_HANDLE throughput = RfcGetThroughputFromConnection(connection._handle, &errorInfo)
 *         if errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         for t in Throughput._registry:
 */
  }

  /* "pyrfc/_cyrfc.pyx":2250
 *         if errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         for t in Throughput._registry:             # <<<<<<<<<<<<<<
 *             if t._handle == <uintptr_t>throughput:
 *                 return t
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Throughput), __pyx_n_s_registry); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2250, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2250, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2250, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2250, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2250, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2250, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyrfc/_cyrfc.pyx":2251
 *             raise wrapError(&errorInfo)
 *         for t in Throughput._registry:
 *             if t._handle == <uintptr_t>throughput:             # <<<<<<<<<<<<<<
 *                 return t
 *         return None
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_handle_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_throughput)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2251, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2251, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_1) {

      /* "pyrfc/_cyrfc.pyx":2252
 *         for t in Throughput._registry:
 *             if t._handle == <uintptr_t>throughput:
 *                 return t             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_t);
      __pyx_r = __pyx_v_t;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyrfc/_cyrfc.pyx":2251
 *             raise wrapError(&errorInfo)
 *         for t in Throughput._registry:
 *             if t._handle == <uintptr_t>throughput:             # <<<<<<<<<<<<<<
 *                 return t
 *         return None
 */
    }

    /* "pyrfc/_cyrfc.pyx":2250
 *         if errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         for t in Throughput._registry:             # <<<<<<<<<<<<<<
 *             if t._handle == <uintptr_t>throughput:
 *                 return t
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":2253
 *             if t._handle == <uintptr_t>throughput:
 *                 return t
 *         return None             # <<<<<<<<<<<<<<
 * 
 *     def removeFromConnection(self, Connection connection):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":2232
 * 
 *     @staticmethod
 *     def getFromConnection(Connection connection):             # <<<<<<<<<<<<<<
 *         """Returns the currently attached throughput object from a connection, if any.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrfc._cyrfc.Throughput.getFromConnection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2255
 *         return None
 * 
 *     def removeFromConnection(self, Connection connection):             # <<<<<<<<<<<<<<
 *         """Removes the throughput object from a connection.
 *         The connection will no longer be monitored.
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_7removeFromConnection(PyObject *__pyx_v_self, PyObject *__pyx_v_connection); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Throughput_6removeFromConnection[] = "Removes the throughput object from a connection.\n        The connection will no longer be monitored.\n\n        :param connection: Connection instance\n        :type connection: Connection\n        :returns: Nothing\n        :raises: :exc:`~pyrfc.RFCError` or a subclass in case of error\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_7removeFromConnection(PyObject *__pyx_v_self, PyObject *__pyx_v_connection) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("removeFromConnection (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_connection), __pyx_ptype_5pyrfc_6_cyrfc_Connection, 1, "connection", 0))) __PYX_ERR(0, 2255, __pyx_L1_error)
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput_6removeFromConnection(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self), ((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_connection));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_6removeFromConnection(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self, struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_connection) {
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_RC __pyx_v_rc;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("removeFromConnection", 0);

  /* "pyrfc/_cyrfc.pyx":2265
 *         """
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc = RfcRemoveThroughputFromConnection(connection._handle, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
  __pyx_v_rc = RfcRemoveThroughputFromConnection(__pyx_v_connection->_handle, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":2266
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc = RfcRemoveThroughputFromConnection(connection._handle, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         self._connections.remove(connection)
 */
  __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":2267
 *         cdef RFC_RC rc = RfcRemoveThroughputFromConnection(connection._handle, &errorInfo)
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         self._connections.remove(connection)
 * 
 */
    __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2267, __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, 2267, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2266
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc = RfcRemoveThroughputFromConnection(connection._handle, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         self._connections.remove(connection)
 */
  }

  /* "pyrfc/_cyrfc.pyx":2268
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         self._connections.remove(connection)             # <<<<<<<<<<<<<<
 * 
 *     def reset(self):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_connections, __pyx_n_s_remove); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_connection)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_connection));
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2255
 *         return None
 * 
 *     def removeFromConnection(self, Connection connection):             # <<<<<<<<<<<<<<
 *         """Removes the throughput object from a connection.
 *         The connection will no longer be monitored.
 */

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

/* "pyrfc/_cyrfc.pyx":2270
 *         self._connections.remove(connection)
 * 
 *     def reset(self):             # <<<<<<<<<<<<<<
 *         """Resets the data so far collected and aggregated by the throughput object.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_6_cyrfc_10Throughput_8reset[] = "Resets the data so far collected and aggregated by the throughput object.\n\n        :returns: Nothing\n        :raises: :exc:`~pyrfc.RFCError` or a subclass in case of error\n        ";
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput_8reset(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_8reset(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self) {
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_RC __pyx_v_rc;
  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("reset", 0);

  /* "pyrfc/_cyrfc.pyx":2277
 *         """
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc = RfcResetThroughput(self._throughput_handle, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
  __pyx_v_rc = RfcResetThroughput(__pyx_v_self->_throughput_handle, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":2278
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc = RfcResetThroughput(self._throughput_handle, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 * 
 */
  __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":2279
 *         cdef RFC_RC rc = RfcResetThroughput(self._throughput_handle, &errorInfo)
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *     cdef _destroy(self):
 */
    __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2279, __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, 2279, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2278
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc = RfcResetThroughput(self._throughput_handle, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":2270
 *         self._connections.remove(connection)
 * 
 *     def reset(self):             # <<<<<<<<<<<<<<
 *         """Resets the data so far collected and aggregated by the throughput object.
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":2281
 *             raise wrapError(&errorInfo)
 * 
 *     cdef _destroy(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_10Throughput__destroy(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self) {
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_RC __pyx_v_rc;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_destroy", 0);

  /* "pyrfc/_cyrfc.pyx":2284
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc
 *         self._registry.clear()             # <<<<<<<<<<<<<<
 *         self._connections = None
 *         if self._throughput_handle != NULL:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_registry); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_clear); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2285
 *         cdef RFC_RC rc
 *         self._registry.clear()
 *         self._connections = None             # <<<<<<<<<<<<<<
 *         if self._throughput_handle != NULL:
 *             rc = RfcDestroyThroughput(self._throughput_handle, &errorInfo)
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_connections);
  __Pyx_DECREF(__pyx_v_self->_connections);
  __pyx_v_self->_connections = Py_None;

  /* "pyrfc/_cyrfc.pyx":2286
 *         self._registry.clear()
 *         self._connections = None
 *         if self._throughput_handle != NULL:             # <<<<<<<<<<<<<<
 *             rc = RfcDestroyThroughput(self._throughput_handle, &errorInfo)
 *             self._throughput_handle = NULL
 */
  __pyx_t_4 = ((__pyx_v_self->_throughput_handle != NULL) != 0);
  if (__pyx_t_4) {

    /* "pyrfc/_cyrfc.pyx":2287
 *         self._connections = None
 *         if self._throughput_handle != NULL:
 *             rc = RfcDestroyThroughput(self._throughput_handle, &errorInfo)             # <<<<<<<<<<<<<<
 *             self._throughput_handle = NULL
 *             if rc != RFC_OK:
 */
    __pyx_v_rc = RfcDestroyThroughput(__pyx_v_self->_throughput_handle, (&__pyx_v_errorInfo));

    /* "pyrfc/_cyrfc.pyx":2288
 *         if self._throughput_handle != NULL:
 *             rc = RfcDestroyThroughput(self._throughput_handle, &errorInfo)
 *             self._throughput_handle = NULL             # <<<<<<<<<<<<<<
 *             if rc != RFC_OK:
 *                 # is ok
 */
    __pyx_v_self->_throughput_handle = NULL;

    /* "pyrfc/_cyrfc.pyx":2289
 *             rc = RfcDestroyThroughput(self._throughput_handle, &errorInfo)
 *             self._throughput_handle = NULL
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 # is ok
 *                 pass
 */
    __pyx_t_4 = ((__pyx_v_rc != RFC_OK) != 0);
    if (__pyx_t_4) {
    }

    /* "pyrfc/_cyrfc.pyx":2286
 *         self._registry.clear()
 *         self._connections = None
 *         if self._throughput_handle != NULL:             # <<<<<<<<<<<<<<
 *             rc = RfcDestroyThroughput(self._throughput_handle, &errorInfo)
 *             self._throughput_handle = NULL
 */
  }

  /* "pyrfc/_cyrfc.pyx":2281
 *             raise wrapError(&errorInfo)
 * 
 *     cdef _destroy(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrfc._cyrfc.Throughput._destroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2293
 *                 pass
 * 
 *     def __del__(self):             # <<<<<<<<<<<<<<
 *         self.destroy()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_11__del__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_11__del__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput_10__del__(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_10__del__(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);

  /* "pyrfc/_cyrfc.pyx":2294
 * 
 *     def __del__(self):
 *         self.destroy()             # <<<<<<<<<<<<<<
 * 
 *     def __exit__(self, type, value, traceback):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_destroy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2293
 *                 pass
 * 
 *     def __del__(self):             # <<<<<<<<<<<<<<
 *         self.destroy()
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":2296
 *         self.destroy()
 * 
 *     def __exit__(self, type, value, traceback):             # <<<<<<<<<<<<<<
 *         self._destroy()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_13__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_13__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_type = 0;
  CYTHON_UNUSED PyObject *__pyx_v_value = 0;
  CYTHON_UNUSED PyObject *__pyx_v_traceback = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_type,&__pyx_n_s_value,&__pyx_n_s_traceback,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); __PYX_ERR(0, 2296, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traceback)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); __PYX_ERR(0, 2296, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) __PYX_ERR(0, 2296, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_type = values[0];
    __pyx_v_value = values[1];
    __pyx_v_traceback = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2296, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.Throughput.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput_12__exit__(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self), __pyx_v_type, __pyx_v_value, __pyx_v_traceback);

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_12__exit__(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_type, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_traceback) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__exit__", 0);

  /* "pyrfc/_cyrfc.pyx":2297
 * 
 *     def __exit__(self, type, value, traceback):
 *         self._destroy()             # <<<<<<<<<<<<<<
 * 
 *     def __enter__(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self->__pyx_vtab)->_destroy(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2296
 *         self.destroy()
 * 
 *     def __exit__(self, type, value, traceback):             # <<<<<<<<<<<<<<
 *         self._destroy()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrfc._cyrfc.Throughput.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2299
 *         self._destroy()
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_15__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_15__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput_14__enter__(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_14__enter__(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__enter__", 0);

  /* "pyrfc/_cyrfc.pyx":2300
 * 
 *     def __enter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":2299
 *         self._destroy()
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "pyrfc/_cyrfc.pyx":2303
 * 
 *     @property
 *     def stats(self):             # <<<<<<<<<<<<<<
 *         """Get throughput monitor statistics
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_5stats_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_5stats_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput_5stats___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_5stats___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self) {
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_RC __pyx_v_rc;
  SAP_ULLONG __pyx_v_numberOfCalls;
  SAP_ULLONG __pyx_v_sentBytes;
  SAP_ULLONG __pyx_v_receivedBytes;
  SAP_ULLONG __pyx_v_applicationTime;
  SAP_ULLONG __pyx_v_totalTime;
  SAP_ULLONG __pyx_v_serializationTime;
  SAP_ULLONG __pyx_v_deserializationTime;
  PyObject *__pyx_v__stats = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrfc/_cyrfc.pyx":2327
 *         cdef SAP_ULLONG deserializationTime
 * 
 *         _stats = {}             # <<<<<<<<<<<<<<
 * 
 *         if self._throughput_handle == NULL:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__stats = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2329
 *         _stats = {}
 * 
 *         if self._throughput_handle == NULL:             # <<<<<<<<<<<<<<
 *             raise RFCError('No connections assigned')
 * 
 */
  __pyx_t_2 = ((__pyx_v_self->_throughput_handle == NULL) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":2330
 * 
 *         if self._throughput_handle == NULL:
 *             raise RFCError('No connections assigned')             # <<<<<<<<<<<<<<
 * 
 *         rc = RfcGetNumberOfCalls (self._throughput_handle, &numberOfCalls, &errorInfo)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_No_connections_assigned) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_No_connections_assigned);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2330, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2329
 *         _stats = {}
 * 
 *         if self._throughput_handle == NULL:             # <<<<<<<<<<<<<<
 *             raise RFCError('No connections assigned')
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":2332
 *             raise RFCError('No connections assigned')
 * 
 *         rc = RfcGetNumberOfCalls (self._throughput_handle, &numberOfCalls, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
  __pyx_v_rc = RfcGetNumberOfCalls(__pyx_v_self->_throughput_handle, (&__pyx_v_numberOfCalls), (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":2333
 * 
 *         rc = RfcGetNumberOfCalls (self._throughput_handle, &numberOfCalls, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         _stats['numberOfCalls'] = numberOfCalls
 */
  __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":2334
 *         rc = RfcGetNumberOfCalls (self._throughput_handle, &numberOfCalls, &errorInfo)
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         _stats['numberOfCalls'] = numberOfCalls
 * 
 */
    __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2334, __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, 2334, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2333
 * 
 *         rc = RfcGetNumberOfCalls (self._throughput_handle, &numberOfCalls, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         _stats['numberOfCalls'] = numberOfCalls
 */
  }

  /* "pyrfc/_cyrfc.pyx":2335
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         _stats['numberOfCalls'] = numberOfCalls             # <<<<<<<<<<<<<<
 * 
 *         rc = RfcGetSentBytes (self._throughput_handle, &sentBytes, &errorInfo)
 */
  __pyx_t_1 = __Pyx_PyInt_From_SAP_ULLONG(__pyx_v_numberOfCalls); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyDict_SetItem(__pyx_v__stats, __pyx_n_u_numberOfCalls, __pyx_t_1) < 0)) __PYX_ERR(0, 2335, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2337
 *         _stats['numberOfCalls'] = numberOfCalls
 * 
 *         rc = RfcGetSentBytes (self._throughput_handle, &sentBytes, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
  __pyx_v_rc = RfcGetSentBytes(__pyx_v_self->_throughput_handle, (&__pyx_v_sentBytes), (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":2338
 * 
 *         rc = RfcGetSentBytes (self._throughput_handle, &sentBytes, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         _stats['sentBytes'] = sentBytes
 */
  __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":2339
 *         rc = RfcGetSentBytes (self._throughput_handle, &sentBytes, &errorInfo)
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         _stats['sentBytes'] = sentBytes
 * 
 */
    __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2339, __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, 2339, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2338
 * 
 *         rc = RfcGetSentBytes (self._throughput_handle, &sentBytes, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         _stats['sentBytes'] = sentBytes
 */
  }

  /* "pyrfc/_cyrfc.pyx":2340
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         _stats['sentBytes'] = sentBytes             # <<<<<<<<<<<<<<
 * 
 *         rc = RfcGetReceivedBytes (self._throughput_handle, &receivedBytes, &errorInfo)
 */
  __pyx_t_1 = __Pyx_PyInt_From_SAP_ULLONG(__pyx_v_sentBytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyDict_SetItem(__pyx_v__stats, __pyx_n_u_sentBytes, __pyx_t_1) < 0)) __PYX_ERR(0, 2340, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2342
 *         _stats['sentBytes'] = sentBytes
 * 
 *         rc = RfcGetReceivedBytes (self._throughput_handle, &receivedBytes, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
  __pyx_v_rc = RfcGetReceivedBytes(__pyx_v_self->_throughput_handle, (&__pyx_v_receivedBytes), (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":2343
 * 
 *         rc = RfcGetReceivedBytes (self._throughput_handle, &receivedBytes, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         _stats['receivedBytes'] = receivedBytes
 */
  __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":2344
 *         rc = RfcGetReceivedBytes (self._throughput_handle, &receivedBytes, &errorInfo)
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         _stats['receivedBytes'] = receivedBytes
 * 
 */
    __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2344, __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, 2344, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2343
 * 
 *         rc = RfcGetReceivedBytes (self._throughput_handle, &receivedBytes, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         _stats['receivedBytes'] = receivedBytes
 */
  }

  /* "pyrfc/_cyrfc.pyx":2345
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         _stats['receivedBytes'] = receivedBytes             # <<<<<<<<<<<<<<
 * 
 *         rc = RfcGetApplicationTime (self._throughput_handle, &applicationTime, &errorInfo)
 */
  __pyx_t_1 = __Pyx_PyInt_From_SAP_ULLONG(__pyx_v_receivedBytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyDict_SetItem(__pyx_v__stats, __pyx_n_u_receivedBytes, __pyx_t_1) < 0)) __PYX_ERR(0, 2345, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2347
 *         _stats['receivedBytes'] = receivedBytes
 * 
 *         rc = RfcGetApplicationTime (self._throughput_handle, &applicationTime, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
  __pyx_v_rc = RfcGetApplicationTime(__pyx_v_self->_throughput_handle, (&__pyx_v_applicationTime), (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":2348
 * 
 *         rc = RfcGetApplicationTime (self._throughput_handle, &applicationTime, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         _stats['applicationTime'] = applicationTime
 */
  __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":2349
 *         rc = RfcGetApplicationTime (self._throughput_handle, &applicationTime, &errorInfo)
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         _stats['applicationTime'] = applicationTime
 * 
 */
    __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2349, __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, 2349, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2348
 * 
 *         rc = RfcGetApplicationTime (self._throughput_handle, &applicationTime, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         _stats['applicationTime'] = applicationTime
 */
  }

  /* "pyrfc/_cyrfc.pyx":2350
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         _stats['applicationTime'] = applicationTime             # <<<<<<<<<<<<<<
 * 
 *         rc = RfcGetTotalTime (self._throughput_handle, &totalTime, &errorInfo)
 */
  __pyx_t_1 = __Pyx_PyInt_From_SAP_ULLONG(__pyx_v_applicationTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyDict_SetItem(__pyx_v__stats, __pyx_n_u_applicationTime, __pyx_t_1) < 0)) __PYX_ERR(0, 2350, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2352
 *         _stats['applicationTime'] = applicationTime
 * 
 *         rc = RfcGetTotalTime (self._throughput_handle, &totalTime, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
  __pyx_v_rc = RfcGetTotalTime(__pyx_v_self->_throughput_handle, (&__pyx_v_totalTime), (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":2353
 * 
 *         rc = RfcGetTotalTime (self._throughput_handle, &totalTime, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         _stats['totalTime'] = totalTime
 */
  __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":2354
 *         rc = RfcGetTotalTime (self._throughput_handle, &totalTime, &errorInfo)
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         _stats['totalTime'] = totalTime
 * 
 */
    __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2354, __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, 2354, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2353
 * 
 *         rc = RfcGetTotalTime (self._throughput_handle, &totalTime, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         _stats['totalTime'] = totalTime
 */
  }

  /* "pyrfc/_cyrfc.pyx":2355
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         _stats['totalTime'] = totalTime             # <<<<<<<<<<<<<<
 * 
 *         rc = RfcGetSerializationTime (self._throughput_handle, &serializationTime, &errorInfo)
 */
  __pyx_t_1 = __Pyx_PyInt_From_SAP_ULLONG(__pyx_v_totalTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyDict_SetItem(__pyx_v__stats, __pyx_n_u_totalTime, __pyx_t_1) < 0)) __PYX_ERR(0, 2355, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2357
 *         _stats['totalTime'] = totalTime
 * 
 *         rc = RfcGetSerializationTime (self._throughput_handle, &serializationTime, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
  __pyx_v_rc = RfcGetSerializationTime(__pyx_v_self->_throughput_handle, (&__pyx_v_serializationTime), (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":2358
 * 
 *         rc = RfcGetSerializationTime (self._throughput_handle, &serializationTime, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         _stats['serializationTime'] = serializationTime
 */
  __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":2359
 *         rc = RfcGetSerializationTime (self._throughput_handle, &serializationTime, &errorInfo)
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         _stats['serializationTime'] = serializationTime
 * 
 */
    __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2359, __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, 2359, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2358
 * 
 *         rc = RfcGetSerializationTime (self._throughput_handle, &serializationTime, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         _stats['serializationTime'] = serializationTime
 */
  }

  /* "pyrfc/_cyrfc.pyx":2360
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         _stats['serializationTime'] = serializationTime             # <<<<<<<<<<<<<<
 * 
 *         rc = RfcGetDeserializationTime (self._throughput_handle, &deserializationTime, &errorInfo)
 */
  __pyx_t_1 = __Pyx_PyInt_From_SAP_ULLONG(__pyx_v_serializationTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyDict_SetItem(__pyx_v__stats, __pyx_n_u_serializationTime, __pyx_t_1) < 0)) __PYX_ERR(0, 2360, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2362
 *         _stats['serializationTime'] = serializationTime
 * 
 *         rc = RfcGetDeserializationTime (self._throughput_handle, &deserializationTime, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
  __pyx_v_rc = RfcGetDeserializationTime(__pyx_v_self->_throughput_handle, (&__pyx_v_deserializationTime), (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":2363
 * 
 *         rc = RfcGetDeserializationTime (self._throughput_handle, &deserializationTime, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         _stats['deserializationTime'] = deserializationTime
 */
  __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":2364
 *         rc = RfcGetDeserializationTime (self._throughput_handle, &deserializationTime, &errorInfo)
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         _stats['deserializationTime'] = deserializationTime
 * 
 */
    __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2364, __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, 2364, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2363
 * 
 *         rc = RfcGetDeserializationTime (self._throughput_handle, &deserializationTime, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         _stats['deserializationTime'] = deserializationTime
 */
  }

  /* "pyrfc/_cyrfc.pyx":2365
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         _stats['deserializationTime'] = deserializationTime             # <<<<<<<<<<<<<<
 * 
 *         return _stats
 */
  __pyx_t_1 = __Pyx_PyInt_From_SAP_ULLONG(__pyx_v_deserializationTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyDict_SetItem(__pyx_v__stats, __pyx_n_u_deserializationTime, __pyx_t_1) < 0)) __PYX_ERR(0, 2365, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2367
 *         _stats['deserializationTime'] = deserializationTime
 * 
 *         return _stats             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v__stats);
  __pyx_r = __pyx_v__stats;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":2303
 * 
 *     @property
 *     def stats(self):             # <<<<<<<<<<<<<<
 *         """Get throughput monitor statistics
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyrfc._cyrfc.Throughput.stats.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__stats);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput_16__reduce_cython__(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self));

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

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

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self._throughput_handle cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._throughput_handle cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrfc._cyrfc.Throughput.__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._throughput_handle cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self._throughput_handle cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput_18__setstate_cython__(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

  /* "(tree fragment)":4
 *     raise TypeError("self._throughput_handle cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._throughput_handle cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

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

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

/* "pyrfc/_cyrfc.pyx":2374
 * ################################################################################
 * 
 * cdef fillFunctionParameter(RFC_FUNCTION_DESC_HANDLE funcDesc, RFC_FUNCTION_HANDLE container, name, value):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_fillFunctionParameter(RFC_FUNCTION_DESC_HANDLE __pyx_v_funcDesc, RFC_FUNCTION_HANDLE __pyx_v_container, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_PARAMETER_DESC __pyx_v_paramDesc;
  SAP_UC *__pyx_v_cName;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SAP_UC *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fillFunctionParameter", 0);

  /* "pyrfc/_cyrfc.pyx":2378
 *     cdef RFC_ERROR_INFO errorInfo
 *     cdef RFC_PARAMETER_DESC paramDesc
 *     cName = fillString(name)             # <<<<<<<<<<<<<<
 *     rc = RfcGetParameterDescByName(funcDesc, cName, &paramDesc, &errorInfo)
 *     free(cName)
 */
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_name); if (unlikely(__pyx_t_1 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2378, __pyx_L1_error)
  __pyx_v_cName = __pyx_t_1;

  /* "pyrfc/_cyrfc.pyx":2379
 *     cdef RFC_PARAMETER_DESC paramDesc
 *     cName = fillString(name)
 *     rc = RfcGetParameterDescByName(funcDesc, cName, &paramDesc, &errorInfo)             # <<<<<<<<<<<<<<
 *     free(cName)
 *     if rc != RFC_OK:
 */
  __pyx_v_rc = RfcGetParameterDescByName(__pyx_v_funcDesc, __pyx_v_cName, (&__pyx_v_paramDesc), (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":2380
 *     cName = fillString(name)
 *     rc = RfcGetParameterDescByName(funcDesc, cName, &paramDesc, &errorInfo)
 *     free(cName)             # <<<<<<<<<<<<<<
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 */
  free(__pyx_v_cName);

  /* "pyrfc/_cyrfc.pyx":2381
 *     rc = RfcGetParameterDescByName(funcDesc, cName, &paramDesc, &errorInfo)
 *     free(cName)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     fillVariable(paramDesc.type, container, paramDesc.name, value, paramDesc.typeDescHandle)
 */
  __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":2382
 *     free(cName)
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *     fillVariable(paramDesc.type, container, paramDesc.name, value, paramDesc.typeDescHandle)
 * 
 */
    __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2382, __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, 2382, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2381
 *     rc = RfcGetParameterDescByName(funcDesc, cName, &paramDesc, &errorInfo)
 *     free(cName)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     fillVariable(paramDesc.type, container, paramDesc.name, value, paramDesc.typeDescHandle)
 */
  }

  /* "pyrfc/_cyrfc.pyx":2383
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 *     fillVariable(paramDesc.type, container, paramDesc.name, value, paramDesc.typeDescHandle)             # <<<<<<<<<<<<<<
 * 
 * cdef fillStructureField(RFC_TYPE_DESC_HANDLE typeDesc, RFC_STRUCTURE_HANDLE container, name, value):
 */
  __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_fillVariable(__pyx_v_paramDesc.type, __pyx_v_container, __pyx_v_paramDesc.name, __pyx_v_value, __pyx_v_paramDesc.typeDescHandle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":2374
 * ################################################################################
 * 
 * cdef fillFunctionParameter(RFC_FUNCTION_DESC_HANDLE funcDesc, RFC_FUNCTION_HANDLE container, name, value):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrfc._cyrfc.fillFunctionParameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2385
 *     fillVariable(paramDesc.type, container, paramDesc.name, value, paramDesc.typeDescHandle)
 * 
 * cdef fillStructureField(RFC_TYPE_DESC_HANDLE typeDesc, RFC_STRUCTURE_HANDLE container, name, value):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_fillStructureField(RFC_TYPE_DESC_HANDLE __pyx_v_typeDesc, RFC_STRUCTURE_HANDLE __pyx_v_container, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_FIELD_DESC __pyx_v_fieldDesc;
  SAP_UC *__pyx_v_cName;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SAP_UC *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fillStructureField", 0);

  /* "pyrfc/_cyrfc.pyx":2389
 *     cdef RFC_ERROR_INFO errorInfo
 *     cdef RFC_FIELD_DESC fieldDesc
 *     cdef SAP_UC* cName = fillString(name)             # <<<<<<<<<<<<<<
 *     rc = RfcGetFieldDescByName(typeDesc, cName, &fieldDesc, &errorInfo)
 *     free(cName)
 */
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_name); if (unlikely(__pyx_t_1 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2389, __pyx_L1_error)
  __pyx_v_cName = __pyx_t_1;

  /* "pyrfc/_cyrfc.pyx":2390
 *     cdef RFC_FIELD_DESC fieldDesc
 *     cdef SAP_UC* cName = fillString(name)
 *     rc = RfcGetFieldDescByName(typeDesc, cName, &fieldDesc, &errorInfo)             # <<<<<<<<<<<<<<
 *     free(cName)
 *     if rc != RFC_OK:
 */
  __pyx_v_rc = RfcGetFieldDescByName(__pyx_v_typeDesc, __pyx_v_cName, (&__pyx_v_fieldDesc), (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":2391
 *     cdef SAP_UC* cName = fillString(name)
 *     rc = RfcGetFieldDescByName(typeDesc, cName, &fieldDesc, &errorInfo)
 *     free(cName)             # <<<<<<<<<<<<<<
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 */
  free(__pyx_v_cName);

  /* "pyrfc/_cyrfc.pyx":2392
 *     rc = RfcGetFieldDescByName(typeDesc, cName, &fieldDesc, &errorInfo)
 *     free(cName)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     fillVariable(fieldDesc.type, container, fieldDesc.name, value, fieldDesc.typeDescHandle)
 */
  __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":2393
 *     free(cName)
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *     fillVariable(fieldDesc.type, container, fieldDesc.name, value, fieldDesc.typeDescHandle)
 * 
 */
    __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2393, __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, 2393, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2392
 *     rc = RfcGetFieldDescByName(typeDesc, cName, &fieldDesc, &errorInfo)
 *     free(cName)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     fillVariable(fieldDesc.type, container, fieldDesc.name, value, fieldDesc.typeDescHandle)
 */
  }

  /* "pyrfc/_cyrfc.pyx":2394
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 *     fillVariable(fieldDesc.type, container, fieldDesc.name, value, fieldDesc.typeDescHandle)             # <<<<<<<<<<<<<<
 * 
 * cdef fillTable(RFC_TYPE_DESC_HANDLE typeDesc, RFC_TABLE_HANDLE container, lines):
 */
  __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_fillVariable(__pyx_v_fieldDesc.type, __pyx_v_container, __pyx_v_fieldDesc.name, __pyx_v_value, __pyx_v_fieldDesc.typeDescHandle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":2385
 *     fillVariable(paramDesc.type, container, paramDesc.name, value, paramDesc.typeDescHandle)
 * 
 * cdef fillStructureField(RFC_TYPE_DESC_HANDLE typeDesc, RFC_STRUCTURE_HANDLE container, name, value):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrfc._cyrfc.fillStructureField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2396
 *     fillVariable(fieldDesc.type, container, fieldDesc.name, value, fieldDesc.typeDescHandle)
 * 
 * cdef fillTable(RFC_TYPE_DESC_HANDLE typeDesc, RFC_TABLE_HANDLE container, lines):             # <<<<<<<<<<<<<<
 *     cdef RFC_ERROR_INFO errorInfo
 *     cdef RFC_STRUCTURE_HANDLE lineHandle
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_fillTable(RFC_TYPE_DESC_HANDLE __pyx_v_typeDesc, RFC_TABLE_HANDLE __pyx_v_container, PyObject *__pyx_v_lines) {
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_STRUCTURE_HANDLE __pyx_v_lineHandle;
  unsigned int __pyx_v_rowCount;
  unsigned int __pyx_v_i;
  PyObject *__pyx_v_line = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fillTable", 0);

  /* "pyrfc/_cyrfc.pyx":2399
 *     cdef RFC_ERROR_INFO errorInfo
 *     cdef RFC_STRUCTURE_HANDLE lineHandle
 *     cdef unsigned int rowCount = int(len(lines))             # <<<<<<<<<<<<<<
 *     cdef unsigned int i = 0
 *     while i < rowCount:
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_lines); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2399, __pyx_L1_error)
  __pyx_v_rowCount = ((unsigned int)__pyx_t_1);

  /* "pyrfc/_cyrfc.pyx":2400
 *     cdef RFC_STRUCTURE_HANDLE lineHandle
 *     cdef unsigned int rowCount = int(len(lines))
 *     cdef unsigned int i = 0             # <<<<<<<<<<<<<<
 *     while i < rowCount:
 *         lineHandle = RfcAppendNewRow(container, &errorInfo)
 */
  __pyx_v_i = 0;

  /* "pyrfc/_cyrfc.pyx":2401
 *     cdef unsigned int rowCount = int(len(lines))
 *     cdef unsigned int i = 0
 *     while i < rowCount:             # <<<<<<<<<<<<<<
 *         lineHandle = RfcAppendNewRow(container, &errorInfo)
 *         if not lineHandle:
 */
  while (1) {
    __pyx_t_2 = ((__pyx_v_i < __pyx_v_rowCount) != 0);
    if (!__pyx_t_2) break;

    /* "pyrfc/_cyrfc.pyx":2402
 *     cdef unsigned int i = 0
 *     while i < rowCount:
 *         lineHandle = RfcAppendNewRow(container, &errorInfo)             # <<<<<<<<<<<<<<
 *         if not lineHandle:
 *             raise wrapError(&errorInfo)
 */
    __pyx_v_lineHandle = RfcAppendNewRow(__pyx_v_container, (&__pyx_v_errorInfo));

    /* "pyrfc/_cyrfc.pyx":2403
 *     while i < rowCount:
 *         lineHandle = RfcAppendNewRow(container, &errorInfo)
 *         if not lineHandle:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         line = lines[i]
 */
    __pyx_t_2 = ((!(__pyx_v_lineHandle != 0)) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "pyrfc/_cyrfc.pyx":2404
 *         lineHandle = RfcAppendNewRow(container, &errorInfo)
 *         if not lineHandle:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         line = lines[i]
 *         if type(line) is dict:
 */
      __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2404, __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, 2404, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":2403
 *     while i < rowCount:
 *         lineHandle = RfcAppendNewRow(container, &errorInfo)
 *         if not lineHandle:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         line = lines[i]
 */
    }

    /* "pyrfc/_cyrfc.pyx":2405
 *         if not lineHandle:
 *             raise wrapError(&errorInfo)
 *         line = lines[i]             # <<<<<<<<<<<<<<
 *         if type(line) is dict:
 *             for name, value in line.iteritems():
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_lines, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":2406
 *             raise wrapError(&errorInfo)
 *         line = lines[i]
 *         if type(line) is dict:             # <<<<<<<<<<<<<<
 *             for name, value in line.iteritems():
 *                 fillStructureField(typeDesc, lineHandle, name, value)
 */
    __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_line)) == ((PyObject *)(&PyDict_Type)));
    __pyx_t_4 = (__pyx_t_2 != 0);
    if (__pyx_t_4) {

      /* "pyrfc/_cyrfc.pyx":2407
 *         line = lines[i]
 *         if type(line) is dict:
 *             for name, value in line.iteritems():             # <<<<<<<<<<<<<<
 *                 fillStructureField(typeDesc, lineHandle, name, value)
 *         else:
 */
      __pyx_t_1 = 0;
      if (unlikely(__pyx_v_line == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems");
        __PYX_ERR(0, 2407, __pyx_L1_error)
      }
      __pyx_t_7 = __Pyx_dict_iterator(__pyx_v_line, 0, __pyx_n_s_iteritems, (&__pyx_t_5), (&__pyx_t_6)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2407, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_3);
      __pyx_t_3 = __pyx_t_7;
      __pyx_t_7 = 0;
      while (1) {
        __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_5, &__pyx_t_1, &__pyx_t_7, &__pyx_t_8, NULL, __pyx_t_6);
        if (unlikely(__pyx_t_9 == 0)) break;
        if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 2407, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_7);
        __pyx_t_7 = 0;
        __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "pyrfc/_cyrfc.pyx":2408
 *         if type(line) is dict:
 *             for name, value in line.iteritems():
 *                 fillStructureField(typeDesc, lineHandle, name, value)             # <<<<<<<<<<<<<<
 *         else:
 *             fillStructureField(typeDesc, lineHandle, '', line)
 */
        __pyx_t_8 = __pyx_f_5pyrfc_6_cyrfc_fillStructureField(__pyx_v_typeDesc, __pyx_v_lineHandle, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2408, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyrfc/_cyrfc.pyx":2406
 *             raise wrapError(&errorInfo)
 *         line = lines[i]
 *         if type(line) is dict:             # <<<<<<<<<<<<<<
 *             for name, value in line.iteritems():
 *                 fillStructureField(typeDesc, lineHandle, name, value)
 */
      goto __pyx_L6;
    }

    /* "pyrfc/_cyrfc.pyx":2410
 *                 fillStructureField(typeDesc, lineHandle, name, value)
 *         else:
 *             fillStructureField(typeDesc, lineHandle, '', line)             # <<<<<<<<<<<<<<
 *         i += 1
 * 
 */
    /*else*/ {
      __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_fillStructureField(__pyx_v_typeDesc, __pyx_v_lineHandle, __pyx_kp_u__5, __pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2410, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_L6:;

    /* "pyrfc/_cyrfc.pyx":2411
 *         else:
 *             fillStructureField(typeDesc, lineHandle, '', line)
 *         i += 1             # <<<<<<<<<<<<<<
 * 
 * cdef fillVariable(RFCTYPE typ, RFC_FUNCTION_HANDLE container, SAP_UC* cName, value, RFC_TYPE_DESC_HANDLE typeDesc):
 */
    __pyx_v_i = (__pyx_v_i + 1);
  }

  /* "pyrfc/_cyrfc.pyx":2396
 *     fillVariable(fieldDesc.type, container, fieldDesc.name, value, fieldDesc.typeDescHandle)
 * 
 * cdef fillTable(RFC_TYPE_DESC_HANDLE typeDesc, RFC_TABLE_HANDLE container, lines):             # <<<<<<<<<<<<<<
 *     cdef RFC_ERROR_INFO errorInfo
 *     cdef RFC_STRUCTURE_HANDLE lineHandle
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrfc._cyrfc.fillTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2413
 *         i += 1
 * 
 * cdef fillVariable(RFCTYPE typ, RFC_FUNCTION_HANDLE container, SAP_UC* cName, value, RFC_TYPE_DESC_HANDLE typeDesc):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_fillVariable(RFCTYPE __pyx_v_typ, RFC_FUNCTION_HANDLE __pyx_v_container, SAP_UC *__pyx_v_cName, PyObject *__pyx_v_value, RFC_TYPE_DESC_HANDLE __pyx_v_typeDesc) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_STRUCTURE_HANDLE __pyx_v_struct;
  RFC_TABLE_HANDLE __pyx_v_table;
  SAP_UC *__pyx_v_cValue;
  SAP_RAW *__pyx_v_bValue;
  PyObject *__pyx_v_name = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_ex = NULL;
  PyObject *__pyx_v_svalue = NULL;
  PyObject *__pyx_v_locale_radix = NULL;
  int __pyx_v_format_ok;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  SAP_RAW *__pyx_t_13;
  SAP_UC *__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;
  char const *__pyx_t_20;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  int __pyx_t_27;
  PyObject *__pyx_t_28 = NULL;
  char const *__pyx_t_29;
  RFC_INT __pyx_t_30;
  RFC_INT8 __pyx_t_31;
  Py_UCS4 __pyx_t_32;
  PyObject *__pyx_t_33 = NULL;
  char const *__pyx_t_34;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fillVariable", 0);
  __Pyx_INCREF(__pyx_v_value);

  /* "pyrfc/_cyrfc.pyx":2422
 *     global _LOCALE_RADIX
 *     # print ("fill", wrapString(cName), value, type(value))
 *     try:             # <<<<<<<<<<<<<<
 *         if typ == RFCTYPE_STRUCTURE:
 *             if type(value) is not dict:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "pyrfc/_cyrfc.pyx":2423
 *     # print ("fill", wrapString(cName), value, type(value))
 *     try:
 *         if typ == RFCTYPE_STRUCTURE:             # <<<<<<<<<<<<<<
 *             if type(value) is not dict:
 *                 raise TypeError('dictionary required for structure parameter, received', str(type(value)))
 */
      switch (__pyx_v_typ) {
        case RFCTYPE_STRUCTURE:

        /* "pyrfc/_cyrfc.pyx":2424
 *     try:
 *         if typ == RFCTYPE_STRUCTURE:
 *             if type(value) is not dict:             # <<<<<<<<<<<<<<
 *                 raise TypeError('dictionary required for structure parameter, received', str(type(value)))
 *             rc = RfcGetStructure(container, cName, &struct, &errorInfo)
 */
        __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_v_value)) != ((PyObject *)(&PyDict_Type)));
        __pyx_t_5 = (__pyx_t_4 != 0);
        if (unlikely(__pyx_t_5)) {

          /* "pyrfc/_cyrfc.pyx":2425
 *         if typ == RFCTYPE_STRUCTURE:
 *             if type(value) is not dict:
 *                 raise TypeError('dictionary required for structure parameter, received', str(type(value)))             # <<<<<<<<<<<<<<
 *             rc = RfcGetStructure(container, cName, &struct, &errorInfo)
 *             if rc != RFC_OK:
 */
          __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_value))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2425, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2425, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_INCREF(__pyx_kp_u_dictionary_required_for_structur);
          __Pyx_GIVEREF(__pyx_kp_u_dictionary_required_for_structur);
          PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_dictionary_required_for_structur);
          __Pyx_GIVEREF(__pyx_t_6);
          PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
          __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2425, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_Raise(__pyx_t_6, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __PYX_ERR(0, 2425, __pyx_L3_error)

          /* "pyrfc/_cyrfc.pyx":2424
 *     try:
 *         if typ == RFCTYPE_STRUCTURE:
 *             if type(value) is not dict:             # <<<<<<<<<<<<<<
 *                 raise TypeError('dictionary required for structure parameter, received', str(type(value)))
 *             rc = RfcGetStructure(container, cName, &struct, &errorInfo)
 */
        }

        /* "pyrfc/_cyrfc.pyx":2426
 *             if type(value) is not dict:
 *                 raise TypeError('dictionary required for structure parameter, received', str(type(value)))
 *             rc = RfcGetStructure(container, cName, &struct, &errorInfo)             # <<<<<<<<<<<<<<
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)
 */
        __pyx_v_rc = RfcGetStructure(__pyx_v_container, __pyx_v_cName, (&__pyx_v_struct), (&__pyx_v_errorInfo));

        /* "pyrfc/_cyrfc.pyx":2427
 *                 raise TypeError('dictionary required for structure parameter, received', str(type(value)))
 *             rc = RfcGetStructure(container, cName, &struct, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             for name, value in value.iteritems():
 */
        __pyx_t_5 = ((__pyx_v_rc != RFC_OK) != 0);
        if (unlikely(__pyx_t_5)) {

          /* "pyrfc/_cyrfc.pyx":2428
 *             rc = RfcGetStructure(container, cName, &struct, &errorInfo)
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *             for name, value in value.iteritems():
 *                 fillStructureField(typeDesc, struct, name, value)
 */
          __pyx_t_6 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2428, __pyx_L3_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, 2428, __pyx_L3_error)

          /* "pyrfc/_cyrfc.pyx":2427
 *                 raise TypeError('dictionary required for structure parameter, received', str(type(value)))
 *             rc = RfcGetStructure(container, cName, &struct, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             for name, value in value.iteritems():
 */
        }

        /* "pyrfc/_cyrfc.pyx":2429
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)
 *             for name, value in value.iteritems():             # <<<<<<<<<<<<<<
 *                 fillStructureField(typeDesc, struct, name, value)
 *         elif typ == RFCTYPE_TABLE:
 */
        __pyx_t_8 = 0;
        if (unlikely(__pyx_v_value == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems");
          __PYX_ERR(0, 2429, __pyx_L3_error)
        }
        __pyx_t_7 = __Pyx_dict_iterator(__pyx_v_value, 0, __pyx_n_s_iteritems, (&__pyx_t_9), (&__pyx_t_10)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2429, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_6);
        __pyx_t_6 = __pyx_t_7;
        __pyx_t_7 = 0;
        while (1) {
          __pyx_t_12 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_9, &__pyx_t_8, &__pyx_t_7, &__pyx_t_11, NULL, __pyx_t_10);
          if (unlikely(__pyx_t_12 == 0)) break;
          if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 2429, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_7);
          __pyx_t_7 = 0;
          __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_11);
          __pyx_t_11 = 0;

          /* "pyrfc/_cyrfc.pyx":2430
 *                 raise wrapError(&errorInfo)
 *             for name, value in value.iteritems():
 *                 fillStructureField(typeDesc, struct, name, value)             # <<<<<<<<<<<<<<
 *         elif typ == RFCTYPE_TABLE:
 *             if type(value) is not list:
 */
          __pyx_t_11 = __pyx_f_5pyrfc_6_cyrfc_fillStructureField(__pyx_v_typeDesc, __pyx_v_struct, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2430, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "pyrfc/_cyrfc.pyx":2423
 *     # print ("fill", wrapString(cName), value, type(value))
 *     try:
 *         if typ == RFCTYPE_STRUCTURE:             # <<<<<<<<<<<<<<
 *             if type(value) is not dict:
 *                 raise TypeError('dictionary required for structure parameter, received', str(type(value)))
 */
        break;
        case RFCTYPE_TABLE:

        /* "pyrfc/_cyrfc.pyx":2432
 *                 fillStructureField(typeDesc, struct, name, value)
 *         elif typ == RFCTYPE_TABLE:
 *             if type(value) is not list:             # <<<<<<<<<<<<<<
 *                 raise TypeError('list required for table parameter, received', str(type(value)))
 *             rc = RfcGetTable(container, cName, &table, &errorInfo)
 */
        __pyx_t_5 = (((PyObject *)Py_TYPE(__pyx_v_value)) != ((PyObject *)(&PyList_Type)));
        __pyx_t_4 = (__pyx_t_5 != 0);
        if (unlikely(__pyx_t_4)) {

          /* "pyrfc/_cyrfc.pyx":2433
 *         elif typ == RFCTYPE_TABLE:
 *             if type(value) is not list:
 *                 raise TypeError('list required for table parameter, received', str(type(value)))             # <<<<<<<<<<<<<<
 *             rc = RfcGetTable(container, cName, &table, &errorInfo)
 *             if rc != RFC_OK:
 */
          __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_value))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2433, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2433, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_INCREF(__pyx_kp_u_list_required_for_table_paramete);
          __Pyx_GIVEREF(__pyx_kp_u_list_required_for_table_paramete);
          PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_kp_u_list_required_for_table_paramete);
          __Pyx_GIVEREF(__pyx_t_6);
          PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_6);
          __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2433, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_Raise(__pyx_t_6, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __PYX_ERR(0, 2433, __pyx_L3_error)

          /* "pyrfc/_cyrfc.pyx":2432
 *                 fillStructureField(typeDesc, struct, name, value)
 *         elif typ == RFCTYPE_TABLE:
 *             if type(value) is not list:             # <<<<<<<<<<<<<<
 *                 raise TypeError('list required for table parameter, received', str(type(value)))
 *             rc = RfcGetTable(container, cName, &table, &errorInfo)
 */
        }

        /* "pyrfc/_cyrfc.pyx":2434
 *             if type(value) is not list:
 *                 raise TypeError('list required for table parameter, received', str(type(value)))
 *             rc = RfcGetTable(container, cName, &table, &errorInfo)             # <<<<<<<<<<<<<<
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)
 */
        __pyx_v_rc = RfcGetTable(__pyx_v_container, __pyx_v_cName, (&__pyx_v_table), (&__pyx_v_errorInfo));

        /* "pyrfc/_cyrfc.pyx":2435
 *                 raise TypeError('list required for table parameter, received', str(type(value)))
 *             rc = RfcGetTable(container, cName, &table, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             fillTable(typeDesc, table, value)
 */
        __pyx_t_4 = ((__pyx_v_rc != RFC_OK) != 0);
        if (unlikely(__pyx_t_4)) {

          /* "pyrfc/_cyrfc.pyx":2436
 *             rc = RfcGetTable(container, cName, &table, &errorInfo)
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *             fillTable(typeDesc, table, value)
 *         elif typ == RFCTYPE_BYTE:
 */
          __pyx_t_6 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2436, __pyx_L3_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, 2436, __pyx_L3_error)

          /* "pyrfc/_cyrfc.pyx":2435
 *                 raise TypeError('list required for table parameter, received', str(type(value)))
 *             rc = RfcGetTable(container, cName, &table, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             fillTable(typeDesc, table, value)
 */
        }

        /* "pyrfc/_cyrfc.pyx":2437
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)
 *             fillTable(typeDesc, table, value)             # <<<<<<<<<<<<<<
 *         elif typ == RFCTYPE_BYTE:
 *             bValue = fillBytes(value)
 */
        __pyx_t_6 = __pyx_f_5pyrfc_6_cyrfc_fillTable(__pyx_v_typeDesc, __pyx_v_table, __pyx_v_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2437, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "pyrfc/_cyrfc.pyx":2431
 *             for name, value in value.iteritems():
 *                 fillStructureField(typeDesc, struct, name, value)
 *         elif typ == RFCTYPE_TABLE:             # <<<<<<<<<<<<<<
 *             if type(value) is not list:
 *                 raise TypeError('list required for table parameter, received', str(type(value)))
 */
        break;
        case RFCTYPE_BYTE:

        /* "pyrfc/_cyrfc.pyx":2439
 *             fillTable(typeDesc, table, value)
 *         elif typ == RFCTYPE_BYTE:
 *             bValue = fillBytes(value)             # <<<<<<<<<<<<<<
 *             rc = RfcSetBytes(container, cName, bValue, int(len(value)), &errorInfo)
 *             free(bValue)
 */
        __pyx_t_13 = __pyx_f_5pyrfc_6_cyrfc_fillBytes(__pyx_v_value); if (unlikely(__pyx_t_13 == ((SAP_RAW *)NULL))) __PYX_ERR(0, 2439, __pyx_L3_error)
        __pyx_v_bValue = __pyx_t_13;

        /* "pyrfc/_cyrfc.pyx":2440
 *         elif typ == RFCTYPE_BYTE:
 *             bValue = fillBytes(value)
 *             rc = RfcSetBytes(container, cName, bValue, int(len(value)), &errorInfo)             # <<<<<<<<<<<<<<
 *             free(bValue)
 *         elif typ == RFCTYPE_XSTRING:
 */
        __pyx_t_9 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2440, __pyx_L3_error)
        __pyx_v_rc = RfcSetBytes(__pyx_v_container, __pyx_v_cName, __pyx_v_bValue, ((unsigned int)__pyx_t_9), (&__pyx_v_errorInfo));

        /* "pyrfc/_cyrfc.pyx":2441
 *             bValue = fillBytes(value)
 *             rc = RfcSetBytes(container, cName, bValue, int(len(value)), &errorInfo)
 *             free(bValue)             # <<<<<<<<<<<<<<
 *         elif typ == RFCTYPE_XSTRING:
 *             bValue = fillBytes(value)
 */
        free(__pyx_v_bValue);

        /* "pyrfc/_cyrfc.pyx":2438
 *                 raise wrapError(&errorInfo)
 *             fillTable(typeDesc, table, value)
 *         elif typ == RFCTYPE_BYTE:             # <<<<<<<<<<<<<<
 *             bValue = fillBytes(value)
 *             rc = RfcSetBytes(container, cName, bValue, int(len(value)), &errorInfo)
 */
        break;
        case RFCTYPE_XSTRING:

        /* "pyrfc/_cyrfc.pyx":2443
 *             free(bValue)
 *         elif typ == RFCTYPE_XSTRING:
 *             bValue = fillBytes(value)             # <<<<<<<<<<<<<<
 *             rc = RfcSetXString(container, cName, bValue, int(len(value)), &errorInfo)
 *             free(bValue)
 */
        __pyx_t_13 = __pyx_f_5pyrfc_6_cyrfc_fillBytes(__pyx_v_value); if (unlikely(__pyx_t_13 == ((SAP_RAW *)NULL))) __PYX_ERR(0, 2443, __pyx_L3_error)
        __pyx_v_bValue = __pyx_t_13;

        /* "pyrfc/_cyrfc.pyx":2444
 *         elif typ == RFCTYPE_XSTRING:
 *             bValue = fillBytes(value)
 *             rc = RfcSetXString(container, cName, bValue, int(len(value)), &errorInfo)             # <<<<<<<<<<<<<<
 *             free(bValue)
 *         elif typ == RFCTYPE_CHAR:
 */
        __pyx_t_9 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2444, __pyx_L3_error)
        __pyx_v_rc = RfcSetXString(__pyx_v_container, __pyx_v_cName, __pyx_v_bValue, ((unsigned int)__pyx_t_9), (&__pyx_v_errorInfo));

        /* "pyrfc/_cyrfc.pyx":2445
 *             bValue = fillBytes(value)
 *             rc = RfcSetXString(container, cName, bValue, int(len(value)), &errorInfo)
 *             free(bValue)             # <<<<<<<<<<<<<<
 *         elif typ == RFCTYPE_CHAR:
 *             if type(value) is not str:
 */
        free(__pyx_v_bValue);

        /* "pyrfc/_cyrfc.pyx":2442
 *             rc = RfcSetBytes(container, cName, bValue, int(len(value)), &errorInfo)
 *             free(bValue)
 *         elif typ == RFCTYPE_XSTRING:             # <<<<<<<<<<<<<<
 *             bValue = fillBytes(value)
 *             rc = RfcSetXString(container, cName, bValue, int(len(value)), &errorInfo)
 */
        break;
        case RFCTYPE_CHAR:

        /* "pyrfc/_cyrfc.pyx":2447
 *             free(bValue)
 *         elif typ == RFCTYPE_CHAR:
 *             if type(value) is not str:             # <<<<<<<<<<<<<<
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 *             cValue = fillString(value)
 */
        __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_v_value)) != ((PyObject *)(&PyUnicode_Type)));
        __pyx_t_5 = (__pyx_t_4 != 0);
        if (unlikely(__pyx_t_5)) {

          /* "pyrfc/_cyrfc.pyx":2448
 *         elif typ == RFCTYPE_CHAR:
 *             if type(value) is not str:
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))             # <<<<<<<<<<<<<<
 *             cValue = fillString(value)
 *             rc = RfcSetChars(container, cName, cValue, strlenU(cValue), &errorInfo)
 */
          __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2448, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_INCREF(__pyx_kp_u_an_string_is_required_received);
          __Pyx_GIVEREF(__pyx_kp_u_an_string_is_required_received);
          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_an_string_is_required_received);
          __Pyx_INCREF(__pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_value);
          __Pyx_INCREF(__pyx_kp_u_of_type);
          __Pyx_GIVEREF(__pyx_kp_u_of_type);
          PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_of_type);
          __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value)));
          __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_value)));
          PyTuple_SET_ITEM(__pyx_t_6, 3, ((PyObject *)Py_TYPE(__pyx_v_value)));
          __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2448, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_Raise(__pyx_t_11, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __PYX_ERR(0, 2448, __pyx_L3_error)

          /* "pyrfc/_cyrfc.pyx":2447
 *             free(bValue)
 *         elif typ == RFCTYPE_CHAR:
 *             if type(value) is not str:             # <<<<<<<<<<<<<<
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 *             cValue = fillString(value)
 */
        }

        /* "pyrfc/_cyrfc.pyx":2449
 *             if type(value) is not str:
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 *             cValue = fillString(value)             # <<<<<<<<<<<<<<
 *             rc = RfcSetChars(container, cName, cValue, strlenU(cValue), &errorInfo)
 *             free(cValue)
 */
        __pyx_t_14 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_value); if (unlikely(__pyx_t_14 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2449, __pyx_L3_error)
        __pyx_v_cValue = __pyx_t_14;

        /* "pyrfc/_cyrfc.pyx":2450
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 *             cValue = fillString(value)
 *             rc = RfcSetChars(container, cName, cValue, strlenU(cValue), &errorInfo)             # <<<<<<<<<<<<<<
 *             free(cValue)
 *         elif typ == RFCTYPE_STRING:
 */
        __pyx_v_rc = RfcSetChars(__pyx_v_container, __pyx_v_cName, __pyx_v_cValue, strlenU(__pyx_v_cValue), (&__pyx_v_errorInfo));

        /* "pyrfc/_cyrfc.pyx":2451
 *             cValue = fillString(value)
 *             rc = RfcSetChars(container, cName, cValue, strlenU(cValue), &errorInfo)
 *             free(cValue)             # <<<<<<<<<<<<<<
 *         elif typ == RFCTYPE_STRING:
 *             if type(value) is not str:
 */
        free(__pyx_v_cValue);

        /* "pyrfc/_cyrfc.pyx":2446
 *             rc = RfcSetXString(container, cName, bValue, int(len(value)), &errorInfo)
 *             free(bValue)
 *         elif typ == RFCTYPE_CHAR:             # <<<<<<<<<<<<<<
 *             if type(value) is not str:
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 */
        break;
        case RFCTYPE_STRING:

        /* "pyrfc/_cyrfc.pyx":2453
 *             free(cValue)
 *         elif typ == RFCTYPE_STRING:
 *             if type(value) is not str:             # <<<<<<<<<<<<<<
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 *             cValue = fillString(value)
 */
        __pyx_t_5 = (((PyObject *)Py_TYPE(__pyx_v_value)) != ((PyObject *)(&PyUnicode_Type)));
        __pyx_t_4 = (__pyx_t_5 != 0);
        if (unlikely(__pyx_t_4)) {

          /* "pyrfc/_cyrfc.pyx":2454
 *         elif typ == RFCTYPE_STRING:
 *             if type(value) is not str:
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))             # <<<<<<<<<<<<<<
 *             cValue = fillString(value)
 *             rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo)
 */
          __pyx_t_11 = PyTuple_New(4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2454, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_INCREF(__pyx_kp_u_an_string_is_required_received);
          __Pyx_GIVEREF(__pyx_kp_u_an_string_is_required_received);
          PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_kp_u_an_string_is_required_received);
          __Pyx_INCREF(__pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_value);
          __Pyx_INCREF(__pyx_kp_u_of_type);
          __Pyx_GIVEREF(__pyx_kp_u_of_type);
          PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_kp_u_of_type);
          __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value)));
          __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_value)));
          PyTuple_SET_ITEM(__pyx_t_11, 3, ((PyObject *)Py_TYPE(__pyx_v_value)));
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2454, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_Raise(__pyx_t_6, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __PYX_ERR(0, 2454, __pyx_L3_error)

          /* "pyrfc/_cyrfc.pyx":2453
 *             free(cValue)
 *         elif typ == RFCTYPE_STRING:
 *             if type(value) is not str:             # <<<<<<<<<<<<<<
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 *             cValue = fillString(value)
 */
        }

        /* "pyrfc/_cyrfc.pyx":2455
 *             if type(value) is not str:
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 *             cValue = fillString(value)             # <<<<<<<<<<<<<<
 *             rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo)
 *             free(cValue)
 */
        __pyx_t_14 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_value); if (unlikely(__pyx_t_14 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2455, __pyx_L3_error)
        __pyx_v_cValue = __pyx_t_14;

        /* "pyrfc/_cyrfc.pyx":2456
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 *             cValue = fillString(value)
 *             rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo)             # <<<<<<<<<<<<<<
 *             free(cValue)
 *         elif typ == RFCTYPE_NUM:
 */
        __pyx_v_rc = RfcSetString(__pyx_v_container, __pyx_v_cName, __pyx_v_cValue, strlenU(__pyx_v_cValue), (&__pyx_v_errorInfo));

        /* "pyrfc/_cyrfc.pyx":2457
 *             cValue = fillString(value)
 *             rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo)
 *             free(cValue)             # <<<<<<<<<<<<<<
 *         elif typ == RFCTYPE_NUM:
 *             try:
 */
        free(__pyx_v_cValue);

        /* "pyrfc/_cyrfc.pyx":2452
 *             rc = RfcSetChars(container, cName, cValue, strlenU(cValue), &errorInfo)
 *             free(cValue)
 *         elif typ == RFCTYPE_STRING:             # <<<<<<<<<<<<<<
 *             if type(value) is not str:
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 */
        break;
        case RFCTYPE_NUM:

        /* "pyrfc/_cyrfc.pyx":2459
 *             free(cValue)
 *         elif typ == RFCTYPE_NUM:
 *             try:             # <<<<<<<<<<<<<<
 *                 if value.isdigit():
 *                     cValue = fillString(value)
 */
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          /*try:*/ {

            /* "pyrfc/_cyrfc.pyx":2460
 *         elif typ == RFCTYPE_NUM:
 *             try:
 *                 if value.isdigit():             # <<<<<<<<<<<<<<
 *                     cValue = fillString(value)
 *                     rc = RfcSetNum(container, cName, cValue, strlenU(cValue), &errorInfo)
 */
            __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_isdigit); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2460, __pyx_L17_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_7 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
              __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_11);
              if (likely(__pyx_t_7)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
                __Pyx_INCREF(__pyx_t_7);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_11, function);
              }
            }
            __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2460, __pyx_L17_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2460, __pyx_L17_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (likely(__pyx_t_4)) {

              /* "pyrfc/_cyrfc.pyx":2461
 *             try:
 *                 if value.isdigit():
 *                     cValue = fillString(value)             # <<<<<<<<<<<<<<
 *                     rc = RfcSetNum(container, cName, cValue, strlenU(cValue), &errorInfo)
 *                     free(cValue)
 */
              __pyx_t_14 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_value); if (unlikely(__pyx_t_14 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2461, __pyx_L17_error)
              __pyx_v_cValue = __pyx_t_14;

              /* "pyrfc/_cyrfc.pyx":2462
 *                 if value.isdigit():
 *                     cValue = fillString(value)
 *                     rc = RfcSetNum(container, cName, cValue, strlenU(cValue), &errorInfo)             # <<<<<<<<<<<<<<
 *                     free(cValue)
 *                 else:
 */
              __pyx_v_rc = RfcSetNum(__pyx_v_container, __pyx_v_cName, __pyx_v_cValue, strlenU(__pyx_v_cValue), (&__pyx_v_errorInfo));

              /* "pyrfc/_cyrfc.pyx":2463
 *                     cValue = fillString(value)
 *                     rc = RfcSetNum(container, cName, cValue, strlenU(cValue), &errorInfo)
 *                     free(cValue)             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise
 */
              free(__pyx_v_cValue);

              /* "pyrfc/_cyrfc.pyx":2460
 *         elif typ == RFCTYPE_NUM:
 *             try:
 *                 if value.isdigit():             # <<<<<<<<<<<<<<
 *                     cValue = fillString(value)
 *                     rc = RfcSetNum(container, cName, cValue, strlenU(cValue), &errorInfo)
 */
              goto __pyx_L23;
            }

            /* "pyrfc/_cyrfc.pyx":2465
 *                     free(cValue)
 *                 else:
 *                     raise             # <<<<<<<<<<<<<<
 *             except Exception as ex:
 *                 raise TypeError('a numeric string is required, received', value, 'of type', type(value))
 */
            /*else*/ {
              __Pyx_ReraiseException(); __PYX_ERR(0, 2465, __pyx_L17_error)
            }
            __pyx_L23:;

            /* "pyrfc/_cyrfc.pyx":2459
 *             free(cValue)
 *         elif typ == RFCTYPE_NUM:
 *             try:             # <<<<<<<<<<<<<<
 *                 if value.isdigit():
 *                     cValue = fillString(value)
 */
          }
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          goto __pyx_L22_try_end;
          __pyx_L17_error:;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

          /* "pyrfc/_cyrfc.pyx":2466
 *                 else:
 *                     raise
 *             except Exception as ex:             # <<<<<<<<<<<<<<
 *                 raise TypeError('a numeric string is required, received', value, 'of type', type(value))
 *         elif typ == RFCTYPE_BCD or typ == RFCTYPE_FLOAT or typ == RFCTYPE_DECF16 or typ == RFCTYPE_DECF34:
 */
          __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
          if (__pyx_t_10) {
            __Pyx_AddTraceback("pyrfc._cyrfc.fillVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_11, &__pyx_t_7) < 0) __PYX_ERR(0, 2466, __pyx_L19_except_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_11);
            __pyx_v_ex = __pyx_t_11;
            /*try:*/ {

              /* "pyrfc/_cyrfc.pyx":2467
 *                     raise
 *             except Exception as ex:
 *                 raise TypeError('a numeric string is required, received', value, 'of type', type(value))             # <<<<<<<<<<<<<<
 *         elif typ == RFCTYPE_BCD or typ == RFCTYPE_FLOAT or typ == RFCTYPE_DECF16 or typ == RFCTYPE_DECF34:
 *             # cast to string prevents rounding errors in NWRFC SDK
 */
              __pyx_t_18 = PyTuple_New(4); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2467, __pyx_L29_error)
              __Pyx_GOTREF(__pyx_t_18);
              __Pyx_INCREF(__pyx_kp_u_a_numeric_string_is_required_rec);
              __Pyx_GIVEREF(__pyx_kp_u_a_numeric_string_is_required_rec);
              PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_kp_u_a_numeric_string_is_required_rec);
              __Pyx_INCREF(__pyx_v_value);
              __Pyx_GIVEREF(__pyx_v_value);
              PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_v_value);
              __Pyx_INCREF(__pyx_kp_u_of_type);
              __Pyx_GIVEREF(__pyx_kp_u_of_type);
              PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_kp_u_of_type);
              __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value)));
              __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_value)));
              PyTuple_SET_ITEM(__pyx_t_18, 3, ((PyObject *)Py_TYPE(__pyx_v_value)));
              __pyx_t_19 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_18, NULL); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2467, __pyx_L29_error)
              __Pyx_GOTREF(__pyx_t_19);
              __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
              __Pyx_Raise(__pyx_t_19, 0, 0, 0);
              __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
              __PYX_ERR(0, 2467, __pyx_L29_error)
            }

            /* "pyrfc/_cyrfc.pyx":2466
 *                 else:
 *                     raise
 *             except Exception as ex:             # <<<<<<<<<<<<<<
 *                 raise TypeError('a numeric string is required, received', value, 'of type', type(value))
 *         elif typ == RFCTYPE_BCD or typ == RFCTYPE_FLOAT or typ == RFCTYPE_DECF16 or typ == RFCTYPE_DECF34:
 */
            /*finally:*/ {
              __pyx_L29_error:;
              /*exception exit:*/{
                __Pyx_PyThreadState_declare
                __Pyx_PyThreadState_assign
                __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0;
                __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
                __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
                if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26);
                if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23) < 0)) __Pyx_ErrFetch(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
                __Pyx_XGOTREF(__pyx_t_21);
                __Pyx_XGOTREF(__pyx_t_22);
                __Pyx_XGOTREF(__pyx_t_23);
                __Pyx_XGOTREF(__pyx_t_24);
                __Pyx_XGOTREF(__pyx_t_25);
                __Pyx_XGOTREF(__pyx_t_26);
                __pyx_t_10 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_20 = __pyx_filename;
                {
                  __Pyx_DECREF(__pyx_v_ex);
                  __pyx_v_ex = NULL;
                }
                if (PY_MAJOR_VERSION >= 3) {
                  __Pyx_XGIVEREF(__pyx_t_24);
                  __Pyx_XGIVEREF(__pyx_t_25);
                  __Pyx_XGIVEREF(__pyx_t_26);
                  __Pyx_ExceptionReset(__pyx_t_24, __pyx_t_25, __pyx_t_26);
                }
                __Pyx_XGIVEREF(__pyx_t_21);
                __Pyx_XGIVEREF(__pyx_t_22);
                __Pyx_XGIVEREF(__pyx_t_23);
                __Pyx_ErrRestore(__pyx_t_21, __pyx_t_22, __pyx_t_23);
                __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0;
                __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_20;
                goto __pyx_L19_except_error;
              }
            }
          }
          goto __pyx_L19_except_error;
          __pyx_L19_except_error:;

          /* "pyrfc/_cyrfc.pyx":2459
 *             free(cValue)
 *         elif typ == RFCTYPE_NUM:
 *             try:             # <<<<<<<<<<<<<<
 *                 if value.isdigit():
 *                     cValue = fillString(value)
 */
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
          goto __pyx_L3_error;
          __pyx_L22_try_end:;
        }

        /* "pyrfc/_cyrfc.pyx":2458
 *             rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo)
 *             free(cValue)
 *         elif typ == RFCTYPE_NUM:             # <<<<<<<<<<<<<<
 *             try:
 *                 if value.isdigit():
 */
        break;
        case RFCTYPE_BCD:

        /* "pyrfc/_cyrfc.pyx":2468
 *             except Exception as ex:
 *                 raise TypeError('a numeric string is required, received', value, 'of type', type(value))
 *         elif typ == RFCTYPE_BCD or typ == RFCTYPE_FLOAT or typ == RFCTYPE_DECF16 or typ == RFCTYPE_DECF34:             # <<<<<<<<<<<<<<
 *             # cast to string prevents rounding errors in NWRFC SDK
 *             try:
 */
        case RFCTYPE_FLOAT:
        case RFCTYPE_DECF16:
        case RFCTYPE_DECF34:

        /* "pyrfc/_cyrfc.pyx":2470
 *         elif typ == RFCTYPE_BCD or typ == RFCTYPE_FLOAT or typ == RFCTYPE_DECF16 or typ == RFCTYPE_DECF34:
 *             # cast to string prevents rounding errors in NWRFC SDK
 *             try:             # <<<<<<<<<<<<<<
 *                 if type(value) is float or type(value) is Decimal:
 *                     svalue = str(value)
 */
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_15);
          /*try:*/ {

            /* "pyrfc/_cyrfc.pyx":2471
 *             # cast to string prevents rounding errors in NWRFC SDK
 *             try:
 *                 if type(value) is float or type(value) is Decimal:             # <<<<<<<<<<<<<<
 *                     svalue = str(value)
 *                 else:
 */
            __pyx_t_5 = (((PyObject *)Py_TYPE(__pyx_v_value)) == ((PyObject *)(&PyFloat_Type)));
            __pyx_t_27 = (__pyx_t_5 != 0);
            if (!__pyx_t_27) {
            } else {
              __pyx_t_4 = __pyx_t_27;
              goto __pyx_L42_bool_binop_done;
            }
            __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2471, __pyx_L35_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_27 = (((PyObject *)Py_TYPE(__pyx_v_value)) == __pyx_t_7);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_t_5 = (__pyx_t_27 != 0);
            __pyx_t_4 = __pyx_t_5;
            __pyx_L42_bool_binop_done:;
            if (__pyx_t_4) {

              /* "pyrfc/_cyrfc.pyx":2472
 *             try:
 *                 if type(value) is float or type(value) is Decimal:
 *                     svalue = str(value)             # <<<<<<<<<<<<<<
 *                 else:
 *                     # string passed from application should be locale correct, do nothing
 */
              __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2472, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_7);
              __pyx_v_svalue = __pyx_t_7;
              __pyx_t_7 = 0;

              /* "pyrfc/_cyrfc.pyx":2471
 *             # cast to string prevents rounding errors in NWRFC SDK
 *             try:
 *                 if type(value) is float or type(value) is Decimal:             # <<<<<<<<<<<<<<
 *                     svalue = str(value)
 *                 else:
 */
              goto __pyx_L41;
            }

            /* "pyrfc/_cyrfc.pyx":2475
 *                 else:
 *                     # string passed from application should be locale correct, do nothing
 *                     svalue = value             # <<<<<<<<<<<<<<
 *                 # decimal separator must be "." for the Decimal parsing check
 *                 locale_radix = _LOCALE_RADIX  # localeconv()['decimal_point']
 */
            /*else*/ {
              __Pyx_INCREF(__pyx_v_value);
              __pyx_v_svalue = __pyx_v_value;
            }
            __pyx_L41:;

            /* "pyrfc/_cyrfc.pyx":2477
 *                     svalue = value
 *                 # decimal separator must be "." for the Decimal parsing check
 *                 locale_radix = _LOCALE_RADIX  # localeconv()['decimal_point']             # <<<<<<<<<<<<<<
 *                 if locale_radix != ".":
 *                     Decimal('.'.join(svalue.rsplit(locale_radix, 1)))
 */
            __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_LOCALE_RADIX); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2477, __pyx_L35_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_v_locale_radix = __pyx_t_7;
            __pyx_t_7 = 0;

            /* "pyrfc/_cyrfc.pyx":2478
 *                 # decimal separator must be "." for the Decimal parsing check
 *                 locale_radix = _LOCALE_RADIX  # localeconv()['decimal_point']
 *                 if locale_radix != ".":             # <<<<<<<<<<<<<<
 *                     Decimal('.'.join(svalue.rsplit(locale_radix, 1)))
 *                 else:
 */
            __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_locale_radix, __pyx_kp_u__21, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2478, __pyx_L35_error)
            if (__pyx_t_4) {

              /* "pyrfc/_cyrfc.pyx":2479
 *                 locale_radix = _LOCALE_RADIX  # localeconv()['decimal_point']
 *                 if locale_radix != ".":
 *                     Decimal('.'.join(svalue.rsplit(locale_radix, 1)))             # <<<<<<<<<<<<<<
 *                 else:
 *                     Decimal(svalue)
 */
              __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2479, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_11);
              __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_svalue, __pyx_n_s_rsplit); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2479, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_19);
              __pyx_t_18 = NULL;
              __pyx_t_12 = 0;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_19))) {
                __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_19);
                if (likely(__pyx_t_18)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
                  __Pyx_INCREF(__pyx_t_18);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_19, function);
                  __pyx_t_12 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_19)) {
                PyObject *__pyx_temp[3] = {__pyx_t_18, __pyx_v_locale_radix, __pyx_int_1};
                __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2479, __pyx_L35_error)
                __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
                __Pyx_GOTREF(__pyx_t_6);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_19)) {
                PyObject *__pyx_temp[3] = {__pyx_t_18, __pyx_v_locale_radix, __pyx_int_1};
                __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2479, __pyx_L35_error)
                __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
                __Pyx_GOTREF(__pyx_t_6);
              } else
              #endif
              {
                __pyx_t_28 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 2479, __pyx_L35_error)
                __Pyx_GOTREF(__pyx_t_28);
                if (__pyx_t_18) {
                  __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_28, 0, __pyx_t_18); __pyx_t_18 = NULL;
                }
                __Pyx_INCREF(__pyx_v_locale_radix);
                __Pyx_GIVEREF(__pyx_v_locale_radix);
                PyTuple_SET_ITEM(__pyx_t_28, 0+__pyx_t_12, __pyx_v_locale_radix);
                __Pyx_INCREF(__pyx_int_1);
                __Pyx_GIVEREF(__pyx_int_1);
                PyTuple_SET_ITEM(__pyx_t_28, 1+__pyx_t_12, __pyx_int_1);
                __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_t_28, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2479, __pyx_L35_error)
                __Pyx_GOTREF(__pyx_t_6);
                __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
              }
              __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
              __pyx_t_19 = PyUnicode_Join(__pyx_kp_u__21, __pyx_t_6); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2479, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_19);
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              __pyx_t_6 = NULL;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
                __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11);
                if (likely(__pyx_t_6)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
                  __Pyx_INCREF(__pyx_t_6);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_11, function);
                }
              }
              __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_6, __pyx_t_19) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_19);
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
              if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2479, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

              /* "pyrfc/_cyrfc.pyx":2478
 *                 # decimal separator must be "." for the Decimal parsing check
 *                 locale_radix = _LOCALE_RADIX  # localeconv()['decimal_point']
 *                 if locale_radix != ".":             # <<<<<<<<<<<<<<
 *                     Decimal('.'.join(svalue.rsplit(locale_radix, 1)))
 *                 else:
 */
              goto __pyx_L44;
            }

            /* "pyrfc/_cyrfc.pyx":2481
 *                     Decimal('.'.join(svalue.rsplit(locale_radix, 1)))
 *                 else:
 *                     Decimal(svalue)             # <<<<<<<<<<<<<<
 *                 cValue = fillString(svalue)
 *             except Exception as ex:
 */
            /*else*/ {
              __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2481, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_11);
              __pyx_t_19 = NULL;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
                __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_11);
                if (likely(__pyx_t_19)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
                  __Pyx_INCREF(__pyx_t_19);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_11, function);
                }
              }
              __pyx_t_7 = (__pyx_t_19) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_19, __pyx_v_svalue) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_svalue);
              __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
              if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2481, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            }
            __pyx_L44:;

            /* "pyrfc/_cyrfc.pyx":2482
 *                 else:
 *                     Decimal(svalue)
 *                 cValue = fillString(svalue)             # <<<<<<<<<<<<<<
 *             except Exception as ex:
 *                 raise TypeError('a decimal value required, received', value, 'of type', type(value))
 */
            __pyx_t_14 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_svalue); if (unlikely(__pyx_t_14 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2482, __pyx_L35_error)
            __pyx_v_cValue = __pyx_t_14;

            /* "pyrfc/_cyrfc.pyx":2470
 *         elif typ == RFCTYPE_BCD or typ == RFCTYPE_FLOAT or typ == RFCTYPE_DECF16 or typ == RFCTYPE_DECF34:
 *             # cast to string prevents rounding errors in NWRFC SDK
 *             try:             # <<<<<<<<<<<<<<
 *                 if type(value) is float or type(value) is Decimal:
 *                     svalue = str(value)
 */
          }
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          goto __pyx_L40_try_end;
          __pyx_L35_error:;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
          __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

          /* "pyrfc/_cyrfc.pyx":2483
 *                     Decimal(svalue)
 *                 cValue = fillString(svalue)
 *             except Exception as ex:             # <<<<<<<<<<<<<<
 *                 raise TypeError('a decimal value required, received', value, 'of type', type(value))
 *             rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo)
 */
          __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
          if (__pyx_t_12) {
            __Pyx_AddTraceback("pyrfc._cyrfc.fillVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_11, &__pyx_t_19) < 0) __PYX_ERR(0, 2483, __pyx_L37_except_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_GOTREF(__pyx_t_19);
            __Pyx_INCREF(__pyx_t_11);
            __pyx_v_ex = __pyx_t_11;
            /*try:*/ {

              /* "pyrfc/_cyrfc.pyx":2484
 *                 cValue = fillString(svalue)
 *             except Exception as ex:
 *                 raise TypeError('a decimal value required, received', value, 'of type', type(value))             # <<<<<<<<<<<<<<
 *             rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo)
 *             free(cValue)
 */
              __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2484, __pyx_L50_error)
              __Pyx_GOTREF(__pyx_t_6);
              __Pyx_INCREF(__pyx_kp_u_a_decimal_value_required_receive);
              __Pyx_GIVEREF(__pyx_kp_u_a_decimal_value_required_receive);
              PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_a_decimal_value_required_receive);
              __Pyx_INCREF(__pyx_v_value);
              __Pyx_GIVEREF(__pyx_v_value);
              PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_value);
              __Pyx_INCREF(__pyx_kp_u_of_type);
              __Pyx_GIVEREF(__pyx_kp_u_of_type);
              PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_of_type);
              __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value)));
              __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_value)));
              PyTuple_SET_ITEM(__pyx_t_6, 3, ((PyObject *)Py_TYPE(__pyx_v_value)));
              __pyx_t_28 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 2484, __pyx_L50_error)
              __Pyx_GOTREF(__pyx_t_28);
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_Raise(__pyx_t_28, 0, 0, 0);
              __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
              __PYX_ERR(0, 2484, __pyx_L50_error)
            }

            /* "pyrfc/_cyrfc.pyx":2483
 *                     Decimal(svalue)
 *                 cValue = fillString(svalue)
 *             except Exception as ex:             # <<<<<<<<<<<<<<
 *                 raise TypeError('a decimal value required, received', value, 'of type', type(value))
 *             rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo)
 */
            /*finally:*/ {
              __pyx_L50_error:;
              /*exception exit:*/{
                __Pyx_PyThreadState_declare
                __Pyx_PyThreadState_assign
                __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0;
                __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
                __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0;
                __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21);
                if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_26, &__pyx_t_25, &__pyx_t_24) < 0)) __Pyx_ErrFetch(&__pyx_t_26, &__pyx_t_25, &__pyx_t_24);
                __Pyx_XGOTREF(__pyx_t_26);
                __Pyx_XGOTREF(__pyx_t_25);
                __Pyx_XGOTREF(__pyx_t_24);
                __Pyx_XGOTREF(__pyx_t_23);
                __Pyx_XGOTREF(__pyx_t_22);
                __Pyx_XGOTREF(__pyx_t_21);
                __pyx_t_12 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_29 = __pyx_filename;
                {
                  __Pyx_DECREF(__pyx_v_ex);
                  __pyx_v_ex = NULL;
                }
                if (PY_MAJOR_VERSION >= 3) {
                  __Pyx_XGIVEREF(__pyx_t_23);
                  __Pyx_XGIVEREF(__pyx_t_22);
                  __Pyx_XGIVEREF(__pyx_t_21);
                  __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_22, __pyx_t_21);
                }
                __Pyx_XGIVEREF(__pyx_t_26);
                __Pyx_XGIVEREF(__pyx_t_25);
                __Pyx_XGIVEREF(__pyx_t_24);
                __Pyx_ErrRestore(__pyx_t_26, __pyx_t_25, __pyx_t_24);
                __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0;
                __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_29;
                goto __pyx_L37_except_error;
              }
            }
          }
          goto __pyx_L37_except_error;
          __pyx_L37_except_error:;

          /* "pyrfc/_cyrfc.pyx":2470
 *         elif typ == RFCTYPE_BCD or typ == RFCTYPE_FLOAT or typ == RFCTYPE_DECF16 or typ == RFCTYPE_DECF34:
 *             # cast to string prevents rounding errors in NWRFC SDK
 *             try:             # <<<<<<<<<<<<<<
 *                 if type(value) is float or type(value) is Decimal:
 *                     svalue = str(value)
 */
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
          goto __pyx_L3_error;
          __pyx_L40_try_end:;
        }

        /* "pyrfc/_cyrfc.pyx":2485
 *             except Exception as ex:
 *                 raise TypeError('a decimal value required, received', value, 'of type', type(value))
 *             rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo)             # <<<<<<<<<<<<<<
 *             free(cValue)
 *         elif typ in (RFCTYPE_INT, RFCTYPE_INT1, RFCTYPE_INT2):
 */
        __pyx_v_rc = RfcSetString(__pyx_v_container, __pyx_v_cName, __pyx_v_cValue, strlenU(__pyx_v_cValue), (&__pyx_v_errorInfo));

        /* "pyrfc/_cyrfc.pyx":2486
 *                 raise TypeError('a decimal value required, received', value, 'of type', type(value))
 *             rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo)
 *             free(cValue)             # <<<<<<<<<<<<<<
 *         elif typ in (RFCTYPE_INT, RFCTYPE_INT1, RFCTYPE_INT2):
 *             if type(value) is not int:
 */
        free(__pyx_v_cValue);

        /* "pyrfc/_cyrfc.pyx":2468
 *             except Exception as ex:
 *                 raise TypeError('a numeric string is required, received', value, 'of type', type(value))
 *         elif typ == RFCTYPE_BCD or typ == RFCTYPE_FLOAT or typ == RFCTYPE_DECF16 or typ == RFCTYPE_DECF34:             # <<<<<<<<<<<<<<
 *             # cast to string prevents rounding errors in NWRFC SDK
 *             try:
 */
        break;
        case RFCTYPE_INT:

        /* "pyrfc/_cyrfc.pyx":2487
 *             rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo)
 *             free(cValue)
 *         elif typ in (RFCTYPE_INT, RFCTYPE_INT1, RFCTYPE_INT2):             # <<<<<<<<<<<<<<
 *             if type(value) is not int:
 *                 raise TypeError('an integer required, received', value, 'of type', type(value))
 */
        case RFCTYPE_INT1:
        case RFCTYPE_INT2:

        /* "pyrfc/_cyrfc.pyx":2488
 *             free(cValue)
 *         elif typ in (RFCTYPE_INT, RFCTYPE_INT1, RFCTYPE_INT2):
 *             if type(value) is not int:             # <<<<<<<<<<<<<<
 *                 raise TypeError('an integer required, received', value, 'of type', type(value))
 *             rc = RfcSetInt(container, cName, value, &errorInfo)
 */
        __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_v_value)) != ((PyObject *)(&PyInt_Type)));
        __pyx_t_5 = (__pyx_t_4 != 0);
        if (unlikely(__pyx_t_5)) {

          /* "pyrfc/_cyrfc.pyx":2489
 *         elif typ in (RFCTYPE_INT, RFCTYPE_INT1, RFCTYPE_INT2):
 *             if type(value) is not int:
 *                 raise TypeError('an integer required, received', value, 'of type', type(value))             # <<<<<<<<<<<<<<
 *             rc = RfcSetInt(container, cName, value, &errorInfo)
 *         elif typ == RFCTYPE_INT8:
 */
          __pyx_t_19 = PyTuple_New(4); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2489, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_19);
          __Pyx_INCREF(__pyx_kp_u_an_integer_required_received);
          __Pyx_GIVEREF(__pyx_kp_u_an_integer_required_received);
          PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_kp_u_an_integer_required_received);
          __Pyx_INCREF(__pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_v_value);
          __Pyx_INCREF(__pyx_kp_u_of_type);
          __Pyx_GIVEREF(__pyx_kp_u_of_type);
          PyTuple_SET_ITEM(__pyx_t_19, 2, __pyx_kp_u_of_type);
          __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value)));
          __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_value)));
          PyTuple_SET_ITEM(__pyx_t_19, 3, ((PyObject *)Py_TYPE(__pyx_v_value)));
          __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_19, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2489, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
          __Pyx_Raise(__pyx_t_11, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __PYX_ERR(0, 2489, __pyx_L3_error)

          /* "pyrfc/_cyrfc.pyx":2488
 *             free(cValue)
 *         elif typ in (RFCTYPE_INT, RFCTYPE_INT1, RFCTYPE_INT2):
 *             if type(value) is not int:             # <<<<<<<<<<<<<<
 *                 raise TypeError('an integer required, received', value, 'of type', type(value))
 *             rc = RfcSetInt(container, cName, value, &errorInfo)
 */
        }

        /* "pyrfc/_cyrfc.pyx":2490
 *             if type(value) is not int:
 *                 raise TypeError('an integer required, received', value, 'of type', type(value))
 *             rc = RfcSetInt(container, cName, value, &errorInfo)             # <<<<<<<<<<<<<<
 *         elif typ == RFCTYPE_INT8:
 *             if type(value) is not int:
 */
        __pyx_t_30 = __Pyx_PyInt_As_RFC_INT(__pyx_v_value); if (unlikely((__pyx_t_30 == ((RFC_INT)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2490, __pyx_L3_error)
        __pyx_v_rc = RfcSetInt(__pyx_v_container, __pyx_v_cName, __pyx_t_30, (&__pyx_v_errorInfo));

        /* "pyrfc/_cyrfc.pyx":2487
 *             rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo)
 *             free(cValue)
 *         elif typ in (RFCTYPE_INT, RFCTYPE_INT1, RFCTYPE_INT2):             # <<<<<<<<<<<<<<
 *             if type(value) is not int:
 *                 raise TypeError('an integer required, received', value, 'of type', type(value))
 */
        break;
        case RFCTYPE_INT8:

        /* "pyrfc/_cyrfc.pyx":2492
 *             rc = RfcSetInt(container, cName, value, &errorInfo)
 *         elif typ == RFCTYPE_INT8:
 *             if type(value) is not int:             # <<<<<<<<<<<<<<
 *                 raise TypeError('an integer required, received', value, 'of type', type(value))
 *             rc = RfcSetInt8(container, cName, value, &errorInfo)
 */
        __pyx_t_5 = (((PyObject *)Py_TYPE(__pyx_v_value)) != ((PyObject *)(&PyInt_Type)));
        __pyx_t_4 = (__pyx_t_5 != 0);
        if (unlikely(__pyx_t_4)) {

          /* "pyrfc/_cyrfc.pyx":2493
 *         elif typ == RFCTYPE_INT8:
 *             if type(value) is not int:
 *                 raise TypeError('an integer required, received', value, 'of type', type(value))             # <<<<<<<<<<<<<<
 *             rc = RfcSetInt8(container, cName, value, &errorInfo)
 *         elif typ == RFCTYPE_UTCLONG:
 */
          __pyx_t_11 = PyTuple_New(4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2493, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_INCREF(__pyx_kp_u_an_integer_required_received);
          __Pyx_GIVEREF(__pyx_kp_u_an_integer_required_received);
          PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_kp_u_an_integer_required_received);
          __Pyx_INCREF(__pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_value);
          __Pyx_INCREF(__pyx_kp_u_of_type);
          __Pyx_GIVEREF(__pyx_kp_u_of_type);
          PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_kp_u_of_type);
          __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value)));
          __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_value)));
          PyTuple_SET_ITEM(__pyx_t_11, 3, ((PyObject *)Py_TYPE(__pyx_v_value)));
          __pyx_t_19 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_11, NULL); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2493, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_19);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_Raise(__pyx_t_19, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
          __PYX_ERR(0, 2493, __pyx_L3_error)

          /* "pyrfc/_cyrfc.pyx":2492
 *             rc = RfcSetInt(container, cName, value, &errorInfo)
 *         elif typ == RFCTYPE_INT8:
 *             if type(value) is not int:             # <<<<<<<<<<<<<<
 *                 raise TypeError('an integer required, received', value, 'of type', type(value))
 *             rc = RfcSetInt8(container, cName, value, &errorInfo)
 */
        }

        /* "pyrfc/_cyrfc.pyx":2494
 *             if type(value) is not int:
 *                 raise TypeError('an integer required, received', value, 'of type', type(value))
 *             rc = RfcSetInt8(container, cName, value, &errorInfo)             # <<<<<<<<<<<<<<
 *         elif typ == RFCTYPE_UTCLONG:
 *             if type(value) is not str:
 */
        __pyx_t_31 = __Pyx_PyInt_As_RFC_INT8(__pyx_v_value); if (unlikely((__pyx_t_31 == ((RFC_INT8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2494, __pyx_L3_error)
        __pyx_v_rc = RfcSetInt8(__pyx_v_container, __pyx_v_cName, __pyx_t_31, (&__pyx_v_errorInfo));

        /* "pyrfc/_cyrfc.pyx":2491
 *                 raise TypeError('an integer required, received', value, 'of type', type(value))
 *             rc = RfcSetInt(container, cName, value, &errorInfo)
 *         elif typ == RFCTYPE_INT8:             # <<<<<<<<<<<<<<
 *             if type(value) is not int:
 *                 raise TypeError('an integer required, received', value, 'of type', type(value))
 */
        break;
        case RFCTYPE_UTCLONG:

        /* "pyrfc/_cyrfc.pyx":2496
 *             rc = RfcSetInt8(container, cName, value, &errorInfo)
 *         elif typ == RFCTYPE_UTCLONG:
 *             if type(value) is not str:             # <<<<<<<<<<<<<<
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 *             cValue = fillString(value)
 */
        __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_v_value)) != ((PyObject *)(&PyUnicode_Type)));
        __pyx_t_5 = (__pyx_t_4 != 0);
        if (unlikely(__pyx_t_5)) {

          /* "pyrfc/_cyrfc.pyx":2497
 *         elif typ == RFCTYPE_UTCLONG:
 *             if type(value) is not str:
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))             # <<<<<<<<<<<<<<
 *             cValue = fillString(value)
 *             rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo)
 */
          __pyx_t_19 = PyTuple_New(4); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2497, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_19);
          __Pyx_INCREF(__pyx_kp_u_an_string_is_required_received);
          __Pyx_GIVEREF(__pyx_kp_u_an_string_is_required_received);
          PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_kp_u_an_string_is_required_received);
          __Pyx_INCREF(__pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_v_value);
          __Pyx_INCREF(__pyx_kp_u_of_type);
          __Pyx_GIVEREF(__pyx_kp_u_of_type);
          PyTuple_SET_ITEM(__pyx_t_19, 2, __pyx_kp_u_of_type);
          __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value)));
          __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_value)));
          PyTuple_SET_ITEM(__pyx_t_19, 3, ((PyObject *)Py_TYPE(__pyx_v_value)));
          __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_19, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2497, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
          __Pyx_Raise(__pyx_t_11, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __PYX_ERR(0, 2497, __pyx_L3_error)

          /* "pyrfc/_cyrfc.pyx":2496
 *             rc = RfcSetInt8(container, cName, value, &errorInfo)
 *         elif typ == RFCTYPE_UTCLONG:
 *             if type(value) is not str:             # <<<<<<<<<<<<<<
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 *             cValue = fillString(value)
 */
        }

        /* "pyrfc/_cyrfc.pyx":2498
 *             if type(value) is not str:
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 *             cValue = fillString(value)             # <<<<<<<<<<<<<<
 *             rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo)
 *             free(cValue)
 */
        __pyx_t_14 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_value); if (unlikely(__pyx_t_14 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2498, __pyx_L3_error)
        __pyx_v_cValue = __pyx_t_14;

        /* "pyrfc/_cyrfc.pyx":2499
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 *             cValue = fillString(value)
 *             rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo)             # <<<<<<<<<<<<<<
 *             free(cValue)
 *         elif typ == RFCTYPE_DATE:
 */
        __pyx_v_rc = RfcSetString(__pyx_v_container, __pyx_v_cName, __pyx_v_cValue, strlenU(__pyx_v_cValue), (&__pyx_v_errorInfo));

        /* "pyrfc/_cyrfc.pyx":2500
 *             cValue = fillString(value)
 *             rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo)
 *             free(cValue)             # <<<<<<<<<<<<<<
 *         elif typ == RFCTYPE_DATE:
 *             if value:
 */
        free(__pyx_v_cValue);

        /* "pyrfc/_cyrfc.pyx":2495
 *                 raise TypeError('an integer required, received', value, 'of type', type(value))
 *             rc = RfcSetInt8(container, cName, value, &errorInfo)
 *         elif typ == RFCTYPE_UTCLONG:             # <<<<<<<<<<<<<<
 *             if type(value) is not str:
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 */
        break;
        case RFCTYPE_DATE:

        /* "pyrfc/_cyrfc.pyx":2502
 *             free(cValue)
 *         elif typ == RFCTYPE_DATE:
 *             if value:             # <<<<<<<<<<<<<<
 *                 format_ok = True
 *                 if type(value) is date:
 */
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2502, __pyx_L3_error)
        if (__pyx_t_5) {

          /* "pyrfc/_cyrfc.pyx":2503
 *         elif typ == RFCTYPE_DATE:
 *             if value:
 *                 format_ok = True             # <<<<<<<<<<<<<<
 *                 if type(value) is date:
 *                     cValue = fillString(f'{value.year:04}{value.month:02}{value.day:02}')
 */
          __pyx_v_format_ok = 1;

          /* "pyrfc/_cyrfc.pyx":2504
 *             if value:
 *                 format_ok = True
 *                 if type(value) is date:             # <<<<<<<<<<<<<<
 *                     cValue = fillString(f'{value.year:04}{value.month:02}{value.day:02}')
 *                 else:
 */
          __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_date); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2504, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_5 = (((PyObject *)Py_TYPE(__pyx_v_value)) == __pyx_t_11);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_4 = (__pyx_t_5 != 0);
          if (__pyx_t_4) {

            /* "pyrfc/_cyrfc.pyx":2505
 *                 format_ok = True
 *                 if type(value) is date:
 *                     cValue = fillString(f'{value.year:04}{value.month:02}{value.day:02}')             # <<<<<<<<<<<<<<
 *                 else:
 *                     try:
 */
            __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2505, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_9 = 0;
            __pyx_t_32 = 127;
            __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_year); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2505, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_19);
            __pyx_t_7 = __Pyx_PyObject_Format(__pyx_t_19, __pyx_kp_u_04); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2505, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
            __pyx_t_32 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_32) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_32;
            __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
            __Pyx_GIVEREF(__pyx_t_7);
            PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7);
            __pyx_t_7 = 0;
            __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_month); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2505, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_19 = __Pyx_PyObject_Format(__pyx_t_7, __pyx_kp_u_02); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2505, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_19);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_t_32 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_19) > __pyx_t_32) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_19) : __pyx_t_32;
            __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_19);
            __Pyx_GIVEREF(__pyx_t_19);
            PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_19);
            __pyx_t_19 = 0;
            __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_day); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2505, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_19);
            __pyx_t_7 = __Pyx_PyObject_Format(__pyx_t_19, __pyx_kp_u_02); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2505, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
            __pyx_t_32 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_32) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_32;
            __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
            __Pyx_GIVEREF(__pyx_t_7);
            PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_7);
            __pyx_t_7 = 0;
            __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __pyx_t_9, __pyx_t_32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2505, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_14 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_7); if (unlikely(__pyx_t_14 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2505, __pyx_L3_error)
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_v_cValue = __pyx_t_14;

            /* "pyrfc/_cyrfc.pyx":2504
 *             if value:
 *                 format_ok = True
 *                 if type(value) is date:             # <<<<<<<<<<<<<<
 *                     cValue = fillString(f'{value.year:04}{value.month:02}{value.day:02}')
 *                 else:
 */
            goto __pyx_L60;
          }

          /* "pyrfc/_cyrfc.pyx":2507
 *                     cValue = fillString(f'{value.year:04}{value.month:02}{value.day:02}')
 *                 else:
 *                     try:             # <<<<<<<<<<<<<<
 *                         if len(value) != 8:
 *                             format_ok = False
 */
          /*else*/ {
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
              __Pyx_XGOTREF(__pyx_t_15);
              __Pyx_XGOTREF(__pyx_t_16);
              __Pyx_XGOTREF(__pyx_t_17);
              /*try:*/ {

                /* "pyrfc/_cyrfc.pyx":2508
 *                 else:
 *                     try:
 *                         if len(value) != 8:             # <<<<<<<<<<<<<<
 *                             format_ok = False
 *                         else:
 */
                __pyx_t_9 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2508, __pyx_L61_error)
                __pyx_t_4 = ((__pyx_t_9 != 8) != 0);
                if (__pyx_t_4) {

                  /* "pyrfc/_cyrfc.pyx":2509
 *                     try:
 *                         if len(value) != 8:
 *                             format_ok = False             # <<<<<<<<<<<<<<
 *                         else:
 *                             if len(value.rstrip()) > 0:
 */
                  __pyx_v_format_ok = 0;

                  /* "pyrfc/_cyrfc.pyx":2508
 *                 else:
 *                     try:
 *                         if len(value) != 8:             # <<<<<<<<<<<<<<
 *                             format_ok = False
 *                         else:
 */
                  goto __pyx_L67;
                }

                /* "pyrfc/_cyrfc.pyx":2511
 *                             format_ok = False
 *                         else:
 *                             if len(value.rstrip()) > 0:             # <<<<<<<<<<<<<<
 *                                 date(int(value[:4]), int(value[4:6]), int(value[6:8]))
 *                             cValue = fillString(value)
 */
                /*else*/ {
                  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2511, __pyx_L61_error)
                  __Pyx_GOTREF(__pyx_t_11);
                  __pyx_t_19 = NULL;
                  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
                    __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_11);
                    if (likely(__pyx_t_19)) {
                      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
                      __Pyx_INCREF(__pyx_t_19);
                      __Pyx_INCREF(function);
                      __Pyx_DECREF_SET(__pyx_t_11, function);
                    }
                  }
                  __pyx_t_7 = (__pyx_t_19) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_19) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
                  __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
                  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2511, __pyx_L61_error)
                  __Pyx_GOTREF(__pyx_t_7);
                  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                  __pyx_t_9 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2511, __pyx_L61_error)
                  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                  __pyx_t_4 = ((__pyx_t_9 > 0) != 0);
                  if (__pyx_t_4) {

                    /* "pyrfc/_cyrfc.pyx":2512
 *                         else:
 *                             if len(value.rstrip()) > 0:
 *                                 date(int(value[:4]), int(value[4:6]), int(value[6:8]))             # <<<<<<<<<<<<<<
 *                             cValue = fillString(value)
 *                     except Exception as ex:
 */
                    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_date); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2512, __pyx_L61_error)
                    __Pyx_GOTREF(__pyx_t_11);
                    __pyx_t_19 = __Pyx_PyObject_GetSlice(__pyx_v_value, 0, 4, NULL, NULL, &__pyx_slice__38, 0, 1, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2512, __pyx_L61_error)
                    __Pyx_GOTREF(__pyx_t_19);
                    __pyx_t_28 = __Pyx_PyNumber_Int(__pyx_t_19); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 2512, __pyx_L61_error)
                    __Pyx_GOTREF(__pyx_t_28);
                    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
                    __pyx_t_19 = __Pyx_PyObject_GetSlice(__pyx_v_value, 4, 6, NULL, NULL, &__pyx_slice__39, 1, 1, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2512, __pyx_L61_error)
                    __Pyx_GOTREF(__pyx_t_19);
                    __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_t_19); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2512, __pyx_L61_error)
                    __Pyx_GOTREF(__pyx_t_6);
                    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
                    __pyx_t_19 = __Pyx_PyObject_GetSlice(__pyx_v_value, 6, 8, NULL, NULL, &__pyx_slice__40, 1, 1, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2512, __pyx_L61_error)
                    __Pyx_GOTREF(__pyx_t_19);
                    __pyx_t_18 = __Pyx_PyNumber_Int(__pyx_t_19); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2512, __pyx_L61_error)
                    __Pyx_GOTREF(__pyx_t_18);
                    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
                    __pyx_t_19 = NULL;
                    __pyx_t_10 = 0;
                    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
                      __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_11);
                      if (likely(__pyx_t_19)) {
                        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
                        __Pyx_INCREF(__pyx_t_19);
                        __Pyx_INCREF(function);
                        __Pyx_DECREF_SET(__pyx_t_11, function);
                        __pyx_t_10 = 1;
                      }
                    }
                    #if CYTHON_FAST_PYCALL
                    if (PyFunction_Check(__pyx_t_11)) {
                      PyObject *__pyx_temp[4] = {__pyx_t_19, __pyx_t_28, __pyx_t_6, __pyx_t_18};
                      __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2512, __pyx_L61_error)
                      __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
                    } else
                    #endif
                    #if CYTHON_FAST_PYCCALL
                    if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
                      PyObject *__pyx_temp[4] = {__pyx_t_19, __pyx_t_28, __pyx_t_6, __pyx_t_18};
                      __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2512, __pyx_L61_error)
                      __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
                    } else
                    #endif
                    {
                      __pyx_t_33 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_33)) __PYX_ERR(0, 2512, __pyx_L61_error)
                      __Pyx_GOTREF(__pyx_t_33);
                      if (__pyx_t_19) {
                        __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_33, 0, __pyx_t_19); __pyx_t_19 = NULL;
                      }
                      __Pyx_GIVEREF(__pyx_t_28);
                      PyTuple_SET_ITEM(__pyx_t_33, 0+__pyx_t_10, __pyx_t_28);
                      __Pyx_GIVEREF(__pyx_t_6);
                      PyTuple_SET_ITEM(__pyx_t_33, 1+__pyx_t_10, __pyx_t_6);
                      __Pyx_GIVEREF(__pyx_t_18);
                      PyTuple_SET_ITEM(__pyx_t_33, 2+__pyx_t_10, __pyx_t_18);
                      __pyx_t_28 = 0;
                      __pyx_t_6 = 0;
                      __pyx_t_18 = 0;
                      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_33, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2512, __pyx_L61_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
                    }
                    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

                    /* "pyrfc/_cyrfc.pyx":2511
 *                             format_ok = False
 *                         else:
 *                             if len(value.rstrip()) > 0:             # <<<<<<<<<<<<<<
 *                                 date(int(value[:4]), int(value[4:6]), int(value[6:8]))
 *                             cValue = fillString(value)
 */
                  }

                  /* "pyrfc/_cyrfc.pyx":2513
 *                             if len(value.rstrip()) > 0:
 *                                 date(int(value[:4]), int(value[4:6]), int(value[6:8]))
 *                             cValue = fillString(value)             # <<<<<<<<<<<<<<
 *                     except Exception as ex:
 *                         format_ok = False
 */
                  __pyx_t_14 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_value); if (unlikely(__pyx_t_14 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2513, __pyx_L61_error)
                  __pyx_v_cValue = __pyx_t_14;
                }
                __pyx_L67:;

                /* "pyrfc/_cyrfc.pyx":2507
 *                     cValue = fillString(f'{value.year:04}{value.month:02}{value.day:02}')
 *                 else:
 *                     try:             # <<<<<<<<<<<<<<
 *                         if len(value) != 8:
 *                             format_ok = False
 */
              }
              __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
              __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
              goto __pyx_L66_try_end;
              __pyx_L61_error:;
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
              __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
              __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0;
              __Pyx_XDECREF(__pyx_t_33); __pyx_t_33 = 0;
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

              /* "pyrfc/_cyrfc.pyx":2514
 *                                 date(int(value[:4]), int(value[4:6]), int(value[6:8]))
 *                             cValue = fillString(value)
 *                     except Exception as ex:             # <<<<<<<<<<<<<<
 *                         format_ok = False
 *                 if not format_ok:
 */
              __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
              if (__pyx_t_10) {
                __Pyx_AddTraceback("pyrfc._cyrfc.fillVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
                if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_11, &__pyx_t_33) < 0) __PYX_ERR(0, 2514, __pyx_L63_except_error)
                __Pyx_GOTREF(__pyx_t_7);
                __Pyx_GOTREF(__pyx_t_11);
                __Pyx_GOTREF(__pyx_t_33);
                __Pyx_INCREF(__pyx_t_11);
                __pyx_v_ex = __pyx_t_11;
                /*try:*/ {

                  /* "pyrfc/_cyrfc.pyx":2515
 *                             cValue = fillString(value)
 *                     except Exception as ex:
 *                         format_ok = False             # <<<<<<<<<<<<<<
 *                 if not format_ok:
 *                     raise TypeError('date value required, received', value, 'of type', type(value))
 */
                  __pyx_v_format_ok = 0;
                }

                /* "pyrfc/_cyrfc.pyx":2514
 *                                 date(int(value[:4]), int(value[4:6]), int(value[6:8]))
 *                             cValue = fillString(value)
 *                     except Exception as ex:             # <<<<<<<<<<<<<<
 *                         format_ok = False
 *                 if not format_ok:
 */
                /*finally:*/ {
                  /*normal exit:*/{
                    __Pyx_DECREF(__pyx_v_ex);
                    __pyx_v_ex = NULL;
                    goto __pyx_L75;
                  }
                  __pyx_L75:;
                }
                __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                __Pyx_XDECREF(__pyx_t_33); __pyx_t_33 = 0;
                goto __pyx_L62_exception_handled;
              }
              goto __pyx_L63_except_error;
              __pyx_L63_except_error:;

              /* "pyrfc/_cyrfc.pyx":2507
 *                     cValue = fillString(f'{value.year:04}{value.month:02}{value.day:02}')
 *                 else:
 *                     try:             # <<<<<<<<<<<<<<
 *                         if len(value) != 8:
 *                             format_ok = False
 */
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_XGIVEREF(__pyx_t_16);
              __Pyx_XGIVEREF(__pyx_t_17);
              __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
              goto __pyx_L3_error;
              __pyx_L62_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_XGIVEREF(__pyx_t_16);
              __Pyx_XGIVEREF(__pyx_t_17);
              __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
              __pyx_L66_try_end:;
            }
          }
          __pyx_L60:;

          /* "pyrfc/_cyrfc.pyx":2516
 *                     except Exception as ex:
 *                         format_ok = False
 *                 if not format_ok:             # <<<<<<<<<<<<<<
 *                     raise TypeError('date value required, received', value, 'of type', type(value))
 *                 rc = RfcSetDate(container, cName, cValue, &errorInfo)
 */
          __pyx_t_4 = ((!(__pyx_v_format_ok != 0)) != 0);
          if (unlikely(__pyx_t_4)) {

            /* "pyrfc/_cyrfc.pyx":2517
 *                         format_ok = False
 *                 if not format_ok:
 *                     raise TypeError('date value required, received', value, 'of type', type(value))             # <<<<<<<<<<<<<<
 *                 rc = RfcSetDate(container, cName, cValue, &errorInfo)
 *                 free(cValue)
 */
            __pyx_t_33 = PyTuple_New(4); if (unlikely(!__pyx_t_33)) __PYX_ERR(0, 2517, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_33);
            __Pyx_INCREF(__pyx_kp_u_date_value_required_received);
            __Pyx_GIVEREF(__pyx_kp_u_date_value_required_received);
            PyTuple_SET_ITEM(__pyx_t_33, 0, __pyx_kp_u_date_value_required_received);
            __Pyx_INCREF(__pyx_v_value);
            __Pyx_GIVEREF(__pyx_v_value);
            PyTuple_SET_ITEM(__pyx_t_33, 1, __pyx_v_value);
            __Pyx_INCREF(__pyx_kp_u_of_type);
            __Pyx_GIVEREF(__pyx_kp_u_of_type);
            PyTuple_SET_ITEM(__pyx_t_33, 2, __pyx_kp_u_of_type);
            __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value)));
            __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_value)));
            PyTuple_SET_ITEM(__pyx_t_33, 3, ((PyObject *)Py_TYPE(__pyx_v_value)));
            __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_33, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2517, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
            __Pyx_Raise(__pyx_t_11, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __PYX_ERR(0, 2517, __pyx_L3_error)

            /* "pyrfc/_cyrfc.pyx":2516
 *                     except Exception as ex:
 *                         format_ok = False
 *                 if not format_ok:             # <<<<<<<<<<<<<<
 *                     raise TypeError('date value required, received', value, 'of type', type(value))
 *                 rc = RfcSetDate(container, cName, cValue, &errorInfo)
 */
          }

          /* "pyrfc/_cyrfc.pyx":2518
 *                 if not format_ok:
 *                     raise TypeError('date value required, received', value, 'of type', type(value))
 *                 rc = RfcSetDate(container, cName, cValue, &errorInfo)             # <<<<<<<<<<<<<<
 *                 free(cValue)
 *             else:
 */
          __pyx_v_rc = RfcSetDate(__pyx_v_container, __pyx_v_cName, __pyx_v_cValue, (&__pyx_v_errorInfo));

          /* "pyrfc/_cyrfc.pyx":2519
 *                     raise TypeError('date value required, received', value, 'of type', type(value))
 *                 rc = RfcSetDate(container, cName, cValue, &errorInfo)
 *                 free(cValue)             # <<<<<<<<<<<<<<
 *             else:
 *                 rc = RFC_OK
 */
          free(__pyx_v_cValue);

          /* "pyrfc/_cyrfc.pyx":2502
 *             free(cValue)
 *         elif typ == RFCTYPE_DATE:
 *             if value:             # <<<<<<<<<<<<<<
 *                 format_ok = True
 *                 if type(value) is date:
 */
          goto __pyx_L59;
        }

        /* "pyrfc/_cyrfc.pyx":2521
 *                 free(cValue)
 *             else:
 *                 rc = RFC_OK             # <<<<<<<<<<<<<<
 *         elif typ == RFCTYPE_TIME:
 *             if value:
 */
        /*else*/ {
          __pyx_v_rc = RFC_OK;
        }
        __pyx_L59:;

        /* "pyrfc/_cyrfc.pyx":2501
 *             rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo)
 *             free(cValue)
 *         elif typ == RFCTYPE_DATE:             # <<<<<<<<<<<<<<
 *             if value:
 *                 format_ok = True
 */
        break;
        case RFCTYPE_TIME:

        /* "pyrfc/_cyrfc.pyx":2523
 *                 rc = RFC_OK
 *         elif typ == RFCTYPE_TIME:
 *             if value:             # <<<<<<<<<<<<<<
 *                 format_ok = True
 *                 if type(value) is time:
 */
        __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2523, __pyx_L3_error)
        if (__pyx_t_4) {

          /* "pyrfc/_cyrfc.pyx":2524
 *         elif typ == RFCTYPE_TIME:
 *             if value:
 *                 format_ok = True             # <<<<<<<<<<<<<<
 *                 if type(value) is time:
 *                     cValue = fillString(f'{value.hour:02}{value.minute:02}{value.second:02}')
 */
          __pyx_v_format_ok = 1;

          /* "pyrfc/_cyrfc.pyx":2525
 *             if value:
 *                 format_ok = True
 *                 if type(value) is time:             # <<<<<<<<<<<<<<
 *                     cValue = fillString(f'{value.hour:02}{value.minute:02}{value.second:02}')
 *                 else:
 */
          __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_time); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2525, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_v_value)) == __pyx_t_11);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_5 = (__pyx_t_4 != 0);
          if (__pyx_t_5) {

            /* "pyrfc/_cyrfc.pyx":2526
 *                 format_ok = True
 *                 if type(value) is time:
 *                     cValue = fillString(f'{value.hour:02}{value.minute:02}{value.second:02}')             # <<<<<<<<<<<<<<
 *                 else:
 *                     try:
 */
            __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2526, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_9 = 0;
            __pyx_t_32 = 127;
            __pyx_t_33 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_hour); if (unlikely(!__pyx_t_33)) __PYX_ERR(0, 2526, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_33);
            __pyx_t_7 = __Pyx_PyObject_Format(__pyx_t_33, __pyx_kp_u_02); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2526, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
            __pyx_t_32 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_32) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_32;
            __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
            __Pyx_GIVEREF(__pyx_t_7);
            PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7);
            __pyx_t_7 = 0;
            __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_minute); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2526, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_33 = __Pyx_PyObject_Format(__pyx_t_7, __pyx_kp_u_02); if (unlikely(!__pyx_t_33)) __PYX_ERR(0, 2526, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_33);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_t_32 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_33) > __pyx_t_32) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_33) : __pyx_t_32;
            __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_33);
            __Pyx_GIVEREF(__pyx_t_33);
            PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_33);
            __pyx_t_33 = 0;
            __pyx_t_33 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_second); if (unlikely(!__pyx_t_33)) __PYX_ERR(0, 2526, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_33);
            __pyx_t_7 = __Pyx_PyObject_Format(__pyx_t_33, __pyx_kp_u_02); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2526, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
            __pyx_t_32 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_32) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_32;
            __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
            __Pyx_GIVEREF(__pyx_t_7);
            PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_7);
            __pyx_t_7 = 0;
            __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __pyx_t_9, __pyx_t_32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2526, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_14 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_7); if (unlikely(__pyx_t_14 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2526, __pyx_L3_error)
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_v_cValue = __pyx_t_14;

            /* "pyrfc/_cyrfc.pyx":2525
 *             if value:
 *                 format_ok = True
 *                 if type(value) is time:             # <<<<<<<<<<<<<<
 *                     cValue = fillString(f'{value.hour:02}{value.minute:02}{value.second:02}')
 *                 else:
 */
            goto __pyx_L78;
          }

          /* "pyrfc/_cyrfc.pyx":2528
 *                     cValue = fillString(f'{value.hour:02}{value.minute:02}{value.second:02}')
 *                 else:
 *                     try:             # <<<<<<<<<<<<<<
 *                         if len(value) != 6:
 *                             format_ok = False
 */
          /*else*/ {
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15);
              __Pyx_XGOTREF(__pyx_t_17);
              __Pyx_XGOTREF(__pyx_t_16);
              __Pyx_XGOTREF(__pyx_t_15);
              /*try:*/ {

                /* "pyrfc/_cyrfc.pyx":2529
 *                 else:
 *                     try:
 *                         if len(value) != 6:             # <<<<<<<<<<<<<<
 *                             format_ok = False
 *                         else:
 */
                __pyx_t_9 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2529, __pyx_L79_error)
                __pyx_t_5 = ((__pyx_t_9 != 6) != 0);
                if (__pyx_t_5) {

                  /* "pyrfc/_cyrfc.pyx":2530
 *                     try:
 *                         if len(value) != 6:
 *                             format_ok = False             # <<<<<<<<<<<<<<
 *                         else:
 *                             if len(value.rstrip()) > 0:
 */
                  __pyx_v_format_ok = 0;

                  /* "pyrfc/_cyrfc.pyx":2529
 *                 else:
 *                     try:
 *                         if len(value) != 6:             # <<<<<<<<<<<<<<
 *                             format_ok = False
 *                         else:
 */
                  goto __pyx_L85;
                }

                /* "pyrfc/_cyrfc.pyx":2532
 *                             format_ok = False
 *                         else:
 *                             if len(value.rstrip()) > 0:             # <<<<<<<<<<<<<<
 *                                 time(int(value[:2]), int(value[2:4]), int(value[4:6]))
 *                             cValue = fillString(value)
 */
                /*else*/ {
                  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2532, __pyx_L79_error)
                  __Pyx_GOTREF(__pyx_t_11);
                  __pyx_t_33 = NULL;
                  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
                    __pyx_t_33 = PyMethod_GET_SELF(__pyx_t_11);
                    if (likely(__pyx_t_33)) {
                      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
                      __Pyx_INCREF(__pyx_t_33);
                      __Pyx_INCREF(function);
                      __Pyx_DECREF_SET(__pyx_t_11, function);
                    }
                  }
                  __pyx_t_7 = (__pyx_t_33) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_33) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
                  __Pyx_XDECREF(__pyx_t_33); __pyx_t_33 = 0;
                  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2532, __pyx_L79_error)
                  __Pyx_GOTREF(__pyx_t_7);
                  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                  __pyx_t_9 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2532, __pyx_L79_error)
                  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                  __pyx_t_5 = ((__pyx_t_9 > 0) != 0);
                  if (__pyx_t_5) {

                    /* "pyrfc/_cyrfc.pyx":2533
 *                         else:
 *                             if len(value.rstrip()) > 0:
 *                                 time(int(value[:2]), int(value[2:4]), int(value[4:6]))             # <<<<<<<<<<<<<<
 *                             cValue = fillString(value)
 *                     except Exception as ex:
 */
                    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_time); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2533, __pyx_L79_error)
                    __Pyx_GOTREF(__pyx_t_11);
                    __pyx_t_33 = __Pyx_PyObject_GetSlice(__pyx_v_value, 0, 2, NULL, NULL, &__pyx_slice__30, 0, 1, 1); if (unlikely(!__pyx_t_33)) __PYX_ERR(0, 2533, __pyx_L79_error)
                    __Pyx_GOTREF(__pyx_t_33);
                    __pyx_t_18 = __Pyx_PyNumber_Int(__pyx_t_33); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2533, __pyx_L79_error)
                    __Pyx_GOTREF(__pyx_t_18);
                    __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
                    __pyx_t_33 = __Pyx_PyObject_GetSlice(__pyx_v_value, 2, 4, NULL, NULL, &__pyx_slice__41, 1, 1, 1); if (unlikely(!__pyx_t_33)) __PYX_ERR(0, 2533, __pyx_L79_error)
                    __Pyx_GOTREF(__pyx_t_33);
                    __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_t_33); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2533, __pyx_L79_error)
                    __Pyx_GOTREF(__pyx_t_6);
                    __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
                    __pyx_t_33 = __Pyx_PyObject_GetSlice(__pyx_v_value, 4, 6, NULL, NULL, &__pyx_slice__39, 1, 1, 1); if (unlikely(!__pyx_t_33)) __PYX_ERR(0, 2533, __pyx_L79_error)
                    __Pyx_GOTREF(__pyx_t_33);
                    __pyx_t_28 = __Pyx_PyNumber_Int(__pyx_t_33); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 2533, __pyx_L79_error)
                    __Pyx_GOTREF(__pyx_t_28);
                    __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
                    __pyx_t_33 = NULL;
                    __pyx_t_10 = 0;
                    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
                      __pyx_t_33 = PyMethod_GET_SELF(__pyx_t_11);
                      if (likely(__pyx_t_33)) {
                        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
                        __Pyx_INCREF(__pyx_t_33);
                        __Pyx_INCREF(function);
                        __Pyx_DECREF_SET(__pyx_t_11, function);
                        __pyx_t_10 = 1;
                      }
                    }
                    #if CYTHON_FAST_PYCALL
                    if (PyFunction_Check(__pyx_t_11)) {
                      PyObject *__pyx_temp[4] = {__pyx_t_33, __pyx_t_18, __pyx_t_6, __pyx_t_28};
                      __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2533, __pyx_L79_error)
                      __Pyx_XDECREF(__pyx_t_33); __pyx_t_33 = 0;
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                      __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
                    } else
                    #endif
                    #if CYTHON_FAST_PYCCALL
                    if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
                      PyObject *__pyx_temp[4] = {__pyx_t_33, __pyx_t_18, __pyx_t_6, __pyx_t_28};
                      __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2533, __pyx_L79_error)
                      __Pyx_XDECREF(__pyx_t_33); __pyx_t_33 = 0;
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                      __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
                    } else
                    #endif
                    {
                      __pyx_t_19 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2533, __pyx_L79_error)
                      __Pyx_GOTREF(__pyx_t_19);
                      if (__pyx_t_33) {
                        __Pyx_GIVEREF(__pyx_t_33); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_33); __pyx_t_33 = NULL;
                      }
                      __Pyx_GIVEREF(__pyx_t_18);
                      PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_10, __pyx_t_18);
                      __Pyx_GIVEREF(__pyx_t_6);
                      PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_10, __pyx_t_6);
                      __Pyx_GIVEREF(__pyx_t_28);
                      PyTuple_SET_ITEM(__pyx_t_19, 2+__pyx_t_10, __pyx_t_28);
                      __pyx_t_18 = 0;
                      __pyx_t_6 = 0;
                      __pyx_t_28 = 0;
                      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_19, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2533, __pyx_L79_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
                    }
                    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

                    /* "pyrfc/_cyrfc.pyx":2532
 *                             format_ok = False
 *                         else:
 *                             if len(value.rstrip()) > 0:             # <<<<<<<<<<<<<<
 *                                 time(int(value[:2]), int(value[2:4]), int(value[4:6]))
 *                             cValue = fillString(value)
 */
                  }

                  /* "pyrfc/_cyrfc.pyx":2534
 *                             if len(value.rstrip()) > 0:
 *                                 time(int(value[:2]), int(value[2:4]), int(value[4:6]))
 *                             cValue = fillString(value)             # <<<<<<<<<<<<<<
 *                     except Exception as ex:
 *                         format_ok = False
 */
                  __pyx_t_14 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_value); if (unlikely(__pyx_t_14 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2534, __pyx_L79_error)
                  __pyx_v_cValue = __pyx_t_14;
                }
                __pyx_L85:;

                /* "pyrfc/_cyrfc.pyx":2528
 *                     cValue = fillString(f'{value.hour:02}{value.minute:02}{value.second:02}')
 *                 else:
 *                     try:             # <<<<<<<<<<<<<<
 *                         if len(value) != 6:
 *                             format_ok = False
 */
              }
              __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
              __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
              goto __pyx_L84_try_end;
              __pyx_L79_error:;
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
              __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
              __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0;
              __Pyx_XDECREF(__pyx_t_33); __pyx_t_33 = 0;
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

              /* "pyrfc/_cyrfc.pyx":2535
 *                                 time(int(value[:2]), int(value[2:4]), int(value[4:6]))
 *                             cValue = fillString(value)
 *                     except Exception as ex:             # <<<<<<<<<<<<<<
 *                         format_ok = False
 * 
 */
              __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
              if (__pyx_t_10) {
                __Pyx_AddTraceback("pyrfc._cyrfc.fillVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
                if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_11, &__pyx_t_19) < 0) __PYX_ERR(0, 2535, __pyx_L81_except_error)
                __Pyx_GOTREF(__pyx_t_7);
                __Pyx_GOTREF(__pyx_t_11);
                __Pyx_GOTREF(__pyx_t_19);
                __Pyx_INCREF(__pyx_t_11);
                __pyx_v_ex = __pyx_t_11;
                /*try:*/ {

                  /* "pyrfc/_cyrfc.pyx":2536
 *                             cValue = fillString(value)
 *                     except Exception as ex:
 *                         format_ok = False             # <<<<<<<<<<<<<<
 * 
 *                 if not format_ok:
 */
                  __pyx_v_format_ok = 0;
                }

                /* "pyrfc/_cyrfc.pyx":2535
 *                                 time(int(value[:2]), int(value[2:4]), int(value[4:6]))
 *                             cValue = fillString(value)
 *                     except Exception as ex:             # <<<<<<<<<<<<<<
 *                         format_ok = False
 * 
 */
                /*finally:*/ {
                  /*normal exit:*/{
                    __Pyx_DECREF(__pyx_v_ex);
                    __pyx_v_ex = NULL;
                    goto __pyx_L93;
                  }
                  __pyx_L93:;
                }
                __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
                goto __pyx_L80_exception_handled;
              }
              goto __pyx_L81_except_error;
              __pyx_L81_except_error:;

              /* "pyrfc/_cyrfc.pyx":2528
 *                     cValue = fillString(f'{value.hour:02}{value.minute:02}{value.second:02}')
 *                 else:
 *                     try:             # <<<<<<<<<<<<<<
 *                         if len(value) != 6:
 *                             format_ok = False
 */
              __Pyx_XGIVEREF(__pyx_t_17);
              __Pyx_XGIVEREF(__pyx_t_16);
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
              goto __pyx_L3_error;
              __pyx_L80_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_17);
              __Pyx_XGIVEREF(__pyx_t_16);
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
              __pyx_L84_try_end:;
            }
          }
          __pyx_L78:;

          /* "pyrfc/_cyrfc.pyx":2538
 *                         format_ok = False
 * 
 *                 if not format_ok:             # <<<<<<<<<<<<<<
 *                     raise TypeError('time value required, received', value, 'of type', type(value))
 *                 rc = RfcSetTime(container, cName, cValue, &errorInfo)
 */
          __pyx_t_5 = ((!(__pyx_v_format_ok != 0)) != 0);
          if (unlikely(__pyx_t_5)) {

            /* "pyrfc/_cyrfc.pyx":2539
 * 
 *                 if not format_ok:
 *                     raise TypeError('time value required, received', value, 'of type', type(value))             # <<<<<<<<<<<<<<
 *                 rc = RfcSetTime(container, cName, cValue, &errorInfo)
 *                 free(cValue)
 */
            __pyx_t_19 = PyTuple_New(4); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2539, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_19);
            __Pyx_INCREF(__pyx_kp_u_time_value_required_received);
            __Pyx_GIVEREF(__pyx_kp_u_time_value_required_received);
            PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_kp_u_time_value_required_received);
            __Pyx_INCREF(__pyx_v_value);
            __Pyx_GIVEREF(__pyx_v_value);
            PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_v_value);
            __Pyx_INCREF(__pyx_kp_u_of_type);
            __Pyx_GIVEREF(__pyx_kp_u_of_type);
            PyTuple_SET_ITEM(__pyx_t_19, 2, __pyx_kp_u_of_type);
            __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value)));
            __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_value)));
            PyTuple_SET_ITEM(__pyx_t_19, 3, ((PyObject *)Py_TYPE(__pyx_v_value)));
            __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_19, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2539, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
            __Pyx_Raise(__pyx_t_11, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __PYX_ERR(0, 2539, __pyx_L3_error)

            /* "pyrfc/_cyrfc.pyx":2538
 *                         format_ok = False
 * 
 *                 if not format_ok:             # <<<<<<<<<<<<<<
 *                     raise TypeError('time value required, received', value, 'of type', type(value))
 *                 rc = RfcSetTime(container, cName, cValue, &errorInfo)
 */
          }

          /* "pyrfc/_cyrfc.pyx":2540
 *                 if not format_ok:
 *                     raise TypeError('time value required, received', value, 'of type', type(value))
 *                 rc = RfcSetTime(container, cName, cValue, &errorInfo)             # <<<<<<<<<<<<<<
 *                 free(cValue)
 *             else:
 */
          __pyx_v_rc = RfcSetTime(__pyx_v_container, __pyx_v_cName, __pyx_v_cValue, (&__pyx_v_errorInfo));

          /* "pyrfc/_cyrfc.pyx":2541
 *                     raise TypeError('time value required, received', value, 'of type', type(value))
 *                 rc = RfcSetTime(container, cName, cValue, &errorInfo)
 *                 free(cValue)             # <<<<<<<<<<<<<<
 *             else:
 *                 rc = RFC_OK
 */
          free(__pyx_v_cValue);

          /* "pyrfc/_cyrfc.pyx":2523
 *                 rc = RFC_OK
 *         elif typ == RFCTYPE_TIME:
 *             if value:             # <<<<<<<<<<<<<<
 *                 format_ok = True
 *                 if type(value) is time:
 */
          goto __pyx_L77;
        }

        /* "pyrfc/_cyrfc.pyx":2543
 *                 free(cValue)
 *             else:
 *                 rc = RFC_OK             # <<<<<<<<<<<<<<
 *         else:
 *             raise RFCError('Unknown RFC type %d when filling %s' % (typ, wrapString(cName)))
 */
        /*else*/ {
          __pyx_v_rc = RFC_OK;
        }
        __pyx_L77:;

        /* "pyrfc/_cyrfc.pyx":2522
 *             else:
 *                 rc = RFC_OK
 *         elif typ == RFCTYPE_TIME:             # <<<<<<<<<<<<<<
 *             if value:
 *                 format_ok = True
 */
        break;
        default:

        /* "pyrfc/_cyrfc.pyx":2545
 *                 rc = RFC_OK
 *         else:
 *             raise RFCError('Unknown RFC type %d when filling %s' % (typ, wrapString(cName)))             # <<<<<<<<<<<<<<
 *     except TypeError as e:
 *         # This way the field name will be attached in reverse direction
 */
        __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2545, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_19);
        __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2545, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_9 = 0;
        __pyx_t_32 = 127;
        __Pyx_INCREF(__pyx_kp_u_Unknown_RFC_type);
        __pyx_t_9 += 17;
        __Pyx_GIVEREF(__pyx_kp_u_Unknown_RFC_type);
        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_Unknown_RFC_type);
        __pyx_t_28 = __Pyx_PyUnicode_From_RFCTYPE(__pyx_v_typ, 0, ' ', 'd'); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 2545, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_28);
        __pyx_t_32 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_28) > __pyx_t_32) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_28) : __pyx_t_32;
        __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_28);
        __Pyx_GIVEREF(__pyx_t_28);
        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_28);
        __pyx_t_28 = 0;
        __Pyx_INCREF(__pyx_kp_u_when_filling);
        __pyx_t_9 += 14;
        __Pyx_GIVEREF(__pyx_kp_u_when_filling);
        PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_kp_u_when_filling);
        __pyx_t_28 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_cName, NULL); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 2545, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_28);
        __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_28), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2545, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
        __pyx_t_32 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_32) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_32;
        __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_7, 4, __pyx_t_9, __pyx_t_32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2545, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_19))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_19);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_19, function);
          }
        }
        __pyx_t_11 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_19, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_19, __pyx_t_6);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2545, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
        __Pyx_Raise(__pyx_t_11, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __PYX_ERR(0, 2545, __pyx_L3_error)
        break;
      }

      /* "pyrfc/_cyrfc.pyx":2422
 *     global _LOCALE_RADIX
 *     # print ("fill", wrapString(cName), value, type(value))
 *     try:             # <<<<<<<<<<<<<<
 *         if typ == RFCTYPE_STRUCTURE:
 *             if type(value) is not dict:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0;
    __Pyx_XDECREF(__pyx_t_33); __pyx_t_33 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyrfc/_cyrfc.pyx":2546
 *         else:
 *             raise RFCError('Unknown RFC type %d when filling %s' % (typ, wrapString(cName)))
 *     except TypeError as e:             # <<<<<<<<<<<<<<
 *         # This way the field name will be attached in reverse direction
 *         # to the argument list of the exception. This helps users to find
 */
    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
    if (__pyx_t_10) {
      __Pyx_AddTraceback("pyrfc._cyrfc.fillVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_19, &__pyx_t_6) < 0) __PYX_ERR(0, 2546, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_19);
      __pyx_v_e = __pyx_t_19;
      /*try:*/ {

        /* "pyrfc/_cyrfc.pyx":2550
 *         # to the argument list of the exception. This helps users to find
 *         # mistakes easier in complex mapping scenarios.
 *         e.args += (wrapString(cName), )             # <<<<<<<<<<<<<<
 *         raise
 *     if rc != RFC_OK:
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2550, __pyx_L100_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_28 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_cName, NULL); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 2550, __pyx_L100_error)
        __Pyx_GOTREF(__pyx_t_28);
        __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2550, __pyx_L100_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_28);
        PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_28);
        __pyx_t_28 = 0;
        __pyx_t_28 = PyNumber_InPlaceAdd(__pyx_t_7, __pyx_t_18); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 2550, __pyx_L100_error)
        __Pyx_GOTREF(__pyx_t_28);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_e, __pyx_n_s_args, __pyx_t_28) < 0) __PYX_ERR(0, 2550, __pyx_L100_error)
        __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

        /* "pyrfc/_cyrfc.pyx":2551
 *         # mistakes easier in complex mapping scenarios.
 *         e.args += (wrapString(cName), )
 *         raise             # <<<<<<<<<<<<<<
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 */
        __Pyx_GIVEREF(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_19);
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_ErrRestoreWithState(__pyx_t_11, __pyx_t_19, __pyx_t_6);
        __pyx_t_11 = 0; __pyx_t_19 = 0; __pyx_t_6 = 0; 
        __PYX_ERR(0, 2551, __pyx_L100_error)
      }

      /* "pyrfc/_cyrfc.pyx":2546
 *         else:
 *             raise RFCError('Unknown RFC type %d when filling %s' % (typ, wrapString(cName)))
 *     except TypeError as e:             # <<<<<<<<<<<<<<
 *         # This way the field name will be attached in reverse direction
 *         # to the argument list of the exception. This helps users to find
 */
      /*finally:*/ {
        __pyx_L100_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0;
          __Pyx_XDECREF(__pyx_t_33); __pyx_t_33 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
          if ((PY_MAJOR_VERSION < 3) || 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_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __pyx_t_10 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_34 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e);
            __pyx_v_e = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
          }
          __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_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_34;
          goto __pyx_L5_except_error;
        }
      }
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "pyrfc/_cyrfc.pyx":2422
 *     global _LOCALE_RADIX
 *     # print ("fill", wrapString(cName), value, type(value))
 *     try:             # <<<<<<<<<<<<<<
 *         if typ == RFCTYPE_STRUCTURE:
 *             if type(value) is not dict:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }

  /* "pyrfc/_cyrfc.pyx":2552
 *         e.args += (wrapString(cName), )
 *         raise
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 * 
 */
  __pyx_t_5 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "pyrfc/_cyrfc.pyx":2553
 *         raise
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 * cdef SAP_RAW* fillBytes(pystr) except NULL:
 */
    __pyx_t_6 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2553, __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, 2553, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2552
 *         e.args += (wrapString(cName), )
 *         raise
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":2413
 *         i += 1
 * 
 * cdef fillVariable(RFCTYPE typ, RFC_FUNCTION_HANDLE container, SAP_UC* cName, value, RFC_TYPE_DESC_HANDLE typeDesc):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_28);
  __Pyx_XDECREF(__pyx_t_33);
  __Pyx_AddTraceback("pyrfc._cyrfc.fillVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_ex);
  __Pyx_XDECREF(__pyx_v_svalue);
  __Pyx_XDECREF(__pyx_v_locale_radix);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2555
 *         raise wrapError(&errorInfo)
 * 
 * cdef SAP_RAW* fillBytes(pystr) except NULL:             # <<<<<<<<<<<<<<
 *     cdef size_t size = len(pystr)
 *     cdef SAP_RAW* bytes = <SAP_RAW*> malloc(size)
 */

static SAP_RAW *__pyx_f_5pyrfc_6_cyrfc_fillBytes(PyObject *__pyx_v_pystr) {
  size_t __pyx_v_size;
  SAP_RAW *__pyx_v_bytes;
  SAP_RAW *__pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  char *__pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fillBytes", 0);

  /* "pyrfc/_cyrfc.pyx":2556
 * 
 * cdef SAP_RAW* fillBytes(pystr) except NULL:
 *     cdef size_t size = len(pystr)             # <<<<<<<<<<<<<<
 *     cdef SAP_RAW* bytes = <SAP_RAW*> malloc(size)
 *     memcpy(bytes, <char*> pystr, size)
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_pystr); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2556, __pyx_L1_error)
  __pyx_v_size = __pyx_t_1;

  /* "pyrfc/_cyrfc.pyx":2557
 * cdef SAP_RAW* fillBytes(pystr) except NULL:
 *     cdef size_t size = len(pystr)
 *     cdef SAP_RAW* bytes = <SAP_RAW*> malloc(size)             # <<<<<<<<<<<<<<
 *     memcpy(bytes, <char*> pystr, size)
 *     return bytes
 */
  __pyx_v_bytes = ((SAP_RAW *)malloc(__pyx_v_size));

  /* "pyrfc/_cyrfc.pyx":2558
 *     cdef size_t size = len(pystr)
 *     cdef SAP_RAW* bytes = <SAP_RAW*> malloc(size)
 *     memcpy(bytes, <char*> pystr, size)             # <<<<<<<<<<<<<<
 *     return bytes
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_AsWritableString(__pyx_v_pystr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2558, __pyx_L1_error)
  (void)(memcpy(__pyx_v_bytes, ((char *)__pyx_t_2), __pyx_v_size));

  /* "pyrfc/_cyrfc.pyx":2559
 *     cdef SAP_RAW* bytes = <SAP_RAW*> malloc(size)
 *     memcpy(bytes, <char*> pystr, size)
 *     return bytes             # <<<<<<<<<<<<<<
 * 
 * cdef fillError(exception, RFC_ERROR_INFO* errorInfo):
 */
  __pyx_r = __pyx_v_bytes;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":2555
 *         raise wrapError(&errorInfo)
 * 
 * cdef SAP_RAW* fillBytes(pystr) except NULL:             # <<<<<<<<<<<<<<
 *     cdef size_t size = len(pystr)
 *     cdef SAP_RAW* bytes = <SAP_RAW*> malloc(size)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrfc._cyrfc.fillBytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2561
 *     return bytes
 * 
 * cdef fillError(exception, RFC_ERROR_INFO* errorInfo):             # <<<<<<<<<<<<<<
 *     group2error = {
 *                     ABAPApplicationError: ABAP_APPLICATION_FAILURE,
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_fillError(PyObject *__pyx_v_exception, RFC_ERROR_INFO *__pyx_v_errorInfo) {
  PyObject *__pyx_v_group2error = NULL;
  PyObject *__pyx_v_str = NULL;
  SAP_UC *__pyx_v_sapuc;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  RFC_ERROR_GROUP __pyx_t_6;
  SAP_UC *__pyx_t_7;
  long __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  RFC_RC __pyx_t_11;
  RFC_RC __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fillError", 0);

  /* "pyrfc/_cyrfc.pyx":2563
 * cdef fillError(exception, RFC_ERROR_INFO* errorInfo):
 *     group2error = {
 *                     ABAPApplicationError: ABAP_APPLICATION_FAILURE,             # <<<<<<<<<<<<<<
 *                     ABAPRuntimeError: ABAP_RUNTIME_FAILURE,
 *                     LogonError: LOGON_FAILURE,
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ABAPApplicationError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_RFC_ERROR_GROUP(ABAP_APPLICATION_FAILURE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 2563, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":2564
 *     group2error = {
 *                     ABAPApplicationError: ABAP_APPLICATION_FAILURE,
 *                     ABAPRuntimeError: ABAP_RUNTIME_FAILURE,             # <<<<<<<<<<<<<<
 *                     LogonError: LOGON_FAILURE,
 *                     CommunicationError: COMMUNICATION_FAILURE,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ABAPRuntimeError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyInt_From_RFC_ERROR_GROUP(ABAP_RUNTIME_FAILURE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_2) < 0) __PYX_ERR(0, 2563, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2565
 *                     ABAPApplicationError: ABAP_APPLICATION_FAILURE,
 *                     ABAPRuntimeError: ABAP_RUNTIME_FAILURE,
 *                     LogonError: LOGON_FAILURE,             # <<<<<<<<<<<<<<
 *                     CommunicationError: COMMUNICATION_FAILURE,
 *                     ExternalRuntimeError: EXTERNAL_RUNTIME_FAILURE,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_LogonError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_RFC_ERROR_GROUP(LOGON_FAILURE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 2563, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":2566
 *                     ABAPRuntimeError: ABAP_RUNTIME_FAILURE,
 *                     LogonError: LOGON_FAILURE,
 *                     CommunicationError: COMMUNICATION_FAILURE,             # <<<<<<<<<<<<<<
 *                     ExternalRuntimeError: EXTERNAL_RUNTIME_FAILURE,
 *                     ExternalApplicationError: EXTERNAL_APPLICATION_FAILURE,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CommunicationError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyInt_From_RFC_ERROR_GROUP(COMMUNICATION_FAILURE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_2) < 0) __PYX_ERR(0, 2563, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2567
 *                     LogonError: LOGON_FAILURE,
 *                     CommunicationError: COMMUNICATION_FAILURE,
 *                     ExternalRuntimeError: EXTERNAL_RUNTIME_FAILURE,             # <<<<<<<<<<<<<<
 *                     ExternalApplicationError: EXTERNAL_APPLICATION_FAILURE,
 *                     ExternalAuthorizationError: EXTERNAL_AUTHORIZATION_FAILURE
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ExternalRuntimeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_RFC_ERROR_GROUP(EXTERNAL_RUNTIME_FAILURE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 2563, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":2568
 *                     CommunicationError: COMMUNICATION_FAILURE,
 *                     ExternalRuntimeError: EXTERNAL_RUNTIME_FAILURE,
 *                     ExternalApplicationError: EXTERNAL_APPLICATION_FAILURE,             # <<<<<<<<<<<<<<
 *                     ExternalAuthorizationError: EXTERNAL_AUTHORIZATION_FAILURE
 *                 }
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ExternalApplicationError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyInt_From_RFC_ERROR_GROUP(EXTERNAL_APPLICATION_FAILURE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_2) < 0) __PYX_ERR(0, 2563, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2569
 *                     ExternalRuntimeError: EXTERNAL_RUNTIME_FAILURE,
 *                     ExternalApplicationError: EXTERNAL_APPLICATION_FAILURE,
 *                     ExternalAuthorizationError: EXTERNAL_AUTHORIZATION_FAILURE             # <<<<<<<<<<<<<<
 *                 }
 *     if type(exception) not in group2error:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ExternalAuthorizationError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_RFC_ERROR_GROUP(EXTERNAL_AUTHORIZATION_FAILURE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 2563, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_group2error = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2571
 *                     ExternalAuthorizationError: EXTERNAL_AUTHORIZATION_FAILURE
 *                 }
 *     if type(exception) not in group2error:             # <<<<<<<<<<<<<<
 *         raise RFCError("Not a valid error group.")
 * 
 */
  __pyx_t_4 = (__Pyx_PyDict_ContainsTF(((PyObject *)Py_TYPE(__pyx_v_exception)), __pyx_v_group2error, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2571, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (unlikely(__pyx_t_5)) {

    /* "pyrfc/_cyrfc.pyx":2572
 *                 }
 *     if type(exception) not in group2error:
 *         raise RFCError("Not a valid error group.")             # <<<<<<<<<<<<<<
 * 
 *     errorInfo.group = group2error.get(type(exception))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_u_Not_a_valid_error_group) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_Not_a_valid_error_group);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2572, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2571
 *                     ExternalAuthorizationError: EXTERNAL_AUTHORIZATION_FAILURE
 *                 }
 *     if type(exception) not in group2error:             # <<<<<<<<<<<<<<
 *         raise RFCError("Not a valid error group.")
 * 
 */
  }

  /* "pyrfc/_cyrfc.pyx":2574
 *         raise RFCError("Not a valid error group.")
 * 
 *     errorInfo.group = group2error.get(type(exception))             # <<<<<<<<<<<<<<
 * 
 *     if exception.message:  # fixed length, exactly 512 chars
 */
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_group2error, ((PyObject *)Py_TYPE(__pyx_v_exception)), Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = ((RFC_ERROR_GROUP)__Pyx_PyInt_As_RFC_ERROR_GROUP(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2574, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_errorInfo->group = __pyx_t_6;

  /* "pyrfc/_cyrfc.pyx":2576
 *     errorInfo.group = group2error.get(type(exception))
 * 
 *     if exception.message:  # fixed length, exactly 512 chars             # <<<<<<<<<<<<<<
 *         # str = exception.message[0:512].ljust(512)
 *         str = exception.message[0:512]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2576, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "pyrfc/_cyrfc.pyx":2578
 *     if exception.message:  # fixed length, exactly 512 chars
 *         # str = exception.message[0:512].ljust(512)
 *         str = exception.message[0:512]             # <<<<<<<<<<<<<<
 *         sapuc = fillString(str)
 *         strncpyU(errorInfo.message, sapuc, min(len(str)+1, 512))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0x200, NULL, NULL, &__pyx_slice__42, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_str = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":2579
 *         # str = exception.message[0:512].ljust(512)
 *         str = exception.message[0:512]
 *         sapuc = fillString(str)             # <<<<<<<<<<<<<<
 *         strncpyU(errorInfo.message, sapuc, min(len(str)+1, 512))
 *         free(sapuc)
 */
    __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_str); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2579, __pyx_L1_error)
    __pyx_v_sapuc = __pyx_t_7;

    /* "pyrfc/_cyrfc.pyx":2580
 *         str = exception.message[0:512]
 *         sapuc = fillString(str)
 *         strncpyU(errorInfo.message, sapuc, min(len(str)+1, 512))             # <<<<<<<<<<<<<<
 *         free(sapuc)
 *     errorInfo.code = exception.code if exception.code else RFC_UNKNOWN_ERROR
 */
    __pyx_t_8 = 0x200;
    __pyx_t_9 = PyObject_Length(__pyx_v_str); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2580, __pyx_L1_error)
    __pyx_t_10 = (__pyx_t_9 + 1);
    if (((__pyx_t_8 < __pyx_t_10) != 0)) {
      __pyx_t_9 = __pyx_t_8;
    } else {
      __pyx_t_9 = __pyx_t_10;
    }
    strncpyU(__pyx_v_errorInfo->message, __pyx_v_sapuc, __pyx_t_9);

    /* "pyrfc/_cyrfc.pyx":2581
 *         sapuc = fillString(str)
 *         strncpyU(errorInfo.message, sapuc, min(len(str)+1, 512))
 *         free(sapuc)             # <<<<<<<<<<<<<<
 *     errorInfo.code = exception.code if exception.code else RFC_UNKNOWN_ERROR
 *     if exception.key:  # fixed length, exactly 128 chars
 */
    free(__pyx_v_sapuc);

    /* "pyrfc/_cyrfc.pyx":2576
 *     errorInfo.group = group2error.get(type(exception))
 * 
 *     if exception.message:  # fixed length, exactly 512 chars             # <<<<<<<<<<<<<<
 *         # str = exception.message[0:512].ljust(512)
 *         str = exception.message[0:512]
 */
  }

  /* "pyrfc/_cyrfc.pyx":2582
 *         strncpyU(errorInfo.message, sapuc, min(len(str)+1, 512))
 *         free(sapuc)
 *     errorInfo.code = exception.code if exception.code else RFC_UNKNOWN_ERROR             # <<<<<<<<<<<<<<
 *     if exception.key:  # fixed length, exactly 128 chars
 *         str = exception.key[0:128]
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2582, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_12 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_3)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2582, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_11 = __pyx_t_12;
  } else {
    __pyx_t_11 = RFC_UNKNOWN_ERROR;
  }
  __pyx_v_errorInfo->code = __pyx_t_11;

  /* "pyrfc/_cyrfc.pyx":2583
 *         free(sapuc)
 *     errorInfo.code = exception.code if exception.code else RFC_UNKNOWN_ERROR
 *     if exception.key:  # fixed length, exactly 128 chars             # <<<<<<<<<<<<<<
 *         str = exception.key[0:128]
 *         sapuc = fillString(str)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2583, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {

    /* "pyrfc/_cyrfc.pyx":2584
 *     errorInfo.code = exception.code if exception.code else RFC_UNKNOWN_ERROR
 *     if exception.key:  # fixed length, exactly 128 chars
 *         str = exception.key[0:128]             # <<<<<<<<<<<<<<
 *         sapuc = fillString(str)
 *         strncpyU(errorInfo.key, sapuc, min(len(str)+1, 128))
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 0x80, NULL, NULL, &__pyx_slice__43, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_str, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":2585
 *     if exception.key:  # fixed length, exactly 128 chars
 *         str = exception.key[0:128]
 *         sapuc = fillString(str)             # <<<<<<<<<<<<<<
 *         strncpyU(errorInfo.key, sapuc, min(len(str)+1, 128))
 *         free(sapuc)
 */
    __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_str); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2585, __pyx_L1_error)
    __pyx_v_sapuc = __pyx_t_7;

    /* "pyrfc/_cyrfc.pyx":2586
 *         str = exception.key[0:128]
 *         sapuc = fillString(str)
 *         strncpyU(errorInfo.key, sapuc, min(len(str)+1, 128))             # <<<<<<<<<<<<<<
 *         free(sapuc)
 *     if exception.msg_class:
 */
    __pyx_t_8 = 0x80;
    __pyx_t_9 = PyObject_Length(__pyx_v_str); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2586, __pyx_L1_error)
    __pyx_t_10 = (__pyx_t_9 + 1);
    if (((__pyx_t_8 < __pyx_t_10) != 0)) {
      __pyx_t_9 = __pyx_t_8;
    } else {
      __pyx_t_9 = __pyx_t_10;
    }
    strncpyU(__pyx_v_errorInfo->key, __pyx_v_sapuc, __pyx_t_9);

    /* "pyrfc/_cyrfc.pyx":2587
 *         sapuc = fillString(str)
 *         strncpyU(errorInfo.key, sapuc, min(len(str)+1, 128))
 *         free(sapuc)             # <<<<<<<<<<<<<<
 *     if exception.msg_class:
 *         sapuc = fillString(exception.msg_class[0:20])
 */
    free(__pyx_v_sapuc);

    /* "pyrfc/_cyrfc.pyx":2583
 *         free(sapuc)
 *     errorInfo.code = exception.code if exception.code else RFC_UNKNOWN_ERROR
 *     if exception.key:  # fixed length, exactly 128 chars             # <<<<<<<<<<<<<<
 *         str = exception.key[0:128]
 *         sapuc = fillString(str)
 */
  }

  /* "pyrfc/_cyrfc.pyx":2588
 *         strncpyU(errorInfo.key, sapuc, min(len(str)+1, 128))
 *         free(sapuc)
 *     if exception.msg_class:             # <<<<<<<<<<<<<<
 *         sapuc = fillString(exception.msg_class[0:20])
 *         strncpyU(errorInfo.abapMsgClass, sapuc, len(exception.msg_class[0:20]) + 1)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_msg_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2588, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "pyrfc/_cyrfc.pyx":2589
 *         free(sapuc)
 *     if exception.msg_class:
 *         sapuc = fillString(exception.msg_class[0:20])             # <<<<<<<<<<<<<<
 *         strncpyU(errorInfo.abapMsgClass, sapuc, len(exception.msg_class[0:20]) + 1)
 *         free(sapuc)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_msg_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 20, NULL, NULL, &__pyx_slice__14, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_3); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2589, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_sapuc = __pyx_t_7;

    /* "pyrfc/_cyrfc.pyx":2590
 *     if exception.msg_class:
 *         sapuc = fillString(exception.msg_class[0:20])
 *         strncpyU(errorInfo.abapMsgClass, sapuc, len(exception.msg_class[0:20]) + 1)             # <<<<<<<<<<<<<<
 *         free(sapuc)
 *     if exception.msg_type:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_msg_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 20, NULL, NULL, &__pyx_slice__14, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_9 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2590, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    strncpyU(__pyx_v_errorInfo->abapMsgClass, __pyx_v_sapuc, (__pyx_t_9 + 1));

    /* "pyrfc/_cyrfc.pyx":2591
 *         sapuc = fillString(exception.msg_class[0:20])
 *         strncpyU(errorInfo.abapMsgClass, sapuc, len(exception.msg_class[0:20]) + 1)
 *         free(sapuc)             # <<<<<<<<<<<<<<
 *     if exception.msg_type:
 *         sapuc = fillString(exception.msg_type[0:1])
 */
    free(__pyx_v_sapuc);

    /* "pyrfc/_cyrfc.pyx":2588
 *         strncpyU(errorInfo.key, sapuc, min(len(str)+1, 128))
 *         free(sapuc)
 *     if exception.msg_class:             # <<<<<<<<<<<<<<
 *         sapuc = fillString(exception.msg_class[0:20])
 *         strncpyU(errorInfo.abapMsgClass, sapuc, len(exception.msg_class[0:20]) + 1)
 */
  }

  /* "pyrfc/_cyrfc.pyx":2592
 *         strncpyU(errorInfo.abapMsgClass, sapuc, len(exception.msg_class[0:20]) + 1)
 *         free(sapuc)
 *     if exception.msg_type:             # <<<<<<<<<<<<<<
 *         sapuc = fillString(exception.msg_type[0:1])
 *         strncpyU(errorInfo.abapMsgType, sapuc, len(exception.msg_type[0:1]) + 1)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_msg_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2592, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "pyrfc/_cyrfc.pyx":2593
 *         free(sapuc)
 *     if exception.msg_type:
 *         sapuc = fillString(exception.msg_type[0:1])             # <<<<<<<<<<<<<<
 *         strncpyU(errorInfo.abapMsgType, sapuc, len(exception.msg_type[0:1]) + 1)
 *         free(sapuc)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_msg_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 1, NULL, NULL, &__pyx_slice__44, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_3); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2593, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_sapuc = __pyx_t_7;

    /* "pyrfc/_cyrfc.pyx":2594
 *     if exception.msg_type:
 *         sapuc = fillString(exception.msg_type[0:1])
 *         strncpyU(errorInfo.abapMsgType, sapuc, len(exception.msg_type[0:1]) + 1)             # <<<<<<<<<<<<<<
 *         free(sapuc)
 *     if exception.msg_number:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_msg_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 1, NULL, NULL, &__pyx_slice__44, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_9 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2594, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    strncpyU(__pyx_v_errorInfo->abapMsgType, __pyx_v_sapuc, (__pyx_t_9 + 1));

    /* "pyrfc/_cyrfc.pyx":2595
 *         sapuc = fillString(exception.msg_type[0:1])
 *         strncpyU(errorInfo.abapMsgType, sapuc, len(exception.msg_type[0:1]) + 1)
 *         free(sapuc)             # <<<<<<<<<<<<<<
 *     if exception.msg_number:
 *         sapuc = fillString(exception.msg_number[0:3])
 */
    free(__pyx_v_sapuc);

    /* "pyrfc/_cyrfc.pyx":2592
 *         strncpyU(errorInfo.abapMsgClass, sapuc, len(exception.msg_class[0:20]) + 1)
 *         free(sapuc)
 *     if exception.msg_type:             # <<<<<<<<<<<<<<
 *         sapuc = fillString(exception.msg_type[0:1])
 *         strncpyU(errorInfo.abapMsgType, sapuc, len(exception.msg_type[0:1]) + 1)
 */
  }

  /* "pyrfc/_cyrfc.pyx":2596
 *         strncpyU(errorInfo.abapMsgType, sapuc, len(exception.msg_type[0:1]) + 1)
 *         free(sapuc)
 *     if exception.msg_number:             # <<<<<<<<<<<<<<
 *         sapuc = fillString(exception.msg_number[0:3])
 *         strncpyU(errorInfo.abapMsgNumber, sapuc, len(exception.msg_number[0:3]) + 1)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_msg_number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2596, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "pyrfc/_cyrfc.pyx":2597
 *         free(sapuc)
 *     if exception.msg_number:
 *         sapuc = fillString(exception.msg_number[0:3])             # <<<<<<<<<<<<<<
 *         strncpyU(errorInfo.abapMsgNumber, sapuc, len(exception.msg_number[0:3]) + 1)
 *         free(sapuc)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_msg_number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 3, NULL, NULL, &__pyx_slice__13, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_3); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2597, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_sapuc = __pyx_t_7;

    /* "pyrfc/_cyrfc.pyx":2598
 *     if exception.msg_number:
 *         sapuc = fillString(exception.msg_number[0:3])
 *         strncpyU(errorInfo.abapMsgNumber, sapuc, len(exception.msg_number[0:3]) + 1)             # <<<<<<<<<<<<<<
 *         free(sapuc)
 *     if exception.msg_v1:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_msg_number); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 3, NULL, NULL, &__pyx_slice__13, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_9 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2598, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    strncpyU(__pyx_v_errorInfo->abapMsgNumber, __pyx_v_sapuc, (__pyx_t_9 + 1));

    /* "pyrfc/_cyrfc.pyx":2599
 *         sapuc = fillString(exception.msg_number[0:3])
 *         strncpyU(errorInfo.abapMsgNumber, sapuc, len(exception.msg_number[0:3]) + 1)
 *         free(sapuc)             # <<<<<<<<<<<<<<
 *     if exception.msg_v1:
 *         sapuc = fillString(exception.msg_v1[0:50])
 */
    free(__pyx_v_sapuc);

    /* "pyrfc/_cyrfc.pyx":2596
 *         strncpyU(errorInfo.abapMsgType, sapuc, len(exception.msg_type[0:1]) + 1)
 *         free(sapuc)
 *     if exception.msg_number:             # <<<<<<<<<<<<<<
 *         sapuc = fillString(exception.msg_number[0:3])
 *         strncpyU(errorInfo.abapMsgNumber, sapuc, len(exception.msg_number[0:3]) + 1)
 */
  }

  /* "pyrfc/_cyrfc.pyx":2600
 *         strncpyU(errorInfo.abapMsgNumber, sapuc, len(exception.msg_number[0:3]) + 1)
 *         free(sapuc)
 *     if exception.msg_v1:             # <<<<<<<<<<<<<<
 *         sapuc = fillString(exception.msg_v1[0:50])
 *         strncpyU(errorInfo.abapMsgV1, sapuc, len(exception.msg_v1[0:50]) + 1)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_msg_v1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2600, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "pyrfc/_cyrfc.pyx":2601
 *         free(sapuc)
 *     if exception.msg_v1:
 *         sapuc = fillString(exception.msg_v1[0:50])             # <<<<<<<<<<<<<<
 *         strncpyU(errorInfo.abapMsgV1, sapuc, len(exception.msg_v1[0:50]) + 1)
 *         free(sapuc)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_msg_v1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 50, NULL, NULL, &__pyx_slice__45, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_3); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2601, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_sapuc = __pyx_t_7;

    /* "pyrfc/_cyrfc.pyx":2602
 *     if exception.msg_v1:
 *         sapuc = fillString(exception.msg_v1[0:50])
 *         strncpyU(errorInfo.abapMsgV1, sapuc, len(exception.msg_v1[0:50]) + 1)             # <<<<<<<<<<<<<<
 *         free(sapuc)
 *     if exception.msg_v2:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_msg_v1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 50, NULL, NULL, &__pyx_slice__45, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_9 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2602, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    strncpyU(__pyx_v_errorInfo->abapMsgV1, __pyx_v_sapuc, (__pyx_t_9 + 1));

    /* "pyrfc/_cyrfc.pyx":2603
 *         sapuc = fillString(exception.msg_v1[0:50])
 *         strncpyU(errorInfo.abapMsgV1, sapuc, len(exception.msg_v1[0:50]) + 1)
 *         free(sapuc)             # <<<<<<<<<<<<<<
 *     if exception.msg_v2:
 *         sapuc = fillString(exception.msg_v2[0:50])
 */
    free(__pyx_v_sapuc);

    /* "pyrfc/_cyrfc.pyx":2600
 *         strncpyU(errorInfo.abapMsgNumber, sapuc, len(exception.msg_number[0:3]) + 1)
 *         free(sapuc)
 *     if exception.msg_v1:             # <<<<<<<<<<<<<<
 *         sapuc = fillString(exception.msg_v1[0:50])
 *         strncpyU(errorInfo.abapMsgV1, sapuc, len(exception.msg_v1[0:50]) + 1)
 */
  }

  /* "pyrfc/_cyrfc.pyx":2604
 *         strncpyU(errorInfo.abapMsgV1, sapuc, len(exception.msg_v1[0:50]) + 1)
 *         free(sapuc)
 *     if exception.msg_v2:             # <<<<<<<<<<<<<<
 *         sapuc = fillString(exception.msg_v2[0:50])
 *         strncpyU(errorInfo.abapMsgV2, sapuc, len(exception.msg_v2[0:50]) + 1)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_msg_v2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2604, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "pyrfc/_cyrfc.pyx":2605
 *         free(sapuc)
 *     if exception.msg_v2:
 *         sapuc = fillString(exception.msg_v2[0:50])             # <<<<<<<<<<<<<<
 *         strncpyU(errorInfo.abapMsgV2, sapuc, len(exception.msg_v2[0:50]) + 1)
 *         free(sapuc)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_msg_v2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2605, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 50, NULL, NULL, &__pyx_slice__45, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2605, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_3); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2605, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_sapuc = __pyx_t_7;

    /* "pyrfc/_cyrfc.pyx":2606
 *     if exception.msg_v2:
 *         sapuc = fillString(exception.msg_v2[0:50])
 *         strncpyU(errorInfo.abapMsgV2, sapuc, len(exception.msg_v2[0:50]) + 1)             # <<<<<<<<<<<<<<
 *         free(sapuc)
 *     if exception.msg_v3:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_msg_v2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 50, NULL, NULL, &__pyx_slice__45, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_9 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2606, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    strncpyU(__pyx_v_errorInfo->abapMsgV2, __pyx_v_sapuc, (__pyx_t_9 + 1));

    /* "pyrfc/_cyrfc.pyx":2607
 *         sapuc = fillString(exception.msg_v2[0:50])
 *         strncpyU(errorInfo.abapMsgV2, sapuc, len(exception.msg_v2[0:50]) + 1)
 *         free(sapuc)             # <<<<<<<<<<<<<<
 *     if exception.msg_v3:
 *         sapuc = fillString(exception.msg_v3[0:50])
 */
    free(__pyx_v_sapuc);

    /* "pyrfc/_cyrfc.pyx":2604
 *         strncpyU(errorInfo.abapMsgV1, sapuc, len(exception.msg_v1[0:50]) + 1)
 *         free(sapuc)
 *     if exception.msg_v2:             # <<<<<<<<<<<<<<
 *         sapuc = fillString(exception.msg_v2[0:50])
 *         strncpyU(errorInfo.abapMsgV2, sapuc, len(exception.msg_v2[0:50]) + 1)
 */
  }

  /* "pyrfc/_cyrfc.pyx":2608
 *         strncpyU(errorInfo.abapMsgV2, sapuc, len(exception.msg_v2[0:50]) + 1)
 *         free(sapuc)
 *     if exception.msg_v3:             # <<<<<<<<<<<<<<
 *         sapuc = fillString(exception.msg_v3[0:50])
 *         strncpyU(errorInfo.abapMsgV3, sapuc, len(exception.msg_v3[0:50]) + 1)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_msg_v3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2608, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "pyrfc/_cyrfc.pyx":2609
 *         free(sapuc)
 *     if exception.msg_v3:
 *         sapuc = fillString(exception.msg_v3[0:50])             # <<<<<<<<<<<<<<
 *         strncpyU(errorInfo.abapMsgV3, sapuc, len(exception.msg_v3[0:50]) + 1)
 *         free(sapuc)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_msg_v3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 50, NULL, NULL, &__pyx_slice__45, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_3); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2609, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_sapuc = __pyx_t_7;

    /* "pyrfc/_cyrfc.pyx":2610
 *     if exception.msg_v3:
 *         sapuc = fillString(exception.msg_v3[0:50])
 *         strncpyU(errorInfo.abapMsgV3, sapuc, len(exception.msg_v3[0:50]) + 1)             # <<<<<<<<<<<<<<
 *         free(sapuc)
 *     if exception.msg_v4:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_msg_v3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 50, NULL, NULL, &__pyx_slice__45, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_9 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2610, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    strncpyU(__pyx_v_errorInfo->abapMsgV3, __pyx_v_sapuc, (__pyx_t_9 + 1));

    /* "pyrfc/_cyrfc.pyx":2611
 *         sapuc = fillString(exception.msg_v3[0:50])
 *         strncpyU(errorInfo.abapMsgV3, sapuc, len(exception.msg_v3[0:50]) + 1)
 *         free(sapuc)             # <<<<<<<<<<<<<<
 *     if exception.msg_v4:
 *         sapuc = fillString(exception.msg_v4[0:50])
 */
    free(__pyx_v_sapuc);

    /* "pyrfc/_cyrfc.pyx":2608
 *         strncpyU(errorInfo.abapMsgV2, sapuc, len(exception.msg_v2[0:50]) + 1)
 *         free(sapuc)
 *     if exception.msg_v3:             # <<<<<<<<<<<<<<
 *         sapuc = fillString(exception.msg_v3[0:50])
 *         strncpyU(errorInfo.abapMsgV3, sapuc, len(exception.msg_v3[0:50]) + 1)
 */
  }

  /* "pyrfc/_cyrfc.pyx":2612
 *         strncpyU(errorInfo.abapMsgV3, sapuc, len(exception.msg_v3[0:50]) + 1)
 *         free(sapuc)
 *     if exception.msg_v4:             # <<<<<<<<<<<<<<
 *         sapuc = fillString(exception.msg_v4[0:50])
 *         strncpyU(errorInfo.abapMsgV4, sapuc, len(exception.msg_v4[0:50]) + 1)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_msg_v4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2612, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "pyrfc/_cyrfc.pyx":2613
 *         free(sapuc)
 *     if exception.msg_v4:
 *         sapuc = fillString(exception.msg_v4[0:50])             # <<<<<<<<<<<<<<
 *         strncpyU(errorInfo.abapMsgV4, sapuc, len(exception.msg_v4[0:50]) + 1)
 *         free(sapuc)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_msg_v4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2613, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 50, NULL, NULL, &__pyx_slice__45, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2613, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_3); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2613, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_sapuc = __pyx_t_7;

    /* "pyrfc/_cyrfc.pyx":2614
 *     if exception.msg_v4:
 *         sapuc = fillString(exception.msg_v4[0:50])
 *         strncpyU(errorInfo.abapMsgV4, sapuc, len(exception.msg_v4[0:50]) + 1)             # <<<<<<<<<<<<<<
 *         free(sapuc)
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_msg_v4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2614, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 50, NULL, NULL, &__pyx_slice__45, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2614, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_9 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2614, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    strncpyU(__pyx_v_errorInfo->abapMsgV4, __pyx_v_sapuc, (__pyx_t_9 + 1));

    /* "pyrfc/_cyrfc.pyx":2615
 *         sapuc = fillString(exception.msg_v4[0:50])
 *         strncpyU(errorInfo.abapMsgV4, sapuc, len(exception.msg_v4[0:50]) + 1)
 *         free(sapuc)             # <<<<<<<<<<<<<<
 * 
 * cdef SAP_UC* fillString(pyuc) except NULL:
 */
    free(__pyx_v_sapuc);

    /* "pyrfc/_cyrfc.pyx":2612
 *         strncpyU(errorInfo.abapMsgV3, sapuc, len(exception.msg_v3[0:50]) + 1)
 *         free(sapuc)
 *     if exception.msg_v4:             # <<<<<<<<<<<<<<
 *         sapuc = fillString(exception.msg_v4[0:50])
 *         strncpyU(errorInfo.abapMsgV4, sapuc, len(exception.msg_v4[0:50]) + 1)
 */
  }

  /* "pyrfc/_cyrfc.pyx":2561
 *     return bytes
 * 
 * cdef fillError(exception, RFC_ERROR_INFO* errorInfo):             # <<<<<<<<<<<<<<
 *     group2error = {
 *                     ABAPApplicationError: ABAP_APPLICATION_FAILURE,
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrfc._cyrfc.fillError", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_group2error);
  __Pyx_XDECREF(__pyx_v_str);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2617
 *         free(sapuc)
 * 
 * cdef SAP_UC* fillString(pyuc) except NULL:             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

static SAP_UC *__pyx_f_5pyrfc_6_cyrfc_fillString(PyObject *__pyx_v_pyuc) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  PyObject *__pyx_v_ucbytes = NULL;
  unsigned int __pyx_v_ucbytes_len;
  unsigned int __pyx_v_sapuc_size;
  SAP_UC *__pyx_v_sapuc;
  unsigned int __pyx_v_result_len;
  SAP_UC *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  unsigned char const *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fillString", 0);

  /* "pyrfc/_cyrfc.pyx":2620
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 *     ucbytes = pyuc.encode()             # <<<<<<<<<<<<<<
 *     cdef unsigned ucbytes_len = <unsigned> len(ucbytes)
 *     cdef unsigned sapuc_size = ucbytes_len + 1
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_pyuc, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_ucbytes = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2621
 *     cdef RFC_ERROR_INFO errorInfo
 *     ucbytes = pyuc.encode()
 *     cdef unsigned ucbytes_len = <unsigned> len(ucbytes)             # <<<<<<<<<<<<<<
 *     cdef unsigned sapuc_size = ucbytes_len + 1
 *     cdef SAP_UC* sapuc = mallocU(sapuc_size)
 */
  __pyx_t_4 = PyObject_Length(__pyx_v_ucbytes); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2621, __pyx_L1_error)
  __pyx_v_ucbytes_len = ((unsigned int)__pyx_t_4);

  /* "pyrfc/_cyrfc.pyx":2622
 *     ucbytes = pyuc.encode()
 *     cdef unsigned ucbytes_len = <unsigned> len(ucbytes)
 *     cdef unsigned sapuc_size = ucbytes_len + 1             # <<<<<<<<<<<<<<
 *     cdef SAP_UC* sapuc = mallocU(sapuc_size)
 *     sapuc[0] = 0
 */
  __pyx_v_sapuc_size = (__pyx_v_ucbytes_len + 1);

  /* "pyrfc/_cyrfc.pyx":2623
 *     cdef unsigned ucbytes_len = <unsigned> len(ucbytes)
 *     cdef unsigned sapuc_size = ucbytes_len + 1
 *     cdef SAP_UC* sapuc = mallocU(sapuc_size)             # <<<<<<<<<<<<<<
 *     sapuc[0] = 0
 *     cdef unsigned result_len = 0
 */
  __pyx_v_sapuc = mallocU(__pyx_v_sapuc_size);

  /* "pyrfc/_cyrfc.pyx":2624
 *     cdef unsigned sapuc_size = ucbytes_len + 1
 *     cdef SAP_UC* sapuc = mallocU(sapuc_size)
 *     sapuc[0] = 0             # <<<<<<<<<<<<<<
 *     cdef unsigned result_len = 0
 *     if ucbytes_len > 0:
 */
  (__pyx_v_sapuc[0]) = 0;

  /* "pyrfc/_cyrfc.pyx":2625
 *     cdef SAP_UC* sapuc = mallocU(sapuc_size)
 *     sapuc[0] = 0
 *     cdef unsigned result_len = 0             # <<<<<<<<<<<<<<
 *     if ucbytes_len > 0:
 *         rc = RfcUTF8ToSAPUC(ucbytes, ucbytes_len, sapuc, &sapuc_size, &result_len, &errorInfo)
 */
  __pyx_v_result_len = 0;

  /* "pyrfc/_cyrfc.pyx":2626
 *     sapuc[0] = 0
 *     cdef unsigned result_len = 0
 *     if ucbytes_len > 0:             # <<<<<<<<<<<<<<
 *         rc = RfcUTF8ToSAPUC(ucbytes, ucbytes_len, sapuc, &sapuc_size, &result_len, &errorInfo)
 *         if rc != RFC_OK:
 */
  __pyx_t_5 = ((__pyx_v_ucbytes_len > 0) != 0);
  if (__pyx_t_5) {

    /* "pyrfc/_cyrfc.pyx":2627
 *     cdef unsigned result_len = 0
 *     if ucbytes_len > 0:
 *         rc = RfcUTF8ToSAPUC(ucbytes, ucbytes_len, sapuc, &sapuc_size, &result_len, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
    __pyx_t_6 = __Pyx_PyObject_AsUString(__pyx_v_ucbytes); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 2627, __pyx_L1_error)
    __pyx_v_rc = RfcUTF8ToSAPUC(__pyx_t_6, __pyx_v_ucbytes_len, __pyx_v_sapuc, (&__pyx_v_sapuc_size), (&__pyx_v_result_len), (&__pyx_v_errorInfo));

    /* "pyrfc/_cyrfc.pyx":2628
 *     if ucbytes_len > 0:
 *         rc = RfcUTF8ToSAPUC(ucbytes, ucbytes_len, sapuc, &sapuc_size, &result_len, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *     return sapuc
 */
    __pyx_t_5 = ((__pyx_v_rc != RFC_OK) != 0);
    if (unlikely(__pyx_t_5)) {

      /* "pyrfc/_cyrfc.pyx":2629
 *         rc = RfcUTF8ToSAPUC(ucbytes, ucbytes_len, sapuc, &sapuc_size, &result_len, &errorInfo)
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *     return sapuc
 * 
 */
      __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2629, __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, 2629, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":2628
 *     if ucbytes_len > 0:
 *         rc = RfcUTF8ToSAPUC(ucbytes, ucbytes_len, sapuc, &sapuc_size, &result_len, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *     return sapuc
 */
    }

    /* "pyrfc/_cyrfc.pyx":2626
 *     sapuc[0] = 0
 *     cdef unsigned result_len = 0
 *     if ucbytes_len > 0:             # <<<<<<<<<<<<<<
 *         rc = RfcUTF8ToSAPUC(ucbytes, ucbytes_len, sapuc, &sapuc_size, &result_len, &errorInfo)
 *         if rc != RFC_OK:
 */
  }

  /* "pyrfc/_cyrfc.pyx":2630
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 *     return sapuc             # <<<<<<<<<<<<<<
 * 
 * ################################################################################
 */
  __pyx_r = __pyx_v_sapuc;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":2617
 *         free(sapuc)
 * 
 * cdef SAP_UC* fillString(pyuc) except NULL:             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrfc._cyrfc.fillString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ucbytes);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2637
 * # wrapper functions take C values and returns Python values
 * 
 * cdef wrapConnectionAttributes(RFC_ATTRIBUTES attributes):             # <<<<<<<<<<<<<<
 *     return {
 *         'dest': wrapString(attributes.dest, 64, True).rstrip('\0')
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapConnectionAttributes(RFC_ATTRIBUTES __pyx_v_attributes) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrapConnectionAttributes", 0);

  /* "pyrfc/_cyrfc.pyx":2638
 * 
 * cdef wrapConnectionAttributes(RFC_ATTRIBUTES attributes):
 *     return {             # <<<<<<<<<<<<<<
 *         'dest': wrapString(attributes.dest, 64, True).rstrip('\0')
 *         , 'host': wrapString(attributes.host, 100, True).rstrip('\0')
 */
  __Pyx_XDECREF(__pyx_r);

  /* "pyrfc/_cyrfc.pyx":2639
 * cdef wrapConnectionAttributes(RFC_ATTRIBUTES attributes):
 *     return {
 *         'dest': wrapString(attributes.dest, 64, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'host': wrapString(attributes.host, 100, True).rstrip('\0')
 *         , 'partnerHost': wrapString(attributes.partnerHost, 100, True).rstrip('\0')
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(25); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_64;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.dest, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_dest, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2640
 *     return {
 *         'dest': wrapString(attributes.dest, 64, True).rstrip('\0')
 *         , 'host': wrapString(attributes.host, 100, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'partnerHost': wrapString(attributes.partnerHost, 100, True).rstrip('\0')
 *         , 'sysNumber': wrapString(attributes.sysNumber, 2, True).rstrip('\0')
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_100;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.host, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_host, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2641
 *         'dest': wrapString(attributes.dest, 64, True).rstrip('\0')
 *         , 'host': wrapString(attributes.host, 100, True).rstrip('\0')
 *         , 'partnerHost': wrapString(attributes.partnerHost, 100, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'sysNumber': wrapString(attributes.sysNumber, 2, True).rstrip('\0')
 *         , 'sysId': wrapString(attributes.sysId, 8, True).rstrip('\0')
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_100;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.partnerHost, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_partnerHost, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2642
 *         , 'host': wrapString(attributes.host, 100, True).rstrip('\0')
 *         , 'partnerHost': wrapString(attributes.partnerHost, 100, True).rstrip('\0')
 *         , 'sysNumber': wrapString(attributes.sysNumber, 2, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'sysId': wrapString(attributes.sysId, 8, True).rstrip('\0')
 *         , 'client': wrapString(attributes.client, 3, True).rstrip('\0')
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_2;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.sysNumber, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_sysNumber, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2643
 *         , 'partnerHost': wrapString(attributes.partnerHost, 100, True).rstrip('\0')
 *         , 'sysNumber': wrapString(attributes.sysNumber, 2, True).rstrip('\0')
 *         , 'sysId': wrapString(attributes.sysId, 8, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'client': wrapString(attributes.client, 3, True).rstrip('\0')
 *         , 'user': wrapString(attributes.user, 12, True).rstrip('\0')
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_8;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.sysId, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_sysId, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2644
 *         , 'sysNumber': wrapString(attributes.sysNumber, 2, True).rstrip('\0')
 *         , 'sysId': wrapString(attributes.sysId, 8, True).rstrip('\0')
 *         , 'client': wrapString(attributes.client, 3, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'user': wrapString(attributes.user, 12, True).rstrip('\0')
 *         , 'language': wrapString(attributes.language, 2, True).rstrip('\0')
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_3;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.client, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_client, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2645
 *         , 'sysId': wrapString(attributes.sysId, 8, True).rstrip('\0')
 *         , 'client': wrapString(attributes.client, 3, True).rstrip('\0')
 *         , 'user': wrapString(attributes.user, 12, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'language': wrapString(attributes.language, 2, True).rstrip('\0')
 *         , 'trace': wrapString(attributes.trace, 1, True).rstrip('\0')
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_12;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.user, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_user, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2646
 *         , 'client': wrapString(attributes.client, 3, True).rstrip('\0')
 *         , 'user': wrapString(attributes.user, 12, True).rstrip('\0')
 *         , 'language': wrapString(attributes.language, 2, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'trace': wrapString(attributes.trace, 1, True).rstrip('\0')
 *         , 'isoLanguage': wrapString(attributes.isoLanguage, 2, True).rstrip('\0')
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_2;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.language, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_language, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2647
 *         , 'user': wrapString(attributes.user, 12, True).rstrip('\0')
 *         , 'language': wrapString(attributes.language, 2, True).rstrip('\0')
 *         , 'trace': wrapString(attributes.trace, 1, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'isoLanguage': wrapString(attributes.isoLanguage, 2, True).rstrip('\0')
 *         , 'codepage': wrapString(attributes.codepage, 4, True).rstrip('\0')
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_1;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.trace, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_trace, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2648
 *         , 'language': wrapString(attributes.language, 2, True).rstrip('\0')
 *         , 'trace': wrapString(attributes.trace, 1, True).rstrip('\0')
 *         , 'isoLanguage': wrapString(attributes.isoLanguage, 2, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'codepage': wrapString(attributes.codepage, 4, True).rstrip('\0')
 *         , 'partnerCodepage': wrapString(attributes.partnerCodepage, 4, True).rstrip('\0')
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_2;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.isoLanguage, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_isoLanguage, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2649
 *         , 'trace': wrapString(attributes.trace, 1, True).rstrip('\0')
 *         , 'isoLanguage': wrapString(attributes.isoLanguage, 2, True).rstrip('\0')
 *         , 'codepage': wrapString(attributes.codepage, 4, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'partnerCodepage': wrapString(attributes.partnerCodepage, 4, True).rstrip('\0')
 *         , 'rfcRole': wrapString(attributes.rfcRole, 1, True).rstrip('\0')
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_4;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.codepage, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_codepage, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2650
 *         , 'isoLanguage': wrapString(attributes.isoLanguage, 2, True).rstrip('\0')
 *         , 'codepage': wrapString(attributes.codepage, 4, True).rstrip('\0')
 *         , 'partnerCodepage': wrapString(attributes.partnerCodepage, 4, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'rfcRole': wrapString(attributes.rfcRole, 1, True).rstrip('\0')
 *         , 'type': wrapString(attributes.type, 1).rstrip('\0')
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_4;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.partnerCodepage, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_partnerCodepage, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2651
 *         , 'codepage': wrapString(attributes.codepage, 4, True).rstrip('\0')
 *         , 'partnerCodepage': wrapString(attributes.partnerCodepage, 4, True).rstrip('\0')
 *         , 'rfcRole': wrapString(attributes.rfcRole, 1, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'type': wrapString(attributes.type, 1).rstrip('\0')
 *         , 'partnerType': wrapString(attributes.partnerType, 1, True).rstrip('\0')
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_1;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.rfcRole, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_rfcRole, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2652
 *         , 'partnerCodepage': wrapString(attributes.partnerCodepage, 4, True).rstrip('\0')
 *         , 'rfcRole': wrapString(attributes.rfcRole, 1, True).rstrip('\0')
 *         , 'type': wrapString(attributes.type, 1).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'partnerType': wrapString(attributes.partnerType, 1, True).rstrip('\0')
 *         , 'rel': wrapString(attributes.rel, 4, True).rstrip('\0')
 */
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.uclen = __pyx_int_1;
  __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.type, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_type, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2653
 *         , 'rfcRole': wrapString(attributes.rfcRole, 1, True).rstrip('\0')
 *         , 'type': wrapString(attributes.type, 1).rstrip('\0')
 *         , 'partnerType': wrapString(attributes.partnerType, 1, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'rel': wrapString(attributes.rel, 4, True).rstrip('\0')
 *         , 'partnerRel': wrapString(attributes.partnerRel, 4, True).rstrip('\0')
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_1;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.partnerType, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_partnerType, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2654
 *         , 'type': wrapString(attributes.type, 1).rstrip('\0')
 *         , 'partnerType': wrapString(attributes.partnerType, 1, True).rstrip('\0')
 *         , 'rel': wrapString(attributes.rel, 4, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'partnerRel': wrapString(attributes.partnerRel, 4, True).rstrip('\0')
 *         , 'kernelRel': wrapString(attributes.kernelRel, 4, True).rstrip('\0')
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_4;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.rel, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_rel, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2655
 *         , 'partnerType': wrapString(attributes.partnerType, 1, True).rstrip('\0')
 *         , 'rel': wrapString(attributes.rel, 4, True).rstrip('\0')
 *         , 'partnerRel': wrapString(attributes.partnerRel, 4, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'kernelRel': wrapString(attributes.kernelRel, 4, True).rstrip('\0')
 *         , 'cpicConvId': wrapString(attributes.cpicConvId, 8, True).rstrip('\0')
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_4;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.partnerRel, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_partnerRel, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2656
 *         , 'rel': wrapString(attributes.rel, 4, True).rstrip('\0')
 *         , 'partnerRel': wrapString(attributes.partnerRel, 4, True).rstrip('\0')
 *         , 'kernelRel': wrapString(attributes.kernelRel, 4, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'cpicConvId': wrapString(attributes.cpicConvId, 8, True).rstrip('\0')
 *         , 'progName': wrapString(attributes.progName, 128, True).rstrip('\0')
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_4;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.kernelRel, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_kernelRel, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2657
 *         , 'partnerRel': wrapString(attributes.partnerRel, 4, True).rstrip('\0')
 *         , 'kernelRel': wrapString(attributes.kernelRel, 4, True).rstrip('\0')
 *         , 'cpicConvId': wrapString(attributes.cpicConvId, 8, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'progName': wrapString(attributes.progName, 128, True).rstrip('\0')
 *         , 'partnerBytesPerChar': wrapString(attributes.partnerBytesPerChar, 1, True).rstrip('\0')
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_8;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.cpicConvId, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_cpicConvId, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2658
 *         , 'kernelRel': wrapString(attributes.kernelRel, 4, True).rstrip('\0')
 *         , 'cpicConvId': wrapString(attributes.cpicConvId, 8, True).rstrip('\0')
 *         , 'progName': wrapString(attributes.progName, 128, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'partnerBytesPerChar': wrapString(attributes.partnerBytesPerChar, 1, True).rstrip('\0')
 *         , 'partnerSystemCodepage': wrapString(attributes.partnerSystemCodepage, 4, True).rstrip('\0')
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_128;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.progName, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_progName, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2659
 *         , 'cpicConvId': wrapString(attributes.cpicConvId, 8, True).rstrip('\0')
 *         , 'progName': wrapString(attributes.progName, 128, True).rstrip('\0')
 *         , 'partnerBytesPerChar': wrapString(attributes.partnerBytesPerChar, 1, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'partnerSystemCodepage': wrapString(attributes.partnerSystemCodepage, 4, True).rstrip('\0')
 *         , 'partnerIP': wrapString(attributes.partnerIP, 15, True).rstrip('\0')
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_1;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.partnerBytesPerChar, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_partnerBytesPerChar, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2660
 *         , 'progName': wrapString(attributes.progName, 128, True).rstrip('\0')
 *         , 'partnerBytesPerChar': wrapString(attributes.partnerBytesPerChar, 1, True).rstrip('\0')
 *         , 'partnerSystemCodepage': wrapString(attributes.partnerSystemCodepage, 4, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'partnerIP': wrapString(attributes.partnerIP, 15, True).rstrip('\0')
 *         , 'partnerIPv6': wrapString(attributes.partnerIPv6, 45, True).rstrip('\0')
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_4;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.partnerSystemCodepage, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_partnerSystemCodepage, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2661
 *         , 'partnerBytesPerChar': wrapString(attributes.partnerBytesPerChar, 1, True).rstrip('\0')
 *         , 'partnerSystemCodepage': wrapString(attributes.partnerSystemCodepage, 4, True).rstrip('\0')
 *         , 'partnerIP': wrapString(attributes.partnerIP, 15, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'partnerIPv6': wrapString(attributes.partnerIPv6, 45, True).rstrip('\0')
 *         , 'reserved': wrapString(attributes.reserved, 17, True).rstrip('\0')
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_15;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.partnerIP, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_partnerIP, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2662
 *         , 'partnerSystemCodepage': wrapString(attributes.partnerSystemCodepage, 4, True).rstrip('\0')
 *         , 'partnerIP': wrapString(attributes.partnerIP, 15, True).rstrip('\0')
 *         , 'partnerIPv6': wrapString(attributes.partnerIPv6, 45, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *         , 'reserved': wrapString(attributes.reserved, 17, True).rstrip('\0')
 *     }
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_45;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.partnerIPv6, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_partnerIPv6, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2663
 *         , 'partnerIP': wrapString(attributes.partnerIP, 15, True).rstrip('\0')
 *         , 'partnerIPv6': wrapString(attributes.partnerIPv6, 45, True).rstrip('\0')
 *         , 'reserved': wrapString(attributes.reserved, 17, True).rstrip('\0')             # <<<<<<<<<<<<<<
 *     }
 * 
 */
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.uclen = __pyx_int_17;
  __pyx_t_4.rstrip = Py_True;
  __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.reserved, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_u__46) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__46);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_reserved, __pyx_t_2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":2637
 * # wrapper functions take C values and returns Python values
 * 
 * cdef wrapConnectionAttributes(RFC_ATTRIBUTES attributes):             # <<<<<<<<<<<<<<
 *     return {
 *         'dest': wrapString(attributes.dest, 64, True).rstrip('\0')
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrfc._cyrfc.wrapConnectionAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2667
 * 
 * 
 * cdef wrapTypeDescription(RFC_TYPE_DESC_HANDLE typeDesc):             # <<<<<<<<<<<<<<
 *     """ Parses a RFC_TYPE_DESC_HANDLE
 * 
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapTypeDescription(RFC_TYPE_DESC_HANDLE __pyx_v_typeDesc) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_FIELD_DESC __pyx_v_fieldDesc;
  RFC_ABAP_NAME __pyx_v_typeName;
  unsigned int __pyx_v_nuc_length;
  unsigned int __pyx_v_uc_length;
  unsigned int __pyx_v_i;
  unsigned int __pyx_v_fieldCount;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_type_desc = NULL;
  PyObject *__pyx_v_field_description = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  unsigned int __pyx_t_9;
  unsigned int __pyx_t_10;
  unsigned int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrapTypeDescription", 0);

  /* "pyrfc/_cyrfc.pyx":2680
 *     cdef unsigned i, fieldCount
 * 
 *     rc = RfcGetTypeName(typeDesc, typeName, &errorInfo)             # <<<<<<<<<<<<<<
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 */
  __pyx_v_rc = RfcGetTypeName(__pyx_v_typeDesc, __pyx_v_typeName, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":2681
 * 
 *     rc = RfcGetTypeName(typeDesc, typeName, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     name = wrapString(typeName)
 */
  __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":2682
 *     rc = RfcGetTypeName(typeDesc, typeName, &errorInfo)
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *     name = wrapString(typeName)
 *     rc = RfcGetTypeLength(typeDesc, &nuc_length, &uc_length, &errorInfo)
 */
    __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2682, __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, 2682, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2681
 * 
 *     rc = RfcGetTypeName(typeDesc, typeName, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     name = wrapString(typeName)
 */
  }

  /* "pyrfc/_cyrfc.pyx":2683
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 *     name = wrapString(typeName)             # <<<<<<<<<<<<<<
 *     rc = RfcGetTypeLength(typeDesc, &nuc_length, &uc_length, &errorInfo)
 *     if rc != RFC_OK:
 */
  __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_typeName, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_name = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2684
 *         raise wrapError(&errorInfo)
 *     name = wrapString(typeName)
 *     rc = RfcGetTypeLength(typeDesc, &nuc_length, &uc_length, &errorInfo)             # <<<<<<<<<<<<<<
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 */
  __pyx_v_rc = RfcGetTypeLength(__pyx_v_typeDesc, (&__pyx_v_nuc_length), (&__pyx_v_uc_length), (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":2685
 *     name = wrapString(typeName)
 *     rc = RfcGetTypeLength(typeDesc, &nuc_length, &uc_length, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     type_desc = TypeDescription(name, nuc_length, uc_length)
 */
  __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":2686
 *     rc = RfcGetTypeLength(typeDesc, &nuc_length, &uc_length, &errorInfo)
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *     type_desc = TypeDescription(name, nuc_length, uc_length)
 * 
 */
    __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2686, __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, 2686, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2685
 *     name = wrapString(typeName)
 *     rc = RfcGetTypeLength(typeDesc, &nuc_length, &uc_length, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     type_desc = TypeDescription(name, nuc_length, uc_length)
 */
  }

  /* "pyrfc/_cyrfc.pyx":2687
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 *     type_desc = TypeDescription(name, nuc_length, uc_length)             # <<<<<<<<<<<<<<
 * 
 *     rc = RfcGetFieldCount(typeDesc, &fieldCount, &errorInfo)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_TypeDescription_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nuc_length); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_uc_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_name, __pyx_t_4, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2687, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_name, __pyx_t_4, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2687, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_name);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_type_desc = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2689
 *     type_desc = TypeDescription(name, nuc_length, uc_length)
 * 
 *     rc = RfcGetFieldCount(typeDesc, &fieldCount, &errorInfo)             # <<<<<<<<<<<<<<
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 */
  __pyx_v_rc = RfcGetFieldCount(__pyx_v_typeDesc, (&__pyx_v_fieldCount), (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":2690
 * 
 *     rc = RfcGetFieldCount(typeDesc, &fieldCount, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     for i in range(fieldCount):
 */
  __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":2691
 *     rc = RfcGetFieldCount(typeDesc, &fieldCount, &errorInfo)
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *     for i in range(fieldCount):
 *         rc = RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, &errorInfo)
 */
    __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2691, __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, 2691, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2690
 * 
 *     rc = RfcGetFieldCount(typeDesc, &fieldCount, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     for i in range(fieldCount):
 */
  }

  /* "pyrfc/_cyrfc.pyx":2692
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 *     for i in range(fieldCount):             # <<<<<<<<<<<<<<
 *         rc = RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, &errorInfo)
 *         if rc != RFC_OK:
 */
  __pyx_t_9 = __pyx_v_fieldCount;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pyrfc/_cyrfc.pyx":2693
 *         raise wrapError(&errorInfo)
 *     for i in range(fieldCount):
 *         rc = RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
    __pyx_v_rc = RfcGetFieldDescByIndex(__pyx_v_typeDesc, __pyx_v_i, (&__pyx_v_fieldDesc), (&__pyx_v_errorInfo));

    /* "pyrfc/_cyrfc.pyx":2694
 *     for i in range(fieldCount):
 *         rc = RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         field_description = {
 */
    __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "pyrfc/_cyrfc.pyx":2695
 *         rc = RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, &errorInfo)
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         field_description = {
 *             'name': wrapString(fieldDesc.name),
 */
      __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2695, __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, 2695, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":2694
 *     for i in range(fieldCount):
 *         rc = RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         field_description = {
 */
    }

    /* "pyrfc/_cyrfc.pyx":2697
 *             raise wrapError(&errorInfo)
 *         field_description = {
 *             'name': wrapString(fieldDesc.name),             # <<<<<<<<<<<<<<
 *             'field_type': RfcFieldType(fieldDesc.type).name,
 *             'nuc_length': fieldDesc.nucLength,
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_fieldDesc.name, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_name, __pyx_t_3) < 0) __PYX_ERR(0, 2697, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":2698
 *         field_description = {
 *             'name': wrapString(fieldDesc.name),
 *             'field_type': RfcFieldType(fieldDesc.type).name,             # <<<<<<<<<<<<<<
 *             'nuc_length': fieldDesc.nucLength,
 *             'nuc_offset': fieldDesc.nucOffset,
 */
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_RfcFieldType); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = __Pyx_PyInt_From_RFCTYPE(__pyx_v_fieldDesc.type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5);
    __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, 2698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_field_type, __pyx_t_8) < 0) __PYX_ERR(0, 2697, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrfc/_cyrfc.pyx":2699
 *             'name': wrapString(fieldDesc.name),
 *             'field_type': RfcFieldType(fieldDesc.type).name,
 *             'nuc_length': fieldDesc.nucLength,             # <<<<<<<<<<<<<<
 *             'nuc_offset': fieldDesc.nucOffset,
 *             'uc_length': fieldDesc.ucLength,
 */
    __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_fieldDesc.nucLength); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_nuc_length, __pyx_t_8) < 0) __PYX_ERR(0, 2697, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrfc/_cyrfc.pyx":2700
 *             'field_type': RfcFieldType(fieldDesc.type).name,
 *             'nuc_length': fieldDesc.nucLength,
 *             'nuc_offset': fieldDesc.nucOffset,             # <<<<<<<<<<<<<<
 *             'uc_length': fieldDesc.ucLength,
 *             'uc_offset': fieldDesc.ucOffset,
 */
    __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_fieldDesc.nucOffset); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2700, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_nuc_offset, __pyx_t_8) < 0) __PYX_ERR(0, 2697, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrfc/_cyrfc.pyx":2701
 *             'nuc_length': fieldDesc.nucLength,
 *             'nuc_offset': fieldDesc.nucOffset,
 *             'uc_length': fieldDesc.ucLength,             # <<<<<<<<<<<<<<
 *             'uc_offset': fieldDesc.ucOffset,
 *             'decimals': fieldDesc.decimals
 */
    __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_fieldDesc.ucLength); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_uc_length, __pyx_t_8) < 0) __PYX_ERR(0, 2697, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrfc/_cyrfc.pyx":2702
 *             'nuc_offset': fieldDesc.nucOffset,
 *             'uc_length': fieldDesc.ucLength,
 *             'uc_offset': fieldDesc.ucOffset,             # <<<<<<<<<<<<<<
 *             'decimals': fieldDesc.decimals
 *         }
 */
    __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_fieldDesc.ucOffset); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_uc_offset, __pyx_t_8) < 0) __PYX_ERR(0, 2697, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrfc/_cyrfc.pyx":2703
 *             'uc_length': fieldDesc.ucLength,
 *             'uc_offset': fieldDesc.ucOffset,
 *             'decimals': fieldDesc.decimals             # <<<<<<<<<<<<<<
 *         }
 *         if fieldDesc.typeDescHandle is NULL:
 */
    __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_fieldDesc.decimals); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_decimals, __pyx_t_8) < 0) __PYX_ERR(0, 2697, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF_SET(__pyx_v_field_description, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrfc/_cyrfc.pyx":2705
 *             'decimals': fieldDesc.decimals
 *         }
 *         if fieldDesc.typeDescHandle is NULL:             # <<<<<<<<<<<<<<
 *             field_description['type_description'] = None
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_fieldDesc.typeDescHandle == NULL) != 0);
    if (__pyx_t_1) {

      /* "pyrfc/_cyrfc.pyx":2706
 *         }
 *         if fieldDesc.typeDescHandle is NULL:
 *             field_description['type_description'] = None             # <<<<<<<<<<<<<<
 *         else:
 *             field_description['type_description'] = wrapTypeDescription(fieldDesc.typeDescHandle)
 */
      if (unlikely(PyDict_SetItem(__pyx_v_field_description, __pyx_n_u_type_description, Py_None) < 0)) __PYX_ERR(0, 2706, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":2705
 *             'decimals': fieldDesc.decimals
 *         }
 *         if fieldDesc.typeDescHandle is NULL:             # <<<<<<<<<<<<<<
 *             field_description['type_description'] = None
 *         else:
 */
      goto __pyx_L9;
    }

    /* "pyrfc/_cyrfc.pyx":2708
 *             field_description['type_description'] = None
 *         else:
 *             field_description['type_description'] = wrapTypeDescription(fieldDesc.typeDescHandle)             # <<<<<<<<<<<<<<
 *         # Add field to object
 *         type_desc.add_field(**field_description)
 */
    /*else*/ {
      __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapTypeDescription(__pyx_v_fieldDesc.typeDescHandle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2708, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(PyDict_SetItem(__pyx_v_field_description, __pyx_n_u_type_description, __pyx_t_2) < 0)) __PYX_ERR(0, 2708, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_L9:;

    /* "pyrfc/_cyrfc.pyx":2710
 *             field_description['type_description'] = wrapTypeDescription(fieldDesc.typeDescHandle)
 *         # Add field to object
 *         type_desc.add_field(**field_description)             # <<<<<<<<<<<<<<
 * 
 *     return type_desc
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_type_desc, __pyx_n_s_add_field); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = PyDict_Copy(__pyx_v_field_description); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }

  /* "pyrfc/_cyrfc.pyx":2712
 *         type_desc.add_field(**field_description)
 * 
 *     return type_desc             # <<<<<<<<<<<<<<
 * 
 * cdef wrapFunctionDescription(RFC_FUNCTION_DESC_HANDLE funcDesc):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_type_desc);
  __pyx_r = __pyx_v_type_desc;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":2667
 * 
 * 
 * cdef wrapTypeDescription(RFC_TYPE_DESC_HANDLE typeDesc):             # <<<<<<<<<<<<<<
 *     """ Parses a RFC_TYPE_DESC_HANDLE
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrfc._cyrfc.wrapTypeDescription", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_type_desc);
  __Pyx_XDECREF(__pyx_v_field_description);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2714
 *     return type_desc
 * 
 * cdef wrapFunctionDescription(RFC_FUNCTION_DESC_HANDLE funcDesc):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapFunctionDescription(RFC_FUNCTION_DESC_HANDLE __pyx_v_funcDesc) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_ABAP_NAME __pyx_v_functionName;
  unsigned int __pyx_v_i;
  unsigned int __pyx_v_paramCount;
  RFC_PARAMETER_DESC __pyx_v_paramDesc;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_func_desc = NULL;
  PyObject *__pyx_v_parameter_description = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  unsigned int __pyx_t_6;
  unsigned int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrapFunctionDescription", 0);

  /* "pyrfc/_cyrfc.pyx":2721
 *     cdef RFC_PARAMETER_DESC paramDesc
 * 
 *     rc = RfcGetFunctionName(funcDesc, functionName, &errorInfo)             # <<<<<<<<<<<<<<
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 */
  __pyx_v_rc = RfcGetFunctionName(__pyx_v_funcDesc, __pyx_v_functionName, (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":2722
 * 
 *     rc = RfcGetFunctionName(funcDesc, functionName, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     name = wrapString(functionName)
 */
  __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":2723
 *     rc = RfcGetFunctionName(funcDesc, functionName, &errorInfo)
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *     name = wrapString(functionName)
 *     func_desc = FunctionDescription(name)
 */
    __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2723, __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, 2723, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2722
 * 
 *     rc = RfcGetFunctionName(funcDesc, functionName, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     name = wrapString(functionName)
 */
  }

  /* "pyrfc/_cyrfc.pyx":2724
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 *     name = wrapString(functionName)             # <<<<<<<<<<<<<<
 *     func_desc = FunctionDescription(name)
 * 
 */
  __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_functionName, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_name = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2725
 *         raise wrapError(&errorInfo)
 *     name = wrapString(functionName)
 *     func_desc = FunctionDescription(name)             # <<<<<<<<<<<<<<
 * 
 *     rc = RfcGetParameterCount(funcDesc, &paramCount, &errorInfo)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FunctionDescription_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_func_desc = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":2727
 *     func_desc = FunctionDescription(name)
 * 
 *     rc = RfcGetParameterCount(funcDesc, &paramCount, &errorInfo)             # <<<<<<<<<<<<<<
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 */
  __pyx_v_rc = RfcGetParameterCount(__pyx_v_funcDesc, (&__pyx_v_paramCount), (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":2728
 * 
 *     rc = RfcGetParameterCount(funcDesc, &paramCount, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     for i in range(paramCount):
 */
  __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrfc/_cyrfc.pyx":2729
 *     rc = RfcGetParameterCount(funcDesc, &paramCount, &errorInfo)
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *     for i in range(paramCount):
 *         rc = RfcGetParameterDescByIndex(funcDesc, i, &paramDesc, &errorInfo)
 */
    __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2729, __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, 2729, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":2728
 * 
 *     rc = RfcGetParameterCount(funcDesc, &paramCount, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     for i in range(paramCount):
 */
  }

  /* "pyrfc/_cyrfc.pyx":2730
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 *     for i in range(paramCount):             # <<<<<<<<<<<<<<
 *         rc = RfcGetParameterDescByIndex(funcDesc, i, &paramDesc, &errorInfo)
 *         if rc != RFC_OK:
 */
  __pyx_t_5 = __pyx_v_paramCount;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "pyrfc/_cyrfc.pyx":2731
 *         raise wrapError(&errorInfo)
 *     for i in range(paramCount):
 *         rc = RfcGetParameterDescByIndex(funcDesc, i, &paramDesc, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
    __pyx_v_rc = RfcGetParameterDescByIndex(__pyx_v_funcDesc, __pyx_v_i, (&__pyx_v_paramDesc), (&__pyx_v_errorInfo));

    /* "pyrfc/_cyrfc.pyx":2732
 *     for i in range(paramCount):
 *         rc = RfcGetParameterDescByIndex(funcDesc, i, &paramDesc, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         parameter_description = {
 */
    __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "pyrfc/_cyrfc.pyx":2733
 *         rc = RfcGetParameterDescByIndex(funcDesc, i, &paramDesc, &errorInfo)
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         parameter_description = {
 *             'name': wrapString(paramDesc.name),
 */
      __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2733, __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, 2733, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":2732
 *     for i in range(paramCount):
 *         rc = RfcGetParameterDescByIndex(funcDesc, i, &paramDesc, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         parameter_description = {
 */
    }

    /* "pyrfc/_cyrfc.pyx":2735
 *             raise wrapError(&errorInfo)
 *         parameter_description = {
 *             'name': wrapString(paramDesc.name),             # <<<<<<<<<<<<<<
 *             'parameter_type': RfcFieldType(paramDesc.type).name,
 *             'direction': RfcParameterDirection(paramDesc.direction).name,
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2735, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_paramDesc.name, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2735, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_name, __pyx_t_3) < 0) __PYX_ERR(0, 2735, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":2736
 *         parameter_description = {
 *             'name': wrapString(paramDesc.name),
 *             'parameter_type': RfcFieldType(paramDesc.type).name,             # <<<<<<<<<<<<<<
 *             'direction': RfcParameterDirection(paramDesc.direction).name,
 *             'nuc_length': paramDesc.nucLength,
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_RfcFieldType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = __Pyx_PyInt_From_RFCTYPE(__pyx_v_paramDesc.type); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_parameter_type, __pyx_t_4) < 0) __PYX_ERR(0, 2735, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrfc/_cyrfc.pyx":2737
 *             'name': wrapString(paramDesc.name),
 *             'parameter_type': RfcFieldType(paramDesc.type).name,
 *             'direction': RfcParameterDirection(paramDesc.direction).name,             # <<<<<<<<<<<<<<
 *             'nuc_length': paramDesc.nucLength,
 *             'uc_length': paramDesc.ucLength,
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_RfcParameterDirection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2737, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyInt_From_RFC_DIRECTION(__pyx_v_paramDesc.direction); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2737, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2737, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2737, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_direction, __pyx_t_3) < 0) __PYX_ERR(0, 2735, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":2738
 *             'parameter_type': RfcFieldType(paramDesc.type).name,
 *             'direction': RfcParameterDirection(paramDesc.direction).name,
 *             'nuc_length': paramDesc.nucLength,             # <<<<<<<<<<<<<<
 *             'uc_length': paramDesc.ucLength,
 *             'decimals': paramDesc.decimals,
 */
    __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_paramDesc.nucLength); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_nuc_length, __pyx_t_3) < 0) __PYX_ERR(0, 2735, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":2739
 *             'direction': RfcParameterDirection(paramDesc.direction).name,
 *             'nuc_length': paramDesc.nucLength,
 *             'uc_length': paramDesc.ucLength,             # <<<<<<<<<<<<<<
 *             'decimals': paramDesc.decimals,
 *             'default_value': wrapString(paramDesc.defaultValue),
 */
    __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_paramDesc.ucLength); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_uc_length, __pyx_t_3) < 0) __PYX_ERR(0, 2735, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":2740
 *             'nuc_length': paramDesc.nucLength,
 *             'uc_length': paramDesc.ucLength,
 *             'decimals': paramDesc.decimals,             # <<<<<<<<<<<<<<
 *             'default_value': wrapString(paramDesc.defaultValue),
 *             'parameter_text': wrapString(paramDesc.parameterText),
 */
    __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_paramDesc.decimals); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_decimals, __pyx_t_3) < 0) __PYX_ERR(0, 2735, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":2741
 *             'uc_length': paramDesc.ucLength,
 *             'decimals': paramDesc.decimals,
 *             'default_value': wrapString(paramDesc.defaultValue),             # <<<<<<<<<<<<<<
 *             'parameter_text': wrapString(paramDesc.parameterText),
 *             'optional': bool(paramDesc.optional)
 */
    __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_paramDesc.defaultValue, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_default_value, __pyx_t_3) < 0) __PYX_ERR(0, 2735, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":2742
 *             'decimals': paramDesc.decimals,
 *             'default_value': wrapString(paramDesc.defaultValue),
 *             'parameter_text': wrapString(paramDesc.parameterText),             # <<<<<<<<<<<<<<
 *             'optional': bool(paramDesc.optional)
 *             # skip: void* extendedDescription;
 */
    __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_paramDesc.parameterText, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_parameter_text, __pyx_t_3) < 0) __PYX_ERR(0, 2735, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrfc/_cyrfc.pyx":2743
 *             'default_value': wrapString(paramDesc.defaultValue),
 *             'parameter_text': wrapString(paramDesc.parameterText),
 *             'optional': bool(paramDesc.optional)             # <<<<<<<<<<<<<<
 *             # skip: void* extendedDescription;
 *             # This field can be used by the application programmer (i.e. you) to store arbitrary extra information.
 */
    __pyx_t_3 = __Pyx_PyInt_From_SAP_RAW(__pyx_v_paramDesc.optional); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2743, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_optional, __pyx_t_3) < 0) __PYX_ERR(0, 2735, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_parameter_description, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrfc/_cyrfc.pyx":2747
 *             # This field can be used by the application programmer (i.e. you) to store arbitrary extra information.
 *         }
 *         if paramDesc.typeDescHandle is NULL:             # <<<<<<<<<<<<<<
 *             parameter_description['type_description'] = None
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_paramDesc.typeDescHandle == NULL) != 0);
    if (__pyx_t_1) {

      /* "pyrfc/_cyrfc.pyx":2748
 *         }
 *         if paramDesc.typeDescHandle is NULL:
 *             parameter_description['type_description'] = None             # <<<<<<<<<<<<<<
 *         else:
 *             parameter_description['type_description'] = wrapTypeDescription(paramDesc.typeDescHandle)
 */
      if (unlikely(PyDict_SetItem(__pyx_v_parameter_description, __pyx_n_u_type_description, Py_None) < 0)) __PYX_ERR(0, 2748, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":2747
 *             # This field can be used by the application programmer (i.e. you) to store arbitrary extra information.
 *         }
 *         if paramDesc.typeDescHandle is NULL:             # <<<<<<<<<<<<<<
 *             parameter_description['type_description'] = None
 *         else:
 */
      goto __pyx_L8;
    }

    /* "pyrfc/_cyrfc.pyx":2750
 *             parameter_description['type_description'] = None
 *         else:
 *             parameter_description['type_description'] = wrapTypeDescription(paramDesc.typeDescHandle)             # <<<<<<<<<<<<<<
 *         func_desc.add_parameter(**parameter_description)
 * 
 */
    /*else*/ {
      __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapTypeDescription(__pyx_v_paramDesc.typeDescHandle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2750, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(PyDict_SetItem(__pyx_v_parameter_description, __pyx_n_u_type_description, __pyx_t_2) < 0)) __PYX_ERR(0, 2750, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_L8:;

    /* "pyrfc/_cyrfc.pyx":2751
 *         else:
 *             parameter_description['type_description'] = wrapTypeDescription(paramDesc.typeDescHandle)
 *         func_desc.add_parameter(**parameter_description)             # <<<<<<<<<<<<<<
 * 
 *     return func_desc
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_func_desc, __pyx_n_s_add_parameter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyDict_Copy(__pyx_v_parameter_description); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2751, __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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }

  /* "pyrfc/_cyrfc.pyx":2753
 *         func_desc.add_parameter(**parameter_description)
 * 
 *     return func_desc             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_func_desc);
  __pyx_r = __pyx_v_func_desc;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":2714
 *     return type_desc
 * 
 * cdef wrapFunctionDescription(RFC_FUNCTION_DESC_HANDLE funcDesc):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrfc._cyrfc.wrapFunctionDescription", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_func_desc);
  __Pyx_XDECREF(__pyx_v_parameter_description);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2756
 * 
 * 
 * cdef wrapResult(             # <<<<<<<<<<<<<<
 *             RFC_FUNCTION_DESC_HANDLE funcDesc,
 *             RFC_FUNCTION_HANDLE container,
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapResult(RFC_FUNCTION_DESC_HANDLE __pyx_v_funcDesc, RFC_FUNCTION_HANDLE __pyx_v_container, RFC_DIRECTION __pyx_v_filter_parameter_direction, PyObject *__pyx_v_config) {
  unsigned int __pyx_v_i;
  unsigned int __pyx_v_paramCount;
  RFC_PARAMETER_DESC __pyx_v_paramDesc;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  unsigned int __pyx_t_2;
  unsigned int __pyx_t_3;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrapResult", 0);

  /* "pyrfc/_cyrfc.pyx":2772
 *     cdef unsigned i, paramCount
 *     cdef RFC_PARAMETER_DESC paramDesc
 *     RfcGetParameterCount(funcDesc, &paramCount, NULL)             # <<<<<<<<<<<<<<
 *     result = {}
 *     for i in range(paramCount):
 */
  (void)(RfcGetParameterCount(__pyx_v_funcDesc, (&__pyx_v_paramCount), NULL));

  /* "pyrfc/_cyrfc.pyx":2773
 *     cdef RFC_PARAMETER_DESC paramDesc
 *     RfcGetParameterCount(funcDesc, &paramCount, NULL)
 *     result = {}             # <<<<<<<<<<<<<<
 *     for i in range(paramCount):
 *         RfcGetParameterDescByIndex(funcDesc, i, &paramDesc, NULL)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2774
 *     RfcGetParameterCount(funcDesc, &paramCount, NULL)
 *     result = {}
 *     for i in range(paramCount):             # <<<<<<<<<<<<<<
 *         RfcGetParameterDescByIndex(funcDesc, i, &paramDesc, NULL)
 *         if paramDesc.direction != filter_parameter_direction:
 */
  __pyx_t_2 = __pyx_v_paramCount;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "pyrfc/_cyrfc.pyx":2775
 *     result = {}
 *     for i in range(paramCount):
 *         RfcGetParameterDescByIndex(funcDesc, i, &paramDesc, NULL)             # <<<<<<<<<<<<<<
 *         if paramDesc.direction != filter_parameter_direction:
 *             result[wrapString(paramDesc.name)] = wrapVariable(
 */
    (void)(RfcGetParameterDescByIndex(__pyx_v_funcDesc, __pyx_v_i, (&__pyx_v_paramDesc), NULL));

    /* "pyrfc/_cyrfc.pyx":2776
 *     for i in range(paramCount):
 *         RfcGetParameterDescByIndex(funcDesc, i, &paramDesc, NULL)
 *         if paramDesc.direction != filter_parameter_direction:             # <<<<<<<<<<<<<<
 *             result[wrapString(paramDesc.name)] = wrapVariable(
 *                 paramDesc.type,
 */
    __pyx_t_5 = ((__pyx_v_paramDesc.direction != __pyx_v_filter_parameter_direction) != 0);
    if (__pyx_t_5) {

      /* "pyrfc/_cyrfc.pyx":2777
 *         RfcGetParameterDescByIndex(funcDesc, i, &paramDesc, NULL)
 *         if paramDesc.direction != filter_parameter_direction:
 *             result[wrapString(paramDesc.name)] = wrapVariable(             # <<<<<<<<<<<<<<
 *                 paramDesc.type,
 *                 container,
 */
      __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapVariable(__pyx_v_paramDesc.type, __pyx_v_container, __pyx_v_paramDesc.name, __pyx_v_paramDesc.nucLength, __pyx_v_paramDesc.typeDescHandle, __pyx_v_config); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2777, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_paramDesc.name, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2777, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_t_6, __pyx_t_1) < 0)) __PYX_ERR(0, 2777, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyrfc/_cyrfc.pyx":2776
 *     for i in range(paramCount):
 *         RfcGetParameterDescByIndex(funcDesc, i, &paramDesc, NULL)
 *         if paramDesc.direction != filter_parameter_direction:             # <<<<<<<<<<<<<<
 *             result[wrapString(paramDesc.name)] = wrapVariable(
 *                 paramDesc.type,
 */
    }
  }

  /* "pyrfc/_cyrfc.pyx":2785
 *                 config
 *             )
 *     return result             # <<<<<<<<<<<<<<
 * 
 * cdef wrapUnitIdentifier(RFC_UNIT_IDENTIFIER uIdentifier):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":2756
 * 
 * 
 * cdef wrapResult(             # <<<<<<<<<<<<<<
 *             RFC_FUNCTION_DESC_HANDLE funcDesc,
 *             RFC_FUNCTION_HANDLE container,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrfc._cyrfc.wrapResult", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2787
 *     return result
 * 
 * cdef wrapUnitIdentifier(RFC_UNIT_IDENTIFIER uIdentifier):             # <<<<<<<<<<<<<<
 *     return {
 *         'queued': "Q" == wrapString(&uIdentifier.unitType, 1),
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapUnitIdentifier(RFC_UNIT_IDENTIFIER __pyx_v_uIdentifier) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrapUnitIdentifier", 0);

  /* "pyrfc/_cyrfc.pyx":2788
 * 
 * cdef wrapUnitIdentifier(RFC_UNIT_IDENTIFIER uIdentifier):
 *     return {             # <<<<<<<<<<<<<<
 *         'queued': "Q" == wrapString(&uIdentifier.unitType, 1),
 *         'id': wrapString(uIdentifier.unitID)
 */
  __Pyx_XDECREF(__pyx_r);

  /* "pyrfc/_cyrfc.pyx":2789
 * cdef wrapUnitIdentifier(RFC_UNIT_IDENTIFIER uIdentifier):
 *     return {
 *         'queued': "Q" == wrapString(&uIdentifier.unitType, 1),             # <<<<<<<<<<<<<<
 *         'id': wrapString(uIdentifier.unitID)
 *     }
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.uclen = __pyx_int_1;
  __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapString((&__pyx_v_uIdentifier.unitType), &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_RichCompare(__pyx_n_u_Q, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2789, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_queued, __pyx_t_4) < 0) __PYX_ERR(0, 2789, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":2790
 *     return {
 *         'queued': "Q" == wrapString(&uIdentifier.unitType, 1),
 *         'id': wrapString(uIdentifier.unitID)             # <<<<<<<<<<<<<<
 *     }
 * 
 */
  __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_uIdentifier.unitID, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_id, __pyx_t_4) < 0) __PYX_ERR(0, 2789, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":2787
 *     return result
 * 
 * cdef wrapUnitIdentifier(RFC_UNIT_IDENTIFIER uIdentifier):             # <<<<<<<<<<<<<<
 *     return {
 *         'queued': "Q" == wrapString(&uIdentifier.unitType, 1),
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyrfc._cyrfc.wrapUnitIdentifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2793
 *     }
 * 
 * cdef wrapUnitAttributes(RFC_UNIT_ATTRIBUTES *uattr):             # <<<<<<<<<<<<<<
 *     unit_attributes = {}
 *     unit_attributes['kernel_trace'] = uattr.kernelTrace != 0
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapUnitAttributes(RFC_UNIT_ATTRIBUTES *__pyx_v_uattr) {
  PyObject *__pyx_v_unit_attributes = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrapUnitAttributes", 0);

  /* "pyrfc/_cyrfc.pyx":2794
 * 
 * cdef wrapUnitAttributes(RFC_UNIT_ATTRIBUTES *uattr):
 *     unit_attributes = {}             # <<<<<<<<<<<<<<
 *     unit_attributes['kernel_trace'] = uattr.kernelTrace != 0
 *     unit_attributes['sat_trace'] = uattr.satTrace != 0
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_unit_attributes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2795
 * cdef wrapUnitAttributes(RFC_UNIT_ATTRIBUTES *uattr):
 *     unit_attributes = {}
 *     unit_attributes['kernel_trace'] = uattr.kernelTrace != 0             # <<<<<<<<<<<<<<
 *     unit_attributes['sat_trace'] = uattr.satTrace != 0
 *     unit_attributes['unit_history'] = uattr.unitHistory != 0
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_uattr->kernelTrace != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_kernel_trace, __pyx_t_1) < 0)) __PYX_ERR(0, 2795, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2796
 *     unit_attributes = {}
 *     unit_attributes['kernel_trace'] = uattr.kernelTrace != 0
 *     unit_attributes['sat_trace'] = uattr.satTrace != 0             # <<<<<<<<<<<<<<
 *     unit_attributes['unit_history'] = uattr.unitHistory != 0
 *     unit_attributes['lock'] = uattr.lock != 0
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_uattr->satTrace != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_sat_trace, __pyx_t_1) < 0)) __PYX_ERR(0, 2796, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2797
 *     unit_attributes['kernel_trace'] = uattr.kernelTrace != 0
 *     unit_attributes['sat_trace'] = uattr.satTrace != 0
 *     unit_attributes['unit_history'] = uattr.unitHistory != 0             # <<<<<<<<<<<<<<
 *     unit_attributes['lock'] = uattr.lock != 0
 *     unit_attributes['no_commit_check'] = uattr.noCommitCheck != 0
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_uattr->unitHistory != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_unit_history, __pyx_t_1) < 0)) __PYX_ERR(0, 2797, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2798
 *     unit_attributes['sat_trace'] = uattr.satTrace != 0
 *     unit_attributes['unit_history'] = uattr.unitHistory != 0
 *     unit_attributes['lock'] = uattr.lock != 0             # <<<<<<<<<<<<<<
 *     unit_attributes['no_commit_check'] = uattr.noCommitCheck != 0
 *     unit_attributes['user'] = wrapString(uattr.user, 12, True)
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_uattr->lock != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_lock, __pyx_t_1) < 0)) __PYX_ERR(0, 2798, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2799
 *     unit_attributes['unit_history'] = uattr.unitHistory != 0
 *     unit_attributes['lock'] = uattr.lock != 0
 *     unit_attributes['no_commit_check'] = uattr.noCommitCheck != 0             # <<<<<<<<<<<<<<
 *     unit_attributes['user'] = wrapString(uattr.user, 12, True)
 *     unit_attributes['client'] = wrapString(uattr.client, 3, True)
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_uattr->noCommitCheck != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_no_commit_check, __pyx_t_1) < 0)) __PYX_ERR(0, 2799, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2800
 *     unit_attributes['lock'] = uattr.lock != 0
 *     unit_attributes['no_commit_check'] = uattr.noCommitCheck != 0
 *     unit_attributes['user'] = wrapString(uattr.user, 12, True)             # <<<<<<<<<<<<<<
 *     unit_attributes['client'] = wrapString(uattr.client, 3, True)
 *     unit_attributes['t_code'] = wrapString(uattr.tCode, 20, True)
 */
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.uclen = __pyx_int_12;
  __pyx_t_2.rstrip = Py_True;
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_uattr->user, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_user, __pyx_t_1) < 0)) __PYX_ERR(0, 2800, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2801
 *     unit_attributes['no_commit_check'] = uattr.noCommitCheck != 0
 *     unit_attributes['user'] = wrapString(uattr.user, 12, True)
 *     unit_attributes['client'] = wrapString(uattr.client, 3, True)             # <<<<<<<<<<<<<<
 *     unit_attributes['t_code'] = wrapString(uattr.tCode, 20, True)
 *     unit_attributes['program'] = wrapString(uattr.program, 40, True)
 */
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.uclen = __pyx_int_3;
  __pyx_t_2.rstrip = Py_True;
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_uattr->client, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_client, __pyx_t_1) < 0)) __PYX_ERR(0, 2801, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2802
 *     unit_attributes['user'] = wrapString(uattr.user, 12, True)
 *     unit_attributes['client'] = wrapString(uattr.client, 3, True)
 *     unit_attributes['t_code'] = wrapString(uattr.tCode, 20, True)             # <<<<<<<<<<<<<<
 *     unit_attributes['program'] = wrapString(uattr.program, 40, True)
 *     unit_attributes['hostname'] = wrapString(uattr.hostname, 40, True)
 */
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.uclen = __pyx_int_20;
  __pyx_t_2.rstrip = Py_True;
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_uattr->tCode, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_t_code, __pyx_t_1) < 0)) __PYX_ERR(0, 2802, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2803
 *     unit_attributes['client'] = wrapString(uattr.client, 3, True)
 *     unit_attributes['t_code'] = wrapString(uattr.tCode, 20, True)
 *     unit_attributes['program'] = wrapString(uattr.program, 40, True)             # <<<<<<<<<<<<<<
 *     unit_attributes['hostname'] = wrapString(uattr.hostname, 40, True)
 *     unit_attributes['sending_date'] = wrapString(uattr.sendingDate, 8, True)
 */
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.uclen = __pyx_int_40;
  __pyx_t_2.rstrip = Py_True;
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_uattr->program, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_program, __pyx_t_1) < 0)) __PYX_ERR(0, 2803, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2804
 *     unit_attributes['t_code'] = wrapString(uattr.tCode, 20, True)
 *     unit_attributes['program'] = wrapString(uattr.program, 40, True)
 *     unit_attributes['hostname'] = wrapString(uattr.hostname, 40, True)             # <<<<<<<<<<<<<<
 *     unit_attributes['sending_date'] = wrapString(uattr.sendingDate, 8, True)
 *     unit_attributes['sending_time'] = wrapString(uattr.sendingTime, 6, True)
 */
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.uclen = __pyx_int_40;
  __pyx_t_2.rstrip = Py_True;
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_uattr->hostname, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_hostname, __pyx_t_1) < 0)) __PYX_ERR(0, 2804, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2805
 *     unit_attributes['program'] = wrapString(uattr.program, 40, True)
 *     unit_attributes['hostname'] = wrapString(uattr.hostname, 40, True)
 *     unit_attributes['sending_date'] = wrapString(uattr.sendingDate, 8, True)             # <<<<<<<<<<<<<<
 *     unit_attributes['sending_time'] = wrapString(uattr.sendingTime, 6, True)
 *     return unit_attributes
 */
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.uclen = __pyx_int_8;
  __pyx_t_2.rstrip = Py_True;
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_uattr->sendingDate, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_sending_date, __pyx_t_1) < 0)) __PYX_ERR(0, 2805, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2806
 *     unit_attributes['hostname'] = wrapString(uattr.hostname, 40, True)
 *     unit_attributes['sending_date'] = wrapString(uattr.sendingDate, 8, True)
 *     unit_attributes['sending_time'] = wrapString(uattr.sendingTime, 6, True)             # <<<<<<<<<<<<<<
 *     return unit_attributes
 * 
 */
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.uclen = __pyx_int_6;
  __pyx_t_2.rstrip = Py_True;
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_uattr->sendingTime, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_sending_time, __pyx_t_1) < 0)) __PYX_ERR(0, 2806, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2807
 *     unit_attributes['sending_date'] = wrapString(uattr.sendingDate, 8, True)
 *     unit_attributes['sending_time'] = wrapString(uattr.sendingTime, 6, True)
 *     return unit_attributes             # <<<<<<<<<<<<<<
 * 
 * cdef wrapStructure(RFC_TYPE_DESC_HANDLE typeDesc, RFC_STRUCTURE_HANDLE container, config):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_unit_attributes);
  __pyx_r = __pyx_v_unit_attributes;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":2793
 *     }
 * 
 * cdef wrapUnitAttributes(RFC_UNIT_ATTRIBUTES *uattr):             # <<<<<<<<<<<<<<
 *     unit_attributes = {}
 *     unit_attributes['kernel_trace'] = uattr.kernelTrace != 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrfc._cyrfc.wrapUnitAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_unit_attributes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2809
 *     return unit_attributes
 * 
 * cdef wrapStructure(RFC_TYPE_DESC_HANDLE typeDesc, RFC_STRUCTURE_HANDLE container, config):             # <<<<<<<<<<<<<<
 *     cdef unsigned i, fieldCount
 *     cdef RFC_FIELD_DESC fieldDesc
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapStructure(RFC_TYPE_DESC_HANDLE __pyx_v_typeDesc, RFC_STRUCTURE_HANDLE __pyx_v_container, PyObject *__pyx_v_config) {
  unsigned int __pyx_v_i;
  unsigned int __pyx_v_fieldCount;
  RFC_FIELD_DESC __pyx_v_fieldDesc;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  unsigned int __pyx_t_2;
  unsigned int __pyx_t_3;
  unsigned int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrapStructure", 0);

  /* "pyrfc/_cyrfc.pyx":2812
 *     cdef unsigned i, fieldCount
 *     cdef RFC_FIELD_DESC fieldDesc
 *     RfcGetFieldCount(typeDesc, &fieldCount, NULL)             # <<<<<<<<<<<<<<
 *     result = {}
 *     for i in range(fieldCount):
 */
  (void)(RfcGetFieldCount(__pyx_v_typeDesc, (&__pyx_v_fieldCount), NULL));

  /* "pyrfc/_cyrfc.pyx":2813
 *     cdef RFC_FIELD_DESC fieldDesc
 *     RfcGetFieldCount(typeDesc, &fieldCount, NULL)
 *     result = {}             # <<<<<<<<<<<<<<
 *     for i in range(fieldCount):
 *         RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, NULL)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2814
 *     RfcGetFieldCount(typeDesc, &fieldCount, NULL)
 *     result = {}
 *     for i in range(fieldCount):             # <<<<<<<<<<<<<<
 *         RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, NULL)
 *         result[wrapString(fieldDesc.name)] = wrapVariable(
 */
  __pyx_t_2 = __pyx_v_fieldCount;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "pyrfc/_cyrfc.pyx":2815
 *     result = {}
 *     for i in range(fieldCount):
 *         RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, NULL)             # <<<<<<<<<<<<<<
 *         result[wrapString(fieldDesc.name)] = wrapVariable(
 *                 fieldDesc.type,
 */
    (void)(RfcGetFieldDescByIndex(__pyx_v_typeDesc, __pyx_v_i, (&__pyx_v_fieldDesc), NULL));

    /* "pyrfc/_cyrfc.pyx":2816
 *     for i in range(fieldCount):
 *         RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, NULL)
 *         result[wrapString(fieldDesc.name)] = wrapVariable(             # <<<<<<<<<<<<<<
 *                 fieldDesc.type,
 *                 container,
 */
    __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapVariable(__pyx_v_fieldDesc.type, __pyx_v_container, __pyx_v_fieldDesc.name, __pyx_v_fieldDesc.nucLength, __pyx_v_fieldDesc.typeDescHandle, __pyx_v_config); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_fieldDesc.name, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(PyObject_SetItem(__pyx_v_result, __pyx_t_5, __pyx_t_1) < 0)) __PYX_ERR(0, 2816, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "pyrfc/_cyrfc.pyx":2824
 *                 config
 *             )
 *     if len(result) == 1:             # <<<<<<<<<<<<<<
 *         if '' in result:
 *             result = result['']
 */
  __pyx_t_6 = PyObject_Length(__pyx_v_result); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2824, __pyx_L1_error)
  __pyx_t_7 = ((__pyx_t_6 == 1) != 0);
  if (__pyx_t_7) {

    /* "pyrfc/_cyrfc.pyx":2825
 *             )
 *     if len(result) == 1:
 *         if '' in result:             # <<<<<<<<<<<<<<
 *             result = result['']
 *     return result
 */
    __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__5, __pyx_v_result, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2825, __pyx_L1_error)
    __pyx_t_8 = (__pyx_t_7 != 0);
    if (__pyx_t_8) {

      /* "pyrfc/_cyrfc.pyx":2826
 *     if len(result) == 1:
 *         if '' in result:
 *             result = result['']             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_kp_u__5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2826, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyrfc/_cyrfc.pyx":2825
 *             )
 *     if len(result) == 1:
 *         if '' in result:             # <<<<<<<<<<<<<<
 *             result = result['']
 *     return result
 */
    }

    /* "pyrfc/_cyrfc.pyx":2824
 *                 config
 *             )
 *     if len(result) == 1:             # <<<<<<<<<<<<<<
 *         if '' in result:
 *             result = result['']
 */
  }

  /* "pyrfc/_cyrfc.pyx":2827
 *         if '' in result:
 *             result = result['']
 *     return result             # <<<<<<<<<<<<<<
 * 
 * # # Used for debugging tables, cf. wrapTable()
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":2809
 *     return unit_attributes
 * 
 * cdef wrapStructure(RFC_TYPE_DESC_HANDLE typeDesc, RFC_STRUCTURE_HANDLE container, config):             # <<<<<<<<<<<<<<
 *     cdef unsigned i, fieldCount
 *     cdef RFC_FIELD_DESC fieldDesc
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrfc._cyrfc.wrapStructure", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2840
 * #        return wrapStructure(self.typeDesc, self.container)
 * 
 * cdef wrapTable(RFC_TYPE_DESC_HANDLE typeDesc, RFC_TABLE_HANDLE container, config):             # <<<<<<<<<<<<<<
 *     cdef RFC_ERROR_INFO errorInfo
 *     cdef unsigned rowCount
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapTable(RFC_TYPE_DESC_HANDLE __pyx_v_typeDesc, RFC_TABLE_HANDLE __pyx_v_container, PyObject *__pyx_v_config) {
  RFC_ERROR_INFO __pyx_v_errorInfo;
  unsigned int __pyx_v_rowCount;
  PyObject *__pyx_v_table = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrapTable", 0);

  /* "pyrfc/_cyrfc.pyx":2848
 *     # tc.container = container
 *     # return tc
 *     RfcGetRowCount(container, &rowCount, &errorInfo)             # <<<<<<<<<<<<<<
 *     table = [None] * rowCount
 *     while rowCount > 0:
 */
  (void)(RfcGetRowCount(__pyx_v_container, (&__pyx_v_rowCount), (&__pyx_v_errorInfo)));

  /* "pyrfc/_cyrfc.pyx":2849
 *     # return tc
 *     RfcGetRowCount(container, &rowCount, &errorInfo)
 *     table = [None] * rowCount             # <<<<<<<<<<<<<<
 *     while rowCount > 0:
 *         rowCount -= 1
 */
  __pyx_t_1 = PyList_New(1 * (__pyx_v_rowCount)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  { Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < __pyx_v_rowCount; __pyx_temp++) {
      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None);
    }
  }
  __pyx_v_table = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":2850
 *     RfcGetRowCount(container, &rowCount, &errorInfo)
 *     table = [None] * rowCount
 *     while rowCount > 0:             # <<<<<<<<<<<<<<
 *         rowCount -= 1
 *         RfcMoveTo(container, rowCount, &errorInfo)
 */
  while (1) {
    __pyx_t_2 = ((__pyx_v_rowCount > 0) != 0);
    if (!__pyx_t_2) break;

    /* "pyrfc/_cyrfc.pyx":2851
 *     table = [None] * rowCount
 *     while rowCount > 0:
 *         rowCount -= 1             # <<<<<<<<<<<<<<
 *         RfcMoveTo(container, rowCount, &errorInfo)
 *         table[rowCount] = wrapStructure(typeDesc, container, config)
 */
    __pyx_v_rowCount = (__pyx_v_rowCount - 1);

    /* "pyrfc/_cyrfc.pyx":2852
 *     while rowCount > 0:
 *         rowCount -= 1
 *         RfcMoveTo(container, rowCount, &errorInfo)             # <<<<<<<<<<<<<<
 *         table[rowCount] = wrapStructure(typeDesc, container, config)
 *         RfcDeleteCurrentRow(container, &errorInfo)
 */
    (void)(RfcMoveTo(__pyx_v_container, __pyx_v_rowCount, (&__pyx_v_errorInfo)));

    /* "pyrfc/_cyrfc.pyx":2853
 *         rowCount -= 1
 *         RfcMoveTo(container, rowCount, &errorInfo)
 *         table[rowCount] = wrapStructure(typeDesc, container, config)             # <<<<<<<<<<<<<<
 *         RfcDeleteCurrentRow(container, &errorInfo)
 *     return table
 */
    __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapStructure(__pyx_v_typeDesc, __pyx_v_container, __pyx_v_config); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2853, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(__Pyx_SetItemInt(__pyx_v_table, __pyx_v_rowCount, __pyx_t_1, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1) < 0)) __PYX_ERR(0, 2853, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":2854
 *         RfcMoveTo(container, rowCount, &errorInfo)
 *         table[rowCount] = wrapStructure(typeDesc, container, config)
 *         RfcDeleteCurrentRow(container, &errorInfo)             # <<<<<<<<<<<<<<
 *     return table
 * 
 */
    (void)(RfcDeleteCurrentRow(__pyx_v_container, (&__pyx_v_errorInfo)));
  }

  /* "pyrfc/_cyrfc.pyx":2855
 *         table[rowCount] = wrapStructure(typeDesc, container, config)
 *         RfcDeleteCurrentRow(container, &errorInfo)
 *     return table             # <<<<<<<<<<<<<<
 * 
 * cdef wrapVariable(
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_table);
  __pyx_r = __pyx_v_table;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":2840
 * #        return wrapStructure(self.typeDesc, self.container)
 * 
 * cdef wrapTable(RFC_TYPE_DESC_HANDLE typeDesc, RFC_TABLE_HANDLE container, config):             # <<<<<<<<<<<<<<
 *     cdef RFC_ERROR_INFO errorInfo
 *     cdef unsigned rowCount
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrfc._cyrfc.wrapTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_table);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":2857
 *     return table
 * 
 * cdef wrapVariable(             # <<<<<<<<<<<<<<
 *             RFCTYPE typ,
 *             RFC_FUNCTION_HANDLE container,
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapVariable(RFCTYPE __pyx_v_typ, RFC_FUNCTION_HANDLE __pyx_v_container, SAP_UC *__pyx_v_cName, unsigned int __pyx_v_cLen, RFC_TYPE_DESC_HANDLE __pyx_v_typeDesc, PyObject *__pyx_v_config) {
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_STRUCTURE_HANDLE __pyx_v_structure;
  RFC_TABLE_HANDLE __pyx_v_table;
  RFC_CHAR *__pyx_v_charValue;
  SAP_UC *__pyx_v_stringValue;
  RFC_NUM *__pyx_v_numValue;
  SAP_RAW *__pyx_v_byteValue;
  RFC_FLOAT __pyx_v_floatValue;
  RFC_INT __pyx_v_intValue;
  RFC_INT1 __pyx_v_int1Value;
  RFC_INT2 __pyx_v_int2Value;
  RFC_INT8 __pyx_v_int8Value;
  RFC_DATE __pyx_v_dateValue;
  RFC_TIME __pyx_v_timeValue;
  unsigned int __pyx_v_resultLen;
  unsigned int __pyx_v_strLen;
  PyObject *__pyx_v_utcValue = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  char const *__pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  char const *__pyx_t_15;
  char const *__pyx_t_16;
  char const *__pyx_t_17;
  char const *__pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  char const *__pyx_t_20;
  char const *__pyx_t_21;
  char const *__pyx_t_22;
  int __pyx_t_23;
  int __pyx_t_24;
  PyObject *__pyx_t_25 = NULL;
  Py_ssize_t __pyx_t_26;
  Py_UCS4 __pyx_t_27;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrapVariable", 0);

  /* "pyrfc/_cyrfc.pyx":2881
 *     cdef RFC_TIME timeValue
 *     cdef unsigned resultLen, strLen
 *     if typ == RFCTYPE_STRUCTURE:             # <<<<<<<<<<<<<<
 *         rc = RfcGetStructure(container, cName, &structure, &errorInfo)
 *         if rc != RFC_OK:
 */
  switch (__pyx_v_typ) {
    case RFCTYPE_STRUCTURE:

    /* "pyrfc/_cyrfc.pyx":2882
 *     cdef unsigned resultLen, strLen
 *     if typ == RFCTYPE_STRUCTURE:
 *         rc = RfcGetStructure(container, cName, &structure, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
    __pyx_v_rc = RfcGetStructure(__pyx_v_container, __pyx_v_cName, (&__pyx_v_structure), (&__pyx_v_errorInfo));

    /* "pyrfc/_cyrfc.pyx":2883
 *     if typ == RFCTYPE_STRUCTURE:
 *         rc = RfcGetStructure(container, cName, &structure, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         return wrapStructure(typeDesc, structure, config)
 */
    __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "pyrfc/_cyrfc.pyx":2884
 *         rc = RfcGetStructure(container, cName, &structure, &errorInfo)
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         return wrapStructure(typeDesc, structure, config)
 *     elif typ == RFCTYPE_TABLE:
 */
      __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2884, __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, 2884, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":2883
 *     if typ == RFCTYPE_STRUCTURE:
 *         rc = RfcGetStructure(container, cName, &structure, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         return wrapStructure(typeDesc, structure, config)
 */
    }

    /* "pyrfc/_cyrfc.pyx":2885
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         return wrapStructure(typeDesc, structure, config)             # <<<<<<<<<<<<<<
 *     elif typ == RFCTYPE_TABLE:
 *         rc = RfcGetTable(container, cName, &table, &errorInfo)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapStructure(__pyx_v_typeDesc, __pyx_v_structure, __pyx_v_config); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pyrfc/_cyrfc.pyx":2881
 *     cdef RFC_TIME timeValue
 *     cdef unsigned resultLen, strLen
 *     if typ == RFCTYPE_STRUCTURE:             # <<<<<<<<<<<<<<
 *         rc = RfcGetStructure(container, cName, &structure, &errorInfo)
 *         if rc != RFC_OK:
 */
    break;
    case RFCTYPE_TABLE:

    /* "pyrfc/_cyrfc.pyx":2887
 *         return wrapStructure(typeDesc, structure, config)
 *     elif typ == RFCTYPE_TABLE:
 *         rc = RfcGetTable(container, cName, &table, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
    __pyx_v_rc = RfcGetTable(__pyx_v_container, __pyx_v_cName, (&__pyx_v_table), (&__pyx_v_errorInfo));

    /* "pyrfc/_cyrfc.pyx":2888
 *     elif typ == RFCTYPE_TABLE:
 *         rc = RfcGetTable(container, cName, &table, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         return wrapTable(typeDesc, table, config)
 */
    __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "pyrfc/_cyrfc.pyx":2889
 *         rc = RfcGetTable(container, cName, &table, &errorInfo)
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         return wrapTable(typeDesc, table, config)
 *     elif typ == RFCTYPE_CHAR:
 */
      __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2889, __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, 2889, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":2888
 *     elif typ == RFCTYPE_TABLE:
 *         rc = RfcGetTable(container, cName, &table, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         return wrapTable(typeDesc, table, config)
 */
    }

    /* "pyrfc/_cyrfc.pyx":2890
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         return wrapTable(typeDesc, table, config)             # <<<<<<<<<<<<<<
 *     elif typ == RFCTYPE_CHAR:
 *         charValue = mallocU(cLen)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapTable(__pyx_v_typeDesc, __pyx_v_table, __pyx_v_config); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pyrfc/_cyrfc.pyx":2886
 *             raise wrapError(&errorInfo)
 *         return wrapStructure(typeDesc, structure, config)
 *     elif typ == RFCTYPE_TABLE:             # <<<<<<<<<<<<<<
 *         rc = RfcGetTable(container, cName, &table, &errorInfo)
 *         if rc != RFC_OK:
 */
    break;
    case RFCTYPE_CHAR:

    /* "pyrfc/_cyrfc.pyx":2892
 *         return wrapTable(typeDesc, table, config)
 *     elif typ == RFCTYPE_CHAR:
 *         charValue = mallocU(cLen)             # <<<<<<<<<<<<<<
 *         try:
 *             rc = RfcGetChars(container, cName, charValue, cLen, &errorInfo)
 */
    __pyx_v_charValue = mallocU(__pyx_v_cLen);

    /* "pyrfc/_cyrfc.pyx":2893
 *     elif typ == RFCTYPE_CHAR:
 *         charValue = mallocU(cLen)
 *         try:             # <<<<<<<<<<<<<<
 *             rc = RfcGetChars(container, cName, charValue, cLen, &errorInfo)
 *             if rc != RFC_OK:
 */
    /*try:*/ {

      /* "pyrfc/_cyrfc.pyx":2894
 *         charValue = mallocU(cLen)
 *         try:
 *             rc = RfcGetChars(container, cName, charValue, cLen, &errorInfo)             # <<<<<<<<<<<<<<
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)
 */
      __pyx_v_rc = RfcGetChars(__pyx_v_container, __pyx_v_cName, __pyx_v_charValue, __pyx_v_cLen, (&__pyx_v_errorInfo));

      /* "pyrfc/_cyrfc.pyx":2895
 *         try:
 *             rc = RfcGetChars(container, cName, charValue, cLen, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             return wrapString(charValue, cLen, config & _MASK_RSTRIP)
 */
      __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
      if (unlikely(__pyx_t_1)) {

        /* "pyrfc/_cyrfc.pyx":2896
 *             rc = RfcGetChars(container, cName, charValue, cLen, &errorInfo)
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *             return wrapString(charValue, cLen, config & _MASK_RSTRIP)
 *         finally:
 */
        __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2896, __pyx_L6_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, 2896, __pyx_L6_error)

        /* "pyrfc/_cyrfc.pyx":2895
 *         try:
 *             rc = RfcGetChars(container, cName, charValue, cLen, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             return wrapString(charValue, cLen, config & _MASK_RSTRIP)
 */
      }

      /* "pyrfc/_cyrfc.pyx":2897
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)
 *             return wrapString(charValue, cLen, config & _MASK_RSTRIP)             # <<<<<<<<<<<<<<
 *         finally:
 *             free(charValue)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_cLen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2897, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MASK_RSTRIP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2897, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyNumber_And(__pyx_v_config, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2897, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_5.__pyx_n = 2;
      __pyx_t_5.uclen = __pyx_t_2;
      __pyx_t_5.rstrip = __pyx_t_4;
      __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_charValue, &__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2897, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L5_return;
    }

    /* "pyrfc/_cyrfc.pyx":2899
 *             return wrapString(charValue, cLen, config & _MASK_RSTRIP)
 *         finally:
 *             free(charValue)             # <<<<<<<<<<<<<<
 *     elif typ == RFCTYPE_STRING:
 *         rc = RfcGetStringLength(container, cName, &strLen, &errorInfo)
 */
    /*finally:*/ {
      __pyx_L6_error:;
      /*exception exit:*/{
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
        if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_13);
        __Pyx_XGOTREF(__pyx_t_14);
        __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
        {
          free(__pyx_v_charValue);
        }
        if (PY_MAJOR_VERSION >= 3) {
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
        }
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
        __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
        goto __pyx_L1_error;
      }
      __pyx_L5_return: {
        __pyx_t_14 = __pyx_r;
        __pyx_r = 0;
        free(__pyx_v_charValue);
        __pyx_r = __pyx_t_14;
        __pyx_t_14 = 0;
        goto __pyx_L0;
      }
    }

    /* "pyrfc/_cyrfc.pyx":2891
 *             raise wrapError(&errorInfo)
 *         return wrapTable(typeDesc, table, config)
 *     elif typ == RFCTYPE_CHAR:             # <<<<<<<<<<<<<<
 *         charValue = mallocU(cLen)
 *         try:
 */
    break;
    case RFCTYPE_STRING:

    /* "pyrfc/_cyrfc.pyx":2901
 *             free(charValue)
 *     elif typ == RFCTYPE_STRING:
 *         rc = RfcGetStringLength(container, cName, &strLen, &errorInfo)             # <<<<<<<<<<<<<<
 *         try:
 *             stringValue = mallocU(strLen+1)
 */
    __pyx_v_rc = RfcGetStringLength(__pyx_v_container, __pyx_v_cName, (&__pyx_v_strLen), (&__pyx_v_errorInfo));

    /* "pyrfc/_cyrfc.pyx":2902
 *     elif typ == RFCTYPE_STRING:
 *         rc = RfcGetStringLength(container, cName, &strLen, &errorInfo)
 *         try:             # <<<<<<<<<<<<<<
 *             stringValue = mallocU(strLen+1)
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 */
    /*try:*/ {

      /* "pyrfc/_cyrfc.pyx":2903
 *         rc = RfcGetStringLength(container, cName, &strLen, &errorInfo)
 *         try:
 *             stringValue = mallocU(strLen+1)             # <<<<<<<<<<<<<<
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 *             if rc != RFC_OK:
 */
      __pyx_v_stringValue = mallocU((__pyx_v_strLen + 1));

      /* "pyrfc/_cyrfc.pyx":2904
 *         try:
 *             stringValue = mallocU(strLen+1)
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)             # <<<<<<<<<<<<<<
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)
 */
      __pyx_v_rc = RfcGetString(__pyx_v_container, __pyx_v_cName, __pyx_v_stringValue, (__pyx_v_strLen + 1), (&__pyx_v_resultLen), (&__pyx_v_errorInfo));

      /* "pyrfc/_cyrfc.pyx":2905
 *             stringValue = mallocU(strLen+1)
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             return wrapString(stringValue, resultLen)
 */
      __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
      if (unlikely(__pyx_t_1)) {

        /* "pyrfc/_cyrfc.pyx":2906
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *             return wrapString(stringValue, resultLen)
 *         finally:
 */
        __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2906, __pyx_L12_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, 2906, __pyx_L12_error)

        /* "pyrfc/_cyrfc.pyx":2905
 *             stringValue = mallocU(strLen+1)
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             return wrapString(stringValue, resultLen)
 */
      }

      /* "pyrfc/_cyrfc.pyx":2907
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)
 *             return wrapString(stringValue, resultLen)             # <<<<<<<<<<<<<<
 *         finally:
 *             free(stringValue)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_resultLen); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2907, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5.__pyx_n = 1;
      __pyx_t_5.uclen = __pyx_t_3;
      __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_stringValue, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2907, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L11_return;
    }

    /* "pyrfc/_cyrfc.pyx":2909
 *             return wrapString(stringValue, resultLen)
 *         finally:
 *             free(stringValue)             # <<<<<<<<<<<<<<
 *     elif typ == RFCTYPE_NUM:
 *         numValue = mallocU(cLen)
 */
    /*finally:*/ {
      __pyx_L12_error:;
      /*exception exit:*/{
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_14);
        __Pyx_XGOTREF(__pyx_t_13);
        __Pyx_XGOTREF(__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_9);
        __pyx_t_7 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
        {
          free(__pyx_v_stringValue);
        }
        if (PY_MAJOR_VERSION >= 3) {
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ErrRestore(__pyx_t_14, __pyx_t_13, __pyx_t_12);
        __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0;
        __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_15;
        goto __pyx_L1_error;
      }
      __pyx_L11_return: {
        __pyx_t_9 = __pyx_r;
        __pyx_r = 0;
        free(__pyx_v_stringValue);
        __pyx_r = __pyx_t_9;
        __pyx_t_9 = 0;
        goto __pyx_L0;
      }
    }

    /* "pyrfc/_cyrfc.pyx":2900
 *         finally:
 *             free(charValue)
 *     elif typ == RFCTYPE_STRING:             # <<<<<<<<<<<<<<
 *         rc = RfcGetStringLength(container, cName, &strLen, &errorInfo)
 *         try:
 */
    break;
    case RFCTYPE_NUM:

    /* "pyrfc/_cyrfc.pyx":2911
 *             free(stringValue)
 *     elif typ == RFCTYPE_NUM:
 *         numValue = mallocU(cLen)             # <<<<<<<<<<<<<<
 *         try:
 *             rc = RfcGetNum(container, cName, numValue, cLen, &errorInfo)
 */
    __pyx_v_numValue = mallocU(__pyx_v_cLen);

    /* "pyrfc/_cyrfc.pyx":2912
 *     elif typ == RFCTYPE_NUM:
 *         numValue = mallocU(cLen)
 *         try:             # <<<<<<<<<<<<<<
 *             rc = RfcGetNum(container, cName, numValue, cLen, &errorInfo)
 *             if rc != RFC_OK:
 */
    /*try:*/ {

      /* "pyrfc/_cyrfc.pyx":2913
 *         numValue = mallocU(cLen)
 *         try:
 *             rc = RfcGetNum(container, cName, numValue, cLen, &errorInfo)             # <<<<<<<<<<<<<<
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)
 */
      __pyx_v_rc = RfcGetNum(__pyx_v_container, __pyx_v_cName, __pyx_v_numValue, __pyx_v_cLen, (&__pyx_v_errorInfo));

      /* "pyrfc/_cyrfc.pyx":2914
 *         try:
 *             rc = RfcGetNum(container, cName, numValue, cLen, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             return wrapString(numValue, cLen)
 */
      __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
      if (unlikely(__pyx_t_1)) {

        /* "pyrfc/_cyrfc.pyx":2915
 *             rc = RfcGetNum(container, cName, numValue, cLen, &errorInfo)
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *             return wrapString(numValue, cLen)
 *         finally:
 */
        __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2915, __pyx_L18_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, 2915, __pyx_L18_error)

        /* "pyrfc/_cyrfc.pyx":2914
 *         try:
 *             rc = RfcGetNum(container, cName, numValue, cLen, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             return wrapString(numValue, cLen)
 */
      }

      /* "pyrfc/_cyrfc.pyx":2916
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)
 *             return wrapString(numValue, cLen)             # <<<<<<<<<<<<<<
 *         finally:
 *             free(numValue)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_cLen); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2916, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5.__pyx_n = 1;
      __pyx_t_5.uclen = __pyx_t_4;
      __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_numValue, &__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2916, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L17_return;
    }

    /* "pyrfc/_cyrfc.pyx":2918
 *             return wrapString(numValue, cLen)
 *         finally:
 *             free(numValue)             # <<<<<<<<<<<<<<
 *     elif typ == RFCTYPE_BYTE:
 *         byteValue = <SAP_RAW*> malloc(cLen)
 */
    /*finally:*/ {
      __pyx_L18_error:;
      /*exception exit:*/{
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
        if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_13);
        __Pyx_XGOTREF(__pyx_t_14);
        __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
        {
          free(__pyx_v_numValue);
        }
        if (PY_MAJOR_VERSION >= 3) {
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
        }
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
        __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_16;
        goto __pyx_L1_error;
      }
      __pyx_L17_return: {
        __pyx_t_14 = __pyx_r;
        __pyx_r = 0;
        free(__pyx_v_numValue);
        __pyx_r = __pyx_t_14;
        __pyx_t_14 = 0;
        goto __pyx_L0;
      }
    }

    /* "pyrfc/_cyrfc.pyx":2910
 *         finally:
 *             free(stringValue)
 *     elif typ == RFCTYPE_NUM:             # <<<<<<<<<<<<<<
 *         numValue = mallocU(cLen)
 *         try:
 */
    break;
    case RFCTYPE_BYTE:

    /* "pyrfc/_cyrfc.pyx":2920
 *             free(numValue)
 *     elif typ == RFCTYPE_BYTE:
 *         byteValue = <SAP_RAW*> malloc(cLen)             # <<<<<<<<<<<<<<
 *         try:
 *             rc = RfcGetBytes(container, cName, byteValue, cLen, &errorInfo)
 */
    __pyx_v_byteValue = ((SAP_RAW *)malloc(__pyx_v_cLen));

    /* "pyrfc/_cyrfc.pyx":2921
 *     elif typ == RFCTYPE_BYTE:
 *         byteValue = <SAP_RAW*> malloc(cLen)
 *         try:             # <<<<<<<<<<<<<<
 *             rc = RfcGetBytes(container, cName, byteValue, cLen, &errorInfo)
 *             if rc != RFC_OK:
 */
    /*try:*/ {

      /* "pyrfc/_cyrfc.pyx":2922
 *         byteValue = <SAP_RAW*> malloc(cLen)
 *         try:
 *             rc = RfcGetBytes(container, cName, byteValue, cLen, &errorInfo)             # <<<<<<<<<<<<<<
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)
 */
      __pyx_v_rc = RfcGetBytes(__pyx_v_container, __pyx_v_cName, __pyx_v_byteValue, __pyx_v_cLen, (&__pyx_v_errorInfo));

      /* "pyrfc/_cyrfc.pyx":2923
 *         try:
 *             rc = RfcGetBytes(container, cName, byteValue, cLen, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             return byteValue[:cLen]
 */
      __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
      if (unlikely(__pyx_t_1)) {

        /* "pyrfc/_cyrfc.pyx":2924
 *             rc = RfcGetBytes(container, cName, byteValue, cLen, &errorInfo)
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *             return byteValue[:cLen]
 *         finally:
 */
        __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2924, __pyx_L24_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, 2924, __pyx_L24_error)

        /* "pyrfc/_cyrfc.pyx":2923
 *         try:
 *             rc = RfcGetBytes(container, cName, byteValue, cLen, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             return byteValue[:cLen]
 */
      }

      /* "pyrfc/_cyrfc.pyx":2925
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)
 *             return byteValue[:cLen]             # <<<<<<<<<<<<<<
 *         finally:
 *             free(byteValue)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_byteValue) + 0, __pyx_v_cLen - 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2925, __pyx_L24_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L23_return;
    }

    /* "pyrfc/_cyrfc.pyx":2927
 *             return byteValue[:cLen]
 *         finally:
 *             free(byteValue)             # <<<<<<<<<<<<<<
 *     elif typ == RFCTYPE_XSTRING:
 *         rc = RfcGetStringLength(container, cName, &strLen, &errorInfo)
 */
    /*finally:*/ {
      __pyx_L24_error:;
      /*exception exit:*/{
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_14);
        __Pyx_XGOTREF(__pyx_t_13);
        __Pyx_XGOTREF(__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_9);
        __pyx_t_7 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
        {
          free(__pyx_v_byteValue);
        }
        if (PY_MAJOR_VERSION >= 3) {
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ErrRestore(__pyx_t_14, __pyx_t_13, __pyx_t_12);
        __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0;
        __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_17;
        goto __pyx_L1_error;
      }
      __pyx_L23_return: {
        __pyx_t_9 = __pyx_r;
        __pyx_r = 0;
        free(__pyx_v_byteValue);
        __pyx_r = __pyx_t_9;
        __pyx_t_9 = 0;
        goto __pyx_L0;
      }
    }

    /* "pyrfc/_cyrfc.pyx":2919
 *         finally:
 *             free(numValue)
 *     elif typ == RFCTYPE_BYTE:             # <<<<<<<<<<<<<<
 *         byteValue = <SAP_RAW*> malloc(cLen)
 *         try:
 */
    break;
    case RFCTYPE_XSTRING:

    /* "pyrfc/_cyrfc.pyx":2929
 *             free(byteValue)
 *     elif typ == RFCTYPE_XSTRING:
 *         rc = RfcGetStringLength(container, cName, &strLen, &errorInfo)             # <<<<<<<<<<<<<<
 *         try:
 *             byteValue = <SAP_RAW*> malloc(strLen+1)
 */
    __pyx_v_rc = RfcGetStringLength(__pyx_v_container, __pyx_v_cName, (&__pyx_v_strLen), (&__pyx_v_errorInfo));

    /* "pyrfc/_cyrfc.pyx":2930
 *     elif typ == RFCTYPE_XSTRING:
 *         rc = RfcGetStringLength(container, cName, &strLen, &errorInfo)
 *         try:             # <<<<<<<<<<<<<<
 *             byteValue = <SAP_RAW*> malloc(strLen+1)
 *             byteValue[strLen] = 0
 */
    /*try:*/ {

      /* "pyrfc/_cyrfc.pyx":2931
 *         rc = RfcGetStringLength(container, cName, &strLen, &errorInfo)
 *         try:
 *             byteValue = <SAP_RAW*> malloc(strLen+1)             # <<<<<<<<<<<<<<
 *             byteValue[strLen] = 0
 *             rc = RfcGetXString(container, cName, byteValue, strLen, &resultLen, &errorInfo)
 */
      __pyx_v_byteValue = ((SAP_RAW *)malloc((__pyx_v_strLen + 1)));

      /* "pyrfc/_cyrfc.pyx":2932
 *         try:
 *             byteValue = <SAP_RAW*> malloc(strLen+1)
 *             byteValue[strLen] = 0             # <<<<<<<<<<<<<<
 *             rc = RfcGetXString(container, cName, byteValue, strLen, &resultLen, &errorInfo)
 *             if rc != RFC_OK:
 */
      (__pyx_v_byteValue[__pyx_v_strLen]) = 0;

      /* "pyrfc/_cyrfc.pyx":2933
 *             byteValue = <SAP_RAW*> malloc(strLen+1)
 *             byteValue[strLen] = 0
 *             rc = RfcGetXString(container, cName, byteValue, strLen, &resultLen, &errorInfo)             # <<<<<<<<<<<<<<
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)
 */
      __pyx_v_rc = RfcGetXString(__pyx_v_container, __pyx_v_cName, __pyx_v_byteValue, __pyx_v_strLen, (&__pyx_v_resultLen), (&__pyx_v_errorInfo));

      /* "pyrfc/_cyrfc.pyx":2934
 *             byteValue[strLen] = 0
 *             rc = RfcGetXString(container, cName, byteValue, strLen, &resultLen, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             return byteValue[:resultLen]
 */
      __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
      if (unlikely(__pyx_t_1)) {

        /* "pyrfc/_cyrfc.pyx":2935
 *             rc = RfcGetXString(container, cName, byteValue, strLen, &resultLen, &errorInfo)
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *             return byteValue[:resultLen]
 *         finally:
 */
        __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2935, __pyx_L30_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, 2935, __pyx_L30_error)

        /* "pyrfc/_cyrfc.pyx":2934
 *             byteValue[strLen] = 0
 *             rc = RfcGetXString(container, cName, byteValue, strLen, &resultLen, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             return byteValue[:resultLen]
 */
      }

      /* "pyrfc/_cyrfc.pyx":2936
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)
 *             return byteValue[:resultLen]             # <<<<<<<<<<<<<<
 *         finally:
 *             free(byteValue)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_byteValue) + 0, __pyx_v_resultLen - 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2936, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L29_return;
    }

    /* "pyrfc/_cyrfc.pyx":2938
 *             return byteValue[:resultLen]
 *         finally:
 *             free(byteValue)             # <<<<<<<<<<<<<<
 *     elif typ == RFCTYPE_BCD:
 *         # An upper bound for the length of the _string representation_
 */
    /*finally:*/ {
      __pyx_L30_error:;
      /*exception exit:*/{
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
        if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_13);
        __Pyx_XGOTREF(__pyx_t_14);
        __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
        {
          free(__pyx_v_byteValue);
        }
        if (PY_MAJOR_VERSION >= 3) {
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
        }
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
        __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_18;
        goto __pyx_L1_error;
      }
      __pyx_L29_return: {
        __pyx_t_14 = __pyx_r;
        __pyx_r = 0;
        free(__pyx_v_byteValue);
        __pyx_r = __pyx_t_14;
        __pyx_t_14 = 0;
        goto __pyx_L0;
      }
    }

    /* "pyrfc/_cyrfc.pyx":2928
 *         finally:
 *             free(byteValue)
 *     elif typ == RFCTYPE_XSTRING:             # <<<<<<<<<<<<<<
 *         rc = RfcGetStringLength(container, cName, &strLen, &errorInfo)
 *         try:
 */
    break;
    case RFCTYPE_BCD:

    /* "pyrfc/_cyrfc.pyx":2945
 *         # Furthermore, a sign char, a decimal separator char may be present
 *         # => (2*cLen)+1
 *         strLen = 2*cLen + 1             # <<<<<<<<<<<<<<
 *         try:
 *             stringValue = mallocU(strLen+1)
 */
    __pyx_v_strLen = ((2 * __pyx_v_cLen) + 1);

    /* "pyrfc/_cyrfc.pyx":2946
 *         # => (2*cLen)+1
 *         strLen = 2*cLen + 1
 *         try:             # <<<<<<<<<<<<<<
 *             stringValue = mallocU(strLen+1)
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 */
    /*try:*/ {

      /* "pyrfc/_cyrfc.pyx":2947
 *         strLen = 2*cLen + 1
 *         try:
 *             stringValue = mallocU(strLen+1)             # <<<<<<<<<<<<<<
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 *             if rc == 23:  # Buffer too small, use returned requried result length
 */
      __pyx_v_stringValue = mallocU((__pyx_v_strLen + 1));

      /* "pyrfc/_cyrfc.pyx":2948
 *         try:
 *             stringValue = mallocU(strLen+1)
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)             # <<<<<<<<<<<<<<
 *             if rc == 23:  # Buffer too small, use returned requried result length
 *                 # print("Warning: Buffer for BCD (cLen={}, buffer={}) too small: "
 */
      __pyx_v_rc = RfcGetString(__pyx_v_container, __pyx_v_cName, __pyx_v_stringValue, (__pyx_v_strLen + 1), (&__pyx_v_resultLen), (&__pyx_v_errorInfo));

      /* "pyrfc/_cyrfc.pyx":2949
 *             stringValue = mallocU(strLen+1)
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 *             if rc == 23:  # Buffer too small, use returned requried result length             # <<<<<<<<<<<<<<
 *                 # print("Warning: Buffer for BCD (cLen={}, buffer={}) too small: "
 *                 #      "trying with {}".format(cLen, strLen, resultLen))
 */
      __pyx_t_1 = ((__pyx_v_rc == 23) != 0);
      if (__pyx_t_1) {

        /* "pyrfc/_cyrfc.pyx":2952
 *                 # print("Warning: Buffer for BCD (cLen={}, buffer={}) too small: "
 *                 #      "trying with {}".format(cLen, strLen, resultLen))
 *                 free(stringValue)             # <<<<<<<<<<<<<<
 *                 strLen = resultLen
 *                 stringValue = mallocU(strLen+1)
 */
        free(__pyx_v_stringValue);

        /* "pyrfc/_cyrfc.pyx":2953
 *                 #      "trying with {}".format(cLen, strLen, resultLen))
 *                 free(stringValue)
 *                 strLen = resultLen             # <<<<<<<<<<<<<<
 *                 stringValue = mallocU(strLen+1)
 *                 rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 */
        __pyx_v_strLen = __pyx_v_resultLen;

        /* "pyrfc/_cyrfc.pyx":2954
 *                 free(stringValue)
 *                 strLen = resultLen
 *                 stringValue = mallocU(strLen+1)             # <<<<<<<<<<<<<<
 *                 rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 *             if rc != RFC_OK:
 */
        __pyx_v_stringValue = mallocU((__pyx_v_strLen + 1));

        /* "pyrfc/_cyrfc.pyx":2955
 *                 strLen = resultLen
 *                 stringValue = mallocU(strLen+1)
 *                 rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)             # <<<<<<<<<<<<<<
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)
 */
        __pyx_v_rc = RfcGetString(__pyx_v_container, __pyx_v_cName, __pyx_v_stringValue, (__pyx_v_strLen + 1), (&__pyx_v_resultLen), (&__pyx_v_errorInfo));

        /* "pyrfc/_cyrfc.pyx":2949
 *             stringValue = mallocU(strLen+1)
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 *             if rc == 23:  # Buffer too small, use returned requried result length             # <<<<<<<<<<<<<<
 *                 # print("Warning: Buffer for BCD (cLen={}, buffer={}) too small: "
 *                 #      "trying with {}".format(cLen, strLen, resultLen))
 */
      }

      /* "pyrfc/_cyrfc.pyx":2956
 *                 stringValue = mallocU(strLen+1)
 *                 rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             return Decimal(wrapString(stringValue, -1, config & _MASK_RSTRIP))
 */
      __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
      if (unlikely(__pyx_t_1)) {

        /* "pyrfc/_cyrfc.pyx":2957
 *                 rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *             return Decimal(wrapString(stringValue, -1, config & _MASK_RSTRIP))
 *         finally:
 */
        __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2957, __pyx_L36_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, 2957, __pyx_L36_error)

        /* "pyrfc/_cyrfc.pyx":2956
 *                 stringValue = mallocU(strLen+1)
 *                 rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             return Decimal(wrapString(stringValue, -1, config & _MASK_RSTRIP))
 */
      }

      /* "pyrfc/_cyrfc.pyx":2958
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)
 *             return Decimal(wrapString(stringValue, -1, config & _MASK_RSTRIP))             # <<<<<<<<<<<<<<
 *         finally:
 *             free(stringValue)
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2958, __pyx_L36_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MASK_RSTRIP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2958, __pyx_L36_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_19 = PyNumber_And(__pyx_v_config, __pyx_t_2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2958, __pyx_L36_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_5.__pyx_n = 2;
      __pyx_t_5.uclen = __pyx_int_neg_1;
      __pyx_t_5.rstrip = __pyx_t_19;
      __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_stringValue, &__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2958, __pyx_L36_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_19 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_19)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_19);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      __pyx_t_3 = (__pyx_t_19) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_19, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2);
      __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2958, __pyx_L36_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L35_return;
    }

    /* "pyrfc/_cyrfc.pyx":2960
 *             return Decimal(wrapString(stringValue, -1, config & _MASK_RSTRIP))
 *         finally:
 *             free(stringValue)             # <<<<<<<<<<<<<<
 *     elif typ == RFCTYPE_DECF16 or typ == RFCTYPE_DECF34:
 *         # An upper bound for the length of the _string representation_
 */
    /*finally:*/ {
      __pyx_L36_error:;
      /*exception exit:*/{
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_14);
        __Pyx_XGOTREF(__pyx_t_13);
        __Pyx_XGOTREF(__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_9);
        __pyx_t_7 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_20 = __pyx_filename;
        {
          free(__pyx_v_stringValue);
        }
        if (PY_MAJOR_VERSION >= 3) {
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ErrRestore(__pyx_t_14, __pyx_t_13, __pyx_t_12);
        __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0;
        __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_20;
        goto __pyx_L1_error;
      }
      __pyx_L35_return: {
        __pyx_t_9 = __pyx_r;
        __pyx_r = 0;
        free(__pyx_v_stringValue);
        __pyx_r = __pyx_t_9;
        __pyx_t_9 = 0;
        goto __pyx_L0;
      }
    }

    /* "pyrfc/_cyrfc.pyx":2939
 *         finally:
 *             free(byteValue)
 *     elif typ == RFCTYPE_BCD:             # <<<<<<<<<<<<<<
 *         # An upper bound for the length of the _string representation_
 *         # of the BCD is given by (2*cLen)-1 (each digit is encoded in 4bit,
 */
    break;
    case RFCTYPE_DECF16:

    /* "pyrfc/_cyrfc.pyx":2961
 *         finally:
 *             free(stringValue)
 *     elif typ == RFCTYPE_DECF16 or typ == RFCTYPE_DECF34:             # <<<<<<<<<<<<<<
 *         # An upper bound for the length of the _string representation_
 *         # of the DECF is given by (2*cLen)-1 (each digit is encoded in 4bit,
 */
    case RFCTYPE_DECF34:

    /* "pyrfc/_cyrfc.pyx":2969
 *         # and exponent char, sign and exponent
 *         # => +9
 *         strLen = 2*cLen + 10             # <<<<<<<<<<<<<<
 *         try:
 *             stringValue = mallocU(strLen+1)
 */
    __pyx_v_strLen = ((2 * __pyx_v_cLen) + 10);

    /* "pyrfc/_cyrfc.pyx":2970
 *         # => +9
 *         strLen = 2*cLen + 10
 *         try:             # <<<<<<<<<<<<<<
 *             stringValue = mallocU(strLen+1)
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 */
    /*try:*/ {

      /* "pyrfc/_cyrfc.pyx":2971
 *         strLen = 2*cLen + 10
 *         try:
 *             stringValue = mallocU(strLen+1)             # <<<<<<<<<<<<<<
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 *             if rc == 23:  # Buffer too small, use returned requried result length
 */
      __pyx_v_stringValue = mallocU((__pyx_v_strLen + 1));

      /* "pyrfc/_cyrfc.pyx":2972
 *         try:
 *             stringValue = mallocU(strLen+1)
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)             # <<<<<<<<<<<<<<
 *             if rc == 23:  # Buffer too small, use returned requried result length
 *                 # print("Warning: Buffer for DECF (cLen={}, buffer={}) too small: "
 */
      __pyx_v_rc = RfcGetString(__pyx_v_container, __pyx_v_cName, __pyx_v_stringValue, (__pyx_v_strLen + 1), (&__pyx_v_resultLen), (&__pyx_v_errorInfo));

      /* "pyrfc/_cyrfc.pyx":2973
 *             stringValue = mallocU(strLen+1)
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 *             if rc == 23:  # Buffer too small, use returned requried result length             # <<<<<<<<<<<<<<
 *                 # print("Warning: Buffer for DECF (cLen={}, buffer={}) too small: "
 *                 #      "trying with {}".format(cLen, strLen, resultLen))
 */
      __pyx_t_1 = ((__pyx_v_rc == 23) != 0);
      if (__pyx_t_1) {

        /* "pyrfc/_cyrfc.pyx":2976
 *                 # print("Warning: Buffer for DECF (cLen={}, buffer={}) too small: "
 *                 #      "trying with {}".format(cLen, strLen, resultLen))
 *                 free(stringValue)             # <<<<<<<<<<<<<<
 *                 strLen = resultLen
 *                 stringValue = mallocU(strLen+1)
 */
        free(__pyx_v_stringValue);

        /* "pyrfc/_cyrfc.pyx":2977
 *                 #      "trying with {}".format(cLen, strLen, resultLen))
 *                 free(stringValue)
 *                 strLen = resultLen             # <<<<<<<<<<<<<<
 *                 stringValue = mallocU(strLen+1)
 *                 rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 */
        __pyx_v_strLen = __pyx_v_resultLen;

        /* "pyrfc/_cyrfc.pyx":2978
 *                 free(stringValue)
 *                 strLen = resultLen
 *                 stringValue = mallocU(strLen+1)             # <<<<<<<<<<<<<<
 *                 rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 *             if rc != RFC_OK:
 */
        __pyx_v_stringValue = mallocU((__pyx_v_strLen + 1));

        /* "pyrfc/_cyrfc.pyx":2979
 *                 strLen = resultLen
 *                 stringValue = mallocU(strLen+1)
 *                 rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)             # <<<<<<<<<<<<<<
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)
 */
        __pyx_v_rc = RfcGetString(__pyx_v_container, __pyx_v_cName, __pyx_v_stringValue, (__pyx_v_strLen + 1), (&__pyx_v_resultLen), (&__pyx_v_errorInfo));

        /* "pyrfc/_cyrfc.pyx":2973
 *             stringValue = mallocU(strLen+1)
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 *             if rc == 23:  # Buffer too small, use returned requried result length             # <<<<<<<<<<<<<<
 *                 # print("Warning: Buffer for DECF (cLen={}, buffer={}) too small: "
 *                 #      "trying with {}".format(cLen, strLen, resultLen))
 */
      }

      /* "pyrfc/_cyrfc.pyx":2980
 *                 stringValue = mallocU(strLen+1)
 *                 rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             return Decimal(wrapString(stringValue, -1, config & _MASK_RSTRIP))
 */
      __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
      if (unlikely(__pyx_t_1)) {

        /* "pyrfc/_cyrfc.pyx":2981
 *                 rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *             return Decimal(wrapString(stringValue, -1, config & _MASK_RSTRIP))
 *         finally:
 */
        __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2981, __pyx_L43_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, 2981, __pyx_L43_error)

        /* "pyrfc/_cyrfc.pyx":2980
 *                 stringValue = mallocU(strLen+1)
 *                 rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             return Decimal(wrapString(stringValue, -1, config & _MASK_RSTRIP))
 */
      }

      /* "pyrfc/_cyrfc.pyx":2982
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)
 *             return Decimal(wrapString(stringValue, -1, config & _MASK_RSTRIP))             # <<<<<<<<<<<<<<
 *         finally:
 *             free(stringValue)
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2982, __pyx_L43_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MASK_RSTRIP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2982, __pyx_L43_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_19 = PyNumber_And(__pyx_v_config, __pyx_t_2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2982, __pyx_L43_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_5.__pyx_n = 2;
      __pyx_t_5.uclen = __pyx_int_neg_1;
      __pyx_t_5.rstrip = __pyx_t_19;
      __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_stringValue, &__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2982, __pyx_L43_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_19 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_19)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_19);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      __pyx_t_3 = (__pyx_t_19) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_19, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2);
      __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2982, __pyx_L43_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L42_return;
    }

    /* "pyrfc/_cyrfc.pyx":2984
 *             return Decimal(wrapString(stringValue, -1, config & _MASK_RSTRIP))
 *         finally:
 *             free(stringValue)             # <<<<<<<<<<<<<<
 *     elif typ == RFCTYPE_FLOAT:
 *         rc = RfcGetFloat(container, cName, &floatValue, &errorInfo)
 */
    /*finally:*/ {
      __pyx_L43_error:;
      /*exception exit:*/{
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
        __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
        if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_13);
        __Pyx_XGOTREF(__pyx_t_14);
        __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_21 = __pyx_filename;
        {
          free(__pyx_v_stringValue);
        }
        if (PY_MAJOR_VERSION >= 3) {
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
        }
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
        __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_21;
        goto __pyx_L1_error;
      }
      __pyx_L42_return: {
        __pyx_t_14 = __pyx_r;
        __pyx_r = 0;
        free(__pyx_v_stringValue);
        __pyx_r = __pyx_t_14;
        __pyx_t_14 = 0;
        goto __pyx_L0;
      }
    }

    /* "pyrfc/_cyrfc.pyx":2961
 *         finally:
 *             free(stringValue)
 *     elif typ == RFCTYPE_DECF16 or typ == RFCTYPE_DECF34:             # <<<<<<<<<<<<<<
 *         # An upper bound for the length of the _string representation_
 *         # of the DECF is given by (2*cLen)-1 (each digit is encoded in 4bit,
 */
    break;
    case RFCTYPE_FLOAT:

    /* "pyrfc/_cyrfc.pyx":2986
 *             free(stringValue)
 *     elif typ == RFCTYPE_FLOAT:
 *         rc = RfcGetFloat(container, cName, &floatValue, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
    __pyx_v_rc = RfcGetFloat(__pyx_v_container, __pyx_v_cName, (&__pyx_v_floatValue), (&__pyx_v_errorInfo));

    /* "pyrfc/_cyrfc.pyx":2987
 *     elif typ == RFCTYPE_FLOAT:
 *         rc = RfcGetFloat(container, cName, &floatValue, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         return floatValue
 */
    __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "pyrfc/_cyrfc.pyx":2988
 *         rc = RfcGetFloat(container, cName, &floatValue, &errorInfo)
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         return floatValue
 *     elif typ == RFCTYPE_INT:
 */
      __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2988, __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, 2988, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":2987
 *     elif typ == RFCTYPE_FLOAT:
 *         rc = RfcGetFloat(container, cName, &floatValue, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         return floatValue
 */
    }

    /* "pyrfc/_cyrfc.pyx":2989
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         return floatValue             # <<<<<<<<<<<<<<
 *     elif typ == RFCTYPE_INT:
 *         rc = RfcGetInt(container, cName, &intValue, &errorInfo)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_floatValue); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "pyrfc/_cyrfc.pyx":2985
 *         finally:
 *             free(stringValue)
 *     elif typ == RFCTYPE_FLOAT:             # <<<<<<<<<<<<<<
 *         rc = RfcGetFloat(container, cName, &floatValue, &errorInfo)
 *         if rc != RFC_OK:
 */
    break;
    case RFCTYPE_INT:

    /* "pyrfc/_cyrfc.pyx":2991
 *         return floatValue
 *     elif typ == RFCTYPE_INT:
 *         rc = RfcGetInt(container, cName, &intValue, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
    __pyx_v_rc = RfcGetInt(__pyx_v_container, __pyx_v_cName, (&__pyx_v_intValue), (&__pyx_v_errorInfo));

    /* "pyrfc/_cyrfc.pyx":2992
 *     elif typ == RFCTYPE_INT:
 *         rc = RfcGetInt(container, cName, &intValue, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         return intValue
 */
    __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "pyrfc/_cyrfc.pyx":2993
 *         rc = RfcGetInt(container, cName, &intValue, &errorInfo)
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         return intValue
 *     elif typ == RFCTYPE_INT1:
 */
      __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2993, __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, 2993, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":2992
 *     elif typ == RFCTYPE_INT:
 *         rc = RfcGetInt(container, cName, &intValue, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         return intValue
 */
    }

    /* "pyrfc/_cyrfc.pyx":2994
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         return intValue             # <<<<<<<<<<<<<<
 *     elif typ == RFCTYPE_INT1:
 *         rc = RfcGetInt1(container, cName, &int1Value, &errorInfo)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyInt_From_RFC_INT(__pyx_v_intValue); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2994, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "pyrfc/_cyrfc.pyx":2990
 *             raise wrapError(&errorInfo)
 *         return floatValue
 *     elif typ == RFCTYPE_INT:             # <<<<<<<<<<<<<<
 *         rc = RfcGetInt(container, cName, &intValue, &errorInfo)
 *         if rc != RFC_OK:
 */
    break;
    case RFCTYPE_INT1:

    /* "pyrfc/_cyrfc.pyx":2996
 *         return intValue
 *     elif typ == RFCTYPE_INT1:
 *         rc = RfcGetInt1(container, cName, &int1Value, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
    __pyx_v_rc = RfcGetInt1(__pyx_v_container, __pyx_v_cName, (&__pyx_v_int1Value), (&__pyx_v_errorInfo));

    /* "pyrfc/_cyrfc.pyx":2997
 *     elif typ == RFCTYPE_INT1:
 *         rc = RfcGetInt1(container, cName, &int1Value, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         return int1Value
 */
    __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "pyrfc/_cyrfc.pyx":2998
 *         rc = RfcGetInt1(container, cName, &int1Value, &errorInfo)
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         return int1Value
 *     elif typ == RFCTYPE_INT2:
 */
      __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2998, __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, 2998, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":2997
 *     elif typ == RFCTYPE_INT1:
 *         rc = RfcGetInt1(container, cName, &int1Value, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         return int1Value
 */
    }

    /* "pyrfc/_cyrfc.pyx":2999
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         return int1Value             # <<<<<<<<<<<<<<
 *     elif typ == RFCTYPE_INT2:
 *         rc = RfcGetInt2(container, cName, &int2Value, &errorInfo)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyInt_From_SAP_RAW(__pyx_v_int1Value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2999, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "pyrfc/_cyrfc.pyx":2995
 *             raise wrapError(&errorInfo)
 *         return intValue
 *     elif typ == RFCTYPE_INT1:             # <<<<<<<<<<<<<<
 *         rc = RfcGetInt1(container, cName, &int1Value, &errorInfo)
 *         if rc != RFC_OK:
 */
    break;
    case RFCTYPE_INT2:

    /* "pyrfc/_cyrfc.pyx":3001
 *         return int1Value
 *     elif typ == RFCTYPE_INT2:
 *         rc = RfcGetInt2(container, cName, &int2Value, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
    __pyx_v_rc = RfcGetInt2(__pyx_v_container, __pyx_v_cName, (&__pyx_v_int2Value), (&__pyx_v_errorInfo));

    /* "pyrfc/_cyrfc.pyx":3002
 *     elif typ == RFCTYPE_INT2:
 *         rc = RfcGetInt2(container, cName, &int2Value, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         return int2Value
 */
    __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "pyrfc/_cyrfc.pyx":3003
 *         rc = RfcGetInt2(container, cName, &int2Value, &errorInfo)
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         return int2Value
 *     elif typ == RFCTYPE_INT8:
 */
      __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3003, __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, 3003, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":3002
 *     elif typ == RFCTYPE_INT2:
 *         rc = RfcGetInt2(container, cName, &int2Value, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         return int2Value
 */
    }

    /* "pyrfc/_cyrfc.pyx":3004
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         return int2Value             # <<<<<<<<<<<<<<
 *     elif typ == RFCTYPE_INT8:
 *         rc = RfcGetInt8(container, cName, &int8Value, &errorInfo)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyInt_From_RFC_INT2(__pyx_v_int2Value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3004, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "pyrfc/_cyrfc.pyx":3000
 *             raise wrapError(&errorInfo)
 *         return int1Value
 *     elif typ == RFCTYPE_INT2:             # <<<<<<<<<<<<<<
 *         rc = RfcGetInt2(container, cName, &int2Value, &errorInfo)
 *         if rc != RFC_OK:
 */
    break;
    case RFCTYPE_INT8:

    /* "pyrfc/_cyrfc.pyx":3006
 *         return int2Value
 *     elif typ == RFCTYPE_INT8:
 *         rc = RfcGetInt8(container, cName, &int8Value, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
    __pyx_v_rc = RfcGetInt8(__pyx_v_container, __pyx_v_cName, (&__pyx_v_int8Value), (&__pyx_v_errorInfo));

    /* "pyrfc/_cyrfc.pyx":3007
 *     elif typ == RFCTYPE_INT8:
 *         rc = RfcGetInt8(container, cName, &int8Value, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         return int8Value
 */
    __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "pyrfc/_cyrfc.pyx":3008
 *         rc = RfcGetInt8(container, cName, &int8Value, &errorInfo)
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         return int8Value
 *     elif typ == RFCTYPE_UTCLONG:
 */
      __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3008, __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, 3008, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":3007
 *     elif typ == RFCTYPE_INT8:
 *         rc = RfcGetInt8(container, cName, &int8Value, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         return int8Value
 */
    }

    /* "pyrfc/_cyrfc.pyx":3009
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         return int8Value             # <<<<<<<<<<<<<<
 *     elif typ == RFCTYPE_UTCLONG:
 *         # rc = RfcGetStringLength(container, cName, &strLen, &errorInfo)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyInt_From_RFC_INT8(__pyx_v_int8Value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "pyrfc/_cyrfc.pyx":3005
 *             raise wrapError(&errorInfo)
 *         return int2Value
 *     elif typ == RFCTYPE_INT8:             # <<<<<<<<<<<<<<
 *         rc = RfcGetInt8(container, cName, &int8Value, &errorInfo)
 *         if rc != RFC_OK:
 */
    break;
    case RFCTYPE_UTCLONG:

    /* "pyrfc/_cyrfc.pyx":3012
 *     elif typ == RFCTYPE_UTCLONG:
 *         # rc = RfcGetStringLength(container, cName, &strLen, &errorInfo)
 *         strLen = 27  # is fixed             # <<<<<<<<<<<<<<
 *         try:
 *             stringValue = mallocU(strLen+1)
 */
    __pyx_v_strLen = 27;

    /* "pyrfc/_cyrfc.pyx":3013
 *         # rc = RfcGetStringLength(container, cName, &strLen, &errorInfo)
 *         strLen = 27  # is fixed
 *         try:             # <<<<<<<<<<<<<<
 *             stringValue = mallocU(strLen+1)
 *             # textual representation from NWRFC SDK because clients' systems unlikely support nanoseconds
 */
    /*try:*/ {

      /* "pyrfc/_cyrfc.pyx":3014
 *         strLen = 27  # is fixed
 *         try:
 *             stringValue = mallocU(strLen+1)             # <<<<<<<<<<<<<<
 *             # textual representation from NWRFC SDK because clients' systems unlikely support nanoseconds
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 */
      __pyx_v_stringValue = mallocU((__pyx_v_strLen + 1));

      /* "pyrfc/_cyrfc.pyx":3016
 *             stringValue = mallocU(strLen+1)
 *             # textual representation from NWRFC SDK because clients' systems unlikely support nanoseconds
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)             # <<<<<<<<<<<<<<
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)
 */
      __pyx_v_rc = RfcGetString(__pyx_v_container, __pyx_v_cName, __pyx_v_stringValue, (__pyx_v_strLen + 1), (&__pyx_v_resultLen), (&__pyx_v_errorInfo));

      /* "pyrfc/_cyrfc.pyx":3017
 *             # textual representation from NWRFC SDK because clients' systems unlikely support nanoseconds
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             utcValue = wrapString(stringValue, resultLen)
 */
      __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
      if (unlikely(__pyx_t_1)) {

        /* "pyrfc/_cyrfc.pyx":3018
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *             utcValue = wrapString(stringValue, resultLen)
 *             # replace the "," separator with "."
 */
        __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3018, __pyx_L55_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, 3018, __pyx_L55_error)

        /* "pyrfc/_cyrfc.pyx":3017
 *             # textual representation from NWRFC SDK because clients' systems unlikely support nanoseconds
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             utcValue = wrapString(stringValue, resultLen)
 */
      }

      /* "pyrfc/_cyrfc.pyx":3019
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)
 *             utcValue = wrapString(stringValue, resultLen)             # <<<<<<<<<<<<<<
 *             # replace the "," separator with "."
 *             return utcValue[:19]+'.'+utcValue[20:]
 */
      __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_resultLen); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3019, __pyx_L55_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5.__pyx_n = 1;
      __pyx_t_5.uclen = __pyx_t_3;
      __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_stringValue, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3019, __pyx_L55_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_utcValue = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "pyrfc/_cyrfc.pyx":3021
 *             utcValue = wrapString(stringValue, resultLen)
 *             # replace the "," separator with "."
 *             return utcValue[:19]+'.'+utcValue[20:]             # <<<<<<<<<<<<<<
 *         finally:
 *             free(stringValue)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_utcValue, 0, 19, NULL, NULL, &__pyx_slice__47, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3021, __pyx_L55_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_kp_u__21); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3021, __pyx_L55_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_utcValue, 20, 0, NULL, NULL, &__pyx_slice__48, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3021, __pyx_L55_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3021, __pyx_L55_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L54_return;
    }

    /* "pyrfc/_cyrfc.pyx":3023
 *             return utcValue[:19]+'.'+utcValue[20:]
 *         finally:
 *             free(stringValue)             # <<<<<<<<<<<<<<
 *     elif typ == RFCTYPE_DATE:
 *         rc = RfcGetDate(container, cName, dateValue, &errorInfo)
 */
    /*finally:*/ {
      __pyx_L55_error:;
      /*exception exit:*/{
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_14);
        __Pyx_XGOTREF(__pyx_t_13);
        __Pyx_XGOTREF(__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_9);
        __pyx_t_7 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_22 = __pyx_filename;
        {
          free(__pyx_v_stringValue);
        }
        if (PY_MAJOR_VERSION >= 3) {
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ErrRestore(__pyx_t_14, __pyx_t_13, __pyx_t_12);
        __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0;
        __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_22;
        goto __pyx_L1_error;
      }
      __pyx_L54_return: {
        __pyx_t_9 = __pyx_r;
        __pyx_r = 0;
        free(__pyx_v_stringValue);
        __pyx_r = __pyx_t_9;
        __pyx_t_9 = 0;
        goto __pyx_L0;
      }
    }

    /* "pyrfc/_cyrfc.pyx":3010
 *             raise wrapError(&errorInfo)
 *         return int8Value
 *     elif typ == RFCTYPE_UTCLONG:             # <<<<<<<<<<<<<<
 *         # rc = RfcGetStringLength(container, cName, &strLen, &errorInfo)
 *         strLen = 27  # is fixed
 */
    break;
    case RFCTYPE_DATE:

    /* "pyrfc/_cyrfc.pyx":3025
 *             free(stringValue)
 *     elif typ == RFCTYPE_DATE:
 *         rc = RfcGetDate(container, cName, dateValue, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
    __pyx_v_rc = RfcGetDate(__pyx_v_container, __pyx_v_cName, __pyx_v_dateValue, (&__pyx_v_errorInfo));

    /* "pyrfc/_cyrfc.pyx":3026
 *     elif typ == RFCTYPE_DATE:
 *         rc = RfcGetDate(container, cName, dateValue, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         value = wrapString(dateValue, 8)
 */
    __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "pyrfc/_cyrfc.pyx":3027
 *         rc = RfcGetDate(container, cName, dateValue, &errorInfo)
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         value = wrapString(dateValue, 8)
 *         # return date or None
 */
      __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3027, __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, 3027, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":3026
 *     elif typ == RFCTYPE_DATE:
 *         rc = RfcGetDate(container, cName, dateValue, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         value = wrapString(dateValue, 8)
 */
    }

    /* "pyrfc/_cyrfc.pyx":3028
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         value = wrapString(dateValue, 8)             # <<<<<<<<<<<<<<
 *         # return date or None
 *         if config & _MASK_DTIME:
 */
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.uclen = __pyx_int_8;
    __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_dateValue, &__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3028, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_value = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pyrfc/_cyrfc.pyx":3030
 *         value = wrapString(dateValue, 8)
 *         # return date or None
 *         if config & _MASK_DTIME:             # <<<<<<<<<<<<<<
 *             if (value == '00000000') or not value:
 *                 return None
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MASK_DTIME); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3030, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyNumber_And(__pyx_v_config, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3030, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3030, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "pyrfc/_cyrfc.pyx":3031
 *         # return date or None
 *         if config & _MASK_DTIME:
 *             if (value == '00000000') or not value:             # <<<<<<<<<<<<<<
 *                 return None
 *             return datetime.strptime(value, '%Y%m%d').date()
 */
      __pyx_t_23 = (__Pyx_PyUnicode_Equals(__pyx_v_value, __pyx_kp_u_00000000, Py_EQ)); if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 3031, __pyx_L1_error)
      if (!__pyx_t_23) {
      } else {
        __pyx_t_1 = __pyx_t_23;
        goto __pyx_L63_bool_binop_done;
      }
      __pyx_t_23 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 3031, __pyx_L1_error)
      __pyx_t_24 = ((!__pyx_t_23) != 0);
      __pyx_t_1 = __pyx_t_24;
      __pyx_L63_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyrfc/_cyrfc.pyx":3032
 *         if config & _MASK_DTIME:
 *             if (value == '00000000') or not value:
 *                 return None             # <<<<<<<<<<<<<<
 *             return datetime.strptime(value, '%Y%m%d').date()
 *         # return date string or ''
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

        /* "pyrfc/_cyrfc.pyx":3031
 *         # return date or None
 *         if config & _MASK_DTIME:
 *             if (value == '00000000') or not value:             # <<<<<<<<<<<<<<
 *                 return None
 *             return datetime.strptime(value, '%Y%m%d').date()
 */
      }

      /* "pyrfc/_cyrfc.pyx":3033
 *             if (value == '00000000') or not value:
 *                 return None
 *             return datetime.strptime(value, '%Y%m%d').date()             # <<<<<<<<<<<<<<
 *         # return date string or ''
 *         if (value == '00000000') or not value:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3033, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strptime); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3033, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_19))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_19);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_19, function);
          __pyx_t_6 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_19)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_value, __pyx_kp_u_Y_m_d};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3033, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_19)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_value, __pyx_kp_u_Y_m_d};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3033, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_25 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 3033, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_25);
        if (__pyx_t_3) {
          __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_t_3); __pyx_t_3 = NULL;
        }
        __Pyx_INCREF(__pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_25, 0+__pyx_t_6, __pyx_v_value);
        __Pyx_INCREF(__pyx_kp_u_Y_m_d);
        __Pyx_GIVEREF(__pyx_kp_u_Y_m_d);
        PyTuple_SET_ITEM(__pyx_t_25, 1+__pyx_t_6, __pyx_kp_u_Y_m_d);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_t_25, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3033, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
      }
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_date); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3033, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_19))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_19);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_19, function);
        }
      }
      __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_19, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_19);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3033, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "pyrfc/_cyrfc.pyx":3030
 *         value = wrapString(dateValue, 8)
 *         # return date or None
 *         if config & _MASK_DTIME:             # <<<<<<<<<<<<<<
 *             if (value == '00000000') or not value:
 *                 return None
 */
    }

    /* "pyrfc/_cyrfc.pyx":3035
 *             return datetime.strptime(value, '%Y%m%d').date()
 *         # return date string or ''
 *         if (value == '00000000') or not value:             # <<<<<<<<<<<<<<
 *             return ''
 *         return value
 */
    __pyx_t_24 = (__Pyx_PyUnicode_Equals(__pyx_v_value, __pyx_kp_u_00000000, Py_EQ)); if (unlikely(__pyx_t_24 < 0)) __PYX_ERR(0, 3035, __pyx_L1_error)
    if (!__pyx_t_24) {
    } else {
      __pyx_t_1 = __pyx_t_24;
      goto __pyx_L66_bool_binop_done;
    }
    __pyx_t_24 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_24 < 0)) __PYX_ERR(0, 3035, __pyx_L1_error)
    __pyx_t_23 = ((!__pyx_t_24) != 0);
    __pyx_t_1 = __pyx_t_23;
    __pyx_L66_bool_binop_done:;
    if (__pyx_t_1) {

      /* "pyrfc/_cyrfc.pyx":3036
 *         # return date string or ''
 *         if (value == '00000000') or not value:
 *             return ''             # <<<<<<<<<<<<<<
 *         return value
 *     elif typ == RFCTYPE_TIME:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_kp_u__5);
      __pyx_r = __pyx_kp_u__5;
      goto __pyx_L0;

      /* "pyrfc/_cyrfc.pyx":3035
 *             return datetime.strptime(value, '%Y%m%d').date()
 *         # return date string or ''
 *         if (value == '00000000') or not value:             # <<<<<<<<<<<<<<
 *             return ''
 *         return value
 */
    }

    /* "pyrfc/_cyrfc.pyx":3037
 *         if (value == '00000000') or not value:
 *             return ''
 *         return value             # <<<<<<<<<<<<<<
 *     elif typ == RFCTYPE_TIME:
 *         rc = RfcGetTime(container, cName, timeValue, &errorInfo)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_value);
    __pyx_r = __pyx_v_value;
    goto __pyx_L0;

    /* "pyrfc/_cyrfc.pyx":3024
 *         finally:
 *             free(stringValue)
 *     elif typ == RFCTYPE_DATE:             # <<<<<<<<<<<<<<
 *         rc = RfcGetDate(container, cName, dateValue, &errorInfo)
 *         if rc != RFC_OK:
 */
    break;
    case RFCTYPE_TIME:

    /* "pyrfc/_cyrfc.pyx":3039
 *         return value
 *     elif typ == RFCTYPE_TIME:
 *         rc = RfcGetTime(container, cName, timeValue, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 */
    __pyx_v_rc = RfcGetTime(__pyx_v_container, __pyx_v_cName, __pyx_v_timeValue, (&__pyx_v_errorInfo));

    /* "pyrfc/_cyrfc.pyx":3040
 *     elif typ == RFCTYPE_TIME:
 *         rc = RfcGetTime(container, cName, timeValue, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         value = wrapString(timeValue, 6)
 */
    __pyx_t_1 = ((__pyx_v_rc != RFC_OK) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "pyrfc/_cyrfc.pyx":3041
 *         rc = RfcGetTime(container, cName, timeValue, &errorInfo)
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         value = wrapString(timeValue, 6)
 *         # return time or None
 */
      __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3041, __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, 3041, __pyx_L1_error)

      /* "pyrfc/_cyrfc.pyx":3040
 *     elif typ == RFCTYPE_TIME:
 *         rc = RfcGetTime(container, cName, timeValue, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         value = wrapString(timeValue, 6)
 */
    }

    /* "pyrfc/_cyrfc.pyx":3042
 *         if rc != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         value = wrapString(timeValue, 6)             # <<<<<<<<<<<<<<
 *         # return time or None
 *         if config & _MASK_DTIME:
 */
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.uclen = __pyx_int_6;
    __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_timeValue, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_value = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "pyrfc/_cyrfc.pyx":3044
 *         value = wrapString(timeValue, 6)
 *         # return time or None
 *         if config & _MASK_DTIME:             # <<<<<<<<<<<<<<
 *             if not value:
 *                 return None
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MASK_DTIME); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_19 = PyNumber_And(__pyx_v_config, __pyx_t_4); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_19); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3044, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    if (__pyx_t_1) {

      /* "pyrfc/_cyrfc.pyx":3045
 *         # return time or None
 *         if config & _MASK_DTIME:
 *             if not value:             # <<<<<<<<<<<<<<
 *                 return None
 *             return datetime.strptime(value, '%H%M%S').time()
 */
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3045, __pyx_L1_error)
      __pyx_t_23 = ((!__pyx_t_1) != 0);
      if (__pyx_t_23) {

        /* "pyrfc/_cyrfc.pyx":3046
 *         if config & _MASK_DTIME:
 *             if not value:
 *                 return None             # <<<<<<<<<<<<<<
 *             return datetime.strptime(value, '%H%M%S').time()
 *         # return time string or ''
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

        /* "pyrfc/_cyrfc.pyx":3045
 *         # return time or None
 *         if config & _MASK_DTIME:
 *             if not value:             # <<<<<<<<<<<<<<
 *                 return None
 *             return datetime.strptime(value, '%H%M%S').time()
 */
      }

      /* "pyrfc/_cyrfc.pyx":3047
 *             if not value:
 *                 return None
 *             return datetime.strptime(value, '%H%M%S').time()             # <<<<<<<<<<<<<<
 *         # return time string or ''
 *         if not value:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_strptime); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 3047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_25);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_25))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_25);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_25);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_25, function);
          __pyx_t_6 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_25)) {
        PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_value, __pyx_kp_u_H_M_S};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_25, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3047, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_25)) {
        PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_value, __pyx_kp_u_H_M_S};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_25, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3047, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3047, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (__pyx_t_2) {
          __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL;
        }
        __Pyx_INCREF(__pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_v_value);
        __Pyx_INCREF(__pyx_kp_u_H_M_S);
        __Pyx_GIVEREF(__pyx_kp_u_H_M_S);
        PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_kp_u_H_M_S);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_25, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3047, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
      __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_time); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 3047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_25);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_25))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_25);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_25);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_25, function);
        }
      }
      __pyx_t_19 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_25, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_25);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
      __pyx_r = __pyx_t_19;
      __pyx_t_19 = 0;
      goto __pyx_L0;

      /* "pyrfc/_cyrfc.pyx":3044
 *         value = wrapString(timeValue, 6)
 *         # return time or None
 *         if config & _MASK_DTIME:             # <<<<<<<<<<<<<<
 *             if not value:
 *                 return None
 */
    }

    /* "pyrfc/_cyrfc.pyx":3049
 *             return datetime.strptime(value, '%H%M%S').time()
 *         # return time string or ''
 *         if not value:             # <<<<<<<<<<<<<<
 *             return ''
 *         return value
 */
    __pyx_t_23 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 3049, __pyx_L1_error)
    __pyx_t_1 = ((!__pyx_t_23) != 0);
    if (__pyx_t_1) {

      /* "pyrfc/_cyrfc.pyx":3050
 *         # return time string or ''
 *         if not value:
 *             return ''             # <<<<<<<<<<<<<<
 *         return value
 *     else:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_kp_u__5);
      __pyx_r = __pyx_kp_u__5;
      goto __pyx_L0;

      /* "pyrfc/_cyrfc.pyx":3049
 *             return datetime.strptime(value, '%H%M%S').time()
 *         # return time string or ''
 *         if not value:             # <<<<<<<<<<<<<<
 *             return ''
 *         return value
 */
    }

    /* "pyrfc/_cyrfc.pyx":3051
 *         if not value:
 *             return ''
 *         return value             # <<<<<<<<<<<<<<
 *     else:
 *         raise RFCError('Unknown RFC type %d when wrapping %s' % (typ, wrapString(cName)))
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_value);
    __pyx_r = __pyx_v_value;
    goto __pyx_L0;

    /* "pyrfc/_cyrfc.pyx":3038
 *             return ''
 *         return value
 *     elif typ == RFCTYPE_TIME:             # <<<<<<<<<<<<<<
 *         rc = RfcGetTime(container, cName, timeValue, &errorInfo)
 *         if rc != RFC_OK:
 */
    break;
    default:

    /* "pyrfc/_cyrfc.pyx":3053
 *         return value
 *     else:
 *         raise RFCError('Unknown RFC type %d when wrapping %s' % (typ, wrapString(cName)))             # <<<<<<<<<<<<<<
 * 
 * cdef wrapError(RFC_ERROR_INFO* errorInfo):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_25, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 3053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_25);
    __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_26 = 0;
    __pyx_t_27 = 127;
    __Pyx_INCREF(__pyx_kp_u_Unknown_RFC_type);
    __pyx_t_26 += 17;
    __Pyx_GIVEREF(__pyx_kp_u_Unknown_RFC_type);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Unknown_RFC_type);
    __pyx_t_3 = __Pyx_PyUnicode_From_RFCTYPE(__pyx_v_typ, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_27 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_27) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_27;
    __pyx_t_26 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_INCREF(__pyx_kp_u_when_wrapping);
    __pyx_t_26 += 15;
    __Pyx_GIVEREF(__pyx_kp_u_when_wrapping);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_when_wrapping);
    __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_cName, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_3), __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_27 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_27) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_27;
    __pyx_t_26 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_26, __pyx_t_27); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_25))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_25);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_25);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_25, function);
      }
    }
    __pyx_t_19 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_25, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_25, __pyx_t_2);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
    __Pyx_Raise(__pyx_t_19, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __PYX_ERR(0, 3053, __pyx_L1_error)
    break;
  }

  /* "pyrfc/_cyrfc.pyx":2857
 *     return table
 * 
 * cdef wrapVariable(             # <<<<<<<<<<<<<<
 *             RFCTYPE typ,
 *             RFC_FUNCTION_HANDLE container,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_AddTraceback("pyrfc._cyrfc.wrapVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_utcValue);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":3055
 *         raise RFCError('Unknown RFC type %d when wrapping %s' % (typ, wrapString(cName)))
 * 
 * cdef wrapError(RFC_ERROR_INFO* errorInfo):             # <<<<<<<<<<<<<<
 *     group2error = {
 *             ABAP_APPLICATION_FAILURE: ABAPApplicationError,
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapError(RFC_ERROR_INFO *__pyx_v_errorInfo) {
  PyObject *__pyx_v_group2error = NULL;
  PyObject *__pyx_v_error = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrapError", 0);

  /* "pyrfc/_cyrfc.pyx":3057
 * cdef wrapError(RFC_ERROR_INFO* errorInfo):
 *     group2error = {
 *             ABAP_APPLICATION_FAILURE: ABAPApplicationError,             # <<<<<<<<<<<<<<
 *             ABAP_RUNTIME_FAILURE: ABAPRuntimeError,
 *             LOGON_FAILURE: LogonError,
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_RFC_ERROR_GROUP(ABAP_APPLICATION_FAILURE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ABAPApplicationError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 3057, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":3058
 *     group2error = {
 *             ABAP_APPLICATION_FAILURE: ABAPApplicationError,
 *             ABAP_RUNTIME_FAILURE: ABAPRuntimeError,             # <<<<<<<<<<<<<<
 *             LOGON_FAILURE: LogonError,
 *             COMMUNICATION_FAILURE: CommunicationError,
 */
  __pyx_t_3 = __Pyx_PyInt_From_RFC_ERROR_GROUP(ABAP_RUNTIME_FAILURE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ABAPRuntimeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_2) < 0) __PYX_ERR(0, 3057, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":3059
 *             ABAP_APPLICATION_FAILURE: ABAPApplicationError,
 *             ABAP_RUNTIME_FAILURE: ABAPRuntimeError,
 *             LOGON_FAILURE: LogonError,             # <<<<<<<<<<<<<<
 *             COMMUNICATION_FAILURE: CommunicationError,
 *             EXTERNAL_RUNTIME_FAILURE: ExternalRuntimeError,
 */
  __pyx_t_2 = __Pyx_PyInt_From_RFC_ERROR_GROUP(LOGON_FAILURE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_LogonError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 3057, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":3060
 *             ABAP_RUNTIME_FAILURE: ABAPRuntimeError,
 *             LOGON_FAILURE: LogonError,
 *             COMMUNICATION_FAILURE: CommunicationError,             # <<<<<<<<<<<<<<
 *             EXTERNAL_RUNTIME_FAILURE: ExternalRuntimeError,
 *             EXTERNAL_APPLICATION_FAILURE: ExternalApplicationError,
 */
  __pyx_t_3 = __Pyx_PyInt_From_RFC_ERROR_GROUP(COMMUNICATION_FAILURE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CommunicationError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_2) < 0) __PYX_ERR(0, 3057, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":3061
 *             LOGON_FAILURE: LogonError,
 *             COMMUNICATION_FAILURE: CommunicationError,
 *             EXTERNAL_RUNTIME_FAILURE: ExternalRuntimeError,             # <<<<<<<<<<<<<<
 *             EXTERNAL_APPLICATION_FAILURE: ExternalApplicationError,
 *             EXTERNAL_AUTHORIZATION_FAILURE: ExternalAuthorizationError
 */
  __pyx_t_2 = __Pyx_PyInt_From_RFC_ERROR_GROUP(EXTERNAL_RUNTIME_FAILURE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ExternalRuntimeError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 3057, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":3062
 *             COMMUNICATION_FAILURE: CommunicationError,
 *             EXTERNAL_RUNTIME_FAILURE: ExternalRuntimeError,
 *             EXTERNAL_APPLICATION_FAILURE: ExternalApplicationError,             # <<<<<<<<<<<<<<
 *             EXTERNAL_AUTHORIZATION_FAILURE: ExternalAuthorizationError
 *         }
 */
  __pyx_t_3 = __Pyx_PyInt_From_RFC_ERROR_GROUP(EXTERNAL_APPLICATION_FAILURE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ExternalApplicationError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_2) < 0) __PYX_ERR(0, 3057, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":3063
 *             EXTERNAL_RUNTIME_FAILURE: ExternalRuntimeError,
 *             EXTERNAL_APPLICATION_FAILURE: ExternalApplicationError,
 *             EXTERNAL_AUTHORIZATION_FAILURE: ExternalAuthorizationError             # <<<<<<<<<<<<<<
 *         }
 *     error = group2error[errorInfo.group]
 */
  __pyx_t_2 = __Pyx_PyInt_From_RFC_ERROR_GROUP(EXTERNAL_AUTHORIZATION_FAILURE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ExternalAuthorizationError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 3057, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_group2error = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":3065
 *             EXTERNAL_AUTHORIZATION_FAILURE: ExternalAuthorizationError
 *         }
 *     error = group2error[errorInfo.group]             # <<<<<<<<<<<<<<
 *     return error(
 *             wrapString(errorInfo.message), errorInfo.code, wrapString(errorInfo.key),
 */
  __pyx_t_1 = __Pyx_PyInt_From_RFC_ERROR_GROUP(__pyx_v_errorInfo->group); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_group2error, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_error = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":3066
 *         }
 *     error = group2error[errorInfo.group]
 *     return error(             # <<<<<<<<<<<<<<
 *             wrapString(errorInfo.message), errorInfo.code, wrapString(errorInfo.key),
 *             wrapString(errorInfo.abapMsgClass), wrapString(errorInfo.abapMsgType), wrapString(errorInfo.abapMsgNumber),
 */
  __Pyx_XDECREF(__pyx_r);

  /* "pyrfc/_cyrfc.pyx":3067
 *     error = group2error[errorInfo.group]
 *     return error(
 *             wrapString(errorInfo.message), errorInfo.code, wrapString(errorInfo.key),             # <<<<<<<<<<<<<<
 *             wrapString(errorInfo.abapMsgClass), wrapString(errorInfo.abapMsgType), wrapString(errorInfo.abapMsgNumber),
 *             wrapString(errorInfo.abapMsgV1), wrapString(errorInfo.abapMsgV2),
 */
  __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_errorInfo->message, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_RFC_RC(__pyx_v_errorInfo->code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_errorInfo->key, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "pyrfc/_cyrfc.pyx":3068
 *     return error(
 *             wrapString(errorInfo.message), errorInfo.code, wrapString(errorInfo.key),
 *             wrapString(errorInfo.abapMsgClass), wrapString(errorInfo.abapMsgType), wrapString(errorInfo.abapMsgNumber),             # <<<<<<<<<<<<<<
 *             wrapString(errorInfo.abapMsgV1), wrapString(errorInfo.abapMsgV2),
 *             wrapString(errorInfo.abapMsgV3), wrapString(errorInfo.abapMsgV4)
 */
  __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_errorInfo->abapMsgClass, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_errorInfo->abapMsgType, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_errorInfo->abapMsgNumber, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "pyrfc/_cyrfc.pyx":3069
 *             wrapString(errorInfo.message), errorInfo.code, wrapString(errorInfo.key),
 *             wrapString(errorInfo.abapMsgClass), wrapString(errorInfo.abapMsgType), wrapString(errorInfo.abapMsgNumber),
 *             wrapString(errorInfo.abapMsgV1), wrapString(errorInfo.abapMsgV2),             # <<<<<<<<<<<<<<
 *             wrapString(errorInfo.abapMsgV3), wrapString(errorInfo.abapMsgV4)
 *         )
 */
  __pyx_t_8 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_errorInfo->abapMsgV1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_errorInfo->abapMsgV2, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "pyrfc/_cyrfc.pyx":3070
 *             wrapString(errorInfo.abapMsgClass), wrapString(errorInfo.abapMsgType), wrapString(errorInfo.abapMsgNumber),
 *             wrapString(errorInfo.abapMsgV1), wrapString(errorInfo.abapMsgV2),
 *             wrapString(errorInfo.abapMsgV3), wrapString(errorInfo.abapMsgV4)             # <<<<<<<<<<<<<<
 *         )
 * 
 */
  __pyx_t_10 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_errorInfo->abapMsgV3, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_errorInfo->abapMsgV4, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_INCREF(__pyx_v_error);
  __pyx_t_12 = __pyx_v_error; __pyx_t_13 = NULL;
  __pyx_t_14 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_12, function);
      __pyx_t_14 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_12)) {
    PyObject *__pyx_temp[11] = {__pyx_t_13, __pyx_t_1, __pyx_t_2, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_14, 10+__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3066, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
    PyObject *__pyx_temp[11] = {__pyx_t_13, __pyx_t_1, __pyx_t_2, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_14, 10+__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3066, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else
  #endif
  {
    __pyx_t_15 = PyTuple_New(10+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    if (__pyx_t_13) {
      __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_13); __pyx_t_13 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_14, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_14, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_15, 3+__pyx_t_14, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_15, 4+__pyx_t_14, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_15, 5+__pyx_t_14, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_15, 6+__pyx_t_14, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_15, 7+__pyx_t_14, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_15, 8+__pyx_t_14, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_15, 9+__pyx_t_14, __pyx_t_11);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    __pyx_t_11 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrfc/_cyrfc.pyx":3055
 *         raise RFCError('Unknown RFC type %d when wrapping %s' % (typ, wrapString(cName)))
 * 
 * cdef wrapError(RFC_ERROR_INFO* errorInfo):             # <<<<<<<<<<<<<<
 *     group2error = {
 *             ABAP_APPLICATION_FAILURE: ABAPApplicationError,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("pyrfc._cyrfc.wrapError", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_group2error);
  __Pyx_XDECREF(__pyx_v_error);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":3073
 *         )
 * 
 * cdef wrapString(const SAP_UC* uc, uclen=-1, rstrip=False):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapString(SAP_UC const *__pyx_v_uc, struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString *__pyx_optional_args) {
  PyObject *__pyx_v_uclen = ((PyObject *)__pyx_int_neg_1);
  PyObject *__pyx_v_rstrip = ((PyObject *)Py_False);
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  unsigned int __pyx_v_utf8_size;
  char *__pyx_v_utf8;
  unsigned int __pyx_v_result_len;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrapString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_uclen = __pyx_optional_args->uclen;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_rstrip = __pyx_optional_args->rstrip;
      }
    }
  }
  __Pyx_INCREF(__pyx_v_uclen);

  /* "pyrfc/_cyrfc.pyx":3076
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 *     if uclen == -1:             # <<<<<<<<<<<<<<
 *         uclen = strlenU(uc)
 *     if uclen == 0:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_uclen, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3076, __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, 3076, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pyrfc/_cyrfc.pyx":3077
 *     cdef RFC_ERROR_INFO errorInfo
 *     if uclen == -1:
 *         uclen = strlenU(uc)             # <<<<<<<<<<<<<<
 *     if uclen == 0:
 *         return ''
 */
    __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(strlenU(__pyx_v_uc)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3077, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_uclen, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":3076
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 *     if uclen == -1:             # <<<<<<<<<<<<<<
 *         uclen = strlenU(uc)
 *     if uclen == 0:
 */
  }

  /* "pyrfc/_cyrfc.pyx":3078
 *     if uclen == -1:
 *         uclen = strlenU(uc)
 *     if uclen == 0:             # <<<<<<<<<<<<<<
 *         return ''
 *     cdef unsigned utf8_size = uclen * 5 + 1
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_uclen, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3078, __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, 3078, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pyrfc/_cyrfc.pyx":3079
 *         uclen = strlenU(uc)
 *     if uclen == 0:
 *         return ''             # <<<<<<<<<<<<<<
 *     cdef unsigned utf8_size = uclen * 5 + 1
 *     cdef char *utf8 = <char*> malloc(utf8_size)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__5);
    __pyx_r = __pyx_kp_u__5;
    goto __pyx_L0;

    /* "pyrfc/_cyrfc.pyx":3078
 *     if uclen == -1:
 *         uclen = strlenU(uc)
 *     if uclen == 0:             # <<<<<<<<<<<<<<
 *         return ''
 *     cdef unsigned utf8_size = uclen * 5 + 1
 */
  }

  /* "pyrfc/_cyrfc.pyx":3080
 *     if uclen == 0:
 *         return ''
 *     cdef unsigned utf8_size = uclen * 5 + 1             # <<<<<<<<<<<<<<
 *     cdef char *utf8 = <char*> malloc(utf8_size)
 *     utf8[0] = 0
 */
  __pyx_t_1 = PyNumber_Multiply(__pyx_v_uclen, __pyx_int_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3080, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_utf8_size = __pyx_t_4;

  /* "pyrfc/_cyrfc.pyx":3081
 *         return ''
 *     cdef unsigned utf8_size = uclen * 5 + 1
 *     cdef char *utf8 = <char*> malloc(utf8_size)             # <<<<<<<<<<<<<<
 *     utf8[0] = 0
 *     cdef unsigned result_len = 0
 */
  __pyx_v_utf8 = ((char *)malloc(__pyx_v_utf8_size));

  /* "pyrfc/_cyrfc.pyx":3082
 *     cdef unsigned utf8_size = uclen * 5 + 1
 *     cdef char *utf8 = <char*> malloc(utf8_size)
 *     utf8[0] = 0             # <<<<<<<<<<<<<<
 *     cdef unsigned result_len = 0
 *     rc = RfcSAPUCToUTF8(uc, uclen, <RFC_BYTE*> utf8, &utf8_size, &result_len, &errorInfo)
 */
  (__pyx_v_utf8[0]) = 0;

  /* "pyrfc/_cyrfc.pyx":3083
 *     cdef char *utf8 = <char*> malloc(utf8_size)
 *     utf8[0] = 0
 *     cdef unsigned result_len = 0             # <<<<<<<<<<<<<<
 *     rc = RfcSAPUCToUTF8(uc, uclen, <RFC_BYTE*> utf8, &utf8_size, &result_len, &errorInfo)
 *     if rc != RFC_OK:
 */
  __pyx_v_result_len = 0;

  /* "pyrfc/_cyrfc.pyx":3084
 *     utf8[0] = 0
 *     cdef unsigned result_len = 0
 *     rc = RfcSAPUCToUTF8(uc, uclen, <RFC_BYTE*> utf8, &utf8_size, &result_len, &errorInfo)             # <<<<<<<<<<<<<<
 *     if rc != RFC_OK:
 *         # raise wrapError(&errorInfo)
 */
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_uclen); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3084, __pyx_L1_error)
  __pyx_v_rc = RfcSAPUCToUTF8(__pyx_v_uc, __pyx_t_4, ((RFC_BYTE *)__pyx_v_utf8), (&__pyx_v_utf8_size), (&__pyx_v_result_len), (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":3085
 *     cdef unsigned result_len = 0
 *     rc = RfcSAPUCToUTF8(uc, uclen, <RFC_BYTE*> utf8, &utf8_size, &result_len, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         # raise wrapError(&errorInfo)
 *         raise RFCError('wrapString uclen: %u utf8_size: %u' % (uclen, utf8_size))
 */
  __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":3087
 *     if rc != RFC_OK:
 *         # raise wrapError(&errorInfo)
 *         raise RFCError('wrapString uclen: %u utf8_size: %u' % (uclen, utf8_size))             # <<<<<<<<<<<<<<
 *     utf8[result_len] = 0
 *     try:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3087, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_utf8_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3087, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3087, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_uclen);
    __Pyx_GIVEREF(__pyx_v_uclen);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_uclen);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_wrapString_uclen_u_utf8_size_u, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3087, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3087, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 3087, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":3085
 *     cdef unsigned result_len = 0
 *     rc = RfcSAPUCToUTF8(uc, uclen, <RFC_BYTE*> utf8, &utf8_size, &result_len, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         # raise wrapError(&errorInfo)
 *         raise RFCError('wrapString uclen: %u utf8_size: %u' % (uclen, utf8_size))
 */
  }

  /* "pyrfc/_cyrfc.pyx":3088
 *         # raise wrapError(&errorInfo)
 *         raise RFCError('wrapString uclen: %u utf8_size: %u' % (uclen, utf8_size))
 *     utf8[result_len] = 0             # <<<<<<<<<<<<<<
 *     try:
 *         if rstrip:
 */
  (__pyx_v_utf8[__pyx_v_result_len]) = 0;

  /* "pyrfc/_cyrfc.pyx":3089
 *         raise RFCError('wrapString uclen: %u utf8_size: %u' % (uclen, utf8_size))
 *     utf8[result_len] = 0
 *     try:             # <<<<<<<<<<<<<<
 *         if rstrip:
 *             return utf8[:result_len].rstrip().decode()
 */
  /*try:*/ {

    /* "pyrfc/_cyrfc.pyx":3090
 *     utf8[result_len] = 0
 *     try:
 *         if rstrip:             # <<<<<<<<<<<<<<
 *             return utf8[:result_len].rstrip().decode()
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_rstrip); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3090, __pyx_L7_error)
    if (__pyx_t_2) {

      /* "pyrfc/_cyrfc.pyx":3091
 *     try:
 *         if rstrip:
 *             return utf8[:result_len].rstrip().decode()             # <<<<<<<<<<<<<<
 *         else:
 *             return utf8[:result_len].decode()
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_utf8 + 0, __pyx_v_result_len - 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3091, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3091, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3091, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3091, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3091, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L6_return;

      /* "pyrfc/_cyrfc.pyx":3090
 *     utf8[result_len] = 0
 *     try:
 *         if rstrip:             # <<<<<<<<<<<<<<
 *             return utf8[:result_len].rstrip().decode()
 *         else:
 */
    }

    /* "pyrfc/_cyrfc.pyx":3093
 *             return utf8[:result_len].rstrip().decode()
 *         else:
 *             return utf8[:result_len].decode()             # <<<<<<<<<<<<<<
 *     finally:
 *         free(utf8)
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_utf8, 0, __pyx_v_result_len, NULL, NULL, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3093, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L6_return;
    }
  }

  /* "pyrfc/_cyrfc.pyx":3095
 *             return utf8[:result_len].decode()
 *     finally:
 *         free(utf8)             # <<<<<<<<<<<<<<
 * 
 * cdef wrapString(SAP_UC* uc, uclen=-1, rstrip=True):
 */
  /*finally:*/ {
    __pyx_L7_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
      {
        free(__pyx_v_utf8);
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_XGIVEREF(__pyx_t_15);
        __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
      goto __pyx_L1_error;
    }
    __pyx_L6_return: {
      __pyx_t_15 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_utf8);
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      goto __pyx_L0;
    }
  }

  /* "pyrfc/_cyrfc.pyx":3073
 *         )
 * 
 * cdef wrapString(const SAP_UC* uc, uclen=-1, rstrip=False):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrfc._cyrfc.wrapString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_uclen);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrfc/_cyrfc.pyx":3097
 *         free(utf8)
 * 
 * cdef wrapString(SAP_UC* uc, uclen=-1, rstrip=True):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapString(SAP_UC *__pyx_v_uc, struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString *__pyx_optional_args) {
  PyObject *__pyx_v_uclen = ((PyObject *)__pyx_int_neg_1);
  PyObject *__pyx_v_rstrip = ((PyObject *)Py_True);
  RFC_RC __pyx_v_rc;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  unsigned int __pyx_v_utf8_size;
  char *__pyx_v_utf8;
  unsigned int __pyx_v_result_len;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrapString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_uclen = __pyx_optional_args->uclen;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_rstrip = __pyx_optional_args->rstrip;
      }
    }
  }
  __Pyx_INCREF(__pyx_v_uclen);

  /* "pyrfc/_cyrfc.pyx":3100
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 *     if uclen == -1:             # <<<<<<<<<<<<<<
 *         uclen = strlenU(uc)
 *     if uclen == 0:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_uclen, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3100, __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, 3100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pyrfc/_cyrfc.pyx":3101
 *     cdef RFC_ERROR_INFO errorInfo
 *     if uclen == -1:
 *         uclen = strlenU(uc)             # <<<<<<<<<<<<<<
 *     if uclen == 0:
 *         return ''
 */
    __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(strlenU(__pyx_v_uc)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_uclen, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrfc/_cyrfc.pyx":3100
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 *     if uclen == -1:             # <<<<<<<<<<<<<<
 *         uclen = strlenU(uc)
 *     if uclen == 0:
 */
  }

  /* "pyrfc/_cyrfc.pyx":3102
 *     if uclen == -1:
 *         uclen = strlenU(uc)
 *     if uclen == 0:             # <<<<<<<<<<<<<<
 *         return ''
 *     cdef unsigned utf8_size = uclen * 5 + 1
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_uclen, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3102, __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, 3102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pyrfc/_cyrfc.pyx":3103
 *         uclen = strlenU(uc)
 *     if uclen == 0:
 *         return ''             # <<<<<<<<<<<<<<
 *     cdef unsigned utf8_size = uclen * 5 + 1
 *     cdef char *utf8 = <char*> malloc(utf8_size)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__5);
    __pyx_r = __pyx_kp_u__5;
    goto __pyx_L0;

    /* "pyrfc/_cyrfc.pyx":3102
 *     if uclen == -1:
 *         uclen = strlenU(uc)
 *     if uclen == 0:             # <<<<<<<<<<<<<<
 *         return ''
 *     cdef unsigned utf8_size = uclen * 5 + 1
 */
  }

  /* "pyrfc/_cyrfc.pyx":3104
 *     if uclen == 0:
 *         return ''
 *     cdef unsigned utf8_size = uclen * 5 + 1             # <<<<<<<<<<<<<<
 *     cdef char *utf8 = <char*> malloc(utf8_size)
 *     utf8[0] = 0
 */
  __pyx_t_1 = PyNumber_Multiply(__pyx_v_uclen, __pyx_int_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_utf8_size = __pyx_t_4;

  /* "pyrfc/_cyrfc.pyx":3105
 *         return ''
 *     cdef unsigned utf8_size = uclen * 5 + 1
 *     cdef char *utf8 = <char*> malloc(utf8_size)             # <<<<<<<<<<<<<<
 *     utf8[0] = 0
 *     cdef unsigned result_len = 0
 */
  __pyx_v_utf8 = ((char *)malloc(__pyx_v_utf8_size));

  /* "pyrfc/_cyrfc.pyx":3106
 *     cdef unsigned utf8_size = uclen * 5 + 1
 *     cdef char *utf8 = <char*> malloc(utf8_size)
 *     utf8[0] = 0             # <<<<<<<<<<<<<<
 *     cdef unsigned result_len = 0
 *     rc = RfcSAPUCToUTF8(uc, uclen, <RFC_BYTE*> utf8, &utf8_size, &result_len, &errorInfo)
 */
  (__pyx_v_utf8[0]) = 0;

  /* "pyrfc/_cyrfc.pyx":3107
 *     cdef char *utf8 = <char*> malloc(utf8_size)
 *     utf8[0] = 0
 *     cdef unsigned result_len = 0             # <<<<<<<<<<<<<<
 *     rc = RfcSAPUCToUTF8(uc, uclen, <RFC_BYTE*> utf8, &utf8_size, &result_len, &errorInfo)
 *     if rc != RFC_OK:
 */
  __pyx_v_result_len = 0;

  /* "pyrfc/_cyrfc.pyx":3108
 *     utf8[0] = 0
 *     cdef unsigned result_len = 0
 *     rc = RfcSAPUCToUTF8(uc, uclen, <RFC_BYTE*> utf8, &utf8_size, &result_len, &errorInfo)             # <<<<<<<<<<<<<<
 *     if rc != RFC_OK:
 *         # raise wrapError(&errorInfo)
 */
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_uclen); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3108, __pyx_L1_error)
  __pyx_v_rc = RfcSAPUCToUTF8(__pyx_v_uc, __pyx_t_4, ((RFC_BYTE *)__pyx_v_utf8), (&__pyx_v_utf8_size), (&__pyx_v_result_len), (&__pyx_v_errorInfo));

  /* "pyrfc/_cyrfc.pyx":3109
 *     cdef unsigned result_len = 0
 *     rc = RfcSAPUCToUTF8(uc, uclen, <RFC_BYTE*> utf8, &utf8_size, &result_len, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         # raise wrapError(&errorInfo)
 *         raise RFCError('wrapString uclen: %u utf8_size: %u' % (uclen, utf8_size))
 */
  __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrfc/_cyrfc.pyx":3111
 *     if rc != RFC_OK:
 *         # raise wrapError(&errorInfo)
 *         raise RFCError('wrapString uclen: %u utf8_size: %u' % (uclen, utf8_size))             # <<<<<<<<<<<<<<
 *     utf8[result_len] = 0
 *     try:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_utf8_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_uclen);
    __Pyx_GIVEREF(__pyx_v_uclen);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_uclen);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_wrapString_uclen_u_utf8_size_u, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 3111, __pyx_L1_error)

    /* "pyrfc/_cyrfc.pyx":3109
 *     cdef unsigned result_len = 0
 *     rc = RfcSAPUCToUTF8(uc, uclen, <RFC_BYTE*> utf8, &utf8_size, &result_len, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         # raise wrapError(&errorInfo)
 *         raise RFCError('wrapString uclen: %u utf8_size: %u' % (uclen, utf8_size))
 */
  }

  /* "pyrfc/_cyrfc.pyx":3112
 *         # raise wrapError(&errorInfo)
 *         raise RFCError('wrapString uclen: %u utf8_size: %u' % (uclen, utf8_size))
 *     utf8[result_len] = 0             # <<<<<<<<<<<<<<
 *     try:
 *         if rstrip:
 */
  (__pyx_v_utf8[__pyx_v_result_len]) = 0;

  /* "pyrfc/_cyrfc.pyx":3113
 *         raise RFCError('wrapString uclen: %u utf8_size: %u' % (uclen, utf8_size))
 *     utf8[result_len] = 0
 *     try:             # <<<<<<<<<<<<<<
 *         if rstrip:
 *             return utf8[:result_len].rstrip().decode()
 */
  /*try:*/ {

    /* "pyrfc/_cyrfc.pyx":3114
 *     utf8[result_len] = 0
 *     try:
 *         if rstrip:             # <<<<<<<<<<<<<<
 *             return utf8[:result_len].rstrip().decode()
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_rstrip); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3114, __pyx_L7_error)
    if (__pyx_t_2) {

      /* "pyrfc/_cyrfc.pyx":3115
 *     try:
 *         if rstrip:
 *             return utf8[:result_len].rstrip().decode()             # <<<<<<<<<<<<<<
 *         else:
 *             return utf8[:result_len].decode()
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_utf8 + 0, __pyx_v_result_len - 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3115, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3115, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3115, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3115, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3115, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L6_return;

      /* "pyrfc/_cyrfc.pyx":3114
 *     utf8[result_len] = 0
 *     try:
 *         if rstrip:             # <<<<<<<<<<<<<<
 *             return utf8[:result_len].rstrip().decode()
 *         else:
 */
    }

    /* "pyrfc/_cyrfc.pyx":3117
 *             return utf8[:result_len].rstrip().decode()
 *         else:
 *             return utf8[:result_len].decode()             # <<<<<<<<<<<<<<
 *     finally:
 *         free(utf8)
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_utf8, 0, __pyx_v_result_len, NULL, NULL, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3117, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L6_return;
    }
  }

  /* "pyrfc/_cyrfc.pyx":3119
 *             return utf8[:result_len].decode()
 *     finally:
 *         free(utf8)             # <<<<<<<<<<<<<<
 */
  /*finally:*/ {
    __pyx_L7_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
      {
        free(__pyx_v_utf8);
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_XGIVEREF(__pyx_t_15);
        __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
      goto __pyx_L1_error;
    }
    __pyx_L6_return: {
      __pyx_t_15 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_utf8);
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      goto __pyx_L0;
    }
  }

  /* "pyrfc/_cyrfc.pyx":3097
 *         free(utf8)
 * 
 * cdef wrapString(SAP_UC* uc, uclen=-1, rstrip=True):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrfc._cyrfc.wrapString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_uclen);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_object____object___to_py")
 * cdef object __Pyx_CFunc_object____object___to_py(object (*f)(object) ):
 *     def wrap(object client_connection):             # <<<<<<<<<<<<<<
 *         """wrap(client_connection)"""
 *         return f(client_connection)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11cfunc_dot_to_py_36__Pyx_CFunc_object____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_v_client_connection); /*proto*/
static char __pyx_doc_11cfunc_dot_to_py_36__Pyx_CFunc_object____object___to_py_wrap[] = "wrap(client_connection)";
static PyMethodDef __pyx_mdef_11cfunc_dot_to_py_36__Pyx_CFunc_object____object___to_py_1wrap = {"wrap", (PyCFunction)__pyx_pw_11cfunc_dot_to_py_36__Pyx_CFunc_object____object___to_py_1wrap, METH_O, __pyx_doc_11cfunc_dot_to_py_36__Pyx_CFunc_object____object___to_py_wrap};
static PyObject *__pyx_pw_11cfunc_dot_to_py_36__Pyx_CFunc_object____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_v_client_connection) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wrap (wrapper)", 0);
  __pyx_r = __pyx_pf_11cfunc_dot_to_py_36__Pyx_CFunc_object____object___to_py_wrap(__pyx_self, ((PyObject *)__pyx_v_client_connection));

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

static PyObject *__pyx_pf_11cfunc_dot_to_py_36__Pyx_CFunc_object____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_client_connection) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py *__pyx_cur_scope;
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrap", 0);
  __pyx_outer_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "cfunc.to_py":67
 *     def wrap(object client_connection):
 *         """wrap(client_connection)"""
 *         return f(client_connection)             # <<<<<<<<<<<<<<
 *     return wrap
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_f(__pyx_v_client_connection); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_object____object___to_py")
 * cdef object __Pyx_CFunc_object____object___to_py(object (*f)(object) ):
 *     def wrap(object client_connection):             # <<<<<<<<<<<<<<
 *         """wrap(client_connection)"""
 *         return f(client_connection)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_object____object___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_object____object___to_py")
 * cdef object __Pyx_CFunc_object____object___to_py(object (*f)(object) ):             # <<<<<<<<<<<<<<
 *     def wrap(object client_connection):
 *         """wrap(client_connection)"""
 */

static PyObject *__Pyx_CFunc_object____object___to_py(PyObject *(*__pyx_v_f)(PyObject *)) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py *__pyx_cur_scope;
  PyObject *__pyx_v_wrap = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_CFunc_object____object___to_py", 0);
  __pyx_cur_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object____object___to_py(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_object____object___to_py, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 64, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_f = __pyx_v_f;

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_object____object___to_py")
 * cdef object __Pyx_CFunc_object____object___to_py(object (*f)(object) ):
 *     def wrap(object client_connection):             # <<<<<<<<<<<<<<
 *         """wrap(client_connection)"""
 *         return f(client_connection)
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11cfunc_dot_to_py_36__Pyx_CFunc_object____object___to_py_1wrap, 0, __pyx_n_s_Pyx_CFunc_object____object___t, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cfunc_to_py, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_wrap = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cfunc.to_py":68
 *         """wrap(client_connection)"""
 *         return f(client_connection)
 *     return wrap             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_wrap);
  __pyx_r = __pyx_v_wrap;
  goto __pyx_L0;

  /* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_object____object___to_py")
 * cdef object __Pyx_CFunc_object____object___to_py(object (*f)(object) ):             # <<<<<<<<<<<<<<
 *     def wrap(object client_connection):
 *         """wrap(client_connection)"""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_object____object___to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wrap);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_tp_new_5pyrfc_6_cyrfc_ConnectionParameters(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_5pyrfc_6_cyrfc_ConnectionParameters(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_5pyrfc_6_cyrfc_ConnectionParameters[] = {
  {"__del__", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_3__del__, METH_NOARGS, 0},
  {"_free", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_5_free, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_7__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_9__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5pyrfc_6_cyrfc_ConnectionParameters = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrfc._cyrfc.ConnectionParameters", /*tp_name*/
  sizeof(struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5pyrfc_6_cyrfc_ConnectionParameters, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "Connection parameters instance in SAP unicode format\n\n    :param args: Connection parameters like ASHOST=\"ABC\" etc\n    :type args: positional\n\n    :returns: Nothing\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5pyrfc_6_cyrfc_ConnectionParameters, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5pyrfc_6_cyrfc_ConnectionParameters, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection __pyx_vtable_5pyrfc_6_cyrfc_Connection;

static PyObject *__pyx_tp_new_5pyrfc_6_cyrfc_Connection(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5pyrfc_6_cyrfc_Connection *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)o);
  p->__pyx_vtab = __pyx_vtabptr_5pyrfc_6_cyrfc_Connection;
  p->__config = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_connection = ((struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5pyrfc_6_cyrfc_Connection(PyObject *o) {
  struct __pyx_obj_5pyrfc_6_cyrfc_Connection *p = (struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__config);
  Py_CLEAR(p->_connection);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5pyrfc_6_cyrfc_Connection(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5pyrfc_6_cyrfc_Connection *p = (struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)o;
  if (p->__config) {
    e = (*v)(p->__config, a); if (e) return e;
  }
  if (p->_connection) {
    e = (*v)(((PyObject *)p->_connection), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5pyrfc_6_cyrfc_Connection(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5pyrfc_6_cyrfc_Connection *p = (struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)o;
  tmp = ((PyObject*)p->__config);
  p->__config = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_connection);
  p->_connection = ((struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_10Connection_version(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_6_cyrfc_10Connection_7version_1__get__(o);
}

static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_10Connection_options(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_6_cyrfc_10Connection_7options_1__get__(o);
}

static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_10Connection_handle(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_6_cyrfc_10Connection_6handle_1__get__(o);
}

static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_10Connection_alive(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_6_cyrfc_10Connection_5alive_1__get__(o);
}

static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_10Connection___config(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_6_cyrfc_10Connection_8__config_1__get__(o);
}

static int __pyx_setprop_5pyrfc_6_cyrfc_10Connection___config(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5pyrfc_6_cyrfc_10Connection_8__config_3__set__(o, v);
  }
  else {
    return __pyx_pw_5pyrfc_6_cyrfc_10Connection_8__config_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_5pyrfc_6_cyrfc_Connection[] = {
  {"free", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_3free, METH_NOARGS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_2free},
  {"__del__", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_5__del__, METH_NOARGS, 0},
  {"__enter__", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_7__enter__, METH_NOARGS, 0},
  {"__exit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_9__exit__, METH_VARARGS|METH_KEYWORDS, 0},
  {"open", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_11open, METH_NOARGS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_10open},
  {"reopen", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_13reopen, METH_NOARGS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_12reopen},
  {"close", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_15close, METH_NOARGS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_14close},
  {"cancel", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_17cancel, METH_NOARGS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_16cancel},
  {"_close", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_21_close, METH_NOARGS, 0},
  {"ping", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_23ping, METH_NOARGS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_22ping},
  {"reset_server_context", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_25reset_server_context, METH_NOARGS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_24reset_server_context},
  {"get_connection_attributes", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_27get_connection_attributes, METH_NOARGS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_26get_connection_attributes},
  {"is_valid", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_29is_valid, METH_NOARGS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_28is_valid},
  {"get_function_description", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_31get_function_description, METH_O, __pyx_doc_5pyrfc_6_cyrfc_10Connection_30get_function_description},
  {"call", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_33call, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_32call},
  {"type_desc_get", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_35type_desc_get, METH_O, __pyx_doc_5pyrfc_6_cyrfc_10Connection_34type_desc_get},
  {"type_desc_remove", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_37type_desc_remove, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_36type_desc_remove},
  {"func_desc_remove", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_39func_desc_remove, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_38func_desc_remove},
  {"_get_transaction_id", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_41_get_transaction_id, METH_NOARGS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_40_get_transaction_id},
  {"_create_and_submit_transaction", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_43_create_and_submit_transaction, METH_VARARGS|METH_KEYWORDS, 0},
  {"_destroy_transaction", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_45_destroy_transaction, METH_NOARGS, 0},
  {"_confirm_transaction", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_47_confirm_transaction, METH_NOARGS, 0},
  {"_get_unit_id", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_49_get_unit_id, METH_NOARGS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_48_get_unit_id},
  {"_create_and_submit_unit", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_51_create_and_submit_unit, METH_VARARGS|METH_KEYWORDS, 0},
  {"_get_unit_state", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_53_get_unit_state, METH_O, 0},
  {"_destroy_unit", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_55_destroy_unit, METH_NOARGS, 0},
  {"_confirm_unit", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_57_confirm_unit, METH_O, 0},
  {"initialize_unit", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_59initialize_unit, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_58initialize_unit},
  {"fill_and_submit_unit", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_61fill_and_submit_unit, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_60fill_and_submit_unit},
  {"get_unit_state", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_63get_unit_state, METH_O, __pyx_doc_5pyrfc_6_cyrfc_10Connection_62get_unit_state},
  {"destroy_unit", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_65destroy_unit, METH_O, __pyx_doc_5pyrfc_6_cyrfc_10Connection_64destroy_unit},
  {"confirm_unit", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_67confirm_unit, METH_O, __pyx_doc_5pyrfc_6_cyrfc_10Connection_66confirm_unit},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_69__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Connection_71__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5pyrfc_6_cyrfc_Connection[] = {
  {(char *)"version", __pyx_getprop_5pyrfc_6_cyrfc_10Connection_version, 0, (char *)"Get SAP NW RFC SDK and PyRFC binding versions\n        :returns: SAP NW RFC SDK major, minor, patch level and PyRFC binding version\n        ", 0},
  {(char *)"options", __pyx_getprop_5pyrfc_6_cyrfc_10Connection_options, 0, (char *)"Client connection configuration\n\n        :getter: Client connection options\n        :setter: Set when new connection object created\n        :type: dict\n        ", 0},
  {(char *)"handle", __pyx_getprop_5pyrfc_6_cyrfc_10Connection_handle, 0, (char *)"Get client connection handle\n\n        :getter: Client connection handle\n        :type: uintptr_t\n        ", 0},
  {(char *)"alive", __pyx_getprop_5pyrfc_6_cyrfc_10Connection_alive, 0, (char *)"Conection alive property\n\n        :getter: True when alive\n        :type: boolean\n        ", 0},
  {(char *)"__config", __pyx_getprop_5pyrfc_6_cyrfc_10Connection___config, __pyx_setprop_5pyrfc_6_cyrfc_10Connection___config, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Connection = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  __pyx_pw_5pyrfc_6_cyrfc_10Connection_19__bool__, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_5pyrfc_6_cyrfc_Connection = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrfc._cyrfc.Connection", /*tp_name*/
  sizeof(struct __pyx_obj_5pyrfc_6_cyrfc_Connection), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5pyrfc_6_cyrfc_Connection, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_Connection, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  " A connection to an SAP backend system\n\n    Instantiating an :class:`pyrfc.Connection` object will\n    automatically attempt to open a connection the SAP backend.\n\n    :param config: Configuration of the client connection, valid for all RFC calls of given connection. Allowed keys are:\n\n           * ``dtime``\n             ABAP DATE and TIME strings are returned as Python datetime date and time objects,\n             instead of ABAP date and time strings (default is False)\n\n           * ``rstrip``\n             right strips strings returned from RFC call (default is True)\n\n           * ``return_import_params``\n             importing parameters are returned by the RFC call (default is False)\n\n           * ``timeout``\n             Cancel connection if ongoing RFC calls takes longer than ``timeout`` seconds.\n             Timeout can be also set as option for particular RFC call, overriding timeout set at connection level.\n\n             Examples: https://github.com/SAP/PyRFC/tree/main/examples/timeout\n\n\n    :type config: dict or None (default)\n\n    :param params: SAP connection parameters. The parameters consist of\n           ``client``, ``user``, ``passwd``, ``lang``, ``trace``\n           and additionally one of\n\n           * Direct application server logon: ``ashost``, ``sysnr``.\n           * Logon with load balancing: ``mshost``, ``msserv``, ``sysid``,\n             ``group``.\n             ``msserv`` is needed only, if the service of the message server\n             is not defined as sapms<SYSID> in /etc/services.\n           * When logging on with SNC, ``user`` and ``passwd`` are to be replaced by\n             ``snc_qop``, ``snc_myname``, ``snc_partnername``, and optionally\n             ``snc_lib``.\n             (If ``snc_lib`` is not specified, the RFC library uses the \"global\" GSS library\n             defined via environment variable SNC_LIB.)\n    :type params: Keyword parameters\n\n    :raises: :exc:`~pyrfc.RFCError` or a subcla""ss\n             thereof if the connection attempt fails.\n    ", /*tp_doc*/
  __pyx_tp_traverse_5pyrfc_6_cyrfc_Connection, /*tp_traverse*/
  __pyx_tp_clear_5pyrfc_6_cyrfc_Connection, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5pyrfc_6_cyrfc_Connection, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5pyrfc_6_cyrfc_Connection, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5pyrfc_6_cyrfc_10Connection_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5pyrfc_6_cyrfc_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 PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_5pyrfc_6_cyrfc_ServerConnection __pyx_vtable_5pyrfc_6_cyrfc_ServerConnection;

static PyObject *__pyx_tp_new_5pyrfc_6_cyrfc_ServerConnection(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *)o);
  p->__pyx_vtab = __pyx_vtabptr_5pyrfc_6_cyrfc_ServerConnection;
  p->_connection = ((struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5pyrfc_6_cyrfc_ServerConnection(PyObject *o) {
  struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *p = (struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_connection);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5pyrfc_6_cyrfc_ServerConnection(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *p = (struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *)o;
  if (p->_connection) {
    e = (*v)(((PyObject *)p->_connection), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5pyrfc_6_cyrfc_ServerConnection(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *p = (struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *)o;
  tmp = ((PyObject*)p->_connection);
  p->_connection = ((struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_16ServerConnection_handle(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_6handle_1__get__(o);
}

static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_16ServerConnection_alive(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_5alive_1__get__(o);
}

static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_16ServerConnection_debug(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_5debug_1__get__(o);
}

static int __pyx_setprop_5pyrfc_6_cyrfc_16ServerConnection_debug(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_5debug_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_16ServerConnection_rstrip(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_6rstrip_1__get__(o);
}

static int __pyx_setprop_5pyrfc_6_cyrfc_16ServerConnection_rstrip(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_6rstrip_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_5pyrfc_6_cyrfc_ServerConnection[] = {
  {"open", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_3open, METH_NOARGS, 0},
  {"close", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_5close, METH_NOARGS, 0},
  {"__del__", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_9__del__, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_11__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_13__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5pyrfc_6_cyrfc_ServerConnection[] = {
  {(char *)"handle", __pyx_getprop_5pyrfc_6_cyrfc_16ServerConnection_handle, 0, (char *)"Server connection handle\n\n        :getter: Returns server connection handle\n        :type: uitptr_t\n        ", 0},
  {(char *)"alive", __pyx_getprop_5pyrfc_6_cyrfc_16ServerConnection_alive, 0, (char *)"Conection alive property\n\n        :getter: Returns True when alive\n        :type: boolean\n        ", 0},
  {(char *)"debug", __pyx_getprop_5pyrfc_6_cyrfc_16ServerConnection_debug, __pyx_setprop_5pyrfc_6_cyrfc_16ServerConnection_debug, (char *)0, 0},
  {(char *)"rstrip", __pyx_getprop_5pyrfc_6_cyrfc_16ServerConnection_rstrip, __pyx_setprop_5pyrfc_6_cyrfc_16ServerConnection_rstrip, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_ServerConnection = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  __pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_7__bool__, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_5pyrfc_6_cyrfc_ServerConnection = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrfc._cyrfc.ServerConnection", /*tp_name*/
  sizeof(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5pyrfc_6_cyrfc_ServerConnection, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_ServerConnection, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5pyrfc_6_cyrfc_ServerConnection, /*tp_traverse*/
  __pyx_tp_clear_5pyrfc_6_cyrfc_ServerConnection, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5pyrfc_6_cyrfc_ServerConnection, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5pyrfc_6_cyrfc_ServerConnection, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5pyrfc_6_cyrfc_16ServerConnection_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5pyrfc_6_cyrfc_ServerConnection, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Server __pyx_vtable_5pyrfc_6_cyrfc_Server;

static PyObject *__pyx_tp_new_5pyrfc_6_cyrfc_Server(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_5pyrfc_6_cyrfc_Server *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)o);
  p->__pyx_vtab = __pyx_vtabptr_5pyrfc_6_cyrfc_Server;
  p->_client_connection = ((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)Py_None); Py_INCREF(Py_None);
  p->_server_connection = ((struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *)Py_None); Py_INCREF(Py_None);
  p->_server_thread = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_5pyrfc_6_cyrfc_6Server_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_5pyrfc_6_cyrfc_Server(PyObject *o) {
  struct __pyx_obj_5pyrfc_6_cyrfc_Server *p = (struct __pyx_obj_5pyrfc_6_cyrfc_Server *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_client_connection);
  Py_CLEAR(p->_server_connection);
  Py_CLEAR(p->_server_thread);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5pyrfc_6_cyrfc_Server(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5pyrfc_6_cyrfc_Server *p = (struct __pyx_obj_5pyrfc_6_cyrfc_Server *)o;
  if (p->_client_connection) {
    e = (*v)(((PyObject *)p->_client_connection), a); if (e) return e;
  }
  if (p->_server_connection) {
    e = (*v)(((PyObject *)p->_server_connection), a); if (e) return e;
  }
  if (p->_server_thread) {
    e = (*v)(p->_server_thread, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5pyrfc_6_cyrfc_Server(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5pyrfc_6_cyrfc_Server *p = (struct __pyx_obj_5pyrfc_6_cyrfc_Server *)o;
  tmp = ((PyObject*)p->_client_connection);
  p->_client_connection = ((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_server_connection);
  p->_server_connection = ((struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_server_thread);
  p->_server_thread = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_6Server_debug(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_6_cyrfc_6Server_5debug_1__get__(o);
}

static int __pyx_setprop_5pyrfc_6_cyrfc_6Server_debug(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5pyrfc_6_cyrfc_6Server_5debug_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_6Server_rstrip(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_6_cyrfc_6Server_6rstrip_1__get__(o);
}

static int __pyx_setprop_5pyrfc_6_cyrfc_6Server_rstrip(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5pyrfc_6_cyrfc_6Server_6rstrip_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_5pyrfc_6_cyrfc_Server[] = {
  {"bgrfc_init", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_6Server_3bgrfc_init, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_6Server_2bgrfc_init},
  {"install_bgrfc_handlers", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_6Server_5install_bgrfc_handlers, METH_O, 0},
  {"add_function", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_6Server_7add_function, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_6Server_6add_function},
  {"serve", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_6Server_9serve, METH_NOARGS, __pyx_doc_5pyrfc_6_cyrfc_6Server_8serve},
  {"start", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_6Server_11start, METH_NOARGS, __pyx_doc_5pyrfc_6_cyrfc_6Server_10start},
  {"stop", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_6Server_13stop, METH_NOARGS, __pyx_doc_5pyrfc_6_cyrfc_6Server_12stop},
  {"close", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_6Server_15close, METH_NOARGS, __pyx_doc_5pyrfc_6_cyrfc_6Server_14close},
  {"get_server_attributes", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_6Server_17get_server_attributes, METH_NOARGS, __pyx_doc_5pyrfc_6_cyrfc_6Server_16get_server_attributes},
  {"_close", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_6Server_19_close, METH_NOARGS, __pyx_doc_5pyrfc_6_cyrfc_6Server_18_close},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_6Server_21__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_6Server_23__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5pyrfc_6_cyrfc_Server[] = {
  {(char *)"debug", __pyx_getprop_5pyrfc_6_cyrfc_6Server_debug, __pyx_setprop_5pyrfc_6_cyrfc_6Server_debug, (char *)0, 0},
  {(char *)"rstrip", __pyx_getprop_5pyrfc_6_cyrfc_6Server_rstrip, __pyx_setprop_5pyrfc_6_cyrfc_6Server_rstrip, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5pyrfc_6_cyrfc_Server = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrfc._cyrfc.Server", /*tp_name*/
  sizeof(struct __pyx_obj_5pyrfc_6_cyrfc_Server), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5pyrfc_6_cyrfc_Server, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  " An ABAP server\n\n    An instance of :class:`~pyrfc.Server` allows for installing\n    Python callback functions and serve requests from SAP systems.\n\n    :param server_params: Parameters for registering Python server.\n                          The parameters may contain the following keywords:\n                          ``GWHOST`, ``GWSERV``, ``PROGRAM_ID``, ``TRACE``,\n                          and ``SAPROUTER``.\n\n    :type server_params: dict\n\n    :param client_params: Parameters for Python client connection.\n                          The parameters may contain the following keywords:\n                          ``GWHOST`, ``GWSERV``, ``PROGRAM_ID``, ``TRACE``,\n                          and ``SAPROUTER``.\n\n    :type server_params: dict\n\n    :param config: Configuration of the instance. Allowed keys are:\n\n           ``debug``\n             For testing/debugging operations. If True, the server\n             behaves more permissive, e.g. allows incoming calls without a\n             valid connection handle. (default is False)\n\n    :type config: dict or None (default)\n\n    :raises: :exc:`~pyrfc.RFCError` or a subclass\n             thereof if the connection attempt fails.\n    ", /*tp_doc*/
  __pyx_tp_traverse_5pyrfc_6_cyrfc_Server, /*tp_traverse*/
  __pyx_tp_clear_5pyrfc_6_cyrfc_Server, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5pyrfc_6_cyrfc_Server, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5pyrfc_6_cyrfc_Server, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5pyrfc_6_cyrfc_Server, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Throughput __pyx_vtable_5pyrfc_6_cyrfc_Throughput;

static PyObject *__pyx_tp_new_5pyrfc_6_cyrfc_Throughput(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)o);
  p->__pyx_vtab = __pyx_vtabptr_5pyrfc_6_cyrfc_Throughput;
  p->_connections = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5pyrfc_6_cyrfc_Throughput(PyObject *o) {
  struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *p = (struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_connections);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5pyrfc_6_cyrfc_Throughput(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *p = (struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)o;
  if (p->_connections) {
    e = (*v)(p->_connections, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5pyrfc_6_cyrfc_Throughput(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *p = (struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)o;
  tmp = ((PyObject*)p->_connections);
  p->_connections = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_10Throughput_connections(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_6_cyrfc_10Throughput_11connections_1__get__(o);
}

static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_10Throughput__handle(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_6_cyrfc_10Throughput_7_handle_1__get__(o);
}

static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_10Throughput_stats(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_6_cyrfc_10Throughput_5stats_1__get__(o);
}

static PyMethodDef __pyx_methods_5pyrfc_6_cyrfc_Throughput[] = {
  {"setOnConnection", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_3setOnConnection, METH_O, __pyx_doc_5pyrfc_6_cyrfc_10Throughput_2setOnConnection},
  {"getFromConnection", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_5getFromConnection, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Throughput_4getFromConnection},
  {"removeFromConnection", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_7removeFromConnection, METH_O, __pyx_doc_5pyrfc_6_cyrfc_10Throughput_6removeFromConnection},
  {"reset", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_9reset, METH_NOARGS, __pyx_doc_5pyrfc_6_cyrfc_10Throughput_8reset},
  {"__del__", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_11__del__, METH_NOARGS, 0},
  {"__exit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_13__exit__, METH_VARARGS|METH_KEYWORDS, 0},
  {"__enter__", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_15__enter__, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_17__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_19__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5pyrfc_6_cyrfc_Throughput[] = {
  {(char *)"connections", __pyx_getprop_5pyrfc_6_cyrfc_10Throughput_connections, 0, (char *)"Get connections attached to throughput monitoring\n\n        :getter: Connections' instances\n        :type: set of Connection\n        ", 0},
  {(char *)"_handle", __pyx_getprop_5pyrfc_6_cyrfc_10Throughput__handle, 0, (char *)"Get throughput object handle\n\n        :getter: Throughput object handle\n        :type: uintptr_t\n        ", 0},
  {(char *)"stats", __pyx_getprop_5pyrfc_6_cyrfc_10Throughput_stats, 0, (char *)"Get throughput monitor statistics\n\n        :getter: Throughput monitor counters\n        :type: dict(str,int)\n\n           * numberOfCalls\n           * sentBytes\n           * receivedBytes\n           * applicationTime\n           * totalTime\n           * serializationTime\n           * deserializationTime\n        ", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5pyrfc_6_cyrfc_Throughput = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrfc._cyrfc.Throughput", /*tp_name*/
  sizeof(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5pyrfc_6_cyrfc_Throughput, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5pyrfc_6_cyrfc_Throughput, /*tp_traverse*/
  __pyx_tp_clear_5pyrfc_6_cyrfc_Throughput, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5pyrfc_6_cyrfc_Throughput, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5pyrfc_6_cyrfc_Throughput, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5pyrfc_6_cyrfc_10Throughput_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5pyrfc_6_cyrfc_Throughput, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py *__pyx_freelist___pyx_scope_struct____Pyx_CFunc_object____object___to_py[8];
static int __pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____object___to_py = 0;

static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object____object___to_py(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____object___to_py > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py)))) {
    o = (PyObject*)__pyx_freelist___pyx_scope_struct____Pyx_CFunc_object____object___to_py[--__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____object___to_py];
    memset(o, 0, sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py));
    (void) PyObject_INIT(o, t);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_object____object___to_py(PyObject *o) {
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____object___to_py < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py)))) {
    __pyx_freelist___pyx_scope_struct____Pyx_CFunc_object____object___to_py[__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____object___to_py++] = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static PyTypeObject __pyx_scope_struct____Pyx_CFunc_object____object___to_py = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrfc._cyrfc.__pyx_scope_struct____Pyx_CFunc_object____object___to_py", /*tp_name*/
  sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_object____object___to_py, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object____object___to_py, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

static int __pyx_import_star_set(PyObject *o, PyObject* py_name, char *name) {
  static const char* internal_type_names[] = {
    "Connection",
    "ConnectionParameters",
    "DATA_CONTAINER_HANDLE",
    "RFCTYPE",
    "RFC_ABAP_NAME",
    "RFC_ATTRIBUTES",
    "RFC_BYTE",
    "RFC_CALL_TYPE",
    "RFC_CHAR",
    "RFC_CONNECTION_HANDLE",
    "RFC_CONNECTION_PARAMETER",
    "RFC_DATE",
    "RFC_DIRECTION",
    "RFC_ERROR_GROUP",
    "RFC_ERROR_INFO",
    "RFC_FIELD_DESC",
    "RFC_FLOAT",
    "RFC_FUNCTION_DESC_HANDLE",
    "RFC_FUNCTION_HANDLE",
    "RFC_FUNC_DESC_CALLBACK",
    "RFC_INT",
    "RFC_INT1",
    "RFC_INT2",
    "RFC_INT8",
    "RFC_METADATA_QUERY_RESULT_HANDLE",
    "RFC_NUM",
    "RFC_ON_CHECK_UNIT",
    "RFC_ON_COMMIT_UNIT",
    "RFC_ON_CONFIRM_UNIT",
    "RFC_ON_GET_UNIT_STATE",
    "RFC_ON_ROLLBACK_UNIT",
    "RFC_PARAMETER_DEFVALUE",
    "RFC_PARAMETER_DESC",
    "RFC_PARAMETER_TEXT",
    "RFC_PROTOCOL_TYPE",
    "RFC_RC",
    "RFC_SERVER_ATTRIBUTES",
    "RFC_SERVER_CONTEXT",
    "RFC_SERVER_FUNCTION",
    "RFC_SERVER_HANDLE",
    "RFC_SERVER_STATE",
    "RFC_STRUCTURE_HANDLE",
    "RFC_TABLE_HANDLE",
    "RFC_THROUGHPUT_HANDLE",
    "RFC_TID",
    "RFC_TIME",
    "RFC_TRANSACTION_HANDLE",
    "RFC_TYPE_DESC_HANDLE",
    "RFC_UNITID",
    "RFC_UNIT_ATTRIBUTES",
    "RFC_UNIT_HANDLE",
    "RFC_UNIT_IDENTIFIER",
    "RFC_UNIT_STATE",
    "SAP_CHAR",
    "SAP_RAW",
    "SAP_UC",
    "SAP_ULLONG",
    "SAP_USHORT",
    "SAP_UTF16",
    "Server",
    "ServerConnection",
    "Throughput",
    "__pyx_ctuple_Py_ssize_t",
    "__pyx_ctuple_Py_ssize_t_struct",
    "__pyx_ctuple_RFCTYPE",
    "__pyx_ctuple_RFCTYPE_struct",
    "__pyx_ctuple_RFC_BYTE",
    "__pyx_ctuple_RFC_BYTE_struct",
    "__pyx_ctuple_RFC_CALL_TYPE",
    "__pyx_ctuple_RFC_CALL_TYPE_struct",
    "__pyx_ctuple_RFC_DIRECTION",
    "__pyx_ctuple_RFC_DIRECTION_struct",
    "__pyx_ctuple_RFC_UNIT_STATE",
    "__pyx_ctuple_RFC_UNIT_STATE_struct",
    "__pyx_ctuple_unsigned__space_int",
    "__pyx_ctuple_unsigned__space_int_struct",
    "__pyx_opt_args_5pyrfc_6_cyrfc_wrapString",
    "__pyx_scope_struct____Pyx_CFunc_object____object___to_py",
    "const_SAP_UC_ptr",
    "uintptr_t",
    0
  };
  const char** type_name = internal_type_names;
  while (*type_name) {
    if (__Pyx_StrEq(name, *type_name)) {
      PyErr_Format(PyExc_TypeError, "Cannot overwrite C type %s", name);
      goto bad;
    }
    type_name++;
  }
  if (0);
  else {
    if (PyObject_SetAttr(__pyx_m, py_name, o) < 0) goto bad;
  }
  return 0;
  bad:
  return -1;
}

static int
__Pyx_import_all_from(PyObject *locals, PyObject *v)
{
    PyObject *all = PyObject_GetAttrString(v, "__all__");
    PyObject *dict, *name, *value;
    int skip_leading_underscores = 0;
    int pos, err;
    if (all == NULL) {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
            return -1;
        PyErr_Clear();
        dict = PyObject_GetAttrString(v, "__dict__");
        if (dict == NULL) {
            if (!PyErr_ExceptionMatches(PyExc_AttributeError))
                return -1;
            PyErr_SetString(PyExc_ImportError,
            "from-import-* object has no __dict__ and no __all__");
            return -1;
        }
#if PY_MAJOR_VERSION < 3
        all = PyObject_CallMethod(dict, (char *)"keys", NULL);
#else
        all = PyMapping_Keys(dict);
#endif
        Py_DECREF(dict);
        if (all == NULL)
            return -1;
        skip_leading_underscores = 1;
    }
    for (pos = 0, err = 0; ; pos++) {
        name = PySequence_GetItem(all, pos);
        if (name == NULL) {
            if (!PyErr_ExceptionMatches(PyExc_IndexError))
                err = -1;
            else
                PyErr_Clear();
            break;
        }
        if (skip_leading_underscores &&
#if PY_MAJOR_VERSION < 3
            likely(PyString_Check(name)) &&
            PyString_AS_STRING(name)[0] == '_')
#else
            likely(PyUnicode_Check(name)) &&
            likely(__Pyx_PyUnicode_GET_LENGTH(name)) &&
            __Pyx_PyUnicode_READ_CHAR(name, 0) == '_')
#endif
        {
            Py_DECREF(name);
            continue;
        }
        value = PyObject_GetAttr(v, name);
        if (value == NULL)
            err = -1;
        else if (PyDict_CheckExact(locals))
            err = PyDict_SetItem(locals, name, value);
        else
            err = PyObject_SetItem(locals, name, value);
        Py_DECREF(name);
        Py_XDECREF(value);
        if (err != 0)
            break;
    }
    Py_DECREF(all);
    return err;
}
static int __pyx_import_star(PyObject* m) {
    int i;
    int ret = -1;
    char* s;
    PyObject *locals = 0;
    PyObject *list = 0;
#if PY_MAJOR_VERSION >= 3
    PyObject *utf8_name = 0;
#endif
    PyObject *name;
    PyObject *item;
    locals = PyDict_New();              if (!locals) goto bad;
    if (__Pyx_import_all_from(locals, m) < 0) goto bad;
    list = PyDict_Items(locals);        if (!list) goto bad;
    for(i=0; i<PyList_GET_SIZE(list); i++) {
        name = PyTuple_GET_ITEM(PyList_GET_ITEM(list, i), 0);
        item = PyTuple_GET_ITEM(PyList_GET_ITEM(list, i), 1);
#if PY_MAJOR_VERSION >= 3
        utf8_name = PyUnicode_AsUTF8String(name);
        if (!utf8_name) goto bad;
        s = PyBytes_AS_STRING(utf8_name);
        if (__pyx_import_star_set(item, name, s) < 0) goto bad;
        Py_DECREF(utf8_name); utf8_name = 0;
#else
        s = PyString_AsString(name);
        if (!s) goto bad;
        if (__pyx_import_star_set(item, name, s) < 0) goto bad;
#endif
    }
    ret = 0;
bad:
    Py_XDECREF(locals);
    Py_XDECREF(list);
#if PY_MAJOR_VERSION >= 3
    Py_XDECREF(utf8_name);
#endif
    return ret;
}



#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec__cyrfc(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec__cyrfc},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "_cyrfc",
    __pyx_k_The__pyrfc_C_extension_module, /* m_doc */
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    0, /* m_size */
  #else
    -1, /* m_size */
  #endif
    __pyx_methods /* m_methods */,
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    __pyx_moduledef_slots, /* m_slots */
  #else
    NULL, /* m_reload */
  #endif
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_u_00000000, __pyx_k_00000000, sizeof(__pyx_k_00000000), 0, 1, 0, 0},
  {&__pyx_kp_u_02, __pyx_k_02, sizeof(__pyx_k_02), 0, 1, 0, 0},
  {&__pyx_kp_u_04, __pyx_k_04, sizeof(__pyx_k_04), 0, 1, 0, 0},
  {&__pyx_n_s_ABAPApplicationError, __pyx_k_ABAPApplicationError, sizeof(__pyx_k_ABAPApplicationError), 0, 0, 1, 1},
  {&__pyx_n_s_ABAPRuntimeError, __pyx_k_ABAPRuntimeError, sizeof(__pyx_k_ABAPRuntimeError), 0, 0, 1, 1},
  {&__pyx_kp_s_A_function_description_This_cla, __pyx_k_A_function_description_This_cla, sizeof(__pyx_k_A_function_description_This_cla), 0, 0, 1, 0},
  {&__pyx_kp_s_A_type_description_This_class_w, __pyx_k_A_type_description_This_class_w, sizeof(__pyx_k_A_type_description_This_class_w), 0, 0, 1, 0},
  {&__pyx_kp_u_Argument_attributes_not_valid_t, __pyx_k_Argument_attributes_not_valid_t, sizeof(__pyx_k_Argument_attributes_not_valid_t), 0, 1, 0, 0},
  {&__pyx_kp_u_Argument_background_must_be_a_bo, __pyx_k_Argument_background_must_be_a_bo, sizeof(__pyx_k_Argument_background_must_be_a_bo), 0, 1, 0, 0},
  {&__pyx_kp_u_Argument_queue_names_not_valid_t, __pyx_k_Argument_queue_names_not_valid_t, sizeof(__pyx_k_Argument_queue_names_not_valid_t), 0, 1, 0, 0},
  {&__pyx_kp_u_Argument_unit_not_valid_Is_unit, __pyx_k_Argument_unit_not_valid_Is_unit, sizeof(__pyx_k_Argument_unit_not_valid_Is_unit), 0, 1, 0, 0},
  {&__pyx_kp_u_Authentication_exception_raised, __pyx_k_Authentication_exception_raised, sizeof(__pyx_k_Authentication_exception_raised), 0, 1, 0, 0},
  {&__pyx_kp_u_BgRfc_callback_function_key_not, __pyx_k_BgRfc_callback_function_key_not, sizeof(__pyx_k_BgRfc_callback_function_key_not), 0, 1, 0, 0},
  {&__pyx_kp_u_BgRfc_callback_function_referenc, __pyx_k_BgRfc_callback_function_referenc, sizeof(__pyx_k_BgRfc_callback_function_referenc), 0, 1, 0, 0},
  {&__pyx_kp_u_Callback_functions_may_only_rai, __pyx_k_Callback_functions_may_only_rai, sizeof(__pyx_k_Callback_functions_may_only_rai), 0, 1, 0, 0},
  {&__pyx_n_s_CommunicationError, __pyx_k_CommunicationError, sizeof(__pyx_k_CommunicationError), 0, 0, 1, 1},
  {&__pyx_n_s_Connection, __pyx_k_Connection, sizeof(__pyx_k_Connection), 0, 0, 1, 1},
  {&__pyx_n_s_ConnectionParameters, __pyx_k_ConnectionParameters, sizeof(__pyx_k_ConnectionParameters), 0, 0, 1, 1},
  {&__pyx_kp_u_Connection_configuration_option, __pyx_k_Connection_configuration_option, sizeof(__pyx_k_Connection_configuration_option), 0, 1, 0, 0},
  {&__pyx_kp_u_Connection_object_required_recei, __pyx_k_Connection_object_required_recei, sizeof(__pyx_k_Connection_object_required_recei), 0, 1, 0, 0},
  {&__pyx_kp_u_Connection_parameters_missing, __pyx_k_Connection_parameters_missing, sizeof(__pyx_k_Connection_parameters_missing), 0, 1, 0, 0},
  {&__pyx_kp_u_Connection_was_canceled, __pyx_k_Connection_was_canceled, sizeof(__pyx_k_Connection_was_canceled), 0, 1, 0, 0},
  {&__pyx_kp_u_Crypto_library_not_found, __pyx_k_Crypto_library_not_found, sizeof(__pyx_k_Crypto_library_not_found), 0, 1, 0, 0},
  {&__pyx_n_s_Decimal, __pyx_k_Decimal, sizeof(__pyx_k_Decimal), 0, 0, 1, 1},
  {&__pyx_n_s_Enum, __pyx_k_Enum, sizeof(__pyx_k_Enum), 0, 0, 1, 1},
  {&__pyx_kp_u_Error_code, __pyx_k_Error_code, sizeof(__pyx_k_Error_code), 0, 1, 0, 0},
  {&__pyx_kp_u_Error_in_bgRFC_handler_onCheck, __pyx_k_Error_in_bgRFC_handler_onCheck, sizeof(__pyx_k_Error_in_bgRFC_handler_onCheck), 0, 1, 0, 0},
  {&__pyx_kp_u_Error_in_bgRFC_handler_onCommit, __pyx_k_Error_in_bgRFC_handler_onCommit, sizeof(__pyx_k_Error_in_bgRFC_handler_onCommit), 0, 1, 0, 0},
  {&__pyx_kp_u_Error_in_bgRFC_handler_onConfirm, __pyx_k_Error_in_bgRFC_handler_onConfirm, sizeof(__pyx_k_Error_in_bgRFC_handler_onConfirm), 0, 1, 0, 0},
  {&__pyx_kp_u_Error_in_bgRFC_handler_onGetStat, __pyx_k_Error_in_bgRFC_handler_onGetStat, sizeof(__pyx_k_Error_in_bgRFC_handler_onGetStat), 0, 1, 0, 0},
  {&__pyx_kp_u_Error_in_bgRFC_handler_onRollbac, __pyx_k_Error_in_bgRFC_handler_onRollbac, sizeof(__pyx_k_Error_in_bgRFC_handler_onRollbac), 0, 1, 0, 0},
  {&__pyx_kp_u_Error_while_retrieving_connecti, __pyx_k_Error_while_retrieving_connecti, sizeof(__pyx_k_Error_while_retrieving_connecti), 0, 1, 0, 0},
  {&__pyx_n_s_ExternalApplicationError, __pyx_k_ExternalApplicationError, sizeof(__pyx_k_ExternalApplicationError), 0, 0, 1, 1},
  {&__pyx_n_s_ExternalAuthorizationError, __pyx_k_ExternalAuthorizationError, sizeof(__pyx_k_ExternalAuthorizationError), 0, 0, 1, 1},
  {&__pyx_n_s_ExternalRuntimeError, __pyx_k_ExternalRuntimeError, sizeof(__pyx_k_ExternalRuntimeError), 0, 0, 1, 1},
  {&__pyx_kp_u_Function, __pyx_k_Function, sizeof(__pyx_k_Function), 0, 1, 0, 0},
  {&__pyx_kp_u_FunctionDescription, __pyx_k_FunctionDescription, sizeof(__pyx_k_FunctionDescription), 0, 1, 0, 0},
  {&__pyx_n_s_FunctionDescription_2, __pyx_k_FunctionDescription_2, sizeof(__pyx_k_FunctionDescription_2), 0, 0, 1, 1},
  {&__pyx_n_s_FunctionDescription___init, __pyx_k_FunctionDescription___init, sizeof(__pyx_k_FunctionDescription___init), 0, 0, 1, 1},
  {&__pyx_n_s_FunctionDescription___repr, __pyx_k_FunctionDescription___repr, sizeof(__pyx_k_FunctionDescription___repr), 0, 0, 1, 1},
  {&__pyx_n_s_FunctionDescription_add_paramete, __pyx_k_FunctionDescription_add_paramete, sizeof(__pyx_k_FunctionDescription_add_paramete), 0, 0, 1, 1},
  {&__pyx_kp_u_H_M_S, __pyx_k_H_M_S, sizeof(__pyx_k_H_M_S), 0, 1, 0, 0},
  {&__pyx_kp_u_Invalid_connection_handle, __pyx_k_Invalid_connection_handle, sizeof(__pyx_k_Invalid_connection_handle), 0, 1, 0, 0},
  {&__pyx_kp_u_Invalid_exception_raised_by_call, __pyx_k_Invalid_exception_raised_by_call, sizeof(__pyx_k_Invalid_exception_raised_by_call), 0, 1, 0, 0},
  {&__pyx_kp_u_Invalid_length_of_unit_id_should, __pyx_k_Invalid_length_of_unit_id_should, sizeof(__pyx_k_Invalid_length_of_unit_id_should), 0, 1, 0, 0},
  {&__pyx_kp_u_Invocation_finished_submitting, __pyx_k_Invocation_finished_submitting, sizeof(__pyx_k_Invocation_finished_submitting), 0, 1, 0, 0},
  {&__pyx_n_s_Iterable, __pyx_k_Iterable, sizeof(__pyx_k_Iterable), 0, 0, 1, 1},
  {&__pyx_n_s_LOCALE_RADIX, __pyx_k_LOCALE_RADIX, sizeof(__pyx_k_LOCALE_RADIX), 0, 0, 1, 1},
  {&__pyx_kp_u_Length_of_parameter_unit_id_must, __pyx_k_Length_of_parameter_unit_id_must, sizeof(__pyx_k_Length_of_parameter_unit_id_must), 0, 1, 0, 0},
  {&__pyx_n_s_LogonError, __pyx_k_LogonError, sizeof(__pyx_k_LogonError), 0, 0, 1, 1},
  {&__pyx_n_s_MASK_DTIME, __pyx_k_MASK_DTIME, sizeof(__pyx_k_MASK_DTIME), 0, 0, 1, 1},
  {&__pyx_n_s_MASK_RETURN_IMPORT_PARAMS, __pyx_k_MASK_RETURN_IMPORT_PARAMS, sizeof(__pyx_k_MASK_RETURN_IMPORT_PARAMS), 0, 0, 1, 1},
  {&__pyx_n_s_MASK_RSTRIP, __pyx_k_MASK_RSTRIP, sizeof(__pyx_k_MASK_RSTRIP), 0, 0, 1, 1},
  {&__pyx_kp_u_New_handle, __pyx_k_New_handle, sizeof(__pyx_k_New_handle), 0, 1, 0, 0},
  {&__pyx_kp_u_No_connections_assigned, __pyx_k_No_connections_assigned, sizeof(__pyx_k_No_connections_assigned), 0, 1, 0, 0},
  {&__pyx_kp_u_No_metadata_found_for_function, __pyx_k_No_metadata_found_for_function, sizeof(__pyx_k_No_metadata_found_for_function), 0, 1, 0, 0},
  {&__pyx_kp_u_No_state_check_possible_of_non_b, __pyx_k_No_state_check_possible_of_non_b, sizeof(__pyx_k_No_state_check_possible_of_non_b), 0, 1, 0, 0},
  {&__pyx_kp_u_No_transaction_handle_for_this_c, __pyx_k_No_transaction_handle_for_this_c, sizeof(__pyx_k_No_transaction_handle_for_this_c), 0, 1, 0, 0},
  {&__pyx_kp_u_No_unit_handle_for_this_connecti, __pyx_k_No_unit_handle_for_this_connecti, sizeof(__pyx_k_No_unit_handle_for_this_connecti), 0, 1, 0, 0},
  {&__pyx_kp_u_Not_a_valid_error_group, __pyx_k_Not_a_valid_error_group, sizeof(__pyx_k_Not_a_valid_error_group), 0, 1, 0, 0},
  {&__pyx_n_s_OK, __pyx_k_OK, sizeof(__pyx_k_OK), 0, 0, 1, 1},
  {&__pyx_kp_u_Parameter_calls_must_be_iterable, __pyx_k_Parameter_calls_must_be_iterable, sizeof(__pyx_k_Parameter_calls_must_be_iterable), 0, 1, 0, 0},
  {&__pyx_kp_u_Parameter_calls_must_contain_at, __pyx_k_Parameter_calls_must_contain_at, sizeof(__pyx_k_Parameter_calls_must_contain_at), 0, 1, 0, 0},
  {&__pyx_kp_u_Parameter_calls_must_contain_val, __pyx_k_Parameter_calls_must_contain_val, sizeof(__pyx_k_Parameter_calls_must_contain_val), 0, 1, 0, 0},
  {&__pyx_kp_u_Parameter_unit_not_valid_Please, __pyx_k_Parameter_unit_not_valid_Please, sizeof(__pyx_k_Parameter_unit_not_valid_Please), 0, 1, 0, 0},
  {&__pyx_n_s_Pyx_CFunc_object____object___t, __pyx_k_Pyx_CFunc_object____object___t, sizeof(__pyx_k_Pyx_CFunc_object____object___t), 0, 0, 1, 1},
  {&__pyx_n_u_Q, __pyx_k_Q, sizeof(__pyx_k_Q), 0, 1, 0, 1},
  {&__pyx_n_s_RCStatus, __pyx_k_RCStatus, sizeof(__pyx_k_RCStatus), 0, 0, 1, 1},
  {&__pyx_n_s_RFCError, __pyx_k_RFCError, sizeof(__pyx_k_RFCError), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_ABAPOBJECT, __pyx_k_RFCTYPE_ABAPOBJECT, sizeof(__pyx_k_RFCTYPE_ABAPOBJECT), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_BCD, __pyx_k_RFCTYPE_BCD, sizeof(__pyx_k_RFCTYPE_BCD), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_BYTE, __pyx_k_RFCTYPE_BYTE, sizeof(__pyx_k_RFCTYPE_BYTE), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_CDAY, __pyx_k_RFCTYPE_CDAY, sizeof(__pyx_k_RFCTYPE_CDAY), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_CHAR, __pyx_k_RFCTYPE_CHAR, sizeof(__pyx_k_RFCTYPE_CHAR), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_DATE, __pyx_k_RFCTYPE_DATE, sizeof(__pyx_k_RFCTYPE_DATE), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_DECF16, __pyx_k_RFCTYPE_DECF16, sizeof(__pyx_k_RFCTYPE_DECF16), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_DECF34, __pyx_k_RFCTYPE_DECF34, sizeof(__pyx_k_RFCTYPE_DECF34), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_DTDAY, __pyx_k_RFCTYPE_DTDAY, sizeof(__pyx_k_RFCTYPE_DTDAY), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_DTMONTH, __pyx_k_RFCTYPE_DTMONTH, sizeof(__pyx_k_RFCTYPE_DTMONTH), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_DTWEEK, __pyx_k_RFCTYPE_DTWEEK, sizeof(__pyx_k_RFCTYPE_DTWEEK), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_FLOAT, __pyx_k_RFCTYPE_FLOAT, sizeof(__pyx_k_RFCTYPE_FLOAT), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_INT, __pyx_k_RFCTYPE_INT, sizeof(__pyx_k_RFCTYPE_INT), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_INT1, __pyx_k_RFCTYPE_INT1, sizeof(__pyx_k_RFCTYPE_INT1), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_INT2, __pyx_k_RFCTYPE_INT2, sizeof(__pyx_k_RFCTYPE_INT2), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_INT8, __pyx_k_RFCTYPE_INT8, sizeof(__pyx_k_RFCTYPE_INT8), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_NULL, __pyx_k_RFCTYPE_NULL, sizeof(__pyx_k_RFCTYPE_NULL), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_NUM, __pyx_k_RFCTYPE_NUM, sizeof(__pyx_k_RFCTYPE_NUM), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_STRING, __pyx_k_RFCTYPE_STRING, sizeof(__pyx_k_RFCTYPE_STRING), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_STRUCTURE, __pyx_k_RFCTYPE_STRUCTURE, sizeof(__pyx_k_RFCTYPE_STRUCTURE), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_TABLE, __pyx_k_RFCTYPE_TABLE, sizeof(__pyx_k_RFCTYPE_TABLE), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_TIME, __pyx_k_RFCTYPE_TIME, sizeof(__pyx_k_RFCTYPE_TIME), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_TMINUTE, __pyx_k_RFCTYPE_TMINUTE, sizeof(__pyx_k_RFCTYPE_TMINUTE), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_TSECOND, __pyx_k_RFCTYPE_TSECOND, sizeof(__pyx_k_RFCTYPE_TSECOND), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_UTCLONG, __pyx_k_RFCTYPE_UTCLONG, sizeof(__pyx_k_RFCTYPE_UTCLONG), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_UTCMINUTE, __pyx_k_RFCTYPE_UTCMINUTE, sizeof(__pyx_k_RFCTYPE_UTCMINUTE), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_UTCSECOND, __pyx_k_RFCTYPE_UTCSECOND, sizeof(__pyx_k_RFCTYPE_UTCSECOND), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_XMLDATA, __pyx_k_RFCTYPE_XMLDATA, sizeof(__pyx_k_RFCTYPE_XMLDATA), 0, 0, 1, 1},
  {&__pyx_n_s_RFCTYPE_XSTRING, __pyx_k_RFCTYPE_XSTRING, sizeof(__pyx_k_RFCTYPE_XSTRING), 0, 0, 1, 1},
  {&__pyx_n_s_RFC_CHANGING, __pyx_k_RFC_CHANGING, sizeof(__pyx_k_RFC_CHANGING), 0, 0, 1, 1},
  {&__pyx_n_s_RFC_EXECUTED, __pyx_k_RFC_EXECUTED, sizeof(__pyx_k_RFC_EXECUTED), 0, 0, 1, 1},
  {&__pyx_n_s_RFC_EXPORT, __pyx_k_RFC_EXPORT, sizeof(__pyx_k_RFC_EXPORT), 0, 0, 1, 1},
  {&__pyx_n_s_RFC_EXTERNAL_FAILURE, __pyx_k_RFC_EXTERNAL_FAILURE, sizeof(__pyx_k_RFC_EXTERNAL_FAILURE), 0, 0, 1, 1},
  {&__pyx_n_s_RFC_IMPORT, __pyx_k_RFC_IMPORT, sizeof(__pyx_k_RFC_IMPORT), 0, 0, 1, 1},
  {&__pyx_n_s_RFC_NOT_FOUND, __pyx_k_RFC_NOT_FOUND, sizeof(__pyx_k_RFC_NOT_FOUND), 0, 0, 1, 1},
  {&__pyx_n_s_RFC_TABLES, __pyx_k_RFC_TABLES, sizeof(__pyx_k_RFC_TABLES), 0, 0, 1, 1},
  {&__pyx_kp_u_Remote_function_module, __pyx_k_Remote_function_module, sizeof(__pyx_k_Remote_function_module), 0, 1, 0, 0},
  {&__pyx_kp_u_Remote_function_module_name_must, __pyx_k_Remote_function_module_name_must, sizeof(__pyx_k_Remote_function_module_name_must), 0, 1, 0, 0},
  {&__pyx_kp_u_Request_for, __pyx_k_Request_for, sizeof(__pyx_k_Request_for), 0, 1, 0, 0},
  {&__pyx_n_s_RfcFieldType, __pyx_k_RfcFieldType, sizeof(__pyx_k_RfcFieldType), 0, 0, 1, 1},
  {&__pyx_n_s_RfcParameterDirection, __pyx_k_RfcParameterDirection, sizeof(__pyx_k_RfcParameterDirection), 0, 0, 1, 1},
  {&__pyx_n_s_Server, __pyx_k_Server, sizeof(__pyx_k_Server), 0, 0, 1, 1},
  {&__pyx_n_u_Server, __pyx_k_Server, sizeof(__pyx_k_Server), 0, 1, 0, 1},
  {&__pyx_n_s_ServerConnection, __pyx_k_ServerConnection, sizeof(__pyx_k_ServerConnection), 0, 0, 1, 1},
  {&__pyx_kp_u_Server_close, __pyx_k_Server_close, sizeof(__pyx_k_Server_close), 0, 1, 0, 0},
  {&__pyx_kp_u_Server_connection, __pyx_k_Server_connection, sizeof(__pyx_k_Server_connection), 0, 1, 0, 0},
  {&__pyx_kp_u_Server_function, __pyx_k_Server_function, sizeof(__pyx_k_Server_function), 0, 1, 0, 0},
  {&__pyx_kp_u_Server_function_installed, __pyx_k_Server_function_installed, sizeof(__pyx_k_Server_function_installed), 0, 1, 0, 0},
  {&__pyx_n_u_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 1, 0, 1},
  {&__pyx_kp_u_TID, __pyx_k_TID, sizeof(__pyx_k_TID), 0, 1, 0, 0},
  {&__pyx_kp_u_There_is_an_active_unit_for_this, __pyx_k_There_is_an_active_unit_for_this, sizeof(__pyx_k_There_is_an_active_unit_for_this), 0, 1, 0, 0},
  {&__pyx_n_s_Thread, __pyx_k_Thread, sizeof(__pyx_k_Thread), 0, 0, 1, 1},
  {&__pyx_n_s_Throughput, __pyx_k_Throughput, sizeof(__pyx_k_Throughput), 0, 0, 1, 1},
  {&__pyx_n_s_Timer, __pyx_k_Timer, sizeof(__pyx_k_Timer), 0, 0, 1, 1},
  {&__pyx_kp_u_TypeDescription, __pyx_k_TypeDescription, sizeof(__pyx_k_TypeDescription), 0, 1, 0, 0},
  {&__pyx_n_s_TypeDescription_2, __pyx_k_TypeDescription_2, sizeof(__pyx_k_TypeDescription_2), 0, 0, 1, 1},
  {&__pyx_n_s_TypeDescription___init, __pyx_k_TypeDescription___init, sizeof(__pyx_k_TypeDescription___init), 0, 0, 1, 1},
  {&__pyx_n_s_TypeDescription___repr, __pyx_k_TypeDescription___repr, sizeof(__pyx_k_TypeDescription___repr), 0, 0, 1, 1},
  {&__pyx_n_s_TypeDescription_add_field, __pyx_k_TypeDescription_add_field, sizeof(__pyx_k_TypeDescription_add_field), 0, 0, 1, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_kp_u_UTC, __pyx_k_UTC, sizeof(__pyx_k_UTC), 0, 1, 0, 0},
  {&__pyx_kp_u_Unit, __pyx_k_Unit, sizeof(__pyx_k_Unit), 0, 1, 0, 0},
  {&__pyx_n_s_UnitCallType, __pyx_k_UnitCallType, sizeof(__pyx_k_UnitCallType), 0, 0, 1, 1},
  {&__pyx_n_s_UnitState, __pyx_k_UnitState, sizeof(__pyx_k_UnitState), 0, 0, 1, 1},
  {&__pyx_kp_u_Unknown_RFC_type, __pyx_k_Unknown_RFC_type, sizeof(__pyx_k_Unknown_RFC_type), 0, 1, 0, 0},
  {&__pyx_kp_u_User_user_from_system_sysId_clie, __pyx_k_User_user_from_system_sysId_clie, sizeof(__pyx_k_User_user_from_system_sysId_clie), 0, 1, 0, 0},
  {&__pyx_kp_u_Values, __pyx_k_Values, sizeof(__pyx_k_Values), 0, 1, 0, 0},
  {&__pyx_kp_u_Y_m_d, __pyx_k_Y_m_d, sizeof(__pyx_k_Y_m_d), 0, 1, 0, 0},
  {&__pyx_kp_u__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 1, 0, 0},
  {&__pyx_kp_u__24, __pyx_k__24, sizeof(__pyx_k__24), 0, 1, 0, 0},
  {&__pyx_kp_u__25, __pyx_k__25, sizeof(__pyx_k__25), 0, 1, 0, 0},
  {&__pyx_kp_u__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 1, 0, 0},
  {&__pyx_kp_u__29, __pyx_k__29, sizeof(__pyx_k__29), 0, 1, 0, 0},
  {&__pyx_kp_u__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0, 0},
  {&__pyx_kp_u__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0, 0},
  {&__pyx_kp_u__46, __pyx_k__46, sizeof(__pyx_k__46), 0, 1, 0, 0},
  {&__pyx_kp_u__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0, 0},
  {&__pyx_n_s__51, __pyx_k__51, sizeof(__pyx_k__51), 0, 0, 1, 1},
  {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0},
  {&__pyx_kp_u_a_decimal_value_required_receive, __pyx_k_a_decimal_value_required_receive, sizeof(__pyx_k_a_decimal_value_required_receive), 0, 1, 0, 0},
  {&__pyx_kp_u_a_numeric_string_is_required_rec, __pyx_k_a_numeric_string_is_required_rec, sizeof(__pyx_k_a_numeric_string_is_required_rec), 0, 1, 0, 0},
  {&__pyx_n_u_active_unit, __pyx_k_active_unit, sizeof(__pyx_k_active_unit), 0, 1, 0, 1},
  {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1},
  {&__pyx_n_s_add_field, __pyx_k_add_field, sizeof(__pyx_k_add_field), 0, 0, 1, 1},
  {&__pyx_n_s_add_parameter, __pyx_k_add_parameter, sizeof(__pyx_k_add_parameter), 0, 0, 1, 1},
  {&__pyx_n_s_alive, __pyx_k_alive, sizeof(__pyx_k_alive), 0, 0, 1, 1},
  {&__pyx_kp_u_already_installed, __pyx_k_already_installed, sizeof(__pyx_k_already_installed), 0, 1, 0, 0},
  {&__pyx_kp_u_an_integer_required_received, __pyx_k_an_integer_required_received, sizeof(__pyx_k_an_integer_required_received), 0, 1, 0, 0},
  {&__pyx_kp_u_an_string_is_required_received, __pyx_k_an_string_is_required_received, sizeof(__pyx_k_an_string_is_required_received), 0, 1, 0, 0},
  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {&__pyx_n_u_applicationTime, __pyx_k_applicationTime, sizeof(__pyx_k_applicationTime), 0, 1, 0, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_attributes, __pyx_k_attributes, sizeof(__pyx_k_attributes), 0, 0, 1, 1},
  {&__pyx_n_u_auth_check, __pyx_k_auth_check, sizeof(__pyx_k_auth_check), 0, 1, 0, 1},
  {&__pyx_kp_u_authorization_check_for, __pyx_k_authorization_check_for, sizeof(__pyx_k_authorization_check_for), 0, 1, 0, 0},
  {&__pyx_n_s_auto, __pyx_k_auto, sizeof(__pyx_k_auto), 0, 0, 1, 1},
  {&__pyx_n_s_background, __pyx_k_background, sizeof(__pyx_k_background), 0, 0, 1, 1},
  {&__pyx_n_u_background, __pyx_k_background, sizeof(__pyx_k_background), 0, 1, 0, 1},
  {&__pyx_n_s_background_unit, __pyx_k_background_unit, sizeof(__pyx_k_background_unit), 0, 0, 1, 1},
  {&__pyx_kp_u_bgRFC_handler_onGetState_is_not, __pyx_k_bgRFC_handler_onGetState_is_not, sizeof(__pyx_k_bgRFC_handler_onGetState_is_not), 0, 1, 0, 0},
  {&__pyx_n_s_bgRfcFunction, __pyx_k_bgRfcFunction, sizeof(__pyx_k_bgRfcFunction), 0, 0, 1, 1},
  {&__pyx_n_s_bgRfcFunction_2, __pyx_k_bgRfcFunction_2, sizeof(__pyx_k_bgRfcFunction_2), 0, 0, 1, 1},
  {&__pyx_kp_u_but_found, __pyx_k_but_found, sizeof(__pyx_k_but_found), 0, 1, 0, 0},
  {&__pyx_n_u_call_type, __pyx_k_call_type, sizeof(__pyx_k_call_type), 0, 1, 0, 1},
  {&__pyx_n_s_callback, __pyx_k_callback, sizeof(__pyx_k_callback), 0, 0, 1, 1},
  {&__pyx_n_u_callback, __pyx_k_callback, sizeof(__pyx_k_callback), 0, 1, 0, 1},
  {&__pyx_n_s_calls, __pyx_k_calls, sizeof(__pyx_k_calls), 0, 0, 1, 1},
  {&__pyx_n_s_cancel, __pyx_k_cancel, sizeof(__pyx_k_cancel), 0, 0, 1, 1},
  {&__pyx_n_s_cancel_connection, __pyx_k_cancel_connection, sizeof(__pyx_k_cancel_connection), 0, 0, 1, 1},
  {&__pyx_n_s_cfunc_to_py, __pyx_k_cfunc_to_py, sizeof(__pyx_k_cfunc_to_py), 0, 0, 1, 1},
  {&__pyx_kp_u_chars_found, __pyx_k_chars_found, sizeof(__pyx_k_chars_found), 0, 1, 0, 0},
  {&__pyx_n_u_check, __pyx_k_check, sizeof(__pyx_k_check), 0, 1, 0, 1},
  {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1},
  {&__pyx_n_u_client, __pyx_k_client, sizeof(__pyx_k_client), 0, 1, 0, 1},
  {&__pyx_n_s_client_connection, __pyx_k_client_connection, sizeof(__pyx_k_client_connection), 0, 0, 1, 1},
  {&__pyx_n_s_client_params, __pyx_k_client_params, sizeof(__pyx_k_client_params), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_n_s_close_2, __pyx_k_close_2, sizeof(__pyx_k_close_2), 0, 0, 1, 1},
  {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1},
  {&__pyx_kp_u_code_set_to_RFC_ABAP_EXCEPTION, __pyx_k_code_set_to_RFC_ABAP_EXCEPTION, sizeof(__pyx_k_code_set_to_RFC_ABAP_EXCEPTION), 0, 1, 0, 0},
  {&__pyx_kp_u_code_set_to_RFC_ABAP_MESSAGE, __pyx_k_code_set_to_RFC_ABAP_MESSAGE, sizeof(__pyx_k_code_set_to_RFC_ABAP_MESSAGE), 0, 1, 0, 0},
  {&__pyx_kp_u_code_set_to_RFC_EXTERNAL_FAILUR, __pyx_k_code_set_to_RFC_EXTERNAL_FAILUR, sizeof(__pyx_k_code_set_to_RFC_EXTERNAL_FAILUR), 0, 1, 0, 0},
  {&__pyx_n_u_codepage, __pyx_k_codepage, sizeof(__pyx_k_codepage), 0, 1, 0, 1},
  {&__pyx_n_s_collections_abc, __pyx_k_collections_abc, sizeof(__pyx_k_collections_abc), 0, 0, 1, 1},
  {&__pyx_n_u_commit, __pyx_k_commit, sizeof(__pyx_k_commit), 0, 1, 0, 1},
  {&__pyx_n_s_committed, __pyx_k_committed, sizeof(__pyx_k_committed), 0, 0, 1, 1},
  {&__pyx_n_s_config, __pyx_k_config, sizeof(__pyx_k_config), 0, 0, 1, 1},
  {&__pyx_n_u_confirm, __pyx_k_confirm, sizeof(__pyx_k_confirm), 0, 1, 0, 1},
  {&__pyx_n_s_confirm_transaction, __pyx_k_confirm_transaction, sizeof(__pyx_k_confirm_transaction), 0, 0, 1, 1},
  {&__pyx_n_s_confirm_unit, __pyx_k_confirm_unit, sizeof(__pyx_k_confirm_unit), 0, 0, 1, 1},
  {&__pyx_n_s_confirmed, __pyx_k_confirmed, sizeof(__pyx_k_confirmed), 0, 0, 1, 1},
  {&__pyx_n_s_connection, __pyx_k_connection, sizeof(__pyx_k_connection), 0, 0, 1, 1},
  {&__pyx_n_u_connection_attributes, __pyx_k_connection_attributes, sizeof(__pyx_k_connection_attributes), 0, 1, 0, 1},
  {&__pyx_n_s_connections, __pyx_k_connections, sizeof(__pyx_k_connections), 0, 0, 1, 1},
  {&__pyx_n_u_cpicConvId, __pyx_k_cpicConvId, sizeof(__pyx_k_cpicConvId), 0, 1, 0, 1},
  {&__pyx_n_s_create_and_submit_transaction, __pyx_k_create_and_submit_transaction, sizeof(__pyx_k_create_and_submit_transaction), 0, 0, 1, 1},
  {&__pyx_n_s_create_and_submit_unit, __pyx_k_create_and_submit_unit, sizeof(__pyx_k_create_and_submit_unit), 0, 0, 1, 1},
  {&__pyx_n_s_created, __pyx_k_created, sizeof(__pyx_k_created), 0, 0, 1, 1},
  {&__pyx_n_u_currentBusyCount, __pyx_k_currentBusyCount, sizeof(__pyx_k_currentBusyCount), 0, 1, 0, 1},
  {&__pyx_n_u_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 1, 0, 1},
  {&__pyx_n_s_date, __pyx_k_date, sizeof(__pyx_k_date), 0, 0, 1, 1},
  {&__pyx_kp_u_date_value_required_received, __pyx_k_date_value_required_received, sizeof(__pyx_k_date_value_required_received), 0, 1, 0, 0},
  {&__pyx_n_s_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1},
  {&__pyx_n_s_day, __pyx_k_day, sizeof(__pyx_k_day), 0, 0, 1, 1},
  {&__pyx_n_s_debug, __pyx_k_debug, sizeof(__pyx_k_debug), 0, 0, 1, 1},
  {&__pyx_n_u_debug, __pyx_k_debug, sizeof(__pyx_k_debug), 0, 1, 0, 1},
  {&__pyx_n_s_decimal, __pyx_k_decimal, sizeof(__pyx_k_decimal), 0, 0, 1, 1},
  {&__pyx_n_u_decimal_point, __pyx_k_decimal_point, sizeof(__pyx_k_decimal_point), 0, 1, 0, 1},
  {&__pyx_n_s_decimals, __pyx_k_decimals, sizeof(__pyx_k_decimals), 0, 0, 1, 1},
  {&__pyx_n_u_decimals, __pyx_k_decimals, sizeof(__pyx_k_decimals), 0, 1, 0, 1},
  {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
  {&__pyx_n_s_default_auth_check, __pyx_k_default_auth_check, sizeof(__pyx_k_default_auth_check), 0, 0, 1, 1},
  {&__pyx_n_s_default_value, __pyx_k_default_value, sizeof(__pyx_k_default_value), 0, 0, 1, 1},
  {&__pyx_n_u_default_value, __pyx_k_default_value, sizeof(__pyx_k_default_value), 0, 1, 0, 1},
  {&__pyx_kp_u_default_value_string, __pyx_k_default_value_string, sizeof(__pyx_k_default_value_string), 0, 1, 0, 0},
  {&__pyx_n_s_del, __pyx_k_del, sizeof(__pyx_k_del), 0, 0, 1, 1},
  {&__pyx_n_u_deserializationTime, __pyx_k_deserializationTime, sizeof(__pyx_k_deserializationTime), 0, 1, 0, 1},
  {&__pyx_n_u_dest, __pyx_k_dest, sizeof(__pyx_k_dest), 0, 1, 0, 1},
  {&__pyx_n_s_destroy, __pyx_k_destroy, sizeof(__pyx_k_destroy), 0, 0, 1, 1},
  {&__pyx_n_s_destroy_transaction, __pyx_k_destroy_transaction, sizeof(__pyx_k_destroy_transaction), 0, 0, 1, 1},
  {&__pyx_n_s_destroy_unit, __pyx_k_destroy_unit, sizeof(__pyx_k_destroy_unit), 0, 0, 1, 1},
  {&__pyx_kp_u_dictionary_required_for_structur, __pyx_k_dictionary_required_for_structur, sizeof(__pyx_k_dictionary_required_for_structur), 0, 1, 0, 0},
  {&__pyx_n_s_direction, __pyx_k_direction, sizeof(__pyx_k_direction), 0, 0, 1, 1},
  {&__pyx_n_u_direction, __pyx_k_direction, sizeof(__pyx_k_direction), 0, 1, 0, 1},
  {&__pyx_kp_u_direction_string, __pyx_k_direction_string, sizeof(__pyx_k_direction_string), 0, 1, 0, 0},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_u_dtime, __pyx_k_dtime, sizeof(__pyx_k_dtime), 0, 1, 0, 1},
  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {&__pyx_n_s_enum, __pyx_k_enum, sizeof(__pyx_k_enum), 0, 0, 1, 1},
  {&__pyx_n_s_enum_names, __pyx_k_enum_names, sizeof(__pyx_k_enum_names), 0, 0, 1, 1},
  {&__pyx_n_s_enum_values, __pyx_k_enum_values, sizeof(__pyx_k_enum_values), 0, 0, 1, 1},
  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
  {&__pyx_n_s_errorInfo, __pyx_k_errorInfo, sizeof(__pyx_k_errorInfo), 0, 0, 1, 1},
  {&__pyx_n_s_exc_info, __pyx_k_exc_info, sizeof(__pyx_k_exc_info), 0, 0, 1, 1},
  {&__pyx_n_s_exception, __pyx_k_exception, sizeof(__pyx_k_exception), 0, 0, 1, 1},
  {&__pyx_n_s_executed, __pyx_k_executed, sizeof(__pyx_k_executed), 0, 0, 1, 1},
  {&__pyx_kp_u_field, __pyx_k_field, sizeof(__pyx_k_field), 0, 1, 0, 0},
  {&__pyx_kp_u_field_name_string, __pyx_k_field_name_string, sizeof(__pyx_k_field_name_string), 0, 1, 0, 0},
  {&__pyx_kp_u_field_name_string_2, __pyx_k_field_name_string_2, sizeof(__pyx_k_field_name_string_2), 0, 1, 0, 0},
  {&__pyx_n_s_field_type, __pyx_k_field_type, sizeof(__pyx_k_field_type), 0, 0, 1, 1},
  {&__pyx_n_u_field_type, __pyx_k_field_type, sizeof(__pyx_k_field_type), 0, 1, 0, 1},
  {&__pyx_kp_u_field_type_string, __pyx_k_field_type_string, sizeof(__pyx_k_field_type_string), 0, 1, 0, 0},
  {&__pyx_n_s_fields, __pyx_k_fields, sizeof(__pyx_k_fields), 0, 0, 1, 1},
  {&__pyx_kp_u_fields_n_uclength, __pyx_k_fields_n_uclength, sizeof(__pyx_k_fields_n_uclength), 0, 1, 0, 0},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_n_s_free, __pyx_k_free, sizeof(__pyx_k_free), 0, 0, 1, 1},
  {&__pyx_n_u_func_desc_handle, __pyx_k_func_desc_handle, sizeof(__pyx_k_func_desc_handle), 0, 1, 0, 1},
  {&__pyx_n_s_func_name, __pyx_k_func_name, sizeof(__pyx_k_func_name), 0, 0, 1, 1},
  {&__pyx_n_s_function_name, __pyx_k_function_name, sizeof(__pyx_k_function_name), 0, 0, 1, 1},
  {&__pyx_n_u_genericHandler, __pyx_k_genericHandler, sizeof(__pyx_k_genericHandler), 0, 1, 0, 1},
  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {&__pyx_n_s_getFromConnection, __pyx_k_getFromConnection, sizeof(__pyx_k_getFromConnection), 0, 0, 1, 1},
  {&__pyx_n_u_getState, __pyx_k_getState, sizeof(__pyx_k_getState), 0, 1, 0, 1},
  {&__pyx_n_s_get_nwrfclib_version, __pyx_k_get_nwrfclib_version, sizeof(__pyx_k_get_nwrfclib_version), 0, 0, 1, 1},
  {&__pyx_n_s_get_transaction_id, __pyx_k_get_transaction_id, sizeof(__pyx_k_get_transaction_id), 0, 0, 1, 1},
  {&__pyx_n_s_get_unit_id, __pyx_k_get_unit_id, sizeof(__pyx_k_get_unit_id), 0, 0, 1, 1},
  {&__pyx_n_s_get_unit_state, __pyx_k_get_unit_state, sizeof(__pyx_k_get_unit_state), 0, 0, 1, 1},
  {&__pyx_n_s_gethostname, __pyx_k_gethostname, sizeof(__pyx_k_gethostname), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_n_s_handle, __pyx_k_handle, sizeof(__pyx_k_handle), 0, 0, 1, 1},
  {&__pyx_kp_u_handle_2, __pyx_k_handle_2, sizeof(__pyx_k_handle_2), 0, 1, 0, 0},
  {&__pyx_n_s_handle_3, __pyx_k_handle_3, sizeof(__pyx_k_handle_3), 0, 0, 1, 1},
  {&__pyx_kp_u_has_invalid_state, __pyx_k_has_invalid_state, sizeof(__pyx_k_has_invalid_state), 0, 1, 0, 0},
  {&__pyx_n_u_host, __pyx_k_host, sizeof(__pyx_k_host), 0, 1, 0, 1},
  {&__pyx_n_u_hostname, __pyx_k_hostname, sizeof(__pyx_k_hostname), 0, 1, 0, 1},
  {&__pyx_n_s_hour, __pyx_k_hour, sizeof(__pyx_k_hour), 0, 0, 1, 1},
  {&__pyx_n_u_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 1, 0, 1},
  {&__pyx_n_s_idunitStateentifier, __pyx_k_idunitStateentifier, sizeof(__pyx_k_idunitStateentifier), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_in_process, __pyx_k_in_process, sizeof(__pyx_k_in_process), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_install_bgrfc_handlers, __pyx_k_install_bgrfc_handlers, sizeof(__pyx_k_install_bgrfc_handlers), 0, 0, 1, 1},
  {&__pyx_n_s_int_field, __pyx_k_int_field, sizeof(__pyx_k_int_field), 0, 0, 1, 1},
  {&__pyx_kp_u_invalid_state, __pyx_k_invalid_state, sizeof(__pyx_k_invalid_state), 0, 1, 0, 0},
  {&__pyx_kp_u_invocation_rejected_because_the, __pyx_k_invocation_rejected_because_the, sizeof(__pyx_k_invocation_rejected_because_the), 0, 1, 0, 0},
  {&__pyx_n_s_is_alive, __pyx_k_is_alive, sizeof(__pyx_k_is_alive), 0, 0, 1, 1},
  {&__pyx_kp_u_is_not_callable, __pyx_k_is_not_callable, sizeof(__pyx_k_is_not_callable), 0, 1, 0, 0},
  {&__pyx_kp_u_is_not_supported, __pyx_k_is_not_supported, sizeof(__pyx_k_is_not_supported), 0, 1, 0, 0},
  {&__pyx_n_u_is_stateful, __pyx_k_is_stateful, sizeof(__pyx_k_is_stateful), 0, 1, 0, 1},
  {&__pyx_n_s_is_valid, __pyx_k_is_valid, sizeof(__pyx_k_is_valid), 0, 0, 1, 1},
  {&__pyx_n_s_isdigit, __pyx_k_isdigit, sizeof(__pyx_k_isdigit), 0, 0, 1, 1},
  {&__pyx_n_s_isfile, __pyx_k_isfile, sizeof(__pyx_k_isfile), 0, 0, 1, 1},
  {&__pyx_n_u_isoLanguage, __pyx_k_isoLanguage, sizeof(__pyx_k_isoLanguage), 0, 1, 0, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_n_s_iteritems, __pyx_k_iteritems, sizeof(__pyx_k_iteritems), 0, 0, 1, 1},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_u_kernelRel, __pyx_k_kernelRel, sizeof(__pyx_k_kernelRel), 0, 1, 0, 1},
  {&__pyx_n_u_kernel_trace, __pyx_k_kernel_trace, sizeof(__pyx_k_kernel_trace), 0, 1, 0, 1},
  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
  {&__pyx_n_s_lang_iso, __pyx_k_lang_iso, sizeof(__pyx_k_lang_iso), 0, 0, 1, 1},
  {&__pyx_n_s_lang_sap, __pyx_k_lang_sap, sizeof(__pyx_k_lang_sap), 0, 0, 1, 1},
  {&__pyx_n_u_language, __pyx_k_language, sizeof(__pyx_k_language), 0, 1, 0, 1},
  {&__pyx_n_s_language_iso_to_sap, __pyx_k_language_iso_to_sap, sizeof(__pyx_k_language_iso_to_sap), 0, 0, 1, 1},
  {&__pyx_n_s_language_sap_to_iso, __pyx_k_language_sap_to_iso, sizeof(__pyx_k_language_sap_to_iso), 0, 0, 1, 1},
  {&__pyx_kp_u_launched, __pyx_k_launched, sizeof(__pyx_k_launched), 0, 1, 0, 0},
  {&__pyx_kp_u_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 1, 0, 0},
  {&__pyx_kp_u_list_required_for_table_paramete, __pyx_k_list_required_for_table_paramete, sizeof(__pyx_k_list_required_for_table_paramete), 0, 1, 0, 0},
  {&__pyx_n_s_locale, __pyx_k_locale, sizeof(__pyx_k_locale), 0, 0, 1, 1},
  {&__pyx_n_s_localeconv, __pyx_k_localeconv, sizeof(__pyx_k_localeconv), 0, 0, 1, 1},
  {&__pyx_n_u_lock, __pyx_k_lock, sizeof(__pyx_k_lock), 0, 1, 0, 1},
  {&__pyx_n_s_log_message, __pyx_k_log_message, sizeof(__pyx_k_log_message), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_major, __pyx_k_major, sizeof(__pyx_k_major), 0, 0, 1, 1},
  {&__pyx_n_u_major, __pyx_k_major, sizeof(__pyx_k_major), 0, 1, 0, 1},
  {&__pyx_n_s_message, __pyx_k_message, sizeof(__pyx_k_message), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_u_metadataLookup, __pyx_k_metadataLookup, sizeof(__pyx_k_metadataLookup), 0, 1, 0, 1},
  {&__pyx_n_s_minor, __pyx_k_minor, sizeof(__pyx_k_minor), 0, 0, 1, 1},
  {&__pyx_n_u_minor, __pyx_k_minor, sizeof(__pyx_k_minor), 0, 1, 0, 1},
  {&__pyx_n_s_minute, __pyx_k_minute, sizeof(__pyx_k_minute), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_month, __pyx_k_month, sizeof(__pyx_k_month), 0, 0, 1, 1},
  {&__pyx_n_s_msg_class, __pyx_k_msg_class, sizeof(__pyx_k_msg_class), 0, 0, 1, 1},
  {&__pyx_n_s_msg_number, __pyx_k_msg_number, sizeof(__pyx_k_msg_number), 0, 0, 1, 1},
  {&__pyx_n_s_msg_type, __pyx_k_msg_type, sizeof(__pyx_k_msg_type), 0, 0, 1, 1},
  {&__pyx_n_s_msg_v1, __pyx_k_msg_v1, sizeof(__pyx_k_msg_v1), 0, 0, 1, 1},
  {&__pyx_n_s_msg_v2, __pyx_k_msg_v2, sizeof(__pyx_k_msg_v2), 0, 0, 1, 1},
  {&__pyx_n_s_msg_v3, __pyx_k_msg_v3, sizeof(__pyx_k_msg_v3), 0, 0, 1, 1},
  {&__pyx_n_s_msg_v4, __pyx_k_msg_v4, sizeof(__pyx_k_msg_v4), 0, 0, 1, 1},
  {&__pyx_kp_u_multi_count, __pyx_k_multi_count, sizeof(__pyx_k_multi_count), 0, 1, 0, 0},
  {&__pyx_kp_u_must_be_in, __pyx_k_must_be_in, sizeof(__pyx_k_must_be_in), 0, 1, 0, 0},
  {&__pyx_kp_u_must_be_in_2, __pyx_k_must_be_in_2, sizeof(__pyx_k_must_be_in_2), 0, 1, 0, 0},
  {&__pyx_kp_u_must_be_of_type_integer, __pyx_k_must_be_of_type_integer, sizeof(__pyx_k_must_be_of_type_integer), 0, 1, 0, 0},
  {&__pyx_kp_u_must_not_exceed_30_chars, __pyx_k_must_not_exceed_30_chars, sizeof(__pyx_k_must_not_exceed_30_chars), 0, 1, 0, 0},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_u_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 1, 0, 1},
  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
  {&__pyx_n_u_no_commit_check, __pyx_k_no_commit_check, sizeof(__pyx_k_no_commit_check), 0, 1, 0, 1},
  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
  {&__pyx_n_s_not_found, __pyx_k_not_found, sizeof(__pyx_k_not_found), 0, 0, 1, 1},
  {&__pyx_n_u_not_requested, __pyx_k_not_requested, sizeof(__pyx_k_not_requested), 0, 1, 0, 1},
  {&__pyx_n_s_nuc_length, __pyx_k_nuc_length, sizeof(__pyx_k_nuc_length), 0, 0, 1, 1},
  {&__pyx_n_u_nuc_length, __pyx_k_nuc_length, sizeof(__pyx_k_nuc_length), 0, 1, 0, 1},
  {&__pyx_n_s_nuc_offset, __pyx_k_nuc_offset, sizeof(__pyx_k_nuc_offset), 0, 0, 1, 1},
  {&__pyx_n_u_nuc_offset, __pyx_k_nuc_offset, sizeof(__pyx_k_nuc_offset), 0, 1, 0, 1},
  {&__pyx_n_u_numberOfCalls, __pyx_k_numberOfCalls, sizeof(__pyx_k_numberOfCalls), 0, 1, 0, 1},
  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
  {&__pyx_kp_u_of_type, __pyx_k_of_type, sizeof(__pyx_k_of_type), 0, 1, 0, 0},
  {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
  {&__pyx_n_s_optional, __pyx_k_optional, sizeof(__pyx_k_optional), 0, 0, 1, 1},
  {&__pyx_n_u_optional, __pyx_k_optional, sizeof(__pyx_k_optional), 0, 1, 0, 1},
  {&__pyx_n_s_options, __pyx_k_options, sizeof(__pyx_k_options), 0, 0, 1, 1},
  {&__pyx_n_s_origin, __pyx_k_origin, sizeof(__pyx_k_origin), 0, 0, 1, 1},
  {&__pyx_n_s_os_path, __pyx_k_os_path, sizeof(__pyx_k_os_path), 0, 0, 1, 1},
  {&__pyx_n_s_parameter_text, __pyx_k_parameter_text, sizeof(__pyx_k_parameter_text), 0, 0, 1, 1},
  {&__pyx_n_u_parameter_text, __pyx_k_parameter_text, sizeof(__pyx_k_parameter_text), 0, 1, 0, 1},
  {&__pyx_kp_u_parameter_text_string_parameter, __pyx_k_parameter_text_string_parameter, sizeof(__pyx_k_parameter_text_string_parameter), 0, 1, 0, 0},
  {&__pyx_n_s_parameter_type, __pyx_k_parameter_type, sizeof(__pyx_k_parameter_type), 0, 0, 1, 1},
  {&__pyx_n_u_parameter_type, __pyx_k_parameter_type, sizeof(__pyx_k_parameter_type), 0, 1, 0, 1},
  {&__pyx_kp_u_parameter_type_string, __pyx_k_parameter_type_string, sizeof(__pyx_k_parameter_type_string), 0, 1, 0, 0},
  {&__pyx_n_s_parameters, __pyx_k_parameters, sizeof(__pyx_k_parameters), 0, 0, 1, 1},
  {&__pyx_kp_u_params, __pyx_k_params, sizeof(__pyx_k_params), 0, 1, 0, 0},
  {&__pyx_n_u_partnerBytesPerChar, __pyx_k_partnerBytesPerChar, sizeof(__pyx_k_partnerBytesPerChar), 0, 1, 0, 1},
  {&__pyx_n_u_partnerCodepage, __pyx_k_partnerCodepage, sizeof(__pyx_k_partnerCodepage), 0, 1, 0, 1},
  {&__pyx_n_u_partnerHost, __pyx_k_partnerHost, sizeof(__pyx_k_partnerHost), 0, 1, 0, 1},
  {&__pyx_n_u_partnerIP, __pyx_k_partnerIP, sizeof(__pyx_k_partnerIP), 0, 1, 0, 1},
  {&__pyx_n_u_partnerIPv6, __pyx_k_partnerIPv6, sizeof(__pyx_k_partnerIPv6), 0, 1, 0, 1},
  {&__pyx_n_u_partnerRel, __pyx_k_partnerRel, sizeof(__pyx_k_partnerRel), 0, 1, 0, 1},
  {&__pyx_n_u_partnerSystemCodepage, __pyx_k_partnerSystemCodepage, sizeof(__pyx_k_partnerSystemCodepage), 0, 1, 0, 1},
  {&__pyx_n_u_partnerType, __pyx_k_partnerType, sizeof(__pyx_k_partnerType), 0, 1, 0, 1},
  {&__pyx_n_u_patchLevel, __pyx_k_patchLevel, sizeof(__pyx_k_patchLevel), 0, 1, 0, 1},
  {&__pyx_n_s_patchlevel, __pyx_k_patchlevel, sizeof(__pyx_k_patchlevel), 0, 0, 1, 1},
  {&__pyx_n_s_pathName, __pyx_k_pathName, sizeof(__pyx_k_pathName), 0, 0, 1, 1},
  {&__pyx_n_s_path_name, __pyx_k_path_name, sizeof(__pyx_k_path_name), 0, 0, 1, 1},
  {&__pyx_n_u_peakBusyCount, __pyx_k_peakBusyCount, sizeof(__pyx_k_peakBusyCount), 0, 1, 0, 1},
  {&__pyx_n_s_platform, __pyx_k_platform, sizeof(__pyx_k_platform), 0, 0, 1, 1},
  {&__pyx_n_u_platform, __pyx_k_platform, sizeof(__pyx_k_platform), 0, 1, 0, 1},
  {&__pyx_n_u_port, __pyx_k_port, sizeof(__pyx_k_port), 0, 1, 0, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
  {&__pyx_n_u_progName, __pyx_k_progName, sizeof(__pyx_k_progName), 0, 1, 0, 1},
  {&__pyx_n_u_program, __pyx_k_program, sizeof(__pyx_k_program), 0, 1, 0, 1},
  {&__pyx_n_u_protocolType, __pyx_k_protocolType, sizeof(__pyx_k_protocolType), 0, 1, 0, 1},
  {&__pyx_n_s_pyrfc__cyrfc, __pyx_k_pyrfc__cyrfc, sizeof(__pyx_k_pyrfc__cyrfc), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {&__pyx_n_s_queue_name, __pyx_k_queue_name, sizeof(__pyx_k_queue_name), 0, 0, 1, 1},
  {&__pyx_n_s_queue_names, __pyx_k_queue_names, sizeof(__pyx_k_queue_names), 0, 0, 1, 1},
  {&__pyx_n_s_queued, __pyx_k_queued, sizeof(__pyx_k_queued), 0, 0, 1, 1},
  {&__pyx_n_u_queued, __pyx_k_queued, sizeof(__pyx_k_queued), 0, 1, 0, 1},
  {&__pyx_kp_u_raises_ABAPApplicationError, __pyx_k_raises_ABAPApplicationError, sizeof(__pyx_k_raises_ABAPApplicationError), 0, 1, 0, 0},
  {&__pyx_kp_u_raises_ABAPRuntimeError, __pyx_k_raises_ABAPRuntimeError, sizeof(__pyx_k_raises_ABAPRuntimeError), 0, 1, 0, 0},
  {&__pyx_kp_u_raises_ExternalRuntimeError, __pyx_k_raises_ExternalRuntimeError, sizeof(__pyx_k_raises_ExternalRuntimeError), 0, 1, 0, 0},
  {&__pyx_kp_u_raises_an_invalid_exception_Exc, __pyx_k_raises_an_invalid_exception_Exc, sizeof(__pyx_k_raises_an_invalid_exception_Exc), 0, 1, 0, 0},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_rc, __pyx_k_rc, sizeof(__pyx_k_rc), 0, 0, 1, 1},
  {&__pyx_n_u_receivedBytes, __pyx_k_receivedBytes, sizeof(__pyx_k_receivedBytes), 0, 1, 0, 1},
  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  {&__pyx_n_u_registrationCount, __pyx_k_registrationCount, sizeof(__pyx_k_registrationCount), 0, 1, 0, 1},
  {&__pyx_n_s_registry, __pyx_k_registry, sizeof(__pyx_k_registry), 0, 0, 1, 1},
  {&__pyx_n_u_rel, __pyx_k_rel, sizeof(__pyx_k_rel), 0, 1, 0, 1},
  {&__pyx_n_s_reload_ini_file, __pyx_k_reload_ini_file, sizeof(__pyx_k_reload_ini_file), 0, 0, 1, 1},
  {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
  {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1},
  {&__pyx_n_s_request_context, __pyx_k_request_context, sizeof(__pyx_k_request_context), 0, 0, 1, 1},
  {&__pyx_kp_u_request_context_2, __pyx_k_request_context_2, sizeof(__pyx_k_request_context_2), 0, 1, 0, 0},
  {&__pyx_n_u_reserved, __pyx_k_reserved, sizeof(__pyx_k_reserved), 0, 1, 0, 1},
  {&__pyx_n_u_return_import_params, __pyx_k_return_import_params, sizeof(__pyx_k_return_import_params), 0, 1, 0, 1},
  {&__pyx_n_u_rfcRole, __pyx_k_rfcRole, sizeof(__pyx_k_rfcRole), 0, 1, 0, 1},
  {&__pyx_n_u_rollback, __pyx_k_rollback, sizeof(__pyx_k_rollback), 0, 1, 0, 1},
  {&__pyx_n_s_rolled_back, __pyx_k_rolled_back, sizeof(__pyx_k_rolled_back), 0, 0, 1, 1},
  {&__pyx_n_s_rsplit, __pyx_k_rsplit, sizeof(__pyx_k_rsplit), 0, 0, 1, 1},
  {&__pyx_n_s_rstrip, __pyx_k_rstrip, sizeof(__pyx_k_rstrip), 0, 0, 1, 1},
  {&__pyx_n_u_rstrip, __pyx_k_rstrip, sizeof(__pyx_k_rstrip), 0, 1, 0, 1},
  {&__pyx_kp_u_sapnwrfc_ini, __pyx_k_sapnwrfc_ini, sizeof(__pyx_k_sapnwrfc_ini), 0, 1, 0, 0},
  {&__pyx_kp_u_sapnwrfc_ini_not_found_in, __pyx_k_sapnwrfc_ini_not_found_in, sizeof(__pyx_k_sapnwrfc_ini_not_found_in), 0, 1, 0, 0},
  {&__pyx_kp_u_sapnwrfc_ini_path_is_not_a_strin, __pyx_k_sapnwrfc_ini_path_is_not_a_strin, sizeof(__pyx_k_sapnwrfc_ini_path_is_not_a_strin), 0, 1, 0, 0},
  {&__pyx_n_u_sat_trace, __pyx_k_sat_trace, sizeof(__pyx_k_sat_trace), 0, 1, 0, 1},
  {&__pyx_n_s_second, __pyx_k_second, sizeof(__pyx_k_second), 0, 0, 1, 1},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_kp_s_self__handle_cannot_be_converted, __pyx_k_self__handle_cannot_be_converted, sizeof(__pyx_k_self__handle_cannot_be_converted), 0, 0, 1, 0},
  {&__pyx_kp_s_self__handle_self__tHandle_self, __pyx_k_self__handle_self__tHandle_self, sizeof(__pyx_k_self__handle_self__tHandle_self), 0, 0, 1, 0},
  {&__pyx_kp_s_self__throughput_handle_cannot_b, __pyx_k_self__throughput_handle_cannot_b, sizeof(__pyx_k_self__throughput_handle_cannot_b), 0, 0, 1, 0},
  {&__pyx_n_u_sending_date, __pyx_k_sending_date, sizeof(__pyx_k_sending_date), 0, 1, 0, 1},
  {&__pyx_n_u_sending_time, __pyx_k_sending_time, sizeof(__pyx_k_sending_time), 0, 1, 0, 1},
  {&__pyx_n_u_sentBytes, __pyx_k_sentBytes, sizeof(__pyx_k_sentBytes), 0, 1, 0, 1},
  {&__pyx_n_u_serializationTime, __pyx_k_serializationTime, sizeof(__pyx_k_serializationTime), 0, 1, 0, 1},
  {&__pyx_n_s_serve, __pyx_k_serve, sizeof(__pyx_k_serve), 0, 0, 1, 1},
  {&__pyx_n_u_server, __pyx_k_server, sizeof(__pyx_k_server), 0, 1, 0, 1},
  {&__pyx_n_u_serverName, __pyx_k_serverName, sizeof(__pyx_k_serverName), 0, 1, 0, 1},
  {&__pyx_n_s_server_context, __pyx_k_server_context, sizeof(__pyx_k_server_context), 0, 0, 1, 1},
  {&__pyx_n_u_server_context, __pyx_k_server_context, sizeof(__pyx_k_server_context), 0, 1, 0, 1},
  {&__pyx_n_s_server_functions, __pyx_k_server_functions, sizeof(__pyx_k_server_functions), 0, 0, 1, 1},
  {&__pyx_n_s_server_log, __pyx_k_server_log, sizeof(__pyx_k_server_log), 0, 0, 1, 1},
  {&__pyx_n_u_server_log_2, __pyx_k_server_log_2, sizeof(__pyx_k_server_log_2), 0, 1, 0, 1},
  {&__pyx_n_s_server_params, __pyx_k_server_params, sizeof(__pyx_k_server_params), 0, 0, 1, 1},
  {&__pyx_n_s_setOnConnection, __pyx_k_setOnConnection, sizeof(__pyx_k_setOnConnection), 0, 0, 1, 1},
  {&__pyx_n_s_set_cryptolib_path, __pyx_k_set_cryptolib_path, sizeof(__pyx_k_set_cryptolib_path), 0, 0, 1, 1},
  {&__pyx_n_s_set_ini_file_directory, __pyx_k_set_ini_file_directory, sizeof(__pyx_k_set_ini_file_directory), 0, 0, 1, 1},
  {&__pyx_n_s_set_locale_radix, __pyx_k_set_locale_radix, sizeof(__pyx_k_set_locale_radix), 0, 0, 1, 1},
  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {&__pyx_kp_u_should_be_from_1_30_chars, __pyx_k_should_be_from_1_30_chars, sizeof(__pyx_k_should_be_from_1_30_chars), 0, 1, 0, 0},
  {&__pyx_kp_u_should_be_from_1_30_chars_2, __pyx_k_should_be_from_1_30_chars_2, sizeof(__pyx_k_should_be_from_1_30_chars_2), 0, 1, 0, 0},
  {&__pyx_n_s_socket, __pyx_k_socket, sizeof(__pyx_k_socket), 0, 0, 1, 1},
  {&__pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_k_src_pyrfc__cyrfc_pyx, sizeof(__pyx_k_src_pyrfc__cyrfc_pyx), 0, 0, 1, 0},
  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
  {&__pyx_n_u_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 1, 0, 1},
  {&__pyx_n_s_staticmethod, __pyx_k_staticmethod, sizeof(__pyx_k_staticmethod), 0, 0, 1, 1},
  {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {&__pyx_n_s_strptime, __pyx_k_strptime, sizeof(__pyx_k_strptime), 0, 0, 1, 1},
  {&__pyx_n_s_synchronous, __pyx_k_synchronous, sizeof(__pyx_k_synchronous), 0, 0, 1, 1},
  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
  {&__pyx_n_s_sysId, __pyx_k_sysId, sizeof(__pyx_k_sysId), 0, 0, 1, 1},
  {&__pyx_n_u_sysId, __pyx_k_sysId, sizeof(__pyx_k_sysId), 0, 1, 0, 1},
  {&__pyx_n_u_sysNumber, __pyx_k_sysNumber, sizeof(__pyx_k_sysNumber), 0, 1, 0, 1},
  {&__pyx_n_s_sysid, __pyx_k_sysid, sizeof(__pyx_k_sysid), 0, 0, 1, 1},
  {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
  {&__pyx_n_u_t_code, __pyx_k_t_code, sizeof(__pyx_k_t_code), 0, 1, 0, 1},
  {&__pyx_n_s_target, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_threading, __pyx_k_threading, sizeof(__pyx_k_threading), 0, 0, 1, 1},
  {&__pyx_n_s_throughput, __pyx_k_throughput, sizeof(__pyx_k_throughput), 0, 0, 1, 1},
  {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
  {&__pyx_kp_u_time_value_required_received, __pyx_k_time_value_required_received, sizeof(__pyx_k_time_value_required_received), 0, 1, 0, 0},
  {&__pyx_n_u_timeout, __pyx_k_timeout, sizeof(__pyx_k_timeout), 0, 1, 0, 1},
  {&__pyx_n_u_totalTime, __pyx_k_totalTime, sizeof(__pyx_k_totalTime), 0, 1, 0, 1},
  {&__pyx_n_u_trace, __pyx_k_trace, sizeof(__pyx_k_trace), 0, 1, 0, 1},
  {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_transaction_id, __pyx_k_transaction_id, sizeof(__pyx_k_transaction_id), 0, 0, 1, 1},
  {&__pyx_n_s_transactional, __pyx_k_transactional, sizeof(__pyx_k_transactional), 0, 0, 1, 1},
  {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
  {&__pyx_n_u_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 1, 0, 1},
  {&__pyx_n_s_type_description, __pyx_k_type_description, sizeof(__pyx_k_type_description), 0, 0, 1, 1},
  {&__pyx_n_u_type_description, __pyx_k_type_description, sizeof(__pyx_k_type_description), 0, 1, 0, 1},
  {&__pyx_n_s_type_name, __pyx_k_type_name, sizeof(__pyx_k_type_name), 0, 0, 1, 1},
  {&__pyx_n_s_uc_length, __pyx_k_uc_length, sizeof(__pyx_k_uc_length), 0, 0, 1, 1},
  {&__pyx_n_u_uc_length, __pyx_k_uc_length, sizeof(__pyx_k_uc_length), 0, 1, 0, 1},
  {&__pyx_n_s_uc_offset, __pyx_k_uc_offset, sizeof(__pyx_k_uc_offset), 0, 0, 1, 1},
  {&__pyx_n_u_uc_offset, __pyx_k_uc_offset, sizeof(__pyx_k_uc_offset), 0, 1, 0, 1},
  {&__pyx_n_s_uclang_iso, __pyx_k_uclang_iso, sizeof(__pyx_k_uclang_iso), 0, 0, 1, 1},
  {&__pyx_n_s_uclang_sap, __pyx_k_uclang_sap, sizeof(__pyx_k_uclang_sap), 0, 0, 1, 1},
  {&__pyx_n_s_unit, __pyx_k_unit, sizeof(__pyx_k_unit), 0, 0, 1, 1},
  {&__pyx_n_u_unit_attributes, __pyx_k_unit_attributes, sizeof(__pyx_k_unit_attributes), 0, 1, 0, 1},
  {&__pyx_n_u_unit_history, __pyx_k_unit_history, sizeof(__pyx_k_unit_history), 0, 1, 0, 1},
  {&__pyx_n_s_unit_id, __pyx_k_unit_id, sizeof(__pyx_k_unit_id), 0, 0, 1, 1},
  {&__pyx_n_u_unit_identifier, __pyx_k_unit_identifier, sizeof(__pyx_k_unit_identifier), 0, 1, 0, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_n_s_upper, __pyx_k_upper, sizeof(__pyx_k_upper), 0, 0, 1, 1},
  {&__pyx_n_u_user, __pyx_k_user, sizeof(__pyx_k_user), 0, 1, 0, 1},
  {&__pyx_n_s_utcnow, __pyx_k_utcnow, sizeof(__pyx_k_utcnow), 0, 0, 1, 1},
  {&__pyx_n_s_utils, __pyx_k_utils, sizeof(__pyx_k_utils), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_kp_u_when_filling, __pyx_k_when_filling, sizeof(__pyx_k_when_filling), 0, 1, 0, 0},
  {&__pyx_kp_u_when_getting_server_context_for, __pyx_k_when_getting_server_context_for, sizeof(__pyx_k_when_getting_server_context_for), 0, 1, 0, 0},
  {&__pyx_kp_u_when_wrapping, __pyx_k_when_wrapping, sizeof(__pyx_k_when_wrapping), 0, 1, 0, 0},
  {&__pyx_kp_u_with, __pyx_k_with, sizeof(__pyx_k_with), 0, 1, 0, 0},
  {&__pyx_n_s_wrap, __pyx_k_wrap, sizeof(__pyx_k_wrap), 0, 0, 1, 1},
  {&__pyx_kp_u_wrapString_uclen_u_utf8_size_u, __pyx_k_wrapString_uclen_u_utf8_size_u, sizeof(__pyx_k_wrapString_uclen_u_utf8_size_u), 0, 1, 0, 0},
  {&__pyx_n_s_year, __pyx_k_year, sizeof(__pyx_k_year), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 312, __pyx_L1_error)
  __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 2231, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 132, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 301, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 1145, __pyx_L1_error)
  __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 1243, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "pyrfc/_cyrfc.pyx":460
 *             raise TypeError(f"'default_value' (string) '{default_value}' must not exceed 30 chars.")
 *         if len(parameter_text)>79:
 *             raise TypeError("'parameter_text' (string) '{parameter_text}' must not exceed 79 chars.")             # <<<<<<<<<<<<<<
 *         self.parameters.append({
 *             'name': name,
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_parameter_text_string_parameter); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "pyrfc/_cyrfc.pyx":599
 *                 raise RFCError(f"Connection configuration option '{k}' is not supported")
 *         self.__config = {}
 *         self.__config['dtime'] = config.get('dtime', False)             # <<<<<<<<<<<<<<
 *         self.__config['return_import_params'] = config.get('return_import_params', False)
 *         self.__config['rstrip'] = config.get('rstrip', True)
 */
  __pyx_tuple__8 = PyTuple_Pack(2, __pyx_n_u_dtime, Py_False); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "pyrfc/_cyrfc.pyx":600
 *         self.__config = {}
 *         self.__config['dtime'] = config.get('dtime', False)
 *         self.__config['return_import_params'] = config.get('return_import_params', False)             # <<<<<<<<<<<<<<
 *         self.__config['rstrip'] = config.get('rstrip', True)
 *         self.__config['timeout'] = config.get('timeout', None)
 */
  __pyx_tuple__9 = PyTuple_Pack(2, __pyx_n_u_return_import_params, Py_False); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "pyrfc/_cyrfc.pyx":601
 *         self.__config['dtime'] = config.get('dtime', False)
 *         self.__config['return_import_params'] = config.get('return_import_params', False)
 *         self.__config['rstrip'] = config.get('rstrip', True)             # <<<<<<<<<<<<<<
 *         self.__config['timeout'] = config.get('timeout', None)
 * 
 */
  __pyx_tuple__10 = PyTuple_Pack(2, __pyx_n_u_rstrip, Py_True); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "pyrfc/_cyrfc.pyx":602
 *         self.__config['return_import_params'] = config.get('return_import_params', False)
 *         self.__config['rstrip'] = config.get('rstrip', True)
 *         self.__config['timeout'] = config.get('timeout', None)             # <<<<<<<<<<<<<<
 * 
 *         # set internal configuration
 */
  __pyx_tuple__11 = PyTuple_Pack(2, __pyx_n_u_timeout, Py_None); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "pyrfc/_cyrfc.pyx":1190
 *             if 'user' in attributes and attributes['user'] is not None:
 *                 # (SAP_UC[12+1]) Sender User (optional). Default is current operating system User.
 *                 sapuc = fillString(attributes['user'][0:12])             # <<<<<<<<<<<<<<
 *                 strncpyU(unitAttr.user, sapuc, len(attributes['user'][0:12]) + 1)
 *                 free(sapuc)
 */
  __pyx_slice__12 = PySlice_New(__pyx_int_0, __pyx_int_12, Py_None); if (unlikely(!__pyx_slice__12)) __PYX_ERR(0, 1190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__12);
  __Pyx_GIVEREF(__pyx_slice__12);

  /* "pyrfc/_cyrfc.pyx":1195
 *             if 'client' in attributes:
 *                 # (SAP_UC[3+1]) Sender Client ("Mandant") (optional). Default is "000".
 *                 sapuc = fillString(attributes['client'][0:3])             # <<<<<<<<<<<<<<
 *                 strncpyU(unitAttr.client, sapuc, len(attributes['client'][0:3]) + 1)
 *                 free(sapuc)
 */
  __pyx_slice__13 = PySlice_New(__pyx_int_0, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__13)) __PYX_ERR(0, 1195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__13);
  __Pyx_GIVEREF(__pyx_slice__13);

  /* "pyrfc/_cyrfc.pyx":1200
 *             if 't_code' in attributes:
 *                 # (SAP_UC[20+1]) Sender Transaction Code (optional). Default is "".
 *                 sapuc = fillString(attributes['t_code'][0:20])             # <<<<<<<<<<<<<<
 *                 strncpyU(unitAttr.tCode, sapuc, len(attributes['t_code'][0:20]) + 1)
 *                 free(sapuc)
 */
  __pyx_slice__14 = PySlice_New(__pyx_int_0, __pyx_int_20, Py_None); if (unlikely(!__pyx_slice__14)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__14);
  __Pyx_GIVEREF(__pyx_slice__14);

  /* "pyrfc/_cyrfc.pyx":1205
 *             if 'program' in attributes and attributes['program'] is not None:
 *                 # (SAP_UC[40+1]) Sender Program (optional). Default is current executable name.
 *                 sapuc = fillString(attributes['program'][0:40])             # <<<<<<<<<<<<<<
 *                 strncpyU(unitAttr.program, sapuc, len(attributes['program'][0:40]) + 1)
 *                 free(sapuc)
 */
  __pyx_slice__15 = PySlice_New(__pyx_int_0, __pyx_int_40, Py_None); if (unlikely(!__pyx_slice__15)) __PYX_ERR(0, 1205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__15);
  __Pyx_GIVEREF(__pyx_slice__15);

  /* "pyrfc/_cyrfc.pyx":1243
 *                     RfcDestroyFunction(funcCont, NULL)
 *             # execute
 *             print (" Invocation finished. submitting unit.")             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 rc = RfcSubmitUnit(self._uHandle, &errorInfo)
 */
  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_u_Invocation_finished_submitting); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "pyrfc/_cyrfc.pyx":1388
 * 
 *         if type(unit) is not dict or 'id' not in unit or 'background' not in unit:
 *             raise TypeError("Parameter 'unit' not valid. Please use initialize_unit() to retrieve a valid unit.")             # <<<<<<<<<<<<<<
 *         if not isinstance(calls, Iterable):
 *             raise TypeError("Parameter 'calls' must be iterable.")
 */
  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_u_Parameter_unit_not_valid_Please); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "pyrfc/_cyrfc.pyx":1390
 *             raise TypeError("Parameter 'unit' not valid. Please use initialize_unit() to retrieve a valid unit.")
 *         if not isinstance(calls, Iterable):
 *             raise TypeError("Parameter 'calls' must be iterable.")             # <<<<<<<<<<<<<<
 *         if len(calls)==0:
 *             raise TypeError("Parameter 'calls' must contain at least on call description (func_name, params).")
 */
  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_u_Parameter_calls_must_be_iterable); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 1390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "pyrfc/_cyrfc.pyx":1392
 *             raise TypeError("Parameter 'calls' must be iterable.")
 *         if len(calls)==0:
 *             raise TypeError("Parameter 'calls' must contain at least on call description (func_name, params).")             # <<<<<<<<<<<<<<
 *         for func_name, params in calls:
 *             if type(func_name) is not str or type(params) is not dict:
 */
  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_u_Parameter_calls_must_contain_at); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 1392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "pyrfc/_cyrfc.pyx":1395
 *         for func_name, params in calls:
 *             if type(func_name) is not str or type(params) is not dict:
 *                 raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).")             # <<<<<<<<<<<<<<
 *         if self.active_unit:
 *             raise RFCError("There is an active unit for this connection. "
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_u_Parameter_calls_must_contain_val); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 1395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self._handle,self._tHandle,self._uHandle cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._handle,self._tHandle,self._uHandle cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_self__handle_self__tHandle_self); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "(tree fragment)":4
 *     raise TypeError("self._handle,self._tHandle,self._uHandle cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._handle,self._tHandle,self._uHandle cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_self__handle_self__tHandle_self); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self._handle cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._handle cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_self__handle_cannot_be_converted); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "(tree fragment)":4
 *     raise TypeError("self._handle cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._handle cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_self__handle_cannot_be_converted); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "pyrfc/_cyrfc.pyx":1705
 *         return RFC_ABAP_EXCEPTION
 *     except Exception as ex:
 *         exctype, value = exc_info()[:2]             # <<<<<<<<<<<<<<
 *         _server_log(
 *             "genericHandler",
 */
  __pyx_slice__30 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__30)) __PYX_ERR(0, 1705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__30);
  __Pyx_GIVEREF(__pyx_slice__30);

  /* "pyrfc/_cyrfc.pyx":1772
 *         # config parsing
 *         config = config or {}
 *         self.debug = config.get('debug', False)             # <<<<<<<<<<<<<<
 *         self.rstrip = config.get('rstrip', True)
 *         server_context["server_log"] = config.get("server_log", False)
 */
  __pyx_tuple__31 = PyTuple_Pack(2, __pyx_n_u_debug, Py_False); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 1772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "pyrfc/_cyrfc.pyx":1774
 *         self.debug = config.get('debug', False)
 *         self.rstrip = config.get('rstrip', True)
 *         server_context["server_log"] = config.get("server_log", False)             # <<<<<<<<<<<<<<
 *         server_context["auth_check"] = config.get("auth_check", default_auth_check)
 *         server_context["port"] = config.get("port", 8080)
 */
  __pyx_tuple__32 = PyTuple_Pack(2, __pyx_n_u_server_log_2, Py_False); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 1774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "pyrfc/_cyrfc.pyx":1776
 *         server_context["server_log"] = config.get("server_log", False)
 *         server_context["auth_check"] = config.get("auth_check", default_auth_check)
 *         server_context["port"] = config.get("port", 8080)             # <<<<<<<<<<<<<<
 * 
 *         self._client_connection = Connection(**client_params)
 */
  __pyx_tuple__33 = PyTuple_Pack(2, __pyx_n_u_port, __pyx_int_8080); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 1776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self._throughput_handle cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._throughput_handle cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s_self__throughput_handle_cannot_b); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "(tree fragment)":4
 *     raise TypeError("self._throughput_handle cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._throughput_handle cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_self__throughput_handle_cannot_b); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "pyrfc/_cyrfc.pyx":2512
 *                         else:
 *                             if len(value.rstrip()) > 0:
 *                                 date(int(value[:4]), int(value[4:6]), int(value[6:8]))             # <<<<<<<<<<<<<<
 *                             cValue = fillString(value)
 *                     except Exception as ex:
 */
  __pyx_slice__38 = PySlice_New(Py_None, __pyx_int_4, Py_None); if (unlikely(!__pyx_slice__38)) __PYX_ERR(0, 2512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__38);
  __Pyx_GIVEREF(__pyx_slice__38);
  __pyx_slice__39 = PySlice_New(__pyx_int_4, __pyx_int_6, Py_None); if (unlikely(!__pyx_slice__39)) __PYX_ERR(0, 2512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__39);
  __Pyx_GIVEREF(__pyx_slice__39);
  __pyx_slice__40 = PySlice_New(__pyx_int_6, __pyx_int_8, Py_None); if (unlikely(!__pyx_slice__40)) __PYX_ERR(0, 2512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__40);
  __Pyx_GIVEREF(__pyx_slice__40);

  /* "pyrfc/_cyrfc.pyx":2533
 *                         else:
 *                             if len(value.rstrip()) > 0:
 *                                 time(int(value[:2]), int(value[2:4]), int(value[4:6]))             # <<<<<<<<<<<<<<
 *                             cValue = fillString(value)
 *                     except Exception as ex:
 */
  __pyx_slice__41 = PySlice_New(__pyx_int_2, __pyx_int_4, Py_None); if (unlikely(!__pyx_slice__41)) __PYX_ERR(0, 2533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__41);
  __Pyx_GIVEREF(__pyx_slice__41);

  /* "pyrfc/_cyrfc.pyx":2578
 *     if exception.message:  # fixed length, exactly 512 chars
 *         # str = exception.message[0:512].ljust(512)
 *         str = exception.message[0:512]             # <<<<<<<<<<<<<<
 *         sapuc = fillString(str)
 *         strncpyU(errorInfo.message, sapuc, min(len(str)+1, 512))
 */
  __pyx_slice__42 = PySlice_New(__pyx_int_0, __pyx_int_512, Py_None); if (unlikely(!__pyx_slice__42)) __PYX_ERR(0, 2578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__42);
  __Pyx_GIVEREF(__pyx_slice__42);

  /* "pyrfc/_cyrfc.pyx":2584
 *     errorInfo.code = exception.code if exception.code else RFC_UNKNOWN_ERROR
 *     if exception.key:  # fixed length, exactly 128 chars
 *         str = exception.key[0:128]             # <<<<<<<<<<<<<<
 *         sapuc = fillString(str)
 *         strncpyU(errorInfo.key, sapuc, min(len(str)+1, 128))
 */
  __pyx_slice__43 = PySlice_New(__pyx_int_0, __pyx_int_128, Py_None); if (unlikely(!__pyx_slice__43)) __PYX_ERR(0, 2584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__43);
  __Pyx_GIVEREF(__pyx_slice__43);

  /* "pyrfc/_cyrfc.pyx":2593
 *         free(sapuc)
 *     if exception.msg_type:
 *         sapuc = fillString(exception.msg_type[0:1])             # <<<<<<<<<<<<<<
 *         strncpyU(errorInfo.abapMsgType, sapuc, len(exception.msg_type[0:1]) + 1)
 *         free(sapuc)
 */
  __pyx_slice__44 = PySlice_New(__pyx_int_0, __pyx_int_1, Py_None); if (unlikely(!__pyx_slice__44)) __PYX_ERR(0, 2593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__44);
  __Pyx_GIVEREF(__pyx_slice__44);

  /* "pyrfc/_cyrfc.pyx":2601
 *         free(sapuc)
 *     if exception.msg_v1:
 *         sapuc = fillString(exception.msg_v1[0:50])             # <<<<<<<<<<<<<<
 *         strncpyU(errorInfo.abapMsgV1, sapuc, len(exception.msg_v1[0:50]) + 1)
 *         free(sapuc)
 */
  __pyx_slice__45 = PySlice_New(__pyx_int_0, __pyx_int_50, Py_None); if (unlikely(!__pyx_slice__45)) __PYX_ERR(0, 2601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__45);
  __Pyx_GIVEREF(__pyx_slice__45);

  /* "pyrfc/_cyrfc.pyx":3021
 *             utcValue = wrapString(stringValue, resultLen)
 *             # replace the "," separator with "."
 *             return utcValue[:19]+'.'+utcValue[20:]             # <<<<<<<<<<<<<<
 *         finally:
 *             free(stringValue)
 */
  __pyx_slice__47 = PySlice_New(Py_None, __pyx_int_19, Py_None); if (unlikely(!__pyx_slice__47)) __PYX_ERR(0, 3021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__47);
  __Pyx_GIVEREF(__pyx_slice__47);
  __pyx_slice__48 = PySlice_New(__pyx_int_20, Py_None, Py_None); if (unlikely(!__pyx_slice__48)) __PYX_ERR(0, 3021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__48);
  __Pyx_GIVEREF(__pyx_slice__48);

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_object____object___to_py")
 * cdef object __Pyx_CFunc_object____object___to_py(object (*f)(object) ):
 *     def wrap(object client_connection):             # <<<<<<<<<<<<<<
 *         """wrap(client_connection)"""
 *         return f(client_connection)
 */
  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_n_s_client_connection); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);
  __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(1, 65, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":112
 * 
 * 
 * def get_nwrfclib_version():             # <<<<<<<<<<<<<<
 *     """Get SAP NW RFC Lib version
 *     :returns: tuple of major, minor and patch level and OS platform
 */
  __pyx_tuple__52 = PyTuple_Pack(3, __pyx_n_s_major, __pyx_n_s_minor, __pyx_n_s_patchlevel); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);
  __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_get_nwrfclib_version, 112, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 112, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":123
 * 
 * 
 * def set_ini_file_directory(path_name):             # <<<<<<<<<<<<<<
 *     """Sets the directory in which to search for the sapnwrfc.ini file
 * 
 */
  __pyx_tuple__54 = PyTuple_Pack(4, __pyx_n_s_path_name, __pyx_n_s_errorInfo, __pyx_n_s_pathName, __pyx_n_s_rc); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);
  __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_set_ini_file_directory, 123, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 123, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":143
 * 
 * 
 * def reload_ini_file():             # <<<<<<<<<<<<<<
 *     """Reloads the contents of the sapnwrfc.ini file into memory.
 * 
 */
  __pyx_tuple__56 = PyTuple_Pack(2, __pyx_n_s_errorInfo, __pyx_n_s_rc); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);
  __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_reload_ini_file, 143, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 143, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":162
 * 
 * 
 * def language_iso_to_sap(lang_iso):             # <<<<<<<<<<<<<<
 *     """Language code conversion of ISO code to SAP code.
 * 
 */
  __pyx_tuple__58 = PyTuple_Pack(5, __pyx_n_s_lang_iso, __pyx_n_s_uclang_iso, __pyx_n_s_uclang_sap, __pyx_n_s_errorInfo, __pyx_n_s_rc); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);
  __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_language_iso_to_sap, 162, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 162, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":183
 * 
 * 
 * def language_sap_to_iso(lang_sap):             # <<<<<<<<<<<<<<
 *     """Language code conversion of SAP code to ISO code.
 * 
 */
  __pyx_tuple__60 = PyTuple_Pack(5, __pyx_n_s_lang_sap, __pyx_n_s_uclang_sap, __pyx_n_s_uclang_iso, __pyx_n_s_errorInfo, __pyx_n_s_rc); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);
  __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_language_sap_to_iso, 183, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 183, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":204
 * 
 * 
 * def set_cryptolib_path(path_name):             # <<<<<<<<<<<<<<
 *     """Sets the absolute path to the sapcrypto library to enable TLS encryption via Websocket Rfc.
 * 
 */
  __pyx_tuple__62 = PyTuple_Pack(4, __pyx_n_s_path_name, __pyx_n_s_errorInfo, __pyx_n_s_pathName, __pyx_n_s_rc); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);
  __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_set_cryptolib_path, 204, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 204, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":228
 * 
 * 
 * def set_locale_radix(value=None):             # <<<<<<<<<<<<<<
 *     """Sets the locale radix for decimal conversions.
 * 
 */
  __pyx_tuple__64 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);
  __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_set_locale_radix, 228, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 228, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":252
 * 
 * 
 * def cancel_connection(client_connection):             # <<<<<<<<<<<<<<
 *     """Immediately cancels the RFC call which is currently being called over the given RFC connection
 *     and closes the connection. Can be used only on an RFC client connection.
 */
  __pyx_tuple__66 = PyTuple_Pack(1, __pyx_n_s_client_connection); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);
  __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_cancel_connection, 252, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 252, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":312
 * 
 * 
 * class TypeDescription(object):             # <<<<<<<<<<<<<<
 *     """ A type description
 * 
 */
  __pyx_tuple__68 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);

  /* "pyrfc/_cyrfc.pyx":337
 * 
 *     """
 *     def __init__(self, name, nuc_length, uc_length):             # <<<<<<<<<<<<<<
 *         self.fields = []
 *         if len(name)<1 or len(name)>30:
 */
  __pyx_tuple__69 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_name, __pyx_n_s_nuc_length, __pyx_n_s_uc_length, __pyx_n_s_int_field); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__69);
  __Pyx_GIVEREF(__pyx_tuple__69);
  __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_init, 337, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 337, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":348
 *         self.uc_length = uc_length
 * 
 *     def add_field(self, name, field_type, nuc_length, uc_length, nuc_offset,             # <<<<<<<<<<<<<<
 *                   uc_offset, decimals=0, type_description=None):
 *         """ Adds a field to the type description.
 */
  __pyx_tuple__71 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_name, __pyx_n_s_field_type, __pyx_n_s_nuc_length, __pyx_n_s_uc_length, __pyx_n_s_nuc_offset, __pyx_n_s_uc_offset, __pyx_n_s_decimals, __pyx_n_s_type_description, __pyx_n_s_int_field); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);
  __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(9, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_add_field, 348, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 348, __pyx_L1_error)
  __pyx_tuple__73 = PyTuple_Pack(2, ((PyObject *)__pyx_int_0), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);

  /* "pyrfc/_cyrfc.pyx":389
 *         })
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"<TypeDescription '{self.name}' with {len(self.fields)} " \
 *             f"fields (n/uclength={self.nuc_length}/{self.uc_length})>"
 */
  __pyx_tuple__74 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);
  __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_repr, 389, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 389, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":398
 * 
 * 
 * class FunctionDescription(object):             # <<<<<<<<<<<<<<
 *     """ A function description
 * 
 */
  __pyx_tuple__76 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);

  /* "pyrfc/_cyrfc.pyx":421
 * 
 *     """
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.name = name
 *         self.parameters = []
 */
  __pyx_tuple__77 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);
  __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_init, 421, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 421, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":425
 *         self.parameters = []
 * 
 *     def add_parameter(self, name, parameter_type, direction, nuc_length,             # <<<<<<<<<<<<<<
 *                       uc_length, decimals=0, default_value="", parameter_text="",
 *                       optional=False, type_description=None):
 */
  __pyx_tuple__79 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_name, __pyx_n_s_parameter_type, __pyx_n_s_direction, __pyx_n_s_nuc_length, __pyx_n_s_uc_length, __pyx_n_s_decimals, __pyx_n_s_default_value, __pyx_n_s_parameter_text, __pyx_n_s_optional, __pyx_n_s_type_description); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);
  __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(11, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_add_parameter, 425, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 425, __pyx_L1_error)
  __pyx_tuple__81 = PyTuple_Pack(5, ((PyObject *)__pyx_int_0), ((PyObject*)__pyx_kp_u__5), ((PyObject*)__pyx_kp_u__5), ((PyObject *)Py_False), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);

  /* "pyrfc/_cyrfc.pyx":474
 *         })
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"<FunctionDescription '{self.name}' with {len(self.parameters)} params>"
 * 
 */
  __pyx_tuple__82 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);
  __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_repr, 474, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 474, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":1501
 * 
 * 
 * def default_auth_check(func_name=False, request_context = None):             # <<<<<<<<<<<<<<
 *     request_context = request_context or {}
 *     _server_log(f"authorization check for '{func_name}'", request_context['server_context'])
 */
  __pyx_tuple__84 = PyTuple_Pack(2, __pyx_n_s_func_name, __pyx_n_s_request_context); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 1501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);
  __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_default_auth_check, 1501, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 1501, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":1507
 * 
 * 
 * def _server_log(origin, log_message):             # <<<<<<<<<<<<<<
 *     if server_context["server_log"]:
 *         print (f"[{datetime.utcnow()} UTC] {origin} '{log_message}'")
 */
  __pyx_tuple__86 = PyTuple_Pack(2, __pyx_n_s_origin, __pyx_n_s_log_message); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 1507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);
  __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_server_log, 1507, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 1507, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":2232
 * 
 *     @staticmethod
 *     def getFromConnection(Connection connection):             # <<<<<<<<<<<<<<
 *         """Returns the currently attached throughput object from a connection, if any.
 * 
 */
  __pyx_tuple__88 = PyTuple_Pack(4, __pyx_n_s_connection, __pyx_n_s_errorInfo, __pyx_n_s_throughput, __pyx_n_s_t); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 2232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);
  __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_getFromConnection, 2232, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 2232, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  __pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type;
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_12 = PyInt_FromLong(12); if (unlikely(!__pyx_int_12)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_17 = PyInt_FromLong(17); if (unlikely(!__pyx_int_17)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_19 = PyInt_FromLong(19); if (unlikely(!__pyx_int_19)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_20 = PyInt_FromLong(20); if (unlikely(!__pyx_int_20)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_40 = PyInt_FromLong(40); if (unlikely(!__pyx_int_40)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_45 = PyInt_FromLong(45); if (unlikely(!__pyx_int_45)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_50 = PyInt_FromLong(50); if (unlikely(!__pyx_int_50)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_64 = PyInt_FromLong(64); if (unlikely(!__pyx_int_64)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_128 = PyInt_FromLong(128); if (unlikely(!__pyx_int_128)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_512 = PyInt_FromLong(512); if (unlikely(!__pyx_int_512)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_8080 = PyInt_FromLong(8080); if (unlikely(!__pyx_int_8080)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_5pyrfc_6_cyrfc_ConnectionParameters) < 0) __PYX_ERR(0, 274, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5pyrfc_6_cyrfc_ConnectionParameters.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5pyrfc_6_cyrfc_ConnectionParameters.tp_dictoffset && __pyx_type_5pyrfc_6_cyrfc_ConnectionParameters.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5pyrfc_6_cyrfc_ConnectionParameters.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ConnectionParameters, (PyObject *)&__pyx_type_5pyrfc_6_cyrfc_ConnectionParameters) < 0) __PYX_ERR(0, 274, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5pyrfc_6_cyrfc_ConnectionParameters) < 0) __PYX_ERR(0, 274, __pyx_L1_error)
  __pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters = &__pyx_type_5pyrfc_6_cyrfc_ConnectionParameters;
  __pyx_vtabptr_5pyrfc_6_cyrfc_Connection = &__pyx_vtable_5pyrfc_6_cyrfc_Connection;
  __pyx_vtable_5pyrfc_6_cyrfc_Connection._reopen = (PyObject *(*)(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *))__pyx_f_5pyrfc_6_cyrfc_10Connection__reopen;
  __pyx_vtable_5pyrfc_6_cyrfc_Connection._open = (PyObject *(*)(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *))__pyx_f_5pyrfc_6_cyrfc_10Connection__open;
  __pyx_vtable_5pyrfc_6_cyrfc_Connection._error = (PyObject *(*)(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *, RFC_ERROR_INFO *))__pyx_f_5pyrfc_6_cyrfc_10Connection__error;
  if (PyType_Ready(&__pyx_type_5pyrfc_6_cyrfc_Connection) < 0) __PYX_ERR(0, 498, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5pyrfc_6_cyrfc_Connection.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5pyrfc_6_cyrfc_Connection.tp_dictoffset && __pyx_type_5pyrfc_6_cyrfc_Connection.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5pyrfc_6_cyrfc_Connection.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5pyrfc_6_cyrfc_Connection.tp_dict, __pyx_vtabptr_5pyrfc_6_cyrfc_Connection) < 0) __PYX_ERR(0, 498, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Connection, (PyObject *)&__pyx_type_5pyrfc_6_cyrfc_Connection) < 0) __PYX_ERR(0, 498, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5pyrfc_6_cyrfc_Connection) < 0) __PYX_ERR(0, 498, __pyx_L1_error)
  __pyx_ptype_5pyrfc_6_cyrfc_Connection = &__pyx_type_5pyrfc_6_cyrfc_Connection;
  __pyx_vtabptr_5pyrfc_6_cyrfc_ServerConnection = &__pyx_vtable_5pyrfc_6_cyrfc_ServerConnection;
  __pyx_vtable_5pyrfc_6_cyrfc_ServerConnection._open = (PyObject *(*)(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *))__pyx_f_5pyrfc_6_cyrfc_16ServerConnection__open;
  __pyx_vtable_5pyrfc_6_cyrfc_ServerConnection._close = (PyObject *(*)(struct __pyx_obj_5pyrfc_6_cyrfc_ServerConnection *))__pyx_f_5pyrfc_6_cyrfc_16ServerConnection__close;
  if (PyType_Ready(&__pyx_type_5pyrfc_6_cyrfc_ServerConnection) < 0) __PYX_ERR(0, 1512, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5pyrfc_6_cyrfc_ServerConnection.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5pyrfc_6_cyrfc_ServerConnection.tp_dictoffset && __pyx_type_5pyrfc_6_cyrfc_ServerConnection.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5pyrfc_6_cyrfc_ServerConnection.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5pyrfc_6_cyrfc_ServerConnection.tp_dict, __pyx_vtabptr_5pyrfc_6_cyrfc_ServerConnection) < 0) __PYX_ERR(0, 1512, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ServerConnection, (PyObject *)&__pyx_type_5pyrfc_6_cyrfc_ServerConnection) < 0) __PYX_ERR(0, 1512, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5pyrfc_6_cyrfc_ServerConnection) < 0) __PYX_ERR(0, 1512, __pyx_L1_error)
  __pyx_ptype_5pyrfc_6_cyrfc_ServerConnection = &__pyx_type_5pyrfc_6_cyrfc_ServerConnection;
  __pyx_vtabptr_5pyrfc_6_cyrfc_Server = &__pyx_vtable_5pyrfc_6_cyrfc_Server;
  __pyx_vtable_5pyrfc_6_cyrfc_Server.__pyx___onCheckFunction = (RFC_RC (*)(RFC_CONNECTION_HANDLE, RFC_UNIT_IDENTIFIER const *))__pyx_f_5pyrfc_6_cyrfc_6Server___onCheckFunction;
  __pyx_vtable_5pyrfc_6_cyrfc_Server.__pyx___onCommitFunction = (RFC_RC (*)(RFC_CONNECTION_HANDLE, RFC_UNIT_IDENTIFIER const *))__pyx_f_5pyrfc_6_cyrfc_6Server___onCommitFunction;
  __pyx_vtable_5pyrfc_6_cyrfc_Server.__pyx___onRollbackFunction = (RFC_RC (*)(RFC_CONNECTION_HANDLE, RFC_UNIT_IDENTIFIER const *))__pyx_f_5pyrfc_6_cyrfc_6Server___onRollbackFunction;
  __pyx_vtable_5pyrfc_6_cyrfc_Server.__pyx___onConfirmFunction = (RFC_RC (*)(RFC_CONNECTION_HANDLE, RFC_UNIT_IDENTIFIER const *))__pyx_f_5pyrfc_6_cyrfc_6Server___onConfirmFunction;
  __pyx_vtable_5pyrfc_6_cyrfc_Server.__pyx___onGetStateFunction = (RFC_RC (*)(RFC_CONNECTION_HANDLE, RFC_UNIT_IDENTIFIER const *, RFC_UNIT_STATE *))__pyx_f_5pyrfc_6_cyrfc_6Server___onGetStateFunction;
  __pyx_vtable_5pyrfc_6_cyrfc_Server._error = (PyObject *(*)(struct __pyx_obj_5pyrfc_6_cyrfc_Server *, RFC_ERROR_INFO *))__pyx_f_5pyrfc_6_cyrfc_6Server__error;
  if (PyType_Ready(&__pyx_type_5pyrfc_6_cyrfc_Server) < 0) __PYX_ERR(0, 1723, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5pyrfc_6_cyrfc_Server.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5pyrfc_6_cyrfc_Server.tp_dictoffset && __pyx_type_5pyrfc_6_cyrfc_Server.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5pyrfc_6_cyrfc_Server.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5pyrfc_6_cyrfc_Server.tp_dict, __pyx_vtabptr_5pyrfc_6_cyrfc_Server) < 0) __PYX_ERR(0, 1723, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Server, (PyObject *)&__pyx_type_5pyrfc_6_cyrfc_Server) < 0) __PYX_ERR(0, 1723, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5pyrfc_6_cyrfc_Server) < 0) __PYX_ERR(0, 1723, __pyx_L1_error)
  __pyx_ptype_5pyrfc_6_cyrfc_Server = &__pyx_type_5pyrfc_6_cyrfc_Server;
  __pyx_vtabptr_5pyrfc_6_cyrfc_Throughput = &__pyx_vtable_5pyrfc_6_cyrfc_Throughput;
  __pyx_vtable_5pyrfc_6_cyrfc_Throughput._destroy = (PyObject *(*)(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *))__pyx_f_5pyrfc_6_cyrfc_10Throughput__destroy;
  if (PyType_Ready(&__pyx_type_5pyrfc_6_cyrfc_Throughput) < 0) __PYX_ERR(0, 2172, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5pyrfc_6_cyrfc_Throughput.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5pyrfc_6_cyrfc_Throughput.tp_dictoffset && __pyx_type_5pyrfc_6_cyrfc_Throughput.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5pyrfc_6_cyrfc_Throughput.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5pyrfc_6_cyrfc_Throughput.tp_dict, __pyx_vtabptr_5pyrfc_6_cyrfc_Throughput) < 0) __PYX_ERR(0, 2172, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Throughput, (PyObject *)&__pyx_type_5pyrfc_6_cyrfc_Throughput) < 0) __PYX_ERR(0, 2172, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5pyrfc_6_cyrfc_Throughput) < 0) __PYX_ERR(0, 2172, __pyx_L1_error)
  __pyx_ptype_5pyrfc_6_cyrfc_Throughput = &__pyx_type_5pyrfc_6_cyrfc_Throughput;
  if (PyType_Ready(&__pyx_scope_struct____Pyx_CFunc_object____object___to_py) < 0) __PYX_ERR(1, 64, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_scope_struct____Pyx_CFunc_object____object___to_py.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_scope_struct____Pyx_CFunc_object____object___to_py.tp_dictoffset && __pyx_scope_struct____Pyx_CFunc_object____object___to_py.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_scope_struct____Pyx_CFunc_object____object___to_py.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype___pyx_scope_struct____Pyx_CFunc_object____object___to_py = &__pyx_scope_struct____Pyx_CFunc_object____object___to_py;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC init_cyrfc(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC init_cyrfc(void)
#else
__Pyx_PyMODINIT_FUNC PyInit__cyrfc(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit__cyrfc(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec__cyrfc(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  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 '_cyrfc' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit__cyrfc(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  PyEval_InitThreads();
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("_cyrfc", __pyx_methods, __pyx_k_The__pyrfc_C_extension_module, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_b);
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_cython_runtime);
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_pyrfc___cyrfc) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "pyrfc._cyrfc")) {
      if (unlikely(PyDict_SetItemString(modules, "pyrfc._cyrfc", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_type_import_code();
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "pyrfc/_cyrfc.pyx":9
 * from libc.stdlib cimport malloc, free
 * from libc.stdint cimport uintptr_t
 * from collections.abc import Iterable             # <<<<<<<<<<<<<<
 * from datetime import date, time, datetime
 * from decimal import Decimal
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Iterable);
  __Pyx_GIVEREF(__pyx_n_s_Iterable);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Iterable);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections_abc, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Iterable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Iterable, __pyx_t_1) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":10
 * from libc.stdint cimport uintptr_t
 * from collections.abc import Iterable
 * from datetime import date, time, datetime             # <<<<<<<<<<<<<<
 * from decimal import Decimal
 * from enum import Enum, auto
 */
  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_date);
  __Pyx_INCREF(__pyx_n_s_time);
  __Pyx_GIVEREF(__pyx_n_s_time);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_time);
  __Pyx_INCREF(__pyx_n_s_datetime);
  __Pyx_GIVEREF(__pyx_n_s_datetime);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_datetime);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_date, __pyx_t_2) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_2) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __pyx_t_2) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":11
 * from collections.abc import Iterable
 * from datetime import date, time, datetime
 * from decimal import Decimal             # <<<<<<<<<<<<<<
 * from enum import Enum, auto
 * from locale import localeconv
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Decimal);
  __Pyx_GIVEREF(__pyx_n_s_Decimal);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Decimal);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_decimal, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Decimal, __pyx_t_1) < 0) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":12
 * from datetime import date, time, datetime
 * from decimal import Decimal
 * from enum import Enum, auto             # <<<<<<<<<<<<<<
 * from locale import localeconv
 * from os.path import isfile, join
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Enum);
  __Pyx_GIVEREF(__pyx_n_s_Enum);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Enum);
  __Pyx_INCREF(__pyx_n_s_auto);
  __Pyx_GIVEREF(__pyx_n_s_auto);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_auto);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_enum, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Enum, __pyx_t_2) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_auto); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_auto, __pyx_t_2) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":13
 * from decimal import Decimal
 * from enum import Enum, auto
 * from locale import localeconv             # <<<<<<<<<<<<<<
 * from os.path import isfile, join
 * from sys import exc_info, platform
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_localeconv);
  __Pyx_GIVEREF(__pyx_n_s_localeconv);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_localeconv);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_locale, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_localeconv); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_localeconv, __pyx_t_1) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":14
 * from enum import Enum, auto
 * from locale import localeconv
 * from os.path import isfile, join             # <<<<<<<<<<<<<<
 * from sys import exc_info, platform
 * import socket
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_isfile);
  __Pyx_GIVEREF(__pyx_n_s_isfile);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_isfile);
  __Pyx_INCREF(__pyx_n_s_join);
  __Pyx_GIVEREF(__pyx_n_s_join);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_join);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_os_path, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_isfile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_isfile, __pyx_t_2) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_join); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_join, __pyx_t_2) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":15
 * from locale import localeconv
 * from os.path import isfile, join
 * from sys import exc_info, platform             # <<<<<<<<<<<<<<
 * import socket
 * from threading import Thread, Timer
 */
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_exc_info);
  __Pyx_GIVEREF(__pyx_n_s_exc_info);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_exc_info);
  __Pyx_INCREF(__pyx_n_s_platform);
  __Pyx_GIVEREF(__pyx_n_s_platform);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_platform);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_sys, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_exc_info, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_platform); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_platform, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":16
 * from os.path import isfile, join
 * from sys import exc_info, platform
 * import socket             # <<<<<<<<<<<<<<
 * from threading import Thread, Timer
 * 
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_socket, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_socket, __pyx_t_2) < 0) __PYX_ERR(0, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":17
 * from sys import exc_info, platform
 * import socket
 * from threading import Thread, Timer             # <<<<<<<<<<<<<<
 * 
 * from . csapnwrfc cimport *
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Thread);
  __Pyx_GIVEREF(__pyx_n_s_Thread);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Thread);
  __Pyx_INCREF(__pyx_n_s_Timer);
  __Pyx_GIVEREF(__pyx_n_s_Timer);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Timer);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_threading, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Thread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Thread, __pyx_t_2) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Timer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Timer, __pyx_t_2) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":20
 * 
 * from . csapnwrfc cimport *
 * from . _exception import *             # <<<<<<<<<<<<<<
 * from . _utils import enum_names, enum_values
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s__51);
  __Pyx_GIVEREF(__pyx_n_s__51);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s__51);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_exception, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_import_star(__pyx_t_2) < 0) __PYX_ERR(0, 20, __pyx_L1_error);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":21
 * from . csapnwrfc cimport *
 * from . _exception import *
 * from . _utils import enum_names, enum_values             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_enum_names);
  __Pyx_GIVEREF(__pyx_n_s_enum_names);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_enum_names);
  __Pyx_INCREF(__pyx_n_s_enum_values);
  __Pyx_GIVEREF(__pyx_n_s_enum_values);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_enum_values);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_utils, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_enum_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_enum_names, __pyx_t_2) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_enum_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_enum_values, __pyx_t_2) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":29
 * 
 * # configuration bitmasks, internal use
 * _MASK_DTIME = 0x01             # <<<<<<<<<<<<<<
 * _MASK_RETURN_IMPORT_PARAMS = 0x02
 * _MASK_RSTRIP = 0x04
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MASK_DTIME, __pyx_int_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":30
 * # configuration bitmasks, internal use
 * _MASK_DTIME = 0x01
 * _MASK_RETURN_IMPORT_PARAMS = 0x02             # <<<<<<<<<<<<<<
 * _MASK_RSTRIP = 0x04
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MASK_RETURN_IMPORT_PARAMS, __pyx_int_2) < 0) __PYX_ERR(0, 30, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":31
 * _MASK_DTIME = 0x01
 * _MASK_RETURN_IMPORT_PARAMS = 0x02
 * _MASK_RSTRIP = 0x04             # <<<<<<<<<<<<<<
 * 
 * _LOCALE_RADIX = localeconv()["decimal_point"]
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MASK_RSTRIP, __pyx_int_4) < 0) __PYX_ERR(0, 31, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":33
 * _MASK_RSTRIP = 0x04
 * 
 * _LOCALE_RADIX = localeconv()["decimal_point"]             # <<<<<<<<<<<<<<
 * 
 * ################################################################################
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_localeconv); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_decimal_point); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOCALE_RADIX, __pyx_t_1) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":41
 * 
 * # RFC parameter direction
 * class RfcParameterDirection(Enum):             # <<<<<<<<<<<<<<
 *     RFC_IMPORT = RFC_DIRECTION.RFC_IMPORT
 *     RFC_EXPORT = RFC_DIRECTION.RFC_EXPORT
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Enum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_RfcParameterDirection, __pyx_n_s_RfcParameterDirection, (PyObject *) NULL, __pyx_n_s_pyrfc__cyrfc, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "pyrfc/_cyrfc.pyx":42
 * # RFC parameter direction
 * class RfcParameterDirection(Enum):
 *     RFC_IMPORT = RFC_DIRECTION.RFC_IMPORT             # <<<<<<<<<<<<<<
 *     RFC_EXPORT = RFC_DIRECTION.RFC_EXPORT
 *     RFC_CHANGING = RFC_DIRECTION.RFC_CHANGING
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFC_DIRECTION(RFC_IMPORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFC_IMPORT, __pyx_t_4) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":43
 * class RfcParameterDirection(Enum):
 *     RFC_IMPORT = RFC_DIRECTION.RFC_IMPORT
 *     RFC_EXPORT = RFC_DIRECTION.RFC_EXPORT             # <<<<<<<<<<<<<<
 *     RFC_CHANGING = RFC_DIRECTION.RFC_CHANGING
 *     RFC_TABLES = RFC_DIRECTION.RFC_TABLES
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFC_DIRECTION(RFC_EXPORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFC_EXPORT, __pyx_t_4) < 0) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":44
 *     RFC_IMPORT = RFC_DIRECTION.RFC_IMPORT
 *     RFC_EXPORT = RFC_DIRECTION.RFC_EXPORT
 *     RFC_CHANGING = RFC_DIRECTION.RFC_CHANGING             # <<<<<<<<<<<<<<
 *     RFC_TABLES = RFC_DIRECTION.RFC_TABLES
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFC_DIRECTION(RFC_CHANGING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFC_CHANGING, __pyx_t_4) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":45
 *     RFC_EXPORT = RFC_DIRECTION.RFC_EXPORT
 *     RFC_CHANGING = RFC_DIRECTION.RFC_CHANGING
 *     RFC_TABLES = RFC_DIRECTION.RFC_TABLES             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFC_DIRECTION(RFC_TABLES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFC_TABLES, __pyx_t_4) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":41
 * 
 * # RFC parameter direction
 * class RfcParameterDirection(Enum):             # <<<<<<<<<<<<<<
 *     RFC_IMPORT = RFC_DIRECTION.RFC_IMPORT
 *     RFC_EXPORT = RFC_DIRECTION.RFC_EXPORT
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_RfcParameterDirection, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_RfcParameterDirection, __pyx_t_4) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":49
 * 
 * # RFC field type
 * class RfcFieldType(Enum):             # <<<<<<<<<<<<<<
 *     RFCTYPE_CHAR = RFCTYPE.RFCTYPE_CHAR
 *     RFCTYPE_DATE = RFCTYPE.RFCTYPE_DATE
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_RfcFieldType, __pyx_n_s_RfcFieldType, (PyObject *) NULL, __pyx_n_s_pyrfc__cyrfc, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "pyrfc/_cyrfc.pyx":50
 * # RFC field type
 * class RfcFieldType(Enum):
 *     RFCTYPE_CHAR = RFCTYPE.RFCTYPE_CHAR             # <<<<<<<<<<<<<<
 *     RFCTYPE_DATE = RFCTYPE.RFCTYPE_DATE
 *     RFCTYPE_BCD = RFCTYPE.RFCTYPE_BCD
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_CHAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_CHAR, __pyx_t_4) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":51
 * class RfcFieldType(Enum):
 *     RFCTYPE_CHAR = RFCTYPE.RFCTYPE_CHAR
 *     RFCTYPE_DATE = RFCTYPE.RFCTYPE_DATE             # <<<<<<<<<<<<<<
 *     RFCTYPE_BCD = RFCTYPE.RFCTYPE_BCD
 *     RFCTYPE_TIME = RFCTYPE.RFCTYPE_TIME
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_DATE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_DATE, __pyx_t_4) < 0) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":52
 *     RFCTYPE_CHAR = RFCTYPE.RFCTYPE_CHAR
 *     RFCTYPE_DATE = RFCTYPE.RFCTYPE_DATE
 *     RFCTYPE_BCD = RFCTYPE.RFCTYPE_BCD             # <<<<<<<<<<<<<<
 *     RFCTYPE_TIME = RFCTYPE.RFCTYPE_TIME
 *     RFCTYPE_BYTE = RFCTYPE.RFCTYPE_BYTE
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_BCD); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_BCD, __pyx_t_4) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":53
 *     RFCTYPE_DATE = RFCTYPE.RFCTYPE_DATE
 *     RFCTYPE_BCD = RFCTYPE.RFCTYPE_BCD
 *     RFCTYPE_TIME = RFCTYPE.RFCTYPE_TIME             # <<<<<<<<<<<<<<
 *     RFCTYPE_BYTE = RFCTYPE.RFCTYPE_BYTE
 *     RFCTYPE_TABLE = RFCTYPE.RFCTYPE_TABLE
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_TIME); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_TIME, __pyx_t_4) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":54
 *     RFCTYPE_BCD = RFCTYPE.RFCTYPE_BCD
 *     RFCTYPE_TIME = RFCTYPE.RFCTYPE_TIME
 *     RFCTYPE_BYTE = RFCTYPE.RFCTYPE_BYTE             # <<<<<<<<<<<<<<
 *     RFCTYPE_TABLE = RFCTYPE.RFCTYPE_TABLE
 *     RFCTYPE_NUM = RFCTYPE.RFCTYPE_NUM
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_BYTE, __pyx_t_4) < 0) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":55
 *     RFCTYPE_TIME = RFCTYPE.RFCTYPE_TIME
 *     RFCTYPE_BYTE = RFCTYPE.RFCTYPE_BYTE
 *     RFCTYPE_TABLE = RFCTYPE.RFCTYPE_TABLE             # <<<<<<<<<<<<<<
 *     RFCTYPE_NUM = RFCTYPE.RFCTYPE_NUM
 *     RFCTYPE_FLOAT = RFCTYPE.RFCTYPE_FLOAT
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_TABLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_TABLE, __pyx_t_4) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":56
 *     RFCTYPE_BYTE = RFCTYPE.RFCTYPE_BYTE
 *     RFCTYPE_TABLE = RFCTYPE.RFCTYPE_TABLE
 *     RFCTYPE_NUM = RFCTYPE.RFCTYPE_NUM             # <<<<<<<<<<<<<<
 *     RFCTYPE_FLOAT = RFCTYPE.RFCTYPE_FLOAT
 *     RFCTYPE_INT = RFCTYPE.RFCTYPE_INT
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_NUM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_NUM, __pyx_t_4) < 0) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":57
 *     RFCTYPE_TABLE = RFCTYPE.RFCTYPE_TABLE
 *     RFCTYPE_NUM = RFCTYPE.RFCTYPE_NUM
 *     RFCTYPE_FLOAT = RFCTYPE.RFCTYPE_FLOAT             # <<<<<<<<<<<<<<
 *     RFCTYPE_INT = RFCTYPE.RFCTYPE_INT
 *     RFCTYPE_INT2 = RFCTYPE.RFCTYPE_INT2
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_FLOAT, __pyx_t_4) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":58
 *     RFCTYPE_NUM = RFCTYPE.RFCTYPE_NUM
 *     RFCTYPE_FLOAT = RFCTYPE.RFCTYPE_FLOAT
 *     RFCTYPE_INT = RFCTYPE.RFCTYPE_INT             # <<<<<<<<<<<<<<
 *     RFCTYPE_INT2 = RFCTYPE.RFCTYPE_INT2
 *     RFCTYPE_INT1 = RFCTYPE.RFCTYPE_INT1
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_INT, __pyx_t_4) < 0) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":59
 *     RFCTYPE_FLOAT = RFCTYPE.RFCTYPE_FLOAT
 *     RFCTYPE_INT = RFCTYPE.RFCTYPE_INT
 *     RFCTYPE_INT2 = RFCTYPE.RFCTYPE_INT2             # <<<<<<<<<<<<<<
 *     RFCTYPE_INT1 = RFCTYPE.RFCTYPE_INT1
 *     RFCTYPE_NULL = RFCTYPE.RFCTYPE_NULL
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_INT2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_INT2, __pyx_t_4) < 0) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":60
 *     RFCTYPE_INT = RFCTYPE.RFCTYPE_INT
 *     RFCTYPE_INT2 = RFCTYPE.RFCTYPE_INT2
 *     RFCTYPE_INT1 = RFCTYPE.RFCTYPE_INT1             # <<<<<<<<<<<<<<
 *     RFCTYPE_NULL = RFCTYPE.RFCTYPE_NULL
 *     RFCTYPE_ABAPOBJECT = RFCTYPE.RFCTYPE_ABAPOBJECT
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_INT1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_INT1, __pyx_t_4) < 0) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":61
 *     RFCTYPE_INT2 = RFCTYPE.RFCTYPE_INT2
 *     RFCTYPE_INT1 = RFCTYPE.RFCTYPE_INT1
 *     RFCTYPE_NULL = RFCTYPE.RFCTYPE_NULL             # <<<<<<<<<<<<<<
 *     RFCTYPE_ABAPOBJECT = RFCTYPE.RFCTYPE_ABAPOBJECT
 *     RFCTYPE_STRUCTURE = RFCTYPE.RFCTYPE_STRUCTURE
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_NULL, __pyx_t_4) < 0) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":62
 *     RFCTYPE_INT1 = RFCTYPE.RFCTYPE_INT1
 *     RFCTYPE_NULL = RFCTYPE.RFCTYPE_NULL
 *     RFCTYPE_ABAPOBJECT = RFCTYPE.RFCTYPE_ABAPOBJECT             # <<<<<<<<<<<<<<
 *     RFCTYPE_STRUCTURE = RFCTYPE.RFCTYPE_STRUCTURE
 *     RFCTYPE_DECF16 = RFCTYPE.RFCTYPE_DECF16
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_ABAPOBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_ABAPOBJECT, __pyx_t_4) < 0) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":63
 *     RFCTYPE_NULL = RFCTYPE.RFCTYPE_NULL
 *     RFCTYPE_ABAPOBJECT = RFCTYPE.RFCTYPE_ABAPOBJECT
 *     RFCTYPE_STRUCTURE = RFCTYPE.RFCTYPE_STRUCTURE             # <<<<<<<<<<<<<<
 *     RFCTYPE_DECF16 = RFCTYPE.RFCTYPE_DECF16
 *     RFCTYPE_DECF34 = RFCTYPE.RFCTYPE_DECF34
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_STRUCTURE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_STRUCTURE, __pyx_t_4) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":64
 *     RFCTYPE_ABAPOBJECT = RFCTYPE.RFCTYPE_ABAPOBJECT
 *     RFCTYPE_STRUCTURE = RFCTYPE.RFCTYPE_STRUCTURE
 *     RFCTYPE_DECF16 = RFCTYPE.RFCTYPE_DECF16             # <<<<<<<<<<<<<<
 *     RFCTYPE_DECF34 = RFCTYPE.RFCTYPE_DECF34
 *     RFCTYPE_XMLDATA = RFCTYPE.RFCTYPE_XMLDATA
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_DECF16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_DECF16, __pyx_t_4) < 0) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":65
 *     RFCTYPE_STRUCTURE = RFCTYPE.RFCTYPE_STRUCTURE
 *     RFCTYPE_DECF16 = RFCTYPE.RFCTYPE_DECF16
 *     RFCTYPE_DECF34 = RFCTYPE.RFCTYPE_DECF34             # <<<<<<<<<<<<<<
 *     RFCTYPE_XMLDATA = RFCTYPE.RFCTYPE_XMLDATA
 *     RFCTYPE_STRING = RFCTYPE.RFCTYPE_STRING
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_DECF34); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_DECF34, __pyx_t_4) < 0) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":66
 *     RFCTYPE_DECF16 = RFCTYPE.RFCTYPE_DECF16
 *     RFCTYPE_DECF34 = RFCTYPE.RFCTYPE_DECF34
 *     RFCTYPE_XMLDATA = RFCTYPE.RFCTYPE_XMLDATA             # <<<<<<<<<<<<<<
 *     RFCTYPE_STRING = RFCTYPE.RFCTYPE_STRING
 *     RFCTYPE_XSTRING = RFCTYPE.RFCTYPE_XSTRING
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_XMLDATA); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_XMLDATA, __pyx_t_4) < 0) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":67
 *     RFCTYPE_DECF34 = RFCTYPE.RFCTYPE_DECF34
 *     RFCTYPE_XMLDATA = RFCTYPE.RFCTYPE_XMLDATA
 *     RFCTYPE_STRING = RFCTYPE.RFCTYPE_STRING             # <<<<<<<<<<<<<<
 *     RFCTYPE_XSTRING = RFCTYPE.RFCTYPE_XSTRING
 *     RFCTYPE_INT8 = RFCTYPE.RFCTYPE_INT8
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_STRING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_STRING, __pyx_t_4) < 0) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":68
 *     RFCTYPE_XMLDATA = RFCTYPE.RFCTYPE_XMLDATA
 *     RFCTYPE_STRING = RFCTYPE.RFCTYPE_STRING
 *     RFCTYPE_XSTRING = RFCTYPE.RFCTYPE_XSTRING             # <<<<<<<<<<<<<<
 *     RFCTYPE_INT8 = RFCTYPE.RFCTYPE_INT8
 *     RFCTYPE_UTCLONG = RFCTYPE.RFCTYPE_UTCLONG
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_XSTRING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_XSTRING, __pyx_t_4) < 0) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":69
 *     RFCTYPE_STRING = RFCTYPE.RFCTYPE_STRING
 *     RFCTYPE_XSTRING = RFCTYPE.RFCTYPE_XSTRING
 *     RFCTYPE_INT8 = RFCTYPE.RFCTYPE_INT8             # <<<<<<<<<<<<<<
 *     RFCTYPE_UTCLONG = RFCTYPE.RFCTYPE_UTCLONG
 *     RFCTYPE_UTCSECOND = RFCTYPE.RFCTYPE_UTCSECOND
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_INT8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_INT8, __pyx_t_4) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":70
 *     RFCTYPE_XSTRING = RFCTYPE.RFCTYPE_XSTRING
 *     RFCTYPE_INT8 = RFCTYPE.RFCTYPE_INT8
 *     RFCTYPE_UTCLONG = RFCTYPE.RFCTYPE_UTCLONG             # <<<<<<<<<<<<<<
 *     RFCTYPE_UTCSECOND = RFCTYPE.RFCTYPE_UTCSECOND
 *     RFCTYPE_UTCMINUTE = RFCTYPE.RFCTYPE_UTCMINUTE
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_UTCLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_UTCLONG, __pyx_t_4) < 0) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":71
 *     RFCTYPE_INT8 = RFCTYPE.RFCTYPE_INT8
 *     RFCTYPE_UTCLONG = RFCTYPE.RFCTYPE_UTCLONG
 *     RFCTYPE_UTCSECOND = RFCTYPE.RFCTYPE_UTCSECOND             # <<<<<<<<<<<<<<
 *     RFCTYPE_UTCMINUTE = RFCTYPE.RFCTYPE_UTCMINUTE
 *     RFCTYPE_DTDAY = RFCTYPE.RFCTYPE_DTDAY
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_UTCSECOND); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_UTCSECOND, __pyx_t_4) < 0) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":72
 *     RFCTYPE_UTCLONG = RFCTYPE.RFCTYPE_UTCLONG
 *     RFCTYPE_UTCSECOND = RFCTYPE.RFCTYPE_UTCSECOND
 *     RFCTYPE_UTCMINUTE = RFCTYPE.RFCTYPE_UTCMINUTE             # <<<<<<<<<<<<<<
 *     RFCTYPE_DTDAY = RFCTYPE.RFCTYPE_DTDAY
 *     RFCTYPE_DTWEEK = RFCTYPE.RFCTYPE_DTWEEK
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_UTCMINUTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_UTCMINUTE, __pyx_t_4) < 0) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":73
 *     RFCTYPE_UTCSECOND = RFCTYPE.RFCTYPE_UTCSECOND
 *     RFCTYPE_UTCMINUTE = RFCTYPE.RFCTYPE_UTCMINUTE
 *     RFCTYPE_DTDAY = RFCTYPE.RFCTYPE_DTDAY             # <<<<<<<<<<<<<<
 *     RFCTYPE_DTWEEK = RFCTYPE.RFCTYPE_DTWEEK
 *     RFCTYPE_DTMONTH = RFCTYPE.RFCTYPE_DTMONTH
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_DTDAY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_DTDAY, __pyx_t_4) < 0) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":74
 *     RFCTYPE_UTCMINUTE = RFCTYPE.RFCTYPE_UTCMINUTE
 *     RFCTYPE_DTDAY = RFCTYPE.RFCTYPE_DTDAY
 *     RFCTYPE_DTWEEK = RFCTYPE.RFCTYPE_DTWEEK             # <<<<<<<<<<<<<<
 *     RFCTYPE_DTMONTH = RFCTYPE.RFCTYPE_DTMONTH
 *     RFCTYPE_TSECOND = RFCTYPE.RFCTYPE_TSECOND
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_DTWEEK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_DTWEEK, __pyx_t_4) < 0) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":75
 *     RFCTYPE_DTDAY = RFCTYPE.RFCTYPE_DTDAY
 *     RFCTYPE_DTWEEK = RFCTYPE.RFCTYPE_DTWEEK
 *     RFCTYPE_DTMONTH = RFCTYPE.RFCTYPE_DTMONTH             # <<<<<<<<<<<<<<
 *     RFCTYPE_TSECOND = RFCTYPE.RFCTYPE_TSECOND
 *     RFCTYPE_TMINUTE = RFCTYPE.RFCTYPE_TMINUTE
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_DTMONTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_DTMONTH, __pyx_t_4) < 0) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":76
 *     RFCTYPE_DTWEEK = RFCTYPE.RFCTYPE_DTWEEK
 *     RFCTYPE_DTMONTH = RFCTYPE.RFCTYPE_DTMONTH
 *     RFCTYPE_TSECOND = RFCTYPE.RFCTYPE_TSECOND             # <<<<<<<<<<<<<<
 *     RFCTYPE_TMINUTE = RFCTYPE.RFCTYPE_TMINUTE
 *     RFCTYPE_CDAY = RFCTYPE.RFCTYPE_CDAY
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_TSECOND); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_TSECOND, __pyx_t_4) < 0) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":77
 *     RFCTYPE_DTMONTH = RFCTYPE.RFCTYPE_DTMONTH
 *     RFCTYPE_TSECOND = RFCTYPE.RFCTYPE_TSECOND
 *     RFCTYPE_TMINUTE = RFCTYPE.RFCTYPE_TMINUTE             # <<<<<<<<<<<<<<
 *     RFCTYPE_CDAY = RFCTYPE.RFCTYPE_CDAY
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_TMINUTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_TMINUTE, __pyx_t_4) < 0) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":78
 *     RFCTYPE_TSECOND = RFCTYPE.RFCTYPE_TSECOND
 *     RFCTYPE_TMINUTE = RFCTYPE.RFCTYPE_TMINUTE
 *     RFCTYPE_CDAY = RFCTYPE.RFCTYPE_CDAY             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_CDAY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_CDAY, __pyx_t_4) < 0) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":49
 * 
 * # RFC field type
 * class RfcFieldType(Enum):             # <<<<<<<<<<<<<<
 *     RFCTYPE_CHAR = RFCTYPE.RFCTYPE_CHAR
 *     RFCTYPE_DATE = RFCTYPE.RFCTYPE_DATE
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_RfcFieldType, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_RfcFieldType, __pyx_t_4) < 0) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":82
 * 
 * # bgRFC unit state
 * class UnitState(Enum):             # <<<<<<<<<<<<<<
 *     not_found = RFC_UNIT_STATE.RFC_UNIT_NOT_FOUND
 *     in_process = RFC_UNIT_STATE.RFC_UNIT_IN_PROCESS
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Enum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_UnitState, __pyx_n_s_UnitState, (PyObject *) NULL, __pyx_n_s_pyrfc__cyrfc, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "pyrfc/_cyrfc.pyx":83
 * # bgRFC unit state
 * class UnitState(Enum):
 *     not_found = RFC_UNIT_STATE.RFC_UNIT_NOT_FOUND             # <<<<<<<<<<<<<<
 *     in_process = RFC_UNIT_STATE.RFC_UNIT_IN_PROCESS
 *     committed = RFC_UNIT_STATE.RFC_UNIT_COMMITTED
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFC_UNIT_STATE(RFC_UNIT_NOT_FOUND); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_not_found, __pyx_t_4) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":84
 * class UnitState(Enum):
 *     not_found = RFC_UNIT_STATE.RFC_UNIT_NOT_FOUND
 *     in_process = RFC_UNIT_STATE.RFC_UNIT_IN_PROCESS             # <<<<<<<<<<<<<<
 *     committed = RFC_UNIT_STATE.RFC_UNIT_COMMITTED
 *     rolled_back = RFC_UNIT_STATE.RFC_UNIT_ROLLED_BACK
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFC_UNIT_STATE(RFC_UNIT_IN_PROCESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_in_process, __pyx_t_4) < 0) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":85
 *     not_found = RFC_UNIT_STATE.RFC_UNIT_NOT_FOUND
 *     in_process = RFC_UNIT_STATE.RFC_UNIT_IN_PROCESS
 *     committed = RFC_UNIT_STATE.RFC_UNIT_COMMITTED             # <<<<<<<<<<<<<<
 *     rolled_back = RFC_UNIT_STATE.RFC_UNIT_ROLLED_BACK
 *     confirmed = RFC_UNIT_STATE.RFC_UNIT_CONFIRMED
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFC_UNIT_STATE(RFC_UNIT_COMMITTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_committed, __pyx_t_4) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":86
 *     in_process = RFC_UNIT_STATE.RFC_UNIT_IN_PROCESS
 *     committed = RFC_UNIT_STATE.RFC_UNIT_COMMITTED
 *     rolled_back = RFC_UNIT_STATE.RFC_UNIT_ROLLED_BACK             # <<<<<<<<<<<<<<
 *     confirmed = RFC_UNIT_STATE.RFC_UNIT_CONFIRMED
 *     created = auto()
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFC_UNIT_STATE(RFC_UNIT_ROLLED_BACK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_rolled_back, __pyx_t_4) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":87
 *     committed = RFC_UNIT_STATE.RFC_UNIT_COMMITTED
 *     rolled_back = RFC_UNIT_STATE.RFC_UNIT_ROLLED_BACK
 *     confirmed = RFC_UNIT_STATE.RFC_UNIT_CONFIRMED             # <<<<<<<<<<<<<<
 *     created = auto()
 *     executed = auto()
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFC_UNIT_STATE(RFC_UNIT_CONFIRMED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_confirmed, __pyx_t_4) < 0) __PYX_ERR(0, 87, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":88
 *     rolled_back = RFC_UNIT_STATE.RFC_UNIT_ROLLED_BACK
 *     confirmed = RFC_UNIT_STATE.RFC_UNIT_CONFIRMED
 *     created = auto()             # <<<<<<<<<<<<<<
 *     executed = auto()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_auto); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_created, __pyx_t_4) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":89
 *     confirmed = RFC_UNIT_STATE.RFC_UNIT_CONFIRMED
 *     created = auto()
 *     executed = auto()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_auto); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_executed, __pyx_t_4) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":82
 * 
 * # bgRFC unit state
 * class UnitState(Enum):             # <<<<<<<<<<<<<<
 *     not_found = RFC_UNIT_STATE.RFC_UNIT_NOT_FOUND
 *     in_process = RFC_UNIT_STATE.RFC_UNIT_IN_PROCESS
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_UnitState, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_UnitState, __pyx_t_4) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":93
 * 
 * # bgRFC status
 * class RCStatus(Enum):             # <<<<<<<<<<<<<<
 *     OK = RFC_RC.RFC_OK
 *     RFC_NOT_FOUND = RFC_RC.RFC_NOT_FOUND
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_RCStatus, __pyx_n_s_RCStatus, (PyObject *) NULL, __pyx_n_s_pyrfc__cyrfc, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "pyrfc/_cyrfc.pyx":94
 * # bgRFC status
 * class RCStatus(Enum):
 *     OK = RFC_RC.RFC_OK             # <<<<<<<<<<<<<<
 *     RFC_NOT_FOUND = RFC_RC.RFC_NOT_FOUND
 *     RFC_EXTERNAL_FAILURE = RFC_RC.RFC_EXTERNAL_FAILURE
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFC_RC(RFC_OK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_OK, __pyx_t_4) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":95
 * class RCStatus(Enum):
 *     OK = RFC_RC.RFC_OK
 *     RFC_NOT_FOUND = RFC_RC.RFC_NOT_FOUND             # <<<<<<<<<<<<<<
 *     RFC_EXTERNAL_FAILURE = RFC_RC.RFC_EXTERNAL_FAILURE
 *     RFC_EXECUTED = RFC_RC.RFC_EXECUTED
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFC_RC(RFC_NOT_FOUND); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFC_NOT_FOUND, __pyx_t_4) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":96
 *     OK = RFC_RC.RFC_OK
 *     RFC_NOT_FOUND = RFC_RC.RFC_NOT_FOUND
 *     RFC_EXTERNAL_FAILURE = RFC_RC.RFC_EXTERNAL_FAILURE             # <<<<<<<<<<<<<<
 *     RFC_EXECUTED = RFC_RC.RFC_EXECUTED
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFC_RC(RFC_EXTERNAL_FAILURE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFC_EXTERNAL_FAILURE, __pyx_t_4) < 0) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":97
 *     RFC_NOT_FOUND = RFC_RC.RFC_NOT_FOUND
 *     RFC_EXTERNAL_FAILURE = RFC_RC.RFC_EXTERNAL_FAILURE
 *     RFC_EXECUTED = RFC_RC.RFC_EXECUTED             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFC_RC(RFC_EXECUTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFC_EXECUTED, __pyx_t_4) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":93
 * 
 * # bgRFC status
 * class RCStatus(Enum):             # <<<<<<<<<<<<<<
 *     OK = RFC_RC.RFC_OK
 *     RFC_NOT_FOUND = RFC_RC.RFC_NOT_FOUND
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_RCStatus, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_RCStatus, __pyx_t_4) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrfc/_cyrfc.pyx":101
 * 
 * # bgRFCunit call type
 * class UnitCallType(Enum):             # <<<<<<<<<<<<<<
 *     synchronous = RFC_CALL_TYPE.RFC_SYNCHRONOUS
 *     transactional = RFC_CALL_TYPE.RFC_TRANSACTIONAL
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Enum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_UnitCallType, __pyx_n_s_UnitCallType, (PyObject *) NULL, __pyx_n_s_pyrfc__cyrfc, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "pyrfc/_cyrfc.pyx":102
 * # bgRFCunit call type
 * class UnitCallType(Enum):
 *     synchronous = RFC_CALL_TYPE.RFC_SYNCHRONOUS             # <<<<<<<<<<<<<<
 *     transactional = RFC_CALL_TYPE.RFC_TRANSACTIONAL
 *     queued = RFC_CALL_TYPE.RFC_QUEUED
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFC_CALL_TYPE(RFC_SYNCHRONOUS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_synchronous, __pyx_t_4) < 0) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":103
 * class UnitCallType(Enum):
 *     synchronous = RFC_CALL_TYPE.RFC_SYNCHRONOUS
 *     transactional = RFC_CALL_TYPE.RFC_TRANSACTIONAL             # <<<<<<<<<<<<<<
 *     queued = RFC_CALL_TYPE.RFC_QUEUED
 *     background_unit = RFC_CALL_TYPE.RFC_BACKGROUND_UNIT
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFC_CALL_TYPE(RFC_TRANSACTIONAL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_transactional, __pyx_t_4) < 0) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":104
 *     synchronous = RFC_CALL_TYPE.RFC_SYNCHRONOUS
 *     transactional = RFC_CALL_TYPE.RFC_TRANSACTIONAL
 *     queued = RFC_CALL_TYPE.RFC_QUEUED             # <<<<<<<<<<<<<<
 *     background_unit = RFC_CALL_TYPE.RFC_BACKGROUND_UNIT
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFC_CALL_TYPE(RFC_QUEUED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_queued, __pyx_t_4) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":105
 *     transactional = RFC_CALL_TYPE.RFC_TRANSACTIONAL
 *     queued = RFC_CALL_TYPE.RFC_QUEUED
 *     background_unit = RFC_CALL_TYPE.RFC_BACKGROUND_UNIT             # <<<<<<<<<<<<<<
 * 
 * ################################################################################
 */
  __pyx_t_4 = __Pyx_PyInt_From_RFC_CALL_TYPE(RFC_BACKGROUND_UNIT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_background_unit, __pyx_t_4) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrfc/_cyrfc.pyx":101
 * 
 * # bgRFCunit call type
 * class UnitCallType(Enum):             # <<<<<<<<<<<<<<
 *     synchronous = RFC_CALL_TYPE.RFC_SYNCHRONOUS
 *     transactional = RFC_CALL_TYPE.RFC_TRANSACTIONAL
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_UnitCallType, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_UnitCallType, __pyx_t_4) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":112
 * 
 * 
 * def get_nwrfclib_version():             # <<<<<<<<<<<<<<
 *     """Get SAP NW RFC Lib version
 *     :returns: tuple of major, minor and patch level and OS platform
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyrfc_6_cyrfc_1get_nwrfclib_version, NULL, __pyx_n_s_pyrfc__cyrfc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_nwrfclib_version, __pyx_t_2) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":123
 * 
 * 
 * def set_ini_file_directory(path_name):             # <<<<<<<<<<<<<<
 *     """Sets the directory in which to search for the sapnwrfc.ini file
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyrfc_6_cyrfc_3set_ini_file_directory, NULL, __pyx_n_s_pyrfc__cyrfc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_ini_file_directory, __pyx_t_2) < 0) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":143
 * 
 * 
 * def reload_ini_file():             # <<<<<<<<<<<<<<
 *     """Reloads the contents of the sapnwrfc.ini file into memory.
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyrfc_6_cyrfc_5reload_ini_file, NULL, __pyx_n_s_pyrfc__cyrfc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reload_ini_file, __pyx_t_2) < 0) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":162
 * 
 * 
 * def language_iso_to_sap(lang_iso):             # <<<<<<<<<<<<<<
 *     """Language code conversion of ISO code to SAP code.
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyrfc_6_cyrfc_7language_iso_to_sap, NULL, __pyx_n_s_pyrfc__cyrfc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_language_iso_to_sap, __pyx_t_2) < 0) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":183
 * 
 * 
 * def language_sap_to_iso(lang_sap):             # <<<<<<<<<<<<<<
 *     """Language code conversion of SAP code to ISO code.
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyrfc_6_cyrfc_9language_sap_to_iso, NULL, __pyx_n_s_pyrfc__cyrfc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_language_sap_to_iso, __pyx_t_2) < 0) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":204
 * 
 * 
 * def set_cryptolib_path(path_name):             # <<<<<<<<<<<<<<
 *     """Sets the absolute path to the sapcrypto library to enable TLS encryption via Websocket Rfc.
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyrfc_6_cyrfc_11set_cryptolib_path, NULL, __pyx_n_s_pyrfc__cyrfc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_cryptolib_path, __pyx_t_2) < 0) __PYX_ERR(0, 204, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":228
 * 
 * 
 * def set_locale_radix(value=None):             # <<<<<<<<<<<<<<
 *     """Sets the locale radix for decimal conversions.
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyrfc_6_cyrfc_13set_locale_radix, NULL, __pyx_n_s_pyrfc__cyrfc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_locale_radix, __pyx_t_2) < 0) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":252
 * 
 * 
 * def cancel_connection(client_connection):             # <<<<<<<<<<<<<<
 *     """Immediately cancels the RFC call which is currently being called over the given RFC connection
 *     and closes the connection. Can be used only on an RFC client connection.
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyrfc_6_cyrfc_15cancel_connection, NULL, __pyx_n_s_pyrfc__cyrfc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cancel_connection, __pyx_t_2) < 0) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":312
 * 
 * 
 * class TypeDescription(object):             # <<<<<<<<<<<<<<
 *     """ A type description
 * 
 */
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__68); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_tuple__68, __pyx_n_s_TypeDescription_2, __pyx_n_s_TypeDescription_2, (PyObject *) NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_kp_s_A_type_description_This_class_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pyrfc/_cyrfc.pyx":337
 * 
 *     """
 *     def __init__(self, name, nuc_length, uc_length):             # <<<<<<<<<<<<<<
 *         self.fields = []
 *         if len(name)<1 or len(name)>30:
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_15TypeDescription_1__init__, 0, __pyx_n_s_TypeDescription___init, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_3) < 0) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":348
 *         self.uc_length = uc_length
 * 
 *     def add_field(self, name, field_type, nuc_length, uc_length, nuc_offset,             # <<<<<<<<<<<<<<
 *                   uc_offset, decimals=0, type_description=None):
 *         """ Adds a field to the type description.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_15TypeDescription_3add_field, 0, __pyx_n_s_TypeDescription_add_field, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__73);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_add_field, __pyx_t_3) < 0) __PYX_ERR(0, 348, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":389
 *         })
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"<TypeDescription '{self.name}' with {len(self.fields)} " \
 *             f"fields (n/uclength={self.nuc_length}/{self.uc_length})>"
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_15TypeDescription_5__repr__, 0, __pyx_n_s_TypeDescription___repr, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_repr, __pyx_t_3) < 0) __PYX_ERR(0, 389, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":312
 * 
 * 
 * class TypeDescription(object):             # <<<<<<<<<<<<<<
 *     """ A type description
 * 
 */
  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_TypeDescription_2, __pyx_tuple__68, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TypeDescription_2, __pyx_t_3) < 0) __PYX_ERR(0, 312, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":398
 * 
 * 
 * class FunctionDescription(object):             # <<<<<<<<<<<<<<
 *     """ A function description
 * 
 */
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__76); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_tuple__76, __pyx_n_s_FunctionDescription_2, __pyx_n_s_FunctionDescription_2, (PyObject *) NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_kp_s_A_function_description_This_cla); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pyrfc/_cyrfc.pyx":421
 * 
 *     """
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.name = name
 *         self.parameters = []
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_19FunctionDescription_1__init__, 0, __pyx_n_s_FunctionDescription___init, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_3) < 0) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":425
 *         self.parameters = []
 * 
 *     def add_parameter(self, name, parameter_type, direction, nuc_length,             # <<<<<<<<<<<<<<
 *                       uc_length, decimals=0, default_value="", parameter_text="",
 *                       optional=False, type_description=None):
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_19FunctionDescription_3add_parameter, 0, __pyx_n_s_FunctionDescription_add_paramete, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__81);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_add_parameter, __pyx_t_3) < 0) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":474
 *         })
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"<FunctionDescription '{self.name}' with {len(self.parameters)} params>"
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_19FunctionDescription_5__repr__, 0, __pyx_n_s_FunctionDescription___repr, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_repr, __pyx_t_3) < 0) __PYX_ERR(0, 474, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrfc/_cyrfc.pyx":398
 * 
 * 
 * class FunctionDescription(object):             # <<<<<<<<<<<<<<
 *     """ A function description
 * 
 */
  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_FunctionDescription_2, __pyx_tuple__76, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FunctionDescription_2, __pyx_t_3) < 0) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":1493
 * #                   "callback": Python function,
 * #                   "server": Server object)
 * server_functions = {}             # <<<<<<<<<<<<<<
 * 
 * # global information about served functions / callbacks
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_server_functions, __pyx_t_2) < 0) __PYX_ERR(0, 1493, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":1498
 * # "auth_check": Default authorization check function
 * # "server_log": Server logging flag, default False
 * server_context = {}             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_server_context, __pyx_t_2) < 0) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":1501
 * 
 * 
 * def default_auth_check(func_name=False, request_context = None):             # <<<<<<<<<<<<<<
 *     request_context = request_context or {}
 *     _server_log(f"authorization check for '{func_name}'", request_context['server_context'])
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyrfc_6_cyrfc_17default_auth_check, NULL, __pyx_n_s_pyrfc__cyrfc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_auth_check, __pyx_t_2) < 0) __PYX_ERR(0, 1501, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":1507
 * 
 * 
 * def _server_log(origin, log_message):             # <<<<<<<<<<<<<<
 *     if server_context["server_log"]:
 *         print (f"[{datetime.utcnow()} UTC] {origin} '{log_message}'")
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyrfc_6_cyrfc_19_server_log, NULL, __pyx_n_s_pyrfc__cyrfc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_server_log, __pyx_t_2) < 0) __PYX_ERR(0, 1507, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrfc/_cyrfc.pyx":1762
 * 
 *     __bgRfcFunction = {
 *         "check": None,             # <<<<<<<<<<<<<<
 *         "commit": None,
 *         "rollback": None,
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_check, Py_None) < 0) __PYX_ERR(0, 1762, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":1763
 *     __bgRfcFunction = {
 *         "check": None,
 *         "commit": None,             # <<<<<<<<<<<<<<
 *         "rollback": None,
 *         "confirm": None,
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_commit, Py_None) < 0) __PYX_ERR(0, 1762, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":1764
 *         "check": None,
 *         "commit": None,
 *         "rollback": None,             # <<<<<<<<<<<<<<
 *         "confirm": None,
 *         "getState": None
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_rollback, Py_None) < 0) __PYX_ERR(0, 1762, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":1765
 *         "commit": None,
 *         "rollback": None,
 *         "confirm": None,             # <<<<<<<<<<<<<<
 *         "getState": None
 *     }
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_confirm, Py_None) < 0) __PYX_ERR(0, 1762, __pyx_L1_error)

  /* "pyrfc/_cyrfc.pyx":1766
 *         "rollback": None,
 *         "confirm": None,
 *         "getState": None             # <<<<<<<<<<<<<<
 *     }
 * 
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_getState, Py_None) < 0) __PYX_ERR(0, 1762, __pyx_L1_error)
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Server->tp_dict, __pyx_n_s_bgRfcFunction, __pyx_t_2) < 0) __PYX_ERR(0, 1761, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Server);

  /* "pyrfc/_cyrfc.pyx":2173
 * 
 * cdef class Throughput:
 *     _registry = []             # <<<<<<<<<<<<<<
 * 
 *     cdef RFC_THROUGHPUT_HANDLE _throughput_handle
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Throughput->tp_dict, __pyx_n_s_registry, __pyx_t_2) < 0) __PYX_ERR(0, 2173, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Throughput);

  /* "pyrfc/_cyrfc.pyx":2232
 * 
 *     @staticmethod
 *     def getFromConnection(Connection connection):             # <<<<<<<<<<<<<<
 *         """Returns the currently attached throughput object from a connection, if any.
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyrfc_6_cyrfc_10Throughput_5getFromConnection, NULL, __pyx_n_s_pyrfc__cyrfc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Throughput->tp_dict, __pyx_n_s_getFromConnection, __pyx_t_2) < 0) __PYX_ERR(0, 2232, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Throughput);

  /* "pyrfc/_cyrfc.pyx":2231
 *         self._connections.add(connection)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def getFromConnection(Connection connection):
 *         """Returns the currently attached throughput object from a connection, if any.
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Throughput, __pyx_n_s_getFromConnection); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Throughput->tp_dict, __pyx_n_s_getFromConnection, __pyx_t_1) < 0) __PYX_ERR(0, 2232, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Throughput);

  /* "pyrfc/_cyrfc.pyx":1
 * # SPDX-FileCopyrightText: 2013 SAP SE Srdjan Boskovic <srdjan.boskovic@sap.com>             # <<<<<<<<<<<<<<
 * #
 * # SPDX-License-Identifier: Apache-2.0
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_object____object___to_py")
 * cdef object __Pyx_CFunc_object____object___to_py(object (*f)(object) ):             # <<<<<<<<<<<<<<
 *     def wrap(object client_connection):
 *         """wrap(client_connection)"""
 */

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init pyrfc._cyrfc", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init pyrfc._cyrfc");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* PyObjectCall */
#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((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_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;
}
#endif

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
    }
}
#endif

/* PyObjectCall2Args */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args, *result = NULL;
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyFunction_FastCall(function, args, 2);
    }
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyCFunction_FastCall(function, args, 2);
    }
    #endif
    args = PyTuple_New(2);
    if (unlikely(!args)) goto done;
    Py_INCREF(arg1);
    PyTuple_SET_ITEM(args, 0, arg1);
    Py_INCREF(arg2);
    PyTuple_SET_ITEM(args, 1, arg2);
    Py_INCREF(function);
    result = __Pyx_PyObject_Call(function, args, NULL);
    Py_DECREF(args);
    Py_DECREF(function);
done:
    return result;
}

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (__Pyx_PyFastCFunction_Check(func)) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

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

/* PyObjectCallNoArg */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#if defined(__Pyx_CyFunction_USED) && defined(NDEBUG)
    if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
#else
    if (likely(PyCFunction_Check(func)))
#endif
    {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* DictGetItem */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            if (unlikely(PyTuple_Check(key))) {
                PyObject* args = PyTuple_Pack(1, key);
                if (likely(args)) {
                    PyErr_SetObject(PyExc_KeyError, args);
                    Py_DECREF(args);
                }
            } else {
                PyErr_SetObject(PyExc_KeyError, key);
            }
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#endif

/* KeywordStringCheck */
static int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (descr != NULL) {
        *method = descr;
        return 0;
    }
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(name));
#endif
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod0 */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

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

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

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

/* RaiseNoneIterError */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* UnpackTupleError */
static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

/* UnpackTuple2 */
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
        PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
    PyObject *value1 = NULL, *value2 = NULL;
#if CYTHON_COMPILING_IN_PYPY
    value1 = PySequence_ITEM(tuple, 0);  if (unlikely(!value1)) goto bad;
    value2 = PySequence_ITEM(tuple, 1);  if (unlikely(!value2)) goto bad;
#else
    value1 = PyTuple_GET_ITEM(tuple, 0);  Py_INCREF(value1);
    value2 = PyTuple_GET_ITEM(tuple, 1);  Py_INCREF(value2);
#endif
    if (decref_tuple) {
        Py_DECREF(tuple);
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
#if CYTHON_COMPILING_IN_PYPY
bad:
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
#endif
}
static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                       int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    iternextfunc iternext;
    iter = PyObject_GetIter(tuple);
    if (unlikely(!iter)) goto bad;
    if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
    iternext = Py_TYPE(iter)->tp_iternext;
    value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
    value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
    if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
    Py_DECREF(iter);
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

/* dict_iter */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
    if (is_dict) {
#if !CYTHON_COMPILING_IN_PYPY
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
#elif PY_MAJOR_VERSION >= 3
        static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
        PyObject **pp = NULL;
        if (method_name) {
            const char *name = PyUnicode_AsUTF8(method_name);
            if (strcmp(name, "iteritems") == 0) pp = &py_items;
            else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
            else if (strcmp(name, "itervalues") == 0) pp = &py_values;
            if (pp) {
                if (!*pp) {
                    *pp = PyUnicode_FromString(name + 4);
                    if (!*pp)
                        return NULL;
                }
                method_name = *pp;
            }
        }
#endif
    }
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

/* PyObjectSetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#endif

/* JoinPyUnicode */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      CYTHON_UNUSED Py_UCS4 max_char) {
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyObject *result_uval;
    int result_ukind;
    Py_ssize_t i, char_pos;
    void *result_udata;
#if CYTHON_PEP393_ENABLED
    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;
    result_udata = PyUnicode_DATA(result_uval);
#else
    result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = sizeof(Py_UNICODE);
    result_udata = PyUnicode_AS_UNICODE(result_uval);
#endif
    char_pos = 0;
    for (i=0; i < value_count; i++) {
        int ukind;
        Py_ssize_t ulength;
        void *udata;
        PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
        if (unlikely(__Pyx_PyUnicode_READY(uval)))
            goto bad;
        ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
        if (unlikely(!ulength))
            continue;
        if (unlikely(char_pos + ulength < 0))
            goto overflow;
        ukind = __Pyx_PyUnicode_KIND(uval);
        udata = __Pyx_PyUnicode_DATA(uval);
        if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
            memcpy((char *)result_udata + char_pos * result_ukind, udata, (size_t) (ulength * result_ukind));
        } else {
            #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || 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
    result_ulength++;
    value_count++;
    return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
#endif
}

/* PyObjectCallMethod1 */
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method = NULL, *result;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_Call2Args(method, obj, arg);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) return NULL;
    return __Pyx__PyObject_CallMethod1(method, arg);
}

/* append */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
    } else {
        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

/* CIntToDigits */
static const char DIGIT_PAIRS_10[2*10*10+1] = {
    "00010203040506070809"
    "10111213141516171819"
    "20212223242526272829"
    "30313233343536373839"
    "40414243444546474849"
    "50515253545556575859"
    "60616263646566676869"
    "70717273747576777879"
    "80818283848586878889"
    "90919293949596979899"
};
static const char DIGIT_PAIRS_8[2*8*8+1] = {
    "0001020304050607"
    "1011121314151617"
    "2021222324252627"
    "3031323334353637"
    "4041424344454647"
    "5051525354555657"
    "6061626364656667"
    "7071727374757677"
};
static const char DIGITS_HEX[2*16+1] = {
    "0123456789abcdef"
    "0123456789ABCDEF"
};

/* BuildPyUnicode */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
                                                int prepend_sign, char padding_char) {
    PyObject *uval;
    Py_ssize_t uoffset = ulength - clength;
#if CYTHON_USE_UNICODE_INTERNALS
    Py_ssize_t i;
#if CYTHON_PEP393_ENABLED
    void *udata;
    uval = PyUnicode_New(ulength, 127);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_DATA(uval);
#else
    Py_UNICODE *udata;
    uval = PyUnicode_FromUnicode(NULL, ulength);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_AS_UNICODE(uval);
#endif
    if (uoffset > 0) {
        i = 0;
        if (prepend_sign) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-');
            i++;
        }
        for (; i < uoffset; i++) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
        }
    }
    for (i=0; i < clength; i++) {
        __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
    }
#else
    {
        PyObject *sign = NULL, *padding = NULL;
        uval = NULL;
        if (uoffset > 0) {
            prepend_sign = !!prepend_sign;
            if (uoffset > prepend_sign) {
                padding = PyUnicode_FromOrdinal(padding_char);
                if (likely(padding) && uoffset > prepend_sign + 1) {
                    PyObject *tmp;
                    PyObject *repeat = PyInt_FromSsize_t(uoffset - prepend_sign);
                    if (unlikely(!repeat)) goto done_or_error;
                    tmp = PyNumber_Multiply(padding, repeat);
                    Py_DECREF(repeat);
                    Py_DECREF(padding);
                    padding = tmp;
                }
                if (unlikely(!padding)) goto done_or_error;
            }
            if (prepend_sign) {
                sign = PyUnicode_FromOrdinal('-');
                if (unlikely(!sign)) goto done_or_error;
            }
        }
        uval = PyUnicode_DecodeASCII(chars, clength, NULL);
        if (likely(uval) && padding) {
            PyObject *tmp = PyNumber_Add(padding, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
        if (likely(uval) && sign) {
            PyObject *tmp = PyNumber_Add(sign, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
done_or_error:
        Py_XDECREF(padding);
        Py_XDECREF(sign);
    }
#endif
    return uval;
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(Py_ssize_t)*3+2];
    char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    Py_ssize_t remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (Py_ssize_t) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (Py_ssize_t) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (Py_ssize_t) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    if (last_one_off) {
        assert(*dpos == '0');
        dpos++;
    }
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* BytesEquals */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS && (PY_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 */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
    #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* SliceObject */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
        Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                    goto bad;
                PyErr_Clear();
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_USE_TYPE_SLOTS
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
bad:
    return NULL;
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_RFC_UNIT_STATE(RFC_UNIT_STATE value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(RFC_UNIT_STATE)*3+2];
    char *dpos, *end = digits + sizeof(RFC_UNIT_STATE)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    RFC_UNIT_STATE remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const RFC_UNIT_STATE neg_one = (RFC_UNIT_STATE) -1, const_zero = (RFC_UNIT_STATE) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (RFC_UNIT_STATE) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (RFC_UNIT_STATE) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (RFC_UNIT_STATE) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    if (last_one_off) {
        assert(*dpos == '0');
        dpos++;
    }
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(int)*3+2];
    char *dpos, *end = digits + sizeof(int)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    int remaining;
#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 (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (int) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (int) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (int) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    if (last_one_off) {
        assert(*dpos == '0');
        dpos++;
    }
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
    PyObject *runerr = NULL;
    Py_ssize_t key_value;
    PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
    if (unlikely(!(m && m->sq_item))) {
        PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
        return NULL;
    }
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
    PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
    if (likely(m && m->mp_subscript)) {
        return m->mp_subscript(obj, key);
    }
    return __Pyx_PyObject_GetIndex(obj, key);
}
#endif

/* WriteUnraisableException */
static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
                                  int full_traceback, CYTHON_UNUSED int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
#ifdef WITH_THREAD
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
    else state = (PyGILState_STATE)0;
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(1);
    }
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
#ifdef WITH_THREAD
    if (nogil)
        PyGILState_Release(state);
#endif
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_RFC_RC(RFC_RC value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(RFC_RC)*3+2];
    char *dpos, *end = digits + sizeof(RFC_RC)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    RFC_RC remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const RFC_RC neg_one = (RFC_RC) -1, const_zero = (RFC_RC) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (RFC_RC) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (RFC_RC) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (RFC_RC) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    if (last_one_off) {
        assert(*dpos == '0');
        dpos++;
    }
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* MergeKeywords */
static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping) {
    PyObject *iter, *key = NULL, *value = NULL;
    int source_is_dict, result;
    Py_ssize_t orig_length, ppos = 0;
    iter = __Pyx_dict_iterator(source_mapping, 0, __pyx_n_s_items, &orig_length, &source_is_dict);
    if (unlikely(!iter)) {
        PyObject *args;
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        args = PyTuple_Pack(1, source_mapping);
        if (likely(args)) {
            PyObject *fallback = PyObject_Call((PyObject*)&PyDict_Type, args, NULL);
            Py_DECREF(args);
            if (likely(fallback)) {
                iter = __Pyx_dict_iterator(fallback, 1, __pyx_n_s_items, &orig_length, &source_is_dict);
                Py_DECREF(fallback);
            }
        }
        if (unlikely(!iter)) goto bad;
    }
    while (1) {
        result = __Pyx_dict_iter_next(iter, orig_length, &ppos, &key, &value, NULL, source_is_dict);
        if (unlikely(result < 0)) goto bad;
        if (!result) break;
        if (unlikely(PyDict_Contains(kwdict, key))) {
            __Pyx_RaiseDoubleKeywordsError("function", key);
            result = -1;
        } else {
            result = PyDict_SetItem(kwdict, key, value);
        }
        Py_DECREF(key);
        Py_DECREF(value);
        if (unlikely(result < 0)) goto bad;
    }
    Py_XDECREF(iter);
    return 0;
bad:
    Py_XDECREF(iter);
    return -1;
}

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* None */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* SetItemInt */
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (!j) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
                                               CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
            PyObject* old = PyList_GET_ITEM(o, n);
            Py_INCREF(v);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 1;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_ass_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return -1;
                    PyErr_Clear();
                }
            }
            return m->sq_ass_item(o, i, v);
        }
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
#else
    if (is_list || PySequence_Check(o))
#endif
    {
        return PySequence_SetItem(o, i, v);
    }
#endif
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

/* ReRaiseException */
static CYTHON_INLINE void __Pyx_ReraiseException(void) {
    PyObject *type = NULL, *value = NULL, *tb = NULL;
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = PyThreadState_GET();
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    type = exc_info->exc_type;
    value = exc_info->exc_value;
    tb = exc_info->exc_traceback;
    #else
    type = tstate->exc_type;
    value = tstate->exc_value;
    tb = tstate->exc_traceback;
    #endif
#else
    PyErr_GetExcInfo(&type, &value, &tb);
#endif
    if (!type || type == Py_None) {
#if !CYTHON_FAST_THREAD_STATE
        Py_XDECREF(type);
        Py_XDECREF(value);
        Py_XDECREF(tb);
#endif
        PyErr_SetString(PyExc_RuntimeError,
            "No active exception to reraise");
    } else {
#if CYTHON_FAST_THREAD_STATE
        Py_INCREF(type);
        Py_XINCREF(value);
        Py_XINCREF(tb);
#endif
        PyErr_Restore(type, value, tb);
    }
}

/* PyObjectFormat */
#if CYTHON_USE_UNICODE_WRITER
static PyObject* __Pyx_PyObject_Format(PyObject* obj, PyObject* format_spec) {
    int ret;
    _PyUnicodeWriter writer;
    if (likely(PyFloat_CheckExact(obj))) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000
        _PyUnicodeWriter_Init(&writer, 0);
#else
        _PyUnicodeWriter_Init(&writer);
#endif
        ret = _PyFloat_FormatAdvancedWriter(
            &writer,
            obj,
            format_spec, 0, PyUnicode_GET_LENGTH(format_spec));
    } else if (likely(PyLong_CheckExact(obj))) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000
        _PyUnicodeWriter_Init(&writer, 0);
#else
        _PyUnicodeWriter_Init(&writer);
#endif
        ret = _PyLong_FormatAdvancedWriter(
            &writer,
            obj,
            format_spec, 0, PyUnicode_GET_LENGTH(format_spec));
    } else {
        return PyObject_Format(obj, format_spec);
    }
    if (unlikely(ret == -1)) {
        _PyUnicodeWriter_Dealloc(&writer);
        return NULL;
    }
    return _PyUnicodeWriter_Finish(&writer);
}
#endif

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_RFCTYPE(RFCTYPE value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(RFCTYPE)*3+2];
    char *dpos, *end = digits + sizeof(RFCTYPE)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    RFCTYPE remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const RFCTYPE neg_one = (RFCTYPE) -1, const_zero = (RFCTYPE) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (RFCTYPE) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (RFCTYPE) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (RFCTYPE) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    if (last_one_off) {
        assert(*dpos == '0');
        dpos++;
    }
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* PyObjectFormatAndDecref */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
    if (unlikely(!s)) return NULL;
    if (likely(PyUnicode_CheckExact(s))) return s;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyString_CheckExact(s))) {
        PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict");
        Py_DECREF(s);
        return result;
    }
    #endif
    return __Pyx_PyObject_FormatAndDecref(s, f);
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
    PyObject *result = PyObject_Format(s, f);
    Py_DECREF(s);
    return result;
}

/* UnpackUnboundCMethod */
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    }
#endif
    return 0;
}

/* CallUnboundCMethod1 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
    if (likely(cfunc->func)) {
        int flag = cfunc->flag;
        if (flag == METH_O) {
            return (*(cfunc->func))(self, arg);
        } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) {
            #if PY_VERSION_HEX >= 0x030700A0
                return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
            #else
                return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
            #endif
        } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
        }
    }
    return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 0, arg);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 1, arg);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(2, self, arg);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* CallUnboundCMethod2 */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    if (likely(cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            #if PY_VERSION_HEX >= 0x030700A0
            return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2);
            #else
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
            #endif
        }
        #if PY_VERSION_HEX >= 0x030700A0
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
        #endif
    }
    return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(3);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 1, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 2, arg2);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(3, self, arg1, arg2);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* dict_getitem_default */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
    PyObject* value;
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (unlikely(PyErr_Occurred()))
            return NULL;
        value = default_value;
    }
    Py_INCREF(value);
    if ((1));
#else
    if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
        value = PyDict_GetItem(d, key);
        if (unlikely(!value)) {
            value = default_value;
        }
        Py_INCREF(value);
    }
#endif
    else {
        if (default_value == Py_None)
            value = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_get, d, key);
        else
            value = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_get, d, key, default_value);
    }
    return value;
}

/* PyIntCompare */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
    if (op1 == op2) {
        Py_RETURN_TRUE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = Py_SIZE(op1);
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        if (intval == 0) {
            if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (size >= 0)
                Py_RETURN_FALSE;
            intval = -intval;
            size = -size;
        } else {
            if (size <= 0)
                Py_RETURN_FALSE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
        if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* decode_c_string */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, 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)) {
    Py_ssize_t length;
    if (unlikely((start < 0) | (stop < 0))) {
        size_t slen = strlen(cstring);
        if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
            PyErr_SetString(PyExc_OverflowError,
                            "c-string too long to convert to Python");
            return NULL;
        }
        length = (Py_ssize_t) slen;
        if (start < 0) {
            start += length;
            if (start < 0)
                start = 0;
        }
        if (stop < 0)
            stop += length;
    }
    if (unlikely(stop <= start))
        return __Pyx_NewRef(__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);
    }
}

/* FetchCommonType */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CythonFunctionShared */
#include <structmember.h>
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    Py_INCREF(m->func_qualname);
    return m->func_qualname;
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    if (unlikely(op == NULL))
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults_size = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
#if PY_MAJOR_VERSION < 3
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
#endif
    return __Pyx_PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
#if PY_MAJOR_VERSION > 2
            PyErr_Format(PyExc_TypeError,
                         "unbound method %.200S() needs an argument",
                         cyfunc->func_qualname);
#else
            PyErr_SetString(PyExc_TypeError,
                            "unbound method needs an argument");
#endif
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
#if PY_VERSION_HEX >= 0x030C0000
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0,
#endif
};
static int __pyx_CyFunction_init(void) {
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    m->defaults_size = size;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, attr_name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(attr_name));
#endif
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* PyObject_GenericGetAttr */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError */
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
}

/* SetupReduce */
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_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_n_s_getstate);
#else
    getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
    if (!getstate && PyErr_Occurred()) {
        goto __PYX_BAD;
    }
#endif
    if (getstate) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
#else
        object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_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_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
            if (likely(reduce_cython)) {
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
    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;
}

/* SetVTable */
static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* Py3ClassCreate */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

/* GetNameInClass */
static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) {
    PyObject *result;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    __Pyx_GetModuleGlobalNameUncached(result, name);
    return result;
}
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
    PyObject *result;
    result = __Pyx_PyObject_GetAttrStr(nmspace, name);
    if (!result) {
        result = __Pyx_GetGlobalNameAfterAttributeLookup(name);
    }
    return result;
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
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 PY_MAJOR_VERSION < 3
    PyObject *py_srcfile = NULL;
    py_srcfile = PyString_FromString(filename);
    if (!py_srcfile) goto bad;
    #endif
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        #else
        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;
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        if (!py_funcname) goto bad;
        #endif
    }
    #if PY_MAJOR_VERSION < 3
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    #else
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    #endif
    Py_XDECREF(py_funcname);  // XDECREF since it's only set on Py3 if cline
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_srcfile);
    #endif
    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_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);
}

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_DIRECTION(RFC_DIRECTION value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const RFC_DIRECTION neg_one = (RFC_DIRECTION) -1, const_zero = (RFC_DIRECTION) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(RFC_DIRECTION) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(RFC_DIRECTION) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RFC_DIRECTION) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(RFC_DIRECTION) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RFC_DIRECTION) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(RFC_DIRECTION),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFCTYPE(RFCTYPE value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const RFCTYPE neg_one = (RFCTYPE) -1, const_zero = (RFCTYPE) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(RFCTYPE) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(RFCTYPE) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RFCTYPE) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(RFCTYPE) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RFCTYPE) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(RFCTYPE),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_UNIT_STATE(RFC_UNIT_STATE value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const RFC_UNIT_STATE neg_one = (RFC_UNIT_STATE) -1, const_zero = (RFC_UNIT_STATE) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(RFC_UNIT_STATE) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(RFC_UNIT_STATE) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RFC_UNIT_STATE) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(RFC_UNIT_STATE) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RFC_UNIT_STATE) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(RFC_UNIT_STATE),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_RC(RFC_RC value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const RFC_RC neg_one = (RFC_RC) -1, const_zero = (RFC_RC) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(RFC_RC) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(RFC_RC) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RFC_RC) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(RFC_RC) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RFC_RC) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(RFC_RC),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_CALL_TYPE(RFC_CALL_TYPE value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const RFC_CALL_TYPE neg_one = (RFC_CALL_TYPE) -1, const_zero = (RFC_CALL_TYPE) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(RFC_CALL_TYPE) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(RFC_CALL_TYPE) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RFC_CALL_TYPE) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(RFC_CALL_TYPE) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RFC_CALL_TYPE) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(RFC_CALL_TYPE),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_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 PyInt_FromLong((long) value);
        } else if (sizeof(unsigned int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(unsigned int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(unsigned int),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE size_t __Pyx_PyInt_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 PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(size_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (size_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (size_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) {
                            return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) {
                            return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) {
                            return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && 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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (size_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(size_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                            return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                            return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
                            return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(size_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            size_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (size_t) -1;
        }
    } else {
        size_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (size_t) -1;
        val = __Pyx_PyInt_As_size_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to size_t");
    return (size_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to size_t");
    return (size_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE unsigned int __Pyx_PyInt_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 PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(unsigned int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(unsigned int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (unsigned int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (unsigned int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(unsigned int, digit, digits[0])
                case 2:
                    if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) >= 2 * PyLong_SHIFT) {
                            return (unsigned int) (((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) >= 3 * PyLong_SHIFT) {
                            return (unsigned int) (((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) >= 4 * PyLong_SHIFT) {
                            return (unsigned int) (((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && 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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (unsigned int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(unsigned int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(unsigned int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(unsigned int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned int) (((unsigned int)-1)*(((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned int) ((((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned int) (((unsigned int)-1)*(((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned int) ((((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned int) (((unsigned int)-1)*(((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned int) ((((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(unsigned int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            unsigned int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (unsigned int) -1;
        }
    } else {
        unsigned int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (unsigned int) -1;
        val = __Pyx_PyInt_As_unsigned_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to unsigned int");
    return (unsigned int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to unsigned int");
    return (unsigned int) -1;
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_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 PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && 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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_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 PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE short __Pyx_PyInt_As_short(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const short neg_one = (short) -1, const_zero = (short) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(short) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(short, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (short) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (short) 0;
                case  1: __PYX_VERIFY_RETURN_INT(short, digit, digits[0])
                case 2:
                    if (8 * sizeof(short) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(short) >= 2 * PyLong_SHIFT) {
                            return (short) (((((short)digits[1]) << PyLong_SHIFT) | (short)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(short) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(short) >= 3 * PyLong_SHIFT) {
                            return (short) (((((((short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(short) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(short, 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(short) >= 4 * PyLong_SHIFT) {
                            return (short) (((((((((short)digits[3]) << PyLong_SHIFT) | (short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)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 (short) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(short) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(short, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(short) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(short, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (short) 0;
                case -1: __PYX_VERIFY_RETURN_INT(short, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(short,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(short) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(short, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(short) - 1 > 2 * PyLong_SHIFT) {
                            return (short) (((short)-1)*(((((short)digits[1]) << PyLong_SHIFT) | (short)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(short) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(short) - 1 > 2 * PyLong_SHIFT) {
                            return (short) ((((((short)digits[1]) << PyLong_SHIFT) | (short)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(short) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(short, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(short) - 1 > 3 * PyLong_SHIFT) {
                            return (short) (((short)-1)*(((((((short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(short) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(short) - 1 > 3 * PyLong_SHIFT) {
                            return (short) ((((((((short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(short) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(short, 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(short) - 1 > 4 * PyLong_SHIFT) {
                            return (short) (((short)-1)*(((((((((short)digits[3]) << PyLong_SHIFT) | (short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(short) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(short, 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(short) - 1 > 4 * PyLong_SHIFT) {
                            return (short) ((((((((((short)digits[3]) << PyLong_SHIFT) | (short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(short) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(short, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(short) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(short, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            short val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (short) -1;
        }
    } else {
        short val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (short) -1;
        val = __Pyx_PyInt_As_short(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to short");
    return (short) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to short");
    return (short) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_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 PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE RFC_RC __Pyx_PyInt_As_RFC_RC(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const RFC_RC neg_one = (RFC_RC) -1, const_zero = (RFC_RC) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(RFC_RC) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(RFC_RC, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (RFC_RC) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (RFC_RC) 0;
                case  1: __PYX_VERIFY_RETURN_INT(RFC_RC, digit, digits[0])
                case 2:
                    if (8 * sizeof(RFC_RC) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_RC, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_RC) >= 2 * PyLong_SHIFT) {
                            return (RFC_RC) (((((RFC_RC)digits[1]) << PyLong_SHIFT) | (RFC_RC)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(RFC_RC) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_RC, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_RC) >= 3 * PyLong_SHIFT) {
                            return (RFC_RC) (((((((RFC_RC)digits[2]) << PyLong_SHIFT) | (RFC_RC)digits[1]) << PyLong_SHIFT) | (RFC_RC)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(RFC_RC) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_RC, 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(RFC_RC) >= 4 * PyLong_SHIFT) {
                            return (RFC_RC) (((((((((RFC_RC)digits[3]) << PyLong_SHIFT) | (RFC_RC)digits[2]) << PyLong_SHIFT) | (RFC_RC)digits[1]) << PyLong_SHIFT) | (RFC_RC)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 (RFC_RC) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(RFC_RC) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFC_RC, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(RFC_RC) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFC_RC, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (RFC_RC) 0;
                case -1: __PYX_VERIFY_RETURN_INT(RFC_RC, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(RFC_RC,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(RFC_RC) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_RC, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_RC) - 1 > 2 * PyLong_SHIFT) {
                            return (RFC_RC) (((RFC_RC)-1)*(((((RFC_RC)digits[1]) << PyLong_SHIFT) | (RFC_RC)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(RFC_RC) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_RC, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_RC) - 1 > 2 * PyLong_SHIFT) {
                            return (RFC_RC) ((((((RFC_RC)digits[1]) << PyLong_SHIFT) | (RFC_RC)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(RFC_RC) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_RC, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_RC) - 1 > 3 * PyLong_SHIFT) {
                            return (RFC_RC) (((RFC_RC)-1)*(((((((RFC_RC)digits[2]) << PyLong_SHIFT) | (RFC_RC)digits[1]) << PyLong_SHIFT) | (RFC_RC)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(RFC_RC) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_RC, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_RC) - 1 > 3 * PyLong_SHIFT) {
                            return (RFC_RC) ((((((((RFC_RC)digits[2]) << PyLong_SHIFT) | (RFC_RC)digits[1]) << PyLong_SHIFT) | (RFC_RC)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(RFC_RC) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_RC, 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(RFC_RC) - 1 > 4 * PyLong_SHIFT) {
                            return (RFC_RC) (((RFC_RC)-1)*(((((((((RFC_RC)digits[3]) << PyLong_SHIFT) | (RFC_RC)digits[2]) << PyLong_SHIFT) | (RFC_RC)digits[1]) << PyLong_SHIFT) | (RFC_RC)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(RFC_RC) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_RC, 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(RFC_RC) - 1 > 4 * PyLong_SHIFT) {
                            return (RFC_RC) ((((((((((RFC_RC)digits[3]) << PyLong_SHIFT) | (RFC_RC)digits[2]) << PyLong_SHIFT) | (RFC_RC)digits[1]) << PyLong_SHIFT) | (RFC_RC)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(RFC_RC) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFC_RC, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(RFC_RC) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFC_RC, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            RFC_RC val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (RFC_RC) -1;
        }
    } else {
        RFC_RC val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (RFC_RC) -1;
        val = __Pyx_PyInt_As_RFC_RC(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to RFC_RC");
    return (RFC_RC) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to RFC_RC");
    return (RFC_RC) -1;
}

/* CIntFromPy */
static CYTHON_INLINE RFCTYPE __Pyx_PyInt_As_RFCTYPE(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const RFCTYPE neg_one = (RFCTYPE) -1, const_zero = (RFCTYPE) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(RFCTYPE) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(RFCTYPE, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (RFCTYPE) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (RFCTYPE) 0;
                case  1: __PYX_VERIFY_RETURN_INT(RFCTYPE, digit, digits[0])
                case 2:
                    if (8 * sizeof(RFCTYPE) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFCTYPE, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFCTYPE) >= 2 * PyLong_SHIFT) {
                            return (RFCTYPE) (((((RFCTYPE)digits[1]) << PyLong_SHIFT) | (RFCTYPE)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(RFCTYPE) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFCTYPE, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFCTYPE) >= 3 * PyLong_SHIFT) {
                            return (RFCTYPE) (((((((RFCTYPE)digits[2]) << PyLong_SHIFT) | (RFCTYPE)digits[1]) << PyLong_SHIFT) | (RFCTYPE)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(RFCTYPE) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFCTYPE, 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(RFCTYPE) >= 4 * PyLong_SHIFT) {
                            return (RFCTYPE) (((((((((RFCTYPE)digits[3]) << PyLong_SHIFT) | (RFCTYPE)digits[2]) << PyLong_SHIFT) | (RFCTYPE)digits[1]) << PyLong_SHIFT) | (RFCTYPE)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 (RFCTYPE) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(RFCTYPE) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFCTYPE, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(RFCTYPE) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFCTYPE, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (RFCTYPE) 0;
                case -1: __PYX_VERIFY_RETURN_INT(RFCTYPE, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(RFCTYPE,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(RFCTYPE) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFCTYPE, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFCTYPE) - 1 > 2 * PyLong_SHIFT) {
                            return (RFCTYPE) (((RFCTYPE)-1)*(((((RFCTYPE)digits[1]) << PyLong_SHIFT) | (RFCTYPE)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(RFCTYPE) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFCTYPE, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFCTYPE) - 1 > 2 * PyLong_SHIFT) {
                            return (RFCTYPE) ((((((RFCTYPE)digits[1]) << PyLong_SHIFT) | (RFCTYPE)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(RFCTYPE) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFCTYPE, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFCTYPE) - 1 > 3 * PyLong_SHIFT) {
                            return (RFCTYPE) (((RFCTYPE)-1)*(((((((RFCTYPE)digits[2]) << PyLong_SHIFT) | (RFCTYPE)digits[1]) << PyLong_SHIFT) | (RFCTYPE)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(RFCTYPE) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFCTYPE, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFCTYPE) - 1 > 3 * PyLong_SHIFT) {
                            return (RFCTYPE) ((((((((RFCTYPE)digits[2]) << PyLong_SHIFT) | (RFCTYPE)digits[1]) << PyLong_SHIFT) | (RFCTYPE)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(RFCTYPE) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFCTYPE, 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(RFCTYPE) - 1 > 4 * PyLong_SHIFT) {
                            return (RFCTYPE) (((RFCTYPE)-1)*(((((((((RFCTYPE)digits[3]) << PyLong_SHIFT) | (RFCTYPE)digits[2]) << PyLong_SHIFT) | (RFCTYPE)digits[1]) << PyLong_SHIFT) | (RFCTYPE)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(RFCTYPE) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFCTYPE, 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(RFCTYPE) - 1 > 4 * PyLong_SHIFT) {
                            return (RFCTYPE) ((((((((((RFCTYPE)digits[3]) << PyLong_SHIFT) | (RFCTYPE)digits[2]) << PyLong_SHIFT) | (RFCTYPE)digits[1]) << PyLong_SHIFT) | (RFCTYPE)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(RFCTYPE) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFCTYPE, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(RFCTYPE) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFCTYPE, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            RFCTYPE val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (RFCTYPE) -1;
        }
    } else {
        RFCTYPE val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (RFCTYPE) -1;
        val = __Pyx_PyInt_As_RFCTYPE(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to RFCTYPE");
    return (RFCTYPE) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to RFCTYPE");
    return (RFCTYPE) -1;
}

/* CIntFromPy */
static CYTHON_INLINE RFC_DIRECTION __Pyx_PyInt_As_RFC_DIRECTION(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const RFC_DIRECTION neg_one = (RFC_DIRECTION) -1, const_zero = (RFC_DIRECTION) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(RFC_DIRECTION) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(RFC_DIRECTION, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (RFC_DIRECTION) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (RFC_DIRECTION) 0;
                case  1: __PYX_VERIFY_RETURN_INT(RFC_DIRECTION, digit, digits[0])
                case 2:
                    if (8 * sizeof(RFC_DIRECTION) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_DIRECTION, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_DIRECTION) >= 2 * PyLong_SHIFT) {
                            return (RFC_DIRECTION) (((((RFC_DIRECTION)digits[1]) << PyLong_SHIFT) | (RFC_DIRECTION)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(RFC_DIRECTION) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_DIRECTION, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_DIRECTION) >= 3 * PyLong_SHIFT) {
                            return (RFC_DIRECTION) (((((((RFC_DIRECTION)digits[2]) << PyLong_SHIFT) | (RFC_DIRECTION)digits[1]) << PyLong_SHIFT) | (RFC_DIRECTION)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(RFC_DIRECTION) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_DIRECTION, 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(RFC_DIRECTION) >= 4 * PyLong_SHIFT) {
                            return (RFC_DIRECTION) (((((((((RFC_DIRECTION)digits[3]) << PyLong_SHIFT) | (RFC_DIRECTION)digits[2]) << PyLong_SHIFT) | (RFC_DIRECTION)digits[1]) << PyLong_SHIFT) | (RFC_DIRECTION)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 (RFC_DIRECTION) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(RFC_DIRECTION) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFC_DIRECTION, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(RFC_DIRECTION) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFC_DIRECTION, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (RFC_DIRECTION) 0;
                case -1: __PYX_VERIFY_RETURN_INT(RFC_DIRECTION, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(RFC_DIRECTION,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(RFC_DIRECTION) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_DIRECTION, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_DIRECTION) - 1 > 2 * PyLong_SHIFT) {
                            return (RFC_DIRECTION) (((RFC_DIRECTION)-1)*(((((RFC_DIRECTION)digits[1]) << PyLong_SHIFT) | (RFC_DIRECTION)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(RFC_DIRECTION) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_DIRECTION, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_DIRECTION) - 1 > 2 * PyLong_SHIFT) {
                            return (RFC_DIRECTION) ((((((RFC_DIRECTION)digits[1]) << PyLong_SHIFT) | (RFC_DIRECTION)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(RFC_DIRECTION) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_DIRECTION, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_DIRECTION) - 1 > 3 * PyLong_SHIFT) {
                            return (RFC_DIRECTION) (((RFC_DIRECTION)-1)*(((((((RFC_DIRECTION)digits[2]) << PyLong_SHIFT) | (RFC_DIRECTION)digits[1]) << PyLong_SHIFT) | (RFC_DIRECTION)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(RFC_DIRECTION) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_DIRECTION, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_DIRECTION) - 1 > 3 * PyLong_SHIFT) {
                            return (RFC_DIRECTION) ((((((((RFC_DIRECTION)digits[2]) << PyLong_SHIFT) | (RFC_DIRECTION)digits[1]) << PyLong_SHIFT) | (RFC_DIRECTION)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(RFC_DIRECTION) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_DIRECTION, 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(RFC_DIRECTION) - 1 > 4 * PyLong_SHIFT) {
                            return (RFC_DIRECTION) (((RFC_DIRECTION)-1)*(((((((((RFC_DIRECTION)digits[3]) << PyLong_SHIFT) | (RFC_DIRECTION)digits[2]) << PyLong_SHIFT) | (RFC_DIRECTION)digits[1]) << PyLong_SHIFT) | (RFC_DIRECTION)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(RFC_DIRECTION) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_DIRECTION, 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(RFC_DIRECTION) - 1 > 4 * PyLong_SHIFT) {
                            return (RFC_DIRECTION) ((((((((((RFC_DIRECTION)digits[3]) << PyLong_SHIFT) | (RFC_DIRECTION)digits[2]) << PyLong_SHIFT) | (RFC_DIRECTION)digits[1]) << PyLong_SHIFT) | (RFC_DIRECTION)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(RFC_DIRECTION) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFC_DIRECTION, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(RFC_DIRECTION) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFC_DIRECTION, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            RFC_DIRECTION val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (RFC_DIRECTION) -1;
        }
    } else {
        RFC_DIRECTION val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (RFC_DIRECTION) -1;
        val = __Pyx_PyInt_As_RFC_DIRECTION(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to RFC_DIRECTION");
    return (RFC_DIRECTION) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to RFC_DIRECTION");
    return (RFC_DIRECTION) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SAP_ULLONG(SAP_ULLONG value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const SAP_ULLONG neg_one = (SAP_ULLONG) -1, const_zero = (SAP_ULLONG) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(SAP_ULLONG) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(SAP_ULLONG) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(SAP_ULLONG) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(SAP_ULLONG) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(SAP_ULLONG) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(SAP_ULLONG),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE RFC_INT __Pyx_PyInt_As_RFC_INT(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const RFC_INT neg_one = (RFC_INT) -1, const_zero = (RFC_INT) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(RFC_INT) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(RFC_INT, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (RFC_INT) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (RFC_INT) 0;
                case  1: __PYX_VERIFY_RETURN_INT(RFC_INT, digit, digits[0])
                case 2:
                    if (8 * sizeof(RFC_INT) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_INT, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_INT) >= 2 * PyLong_SHIFT) {
                            return (RFC_INT) (((((RFC_INT)digits[1]) << PyLong_SHIFT) | (RFC_INT)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(RFC_INT) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_INT, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_INT) >= 3 * PyLong_SHIFT) {
                            return (RFC_INT) (((((((RFC_INT)digits[2]) << PyLong_SHIFT) | (RFC_INT)digits[1]) << PyLong_SHIFT) | (RFC_INT)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(RFC_INT) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_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(RFC_INT) >= 4 * PyLong_SHIFT) {
                            return (RFC_INT) (((((((((RFC_INT)digits[3]) << PyLong_SHIFT) | (RFC_INT)digits[2]) << PyLong_SHIFT) | (RFC_INT)digits[1]) << PyLong_SHIFT) | (RFC_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 (RFC_INT) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(RFC_INT) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFC_INT, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(RFC_INT) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFC_INT, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (RFC_INT) 0;
                case -1: __PYX_VERIFY_RETURN_INT(RFC_INT, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(RFC_INT,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(RFC_INT) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_INT, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_INT) - 1 > 2 * PyLong_SHIFT) {
                            return (RFC_INT) (((RFC_INT)-1)*(((((RFC_INT)digits[1]) << PyLong_SHIFT) | (RFC_INT)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(RFC_INT) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_INT, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_INT) - 1 > 2 * PyLong_SHIFT) {
                            return (RFC_INT) ((((((RFC_INT)digits[1]) << PyLong_SHIFT) | (RFC_INT)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(RFC_INT) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_INT, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_INT) - 1 > 3 * PyLong_SHIFT) {
                            return (RFC_INT) (((RFC_INT)-1)*(((((((RFC_INT)digits[2]) << PyLong_SHIFT) | (RFC_INT)digits[1]) << PyLong_SHIFT) | (RFC_INT)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(RFC_INT) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_INT, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_INT) - 1 > 3 * PyLong_SHIFT) {
                            return (RFC_INT) ((((((((RFC_INT)digits[2]) << PyLong_SHIFT) | (RFC_INT)digits[1]) << PyLong_SHIFT) | (RFC_INT)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(RFC_INT) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_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(RFC_INT) - 1 > 4 * PyLong_SHIFT) {
                            return (RFC_INT) (((RFC_INT)-1)*(((((((((RFC_INT)digits[3]) << PyLong_SHIFT) | (RFC_INT)digits[2]) << PyLong_SHIFT) | (RFC_INT)digits[1]) << PyLong_SHIFT) | (RFC_INT)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(RFC_INT) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_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(RFC_INT) - 1 > 4 * PyLong_SHIFT) {
                            return (RFC_INT) ((((((((((RFC_INT)digits[3]) << PyLong_SHIFT) | (RFC_INT)digits[2]) << PyLong_SHIFT) | (RFC_INT)digits[1]) << PyLong_SHIFT) | (RFC_INT)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(RFC_INT) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFC_INT, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(RFC_INT) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFC_INT, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            RFC_INT val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (RFC_INT) -1;
        }
    } else {
        RFC_INT val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (RFC_INT) -1;
        val = __Pyx_PyInt_As_RFC_INT(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to RFC_INT");
    return (RFC_INT) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to RFC_INT");
    return (RFC_INT) -1;
}

/* CIntFromPy */
static CYTHON_INLINE RFC_INT8 __Pyx_PyInt_As_RFC_INT8(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const RFC_INT8 neg_one = (RFC_INT8) -1, const_zero = (RFC_INT8) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(RFC_INT8) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(RFC_INT8, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (RFC_INT8) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (RFC_INT8) 0;
                case  1: __PYX_VERIFY_RETURN_INT(RFC_INT8, digit, digits[0])
                case 2:
                    if (8 * sizeof(RFC_INT8) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_INT8, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_INT8) >= 2 * PyLong_SHIFT) {
                            return (RFC_INT8) (((((RFC_INT8)digits[1]) << PyLong_SHIFT) | (RFC_INT8)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(RFC_INT8) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_INT8, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_INT8) >= 3 * PyLong_SHIFT) {
                            return (RFC_INT8) (((((((RFC_INT8)digits[2]) << PyLong_SHIFT) | (RFC_INT8)digits[1]) << PyLong_SHIFT) | (RFC_INT8)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(RFC_INT8) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_INT8, 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(RFC_INT8) >= 4 * PyLong_SHIFT) {
                            return (RFC_INT8) (((((((((RFC_INT8)digits[3]) << PyLong_SHIFT) | (RFC_INT8)digits[2]) << PyLong_SHIFT) | (RFC_INT8)digits[1]) << PyLong_SHIFT) | (RFC_INT8)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 (RFC_INT8) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(RFC_INT8) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFC_INT8, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(RFC_INT8) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFC_INT8, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (RFC_INT8) 0;
                case -1: __PYX_VERIFY_RETURN_INT(RFC_INT8, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(RFC_INT8,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(RFC_INT8) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_INT8, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_INT8) - 1 > 2 * PyLong_SHIFT) {
                            return (RFC_INT8) (((RFC_INT8)-1)*(((((RFC_INT8)digits[1]) << PyLong_SHIFT) | (RFC_INT8)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(RFC_INT8) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_INT8, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_INT8) - 1 > 2 * PyLong_SHIFT) {
                            return (RFC_INT8) ((((((RFC_INT8)digits[1]) << PyLong_SHIFT) | (RFC_INT8)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(RFC_INT8) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_INT8, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_INT8) - 1 > 3 * PyLong_SHIFT) {
                            return (RFC_INT8) (((RFC_INT8)-1)*(((((((RFC_INT8)digits[2]) << PyLong_SHIFT) | (RFC_INT8)digits[1]) << PyLong_SHIFT) | (RFC_INT8)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(RFC_INT8) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_INT8, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_INT8) - 1 > 3 * PyLong_SHIFT) {
                            return (RFC_INT8) ((((((((RFC_INT8)digits[2]) << PyLong_SHIFT) | (RFC_INT8)digits[1]) << PyLong_SHIFT) | (RFC_INT8)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(RFC_INT8) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_INT8, 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(RFC_INT8) - 1 > 4 * PyLong_SHIFT) {
                            return (RFC_INT8) (((RFC_INT8)-1)*(((((((((RFC_INT8)digits[3]) << PyLong_SHIFT) | (RFC_INT8)digits[2]) << PyLong_SHIFT) | (RFC_INT8)digits[1]) << PyLong_SHIFT) | (RFC_INT8)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(RFC_INT8) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_INT8, 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(RFC_INT8) - 1 > 4 * PyLong_SHIFT) {
                            return (RFC_INT8) ((((((((((RFC_INT8)digits[3]) << PyLong_SHIFT) | (RFC_INT8)digits[2]) << PyLong_SHIFT) | (RFC_INT8)digits[1]) << PyLong_SHIFT) | (RFC_INT8)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(RFC_INT8) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFC_INT8, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(RFC_INT8) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFC_INT8, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            RFC_INT8 val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (RFC_INT8) -1;
        }
    } else {
        RFC_INT8 val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (RFC_INT8) -1;
        val = __Pyx_PyInt_As_RFC_INT8(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to RFC_INT8");
    return (RFC_INT8) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to RFC_INT8");
    return (RFC_INT8) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_ERROR_GROUP(RFC_ERROR_GROUP value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const RFC_ERROR_GROUP neg_one = (RFC_ERROR_GROUP) -1, const_zero = (RFC_ERROR_GROUP) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(RFC_ERROR_GROUP) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(RFC_ERROR_GROUP) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RFC_ERROR_GROUP) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(RFC_ERROR_GROUP) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RFC_ERROR_GROUP) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(RFC_ERROR_GROUP),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE RFC_ERROR_GROUP __Pyx_PyInt_As_RFC_ERROR_GROUP(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const RFC_ERROR_GROUP neg_one = (RFC_ERROR_GROUP) -1, const_zero = (RFC_ERROR_GROUP) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(RFC_ERROR_GROUP) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(RFC_ERROR_GROUP, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (RFC_ERROR_GROUP) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (RFC_ERROR_GROUP) 0;
                case  1: __PYX_VERIFY_RETURN_INT(RFC_ERROR_GROUP, digit, digits[0])
                case 2:
                    if (8 * sizeof(RFC_ERROR_GROUP) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_ERROR_GROUP, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_ERROR_GROUP) >= 2 * PyLong_SHIFT) {
                            return (RFC_ERROR_GROUP) (((((RFC_ERROR_GROUP)digits[1]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(RFC_ERROR_GROUP) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_ERROR_GROUP, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_ERROR_GROUP) >= 3 * PyLong_SHIFT) {
                            return (RFC_ERROR_GROUP) (((((((RFC_ERROR_GROUP)digits[2]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)digits[1]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(RFC_ERROR_GROUP) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_ERROR_GROUP, 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(RFC_ERROR_GROUP) >= 4 * PyLong_SHIFT) {
                            return (RFC_ERROR_GROUP) (((((((((RFC_ERROR_GROUP)digits[3]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)digits[2]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)digits[1]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)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 (RFC_ERROR_GROUP) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(RFC_ERROR_GROUP) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFC_ERROR_GROUP, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(RFC_ERROR_GROUP) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFC_ERROR_GROUP, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (RFC_ERROR_GROUP) 0;
                case -1: __PYX_VERIFY_RETURN_INT(RFC_ERROR_GROUP, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(RFC_ERROR_GROUP,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(RFC_ERROR_GROUP) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_ERROR_GROUP, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_ERROR_GROUP) - 1 > 2 * PyLong_SHIFT) {
                            return (RFC_ERROR_GROUP) (((RFC_ERROR_GROUP)-1)*(((((RFC_ERROR_GROUP)digits[1]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(RFC_ERROR_GROUP) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_ERROR_GROUP, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_ERROR_GROUP) - 1 > 2 * PyLong_SHIFT) {
                            return (RFC_ERROR_GROUP) ((((((RFC_ERROR_GROUP)digits[1]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(RFC_ERROR_GROUP) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_ERROR_GROUP, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_ERROR_GROUP) - 1 > 3 * PyLong_SHIFT) {
                            return (RFC_ERROR_GROUP) (((RFC_ERROR_GROUP)-1)*(((((((RFC_ERROR_GROUP)digits[2]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)digits[1]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(RFC_ERROR_GROUP) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_ERROR_GROUP, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(RFC_ERROR_GROUP) - 1 > 3 * PyLong_SHIFT) {
                            return (RFC_ERROR_GROUP) ((((((((RFC_ERROR_GROUP)digits[2]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)digits[1]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(RFC_ERROR_GROUP) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_ERROR_GROUP, 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(RFC_ERROR_GROUP) - 1 > 4 * PyLong_SHIFT) {
                            return (RFC_ERROR_GROUP) (((RFC_ERROR_GROUP)-1)*(((((((((RFC_ERROR_GROUP)digits[3]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)digits[2]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)digits[1]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(RFC_ERROR_GROUP) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(RFC_ERROR_GROUP, 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(RFC_ERROR_GROUP) - 1 > 4 * PyLong_SHIFT) {
                            return (RFC_ERROR_GROUP) ((((((((((RFC_ERROR_GROUP)digits[3]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)digits[2]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)digits[1]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(RFC_ERROR_GROUP) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFC_ERROR_GROUP, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(RFC_ERROR_GROUP) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(RFC_ERROR_GROUP, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            RFC_ERROR_GROUP val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (RFC_ERROR_GROUP) -1;
        }
    } else {
        RFC_ERROR_GROUP val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (RFC_ERROR_GROUP) -1;
        val = __Pyx_PyInt_As_RFC_ERROR_GROUP(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to RFC_ERROR_GROUP");
    return (RFC_ERROR_GROUP) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to RFC_ERROR_GROUP");
    return (RFC_ERROR_GROUP) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SAP_RAW(SAP_RAW value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const SAP_RAW neg_one = (SAP_RAW) -1, const_zero = (SAP_RAW) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(SAP_RAW) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(SAP_RAW) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(SAP_RAW) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(SAP_RAW) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(SAP_RAW) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(SAP_RAW),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_INT(RFC_INT value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const RFC_INT neg_one = (RFC_INT) -1, const_zero = (RFC_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(RFC_INT) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(RFC_INT) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RFC_INT) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(RFC_INT) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RFC_INT) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(RFC_INT),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_INT2(RFC_INT2 value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const RFC_INT2 neg_one = (RFC_INT2) -1, const_zero = (RFC_INT2) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(RFC_INT2) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(RFC_INT2) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RFC_INT2) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(RFC_INT2) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RFC_INT2) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(RFC_INT2),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_INT8(RFC_INT8 value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const RFC_INT8 neg_one = (RFC_INT8) -1, const_zero = (RFC_INT8) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(RFC_INT8) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(RFC_INT8) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RFC_INT8) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(RFC_INT8) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RFC_INT8) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(RFC_INT8),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_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 PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && 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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CStringEquals */
static CYTHON_INLINE int __Pyx_StrEq(const char *s1, const char *s2) {
    while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
    return *s1 == *s2;
}

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(void) {
    char ctversion[5];
    int same=1, i, found_dot;
    const char* rt_from_call = Py_GetVersion();
    PyOS_snprintf(ctversion, 5, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    found_dot = 0;
    for (i = 0; i < 4; i++) {
        if (!ctversion[i]) {
            same = (rt_from_call[i] < '0' || rt_from_call[i] > '9');
            break;
        }
        if (rt_from_call[i] != ctversion[i]) {
            same = 0;
            break;
        }
    }
    if (!same) {
        char rtversion[5] = {'\0'};
        char message[200];
        for (i=0; i<4; ++i) {
            if (rt_from_call[i] == '.') {
                if (found_dot) break;
                found_dot = 1;
            } else if (rt_from_call[i] < '0' || rt_from_call[i] > '9') {
                break;
            }
            rtversion[i] = rt_from_call[i];
        }
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* InitStrings */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE 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);
#if PY_MAJOR_VERSION < 3
  } else if (likely(PyInt_CheckExact(o))) {
    return PyInt_AS_LONG(o);
#endif
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyInt_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
